Created Wednesday 12 January 2022
CodeBlocks IDE installation
- Download CodeBlocks IDE: https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-20.03mingw-setup.exe - this installation package includes IDE and GCC compiler.
- Install CodeBlocks with default settings (press Next → Next → etc)
- Alternatively you can check for newer version at https://www.codeblocks.org/downloads/binaries/
- Run CodeBlocks IDE
- For "Compilers auto-detection" and "File associations" dialogs press "OK" button.
Sciter.JS SDK installation
- Download Sciter.JS SDK: https://github.com/c-smile/sciter-js-sdk/archive/refs/heads/main.zip
- Unpack main.zip archive to some directory, for example C:\MY\
- After unpack ensure that directory C:\MY\sciter-js-sdk-main\include\ exists
Creating C++ project with Sciter.JS SDK
- Run CodeBlocks IDE
- Open File → New → Project...
- Select "Console application" and press "Go" button
- Check "Skip this page next time" and press "Next"
- Leave C++ without change and press "Next"
- Use button near "Folder to create project in" and navigate to "C:\MY\" (or other directory you are using), enter project title "test"
- Leave default settings and press "Next"
- Press F9 and check if console application compiles:
- Copy C:\MY\sciter-js-sdk-main\bin\windows\packfolder.exe file to C:\MY\test\ folder
- Copy C:\MY\sciter-js-sdk-main\bin\windows\x64\sciter.dll to C:\MY\test\bin\Debug\ and C:\MY\test\bin\Release\
- Open Project → Build options...
- Double-click on project name "test" to make changes work for both Debug and Release configurations
- Under "Compiler settings" tab check "Static linking [-static]"
- Under "Linker settings" tab add winmm, ws2_32 and libole32 to link libraries and -municode option to linker options
- Under "Search directories" tab add path to C:\MY\sciter-js-sdk-main\include\
- Under "Pre/post" build steps add Pre-build command packfolder.exe resources resources.cpp -v "resources"
- Use "C:\MY\test\resources\index.html" and replace main.cpp with files from this demo project: .\sciter_codeblocks.zip
- Press F9 to build and run this program.