[ Prev ] [ Index ] [ Next ]
[ Index ]
Sign in

Sciter.JS in CodeBlocks

Created Wednesday 12 January 2022


CodeBlocks IDE installation

  1. Download CodeBlocks IDE: https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-20.03mingw-setup.exe - this installation package includes IDE and GCC compiler.
  2. Install CodeBlocks with default settings (press Next → Next → etc)
  3. Alternatively you can check for newer version at https://www.codeblocks.org/downloads/binaries/
  4. Run CodeBlocks IDE
  5. For "Compilers auto-detection" and "File associations" dialogs press "OK" button.



Sciter.JS SDK installation

  1. Download Sciter.JS SDK: https://github.com/c-smile/sciter-js-sdk/archive/refs/heads/main.zip
  2. Unpack main.zip archive to some directory, for example C:\MY\
  3. After unpack ensure that directory C:\MY\sciter-js-sdk-main\include\ exists

Creating C++ project with Sciter.JS SDK

  1. Run CodeBlocks IDE
  2. Open File → New → Project...


  1. Select "Console application" and press "Go" button


  1. Check "Skip this page next time" and press "Next"


  1. Leave C++ without change and press "Next"


  1. Use button near "Folder to create project in" and navigate to "C:\MY\" (or other directory you are using), enter project title "test"


  1. Leave default settings and press "Next"


  1. Press F9 and check if console application compiles:


  1. Copy C:\MY\sciter-js-sdk-main\bin\windows\packfolder.exe file to C:\MY\test\ folder
  2. Copy C:\MY\sciter-js-sdk-main\bin\windows\x64\sciter.dll to C:\MY\test\bin\Debug\ and C:\MY\test\bin\Release\
  3. Open Project → Build options...
  4. Double-click on project name "test" to make changes work for both Debug and Release configurations
  5. Under "Compiler settings" tab check "Static linking [-static]"


  1. Under "Linker settings" tab add winmm, ws2_32 and libole32 to link libraries and -municode option to linker options


  1. Under "Search directories" tab add path to C:\MY\sciter-js-sdk-main\include\


  1. Under "Pre/post" build steps add Pre-build command packfolder.exe resources resources.cpp -v "resources"


  1. Use "C:\MY\test\resources\index.html" and replace main.cpp with files from this demo project: .\sciter_codeblocks.zip

  1. Press F9 to build and run this program.



Attachments:
pasted_image.png 25.2kb
pasted_image001.png 14.3kb
pasted_image002.png 14.4kb
pasted_image003.png 40.6kb
pasted_image004.png 24.2kb
pasted_image005.png 21.2kb
pasted_image006.png 25.3kb
pasted_image007.png 31.7kb
pasted_image008.png 5.15kb
pasted_image009.png 41.9kb
pasted_image010.png 18.2kb
pasted_image011.png 17.6kb
pasted_image012.png 14.7kb
pasted_image013.png 10.3kb
sciter_codeblocks.zip 2.08kb
YouTube channel