Boilerplate instructions for tooling with specific stack and development on specific targetplatform
Intention is NOT to have this project work for many different platforms yet - just want to get a quick up and running Windows 10 clone, follow steps, and go solution
Windows 10
- Language: Haxe Language
- Framework: Heaps.io Game Engine
- Data store: CastleDB
- Runtime: HashLink VM
Target is to achieve tooling to support: GameDev NW.js SDK Application - HIDE IDE
- Visual Studio Code
- Kode Studio (optional)
- MIN-GW & Git Bash
- Chocolatey
- Git >= v2.19
Follow instructions in order:
git clone --recurse-submodules [email protected]:lumodon/haxeboiler.git
cd haxeboiler/hide
git remote set-url --push origin no_push
cd ../
choco install make
- Install Haxe using appropriate installer from https://haxe.org/download/
- Install libraries:
make init
- Download HashLink
- Extract contents to "Program Files" (or elsewhere if preferred) (copy this path to clipboard [accessible via
WinKey+V
] you'll need it for step 4) WinKey+R
-rundll32.exe sysdm.cpl,EditEnvironmentVariables
->Ctrl+Shift+Enter
(Run as Administrator)- Under "System Variables" (bottom section) Add a new variable:
HASHLINKPATH = ${HASHLINKPATH}
substituting${HASHLINKPATH}
with the path from step 2 above - Edit the
Path
system variable- Click "Add" on right
- Paste
%HASHLINKPATH%
- Download NWjs SDK version
- Create a new folder with:
mkdir ./hide/bin/nwjs/
- Extract the contents of the folder within
nwjs-sdk-v0.54.1-win-x64
(version may be different) to newly created folder from previous step
In Extension marketplace within VSCode search and install the following:
nadako.vshaxe
firefox-devtools.vscode-firefox-debug
Seems there's complications when building targeting Windows without a console (i.e. hide console window for end user)
Solution provided here and is as recent as 2020:
https://gist.github.com/Yanrishatum/d69ed72e368e35b18cbfca726d81279a#gistcomment-3506706
(EDIT:) This solution does not build. Working on moving forwards. In the mean-time - awaiting response from Haxe group seen here in this issue: HeapsIO/heaps#989
As of July 17th, 2021 - Haxe's repo is outdated even though the fixes have already been merged When following steps for target HashLink - the following error appears:
Failed - try fixing the error(s) and restarting the language server:
C:\HaxeToolkit\haxe\lib\heaps/git/hxd/System.hl.hx:289: characters 18-34 : Class<sdl.Sdl> has no field getClipboardText
C:\HaxeToolkit\haxe\lib\heaps/git/hxd/System.hl.hx:293: characters 18-34 : Class<sdl.Sdl> has no field setClipboardText
Assuming the version that haxelib
has automatically downloaded is still less than 1.11.0
, the following steps will resolve this issue:
The following steps under this Repair Haxe SDL (Optional) section is a lengthy and brittle process (many things could change from moment of documenting this to moment of following these steps) but was able to resolve the issue for me.
MinGW or VC (Only tested with MinGW as of yet) SDL Development Libraries - MinGW Visual Studio 2015 Community Edition
- Open bash terminal
- Identify your Haxe installation location (Default appeared to be
C:\HaxeToolkit\haxe
) - Store this folder
hxipath="/c/HaxeToolkit/haxe"
replacing example path with one identified from previous step - Run commands:
cd $hxipath/lib/hlsdl/
mkdir 1,11,0
mkdir staging_area
cd $_
git init
git remote add -f origin [email protected]:HaxeFoundation/hashlink.git
git config core.sparseCheckout true
echo 'libs/sdl' >> .git/info/sparse-checkout
git pull origin master
mv -f ./libs/sdl/{.,}* ../1,11,0/
cd ../
rm -rf staging_area
code ./.current
- Edit the
.current
file you just opened and change version to1.11.0
(note the period instead of folder path of comma) - Install SDL
- Using the HashLink install path from steps above
%HASHLINKPATH%
- Install MinGW SDL into
hashlink/include/sdl/include
andhashlink/include/sdl/lib
- Using the HashLink install path from steps above
NOTE -- because of how Haxelib behaves - if you ever execute haxelib install
or haxelib install hlsdl
or other recursive functions which some auto-installers of Haxe utilize - you'll lose this fix and need to re-repair due to hlsdl 1.11.0
not existing in the haxelib artifactory
TODO: find a way to version lock via haxelib git
to this specific project folder rather than relying on brittle global installs)
as detailed here: https://lib.haxe.org/documentation/using-haxelib/
and here: https://lib.haxe.org/documentation/per-project-setup/
solution (albeit seems outdated) appears to be: https://github.com/lix-pm/lix.client
haxelib git minject [email protected]:massiveinteractive/minject.git v2 # Checkout branch or tag
v2
.
make build
make run
Testing Heaps by compiling to Web target:
Set your compilation target using the Haxe extension addition in ribbon bar at bottom of VSCode
simply press F5 to run vscode's debugger utilizing setup in .vscode/launch.json
make hide-build
make hide-run