calc84maniac / tiboyce

A Game Boy emulator for the TI-84 Plus CE and TI-83 Premium CE.
https://calc84maniac.github.io/tiboyce/
GNU General Public License v3.0
375 stars 22 forks source link

Create windows and unix build scripts #216

Closed runer112 closed 3 months ago

runer112 commented 4 months ago

Output of build.bat at daf0ec6ce49ead5057ad895b016eef46527f7e43:

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>set version_arg= 

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>for /F %i in ('git describe --tags "--dirty=*" "--abbrev=7"') do set "version_arg="-DVERSION=\"%i\""" 

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>set "version_arg="-DVERSION=\"v0.3.0-18-gb2e5aec\""" 

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>set "as=spasm -E -T -L -A" 

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>set "build=build"

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>if not exist "build" mkdir "build"

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>spasm -E -T -L -A "-DVERSION=\"v0.3.0-18-gb2e5aec\""  tiboyce.asm "build/TIBoyDat.8xv"   || goto exit        
Pass one...
Pass two... 
Opcycle routine size: 251
LZF compressor size: 320
LZF decompressor size: 95
User RAM code size: 14249
User RAM program size: 14297
SHA code size: 63
GBC SHA code size: 63
5 bytes remaining for port writes
Z80 mode code size: 10002
Opgen routine size: 256
Cursor memory code size: 1006
GBC cursor memory code size: 1022
Total size: 42478
Assembly time: 0.211 seconds

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>spasm -E -T -L -A  launcher.asm "build/TIBOYCE.8xp"   || goto exit
Pass one... 
Pass two...
Loader size is 440 bytes
Assembly time: 0.002 seconds

C:\Users\zwass\OneDrive\Documents\TI\_84+CE\tiboyce>spasm -E -T -L -A  skin.asm "build/TIBoySkn.8xv"   || goto exit
Pass one...
Pass two... 
Assembly time: 0.003 seconds

Success!

Output of build.sh at b2e5aec14adaf36ca06e4202ccd877bdc62c1654:

++ git describe --tags '--dirty=*' --abbrev=7
+ version_arg='-DVERSION="v0.3.0-18-gb2e5aec"'
+ set -e
+ as='spasm -E -T -L -A'
+ build=build
+ mkdir -p build
+ spasm -E -T -L -A '-DVERSION="v0.3.0-18-gb2e5aec"' tiboyce.asm build/TIBoyDat.8xv
Pass one... 
Pass two... 
Opcycle routine size: 251
LZF compressor size: 320
LZF decompressor size: 95
User RAM code size: 14249
User RAM program size: 14297
SHA code size: 63
GBC SHA code size: 63
5 bytes remaining for port writes
Z80 mode code size: 10002
Opgen routine size: 256
Cursor memory code size: 1006
GBC cursor memory code size: 1022
Total size: 42478
Assembly time: 0.221 seconds
+ spasm -E -T -L -A launcher.asm build/TIBOYCE.8xp
Pass one... 
Pass two...
Loader size is 440 bytes
Assembly time: 0.001 seconds
+ spasm -E -T -L -A skin.asm build/TIBoySkn.8xv
Pass one... 
Pass two...
Assembly time: 0.004 seconds

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43:

image

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43 with a dirty working tree:

image

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43 tagged as "v0.3.1":

image

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43 tagged as "v0.3.1" with a dirty working tree:

image

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43 with git describe failure:

image

Screenshot of the main TI-Boy CE settings page at daf0ec6ce49ead5057ad895b016eef46527f7e43 built with build "-DVERSION=\"cool version\"" or ./build.sh '-DVERSION="cool version"':

image

calc84maniac commented 4 months ago

Personally, I'd prefer there not to be a strict dependence on git (either being installed or the repo having been cloned, e.g. it could have been downloaded as a .zip or .tar.gz). I'd probably want it to be handled as a fallback version string (probably at the top of tiboyce.asm) if it's not specified on the command-line, which also makes it more easily buildable without using the build script.

runer112 commented 3 months ago

@calc84maniac:

Personally, I'd prefer there not to be a strict dependence on git (either being installed or the repo having been cloned, e.g. it could have been downloaded as a .zip or .tar.gz). I'd probably want it to be handled as a fallback version string (probably at the top of tiboyce.asm) if it's not specified on the command-line, which also makes it more easily buildable without using the build script.

This should all be addressed. See the updated contents of the first comment demonstrating the PR's changes.

calc84maniac commented 3 months ago

It's looking pretty good now, and I've got a few more improvements implemented locally that I'll commit after merge (mainly fixing a false positive in the "not run from cmd" detection, but I also decided to remove some of the more useless echos and make the lst/lab files optional now that additional parameters are passed through to spasm)