-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create windows and unix build scripts (#216)
* Create simple windows and unix build scripts * Get build version info from git * Update readme - Better explain the spasm situation. - Replace build commands with references to the build scripts. * Make build.bat more normie-friendly * Handle spaces in version string Not that there should be any. * Indicate dirty build with "*" * Use build script for Travis CI No idea if this works. Travis CI seems to already be defunct. * Quote variable paths * Echo more of the build steps * Forward extra build arguments to assembler * Fall back to a hard-coded version definition * Make it possible to override version from git * Explicitly specify commit hash length
- Loading branch information
Showing
6 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@echo off | ||
set exit_timeout=-1 | ||
@echo on | ||
|
||
set version_arg= | ||
for /f %%i in ('git describe --tags "--dirty=*" "--abbrev=7"') do set "version_arg="-DVERSION=\"%%i\""" | ||
set "as=spasm -E -T -L -A" | ||
set "build=build" | ||
|
||
if not exist "%build%" mkdir "%build%" | ||
|
||
%as% %version_arg% %* tiboyce.asm "%build%/TIBoyDat.8xv" || goto exit | ||
%as% %* launcher.asm "%build%/TIBOYCE.8xp" || goto exit | ||
%as% %* skin.asm "%build%/TIBoySkn.8xv" || goto exit | ||
|
||
@echo off | ||
echo. | ||
echo Success! | ||
set exit_timeout=5 | ||
|
||
:exit | ||
@echo off | ||
@REM Pause if not run from cmd so the window persists and the user can see the output. | ||
@REM https://superuser.com/a/1688485 | ||
if /i not "%CMDCMDLINE:"=%" == "%COMSPEC%" timeout /t %exit_timeout% | ||
exit /b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
version_arg="-DVERSION=\"$(git describe --tags --dirty=* --abbrev=7)\"" || unset version_arg | ||
set -e | ||
as="spasm -E -T -L -A" | ||
build="build" | ||
|
||
mkdir -p "$build" | ||
|
||
$as ${version_arg+"$version_arg"} "$@" tiboyce.asm "$build/TIBoyDat.8xv" | ||
$as "$@" launcher.asm "$build/TIBOYCE.8xp" | ||
$as "$@" skin.asm "$build/TIBoySkn.8xv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters