Enhance documentation somewhat. Start working a bit on Windows builds.
This commit is contained in:
parent
19302c5301
commit
b59600d3e6
49
README.md
49
README.md
|
@ -1,10 +1,51 @@
|
|||
# Hello Heaps!
|
||||
|
||||
This is a little template project which is similar to what we use when bootstrapping a Heaps project.
|
||||
This is a little template project which is similar to what we use when
|
||||
bootstrapping a Heaps project.
|
||||
|
||||
It contains the bulid framework and some useful build utility stuff. It is a little opinionated, but hopefully useful!
|
||||
It contains the bulid framework and some useful build utility
|
||||
stuff. It is a little opinionated, but hopefully useful!
|
||||
|
||||
Soon it will have a lot of the common functionality we use to build our projects.
|
||||
Soon it will have a lot of the common functionality we use to build
|
||||
our projects.
|
||||
|
||||
If you have any questions feel free to contact us on Fedi
|
||||
@aldercone@mastodon.art
|
||||
|
||||
Note: this is very much setup for development on Linux; there's some
|
||||
tools for buliding Windows binaries, see *Windows* section below.
|
||||
|
||||
## About how it all works
|
||||
|
||||
You'll need haxe and hashlink installed to use this. It uses make to
|
||||
do various things.
|
||||
|
||||
## Useful targets
|
||||
|
||||
* `make run` - build and run the app using hashlink
|
||||
* `make build-native` - build the app as a native binary for Linux
|
||||
* `make build-web` - build that app as a javascript file for the web
|
||||
targe
|
||||
|
||||
The *-manifest directories are things meant to be copied into the
|
||||
distribution packages (like icons, install scripts, READMEs, etc).
|
||||
|
||||
## Windows
|
||||
|
||||
Windows build support is currently broken. It's missing some files
|
||||
(resources, icons) that are needed.
|
||||
|
||||
Our windows build setup is somewhat idiosyncratic. We build the
|
||||
Windows binaries on a Windows VM with Cygwin (which is used for
|
||||
scripting, but not for building), Haxe for Windows, and Visual Studio
|
||||
(and Visual C++).
|
||||
|
||||
There is a make target `make build-windows` that sets up the
|
||||
build. Then our script `build-windows.sh` is meant to be run from the
|
||||
VM. This requires a shared volume mounted as `H:` (we use ssh-fs on
|
||||
the Windows side); it then copies the source code over, converts it to
|
||||
C, and compiles an exe, and copies it back to a build directory. This
|
||||
script also uses a script called `WINDOWS-CMD-ENVIRONMENT.sh` that
|
||||
sets up the environment in Cygwin to use the Visual C compiler.
|
||||
|
||||
If you have any questions feel free to contact us on Fedi @aldercone@mastodon.art
|
||||
|
||||
|
|
6
TODO
6
TODO
|
@ -5,7 +5,11 @@
|
|||
* Add simple GUI library we use for SoundWell
|
||||
* Add all of the stuff we use from Rubralib (our common functionality library)
|
||||
* Add utilities to rebuild HDLLs on both platforms
|
||||
* Fix Windows builds
|
||||
* Fillin the rc and icons and stuff in the windows-manifest, and make the windows build work.
|
||||
* Make the build-windows.sh script parametric so that it doesn't have all the target stuff
|
||||
and directories hardcoded. Maybe switch the functionality to the Makefile instead.
|
||||
* Work out static compiling on linux, or at least platform-package or Flatpak builds
|
||||
* More documentation about the various tips, tricks and discoveries that went into this.
|
||||
* Publish on itch.io with a web build of the project as an advertisement of this repo.
|
||||
* Maybe take this as an excuse to write our enhanced PBR renderer with shader support
|
||||
* Maybe take this as an excuse to write our enhanced PBR renderer with shader support
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
export ALLUSERSPROFILE='C:\ProgramData'
|
||||
export APPDATA='C:\Users\Alder\AppData\Roaming'
|
||||
export CommandPromptType='Native'
|
||||
export CommonProgramFiles='C:\Program Files\Common Files'
|
||||
export CommonProgramW6432='C:\Program Files\Common Files'
|
||||
export COMPUTERNAME='DESKTOP-KIE127D'
|
||||
export ComSpec='C:\Windows\system32\cmd.exe'
|
||||
export DevEnvDir='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\'
|
||||
export DriverData='C:\Windows\System32\Drivers\DriverData'
|
||||
export ExtensionSdkDir='C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs'
|
||||
export EXTERNAL_INCLUDE='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um'
|
||||
export Framework40Version='v4.0'
|
||||
export FrameworkDir='C:\Windows\Microsoft.NET\Framework64\'
|
||||
export FrameworkDir64='C:\Windows\Microsoft.NET\Framework64\'
|
||||
export FrameworkVersion='v4.0.30319'
|
||||
export FrameworkVersion64='v4.0.30319'
|
||||
export HOMEDRIVE='C:'
|
||||
export HOMEPATH='\Users\Alder'
|
||||
export INCLUDE='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um'
|
||||
export is_x64_arch='true'
|
||||
export LIB='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64'
|
||||
export LIBPATH='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22621.0;C:\Windows\Microsoft.NET\Framework64\v4.0.30319'
|
||||
export LOCALAPPDATA='C:\Users\Alder\AppData\Local'
|
||||
export LOGONSERVER='\\DESKTOP-KIE127D'
|
||||
export NETFXSDKDir='C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\'
|
||||
export NUMBER_OF_PROCESSORS='2'
|
||||
export OS='Windows_NT'
|
||||
export Path='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\Extensions\Microsoft\CodeCoverage.Console;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Alder\AppData\Local\Programs\Python\Launcher\;C:\Users\Alder\AppData\Local\Microsoft\WindowsApps;C:\Users\Alder\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\x64\bin;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\VC\Linux\bin\ConnectionManagerExe'
|
||||
export PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
|
||||
export Platform='x64'
|
||||
export PROCESSOR_ARCHITECTURE='AMD64'
|
||||
export PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 140 Stepping 1, GenuineIntel'
|
||||
export PROCESSOR_LEVEL='6'
|
||||
export PROCESSOR_REVISION='8c01'
|
||||
export ProgramData='C:\ProgramData'
|
||||
export ProgramFiles='C:\Program Files'
|
||||
export ProgramW6432='C:\Program Files'
|
||||
export PROMPT='$P$G'
|
||||
export PSModulePath='C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules'
|
||||
export PUBLIC='C:\Users\Public'
|
||||
export SESSIONNAME='Console'
|
||||
export SystemDrive='C:'
|
||||
export SystemRoot='C:\Windows'
|
||||
export TEMP='C:\Users\Alder\AppData\Local\Temp'
|
||||
export TMP='C:\Users\Alder\AppData\Local\Temp'
|
||||
export UCRTVersion='10.0.22621.0'
|
||||
export UniversalCRTSdkDir='C:\Program Files (x86)\Windows Kits\10\'
|
||||
export USERDOMAIN='DESKTOP-KIE127D'
|
||||
export USERDOMAIN_ROAMINGPROFILE='DESKTOP-KIE127D'
|
||||
export USERNAME='Alder'
|
||||
export USERPROFILE='C:\Users\Alder'
|
||||
export VCIDEInstallDir='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\VC\'
|
||||
export VCINSTALLDIR='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\'
|
||||
export VCToolsInstallDir='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\'
|
||||
export VCToolsRedistDir='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\14.40.33807\'
|
||||
export VCToolsVersion='14.40.33807'
|
||||
export VisualStudioVersion='17.0'
|
||||
export VS170COMNTOOLS='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\'
|
||||
export VSCMD_ARG_app_plat='Desktop'
|
||||
export VSCMD_ARG_HOST_ARCH='x64'
|
||||
export VSCMD_ARG_TGT_ARCH='x64'
|
||||
export VSCMD_VER='17.10.5'
|
||||
export VSINSTALLDIR='C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\'
|
||||
export windir='C:\Windows'
|
||||
export WindowsLibPath='C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22621.0'
|
||||
export WindowsSdkBinPath='C:\Program Files (x86)\Windows Kits\10\bin\'
|
||||
export WindowsSdkDir='C:\Program Files (x86)\Windows Kits\10\'
|
||||
export WindowsSDKLibVersion='10.0.22621.0\'
|
||||
export WindowsSdkVerBinPath='C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\'
|
||||
export WindowsSDKVersion='10.0.22621.0\'
|
||||
export WindowsSDK_ExecutablePath_x64='C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\'
|
||||
export WindowsSDK_ExecutablePath_x86='C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\'
|
||||
export __DOTNET_ADD_64BIT='1'
|
||||
export __DOTNET_PREFERRED_BITNESS='64'
|
||||
export __VSCMD_PREINIT_PATH='C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Alder\AppData\Local\Programs\Python\Launcher\;C:\Users\Alder\AppData\Local\Microsoft\WindowsApps;C:\Users\Alder\AppData\Local\Programs\Microsoft VS Code\bin'
|
|
@ -6,14 +6,14 @@ VCC="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/
|
|||
RC="/cygdrive/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/rc.exe"
|
||||
|
||||
# H: is a mount of home directory
|
||||
SRC=/cygdrive/h/aldercone/soundwell/soundwell3
|
||||
SRC=/cygdrive/h/aldercone/hello/hello
|
||||
HL=/cygdrive/h/software/hashlink-1.14.0-win/
|
||||
BUILD=/cygdrive/c/Users/Alder/build/sw3-build
|
||||
BUILD=/cygdrive/c/Users/Alder/build/hello-build
|
||||
|
||||
VER=$(cat $SRC/build/stamp)
|
||||
IVER=$(echo $VER | tr '.' ',')",0"
|
||||
|
||||
echo "Building SoundWell3 $VER ($IVER)"
|
||||
echo "Building Hello $VER ($IVER)"
|
||||
|
||||
# copy generated source and hashlink api
|
||||
rm -r "$BUILD"-old || /bin/true
|
||||
|
@ -27,13 +27,13 @@ cp -R "$HL" "$BUILD/hashlink"
|
|||
|
||||
pushd "$BUILD"
|
||||
|
||||
sed -e "s;%IVER%;$IVER;g" -e "s;%VER%;$VER;g" <soundwell3.rc>soundwell-done.rc
|
||||
sed -e "s;%IVER%;$IVER;g" -e "s;%VER%;$VER;g" <hello.rc>hello-done.rc
|
||||
|
||||
"$RC" soundwell-icon.rc
|
||||
"$RC" soundwell-done.rc
|
||||
"$RC" hello-icon.rc
|
||||
"$RC" hello-done.rc
|
||||
|
||||
|
||||
"$VCC" -I. '-Ihashlink\include' soundwell3.c 'hashlink\*.lib' /link /subsystem:windows soundwell-icon.res soundwell-done.res
|
||||
"$VCC" -I. '-Ihashlink\include' hello.c 'hashlink\*.lib' /link /subsystem:windows hello-icon.res hello-done.res
|
||||
mkdir -p "$SRC/out/windows" || /bin/true
|
||||
cp soundwell3.exe "$SRC/out/windows"
|
||||
cp hello.exe "$SRC/out/windows"
|
||||
popd
|
||||
|
|
Loading…
Reference in New Issue