Skip to content

Commit

Permalink
version 0.2 release
Browse files Browse the repository at this point in the history
version file that compiles in the game
fix: math damage when extended info is disabled
platform and version info in exception handling code
  • Loading branch information
infidel- committed Jul 29, 2016
1 parent d35dd40 commit ec15949
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 5 deletions.
1 change: 1 addition & 0 deletions GameScene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ class GameScene extends Scene
if (game.config.sendExceptions)
{
var s = new StringBuf();
s.add('v' + Version.getVersion() + ' ' + Sys.systemName() + '\n');
s.add(game.messageList.last() + '\n');
s.add('Exception: ' + e + '\n');
s.add(stack + '\n');
Expand Down
67 changes: 66 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,75 @@
#VERSION=`cat VERSION`
VERSION := $(shell cat VERSION)

all: clean windows-mydebug

release: release-win release-linux32 release-linux64 release-mac64

release-win:
echo "Building windows release" $(VERSION)
mkdir -p _releases _releases/parasite-$(VERSION)-win
cp -R assets/font/ _releases/parasite-$(VERSION)-win/
cp -R assets/graphics/ _releases/parasite-$(VERSION)-win/gfx/
cp _release.windows/* _releases/parasite-$(VERSION)-win/
cp parasite.cfg _releases/parasite-$(VERSION)-win/
openfl build project.nmml windows -Dmydebug
cp .bin/windows/neko/bin/parasite.exe \
_releases/parasite-$(VERSION)-win/parasite-debug.exe
openfl build project.nmml windows
cp .bin/windows/neko/bin/parasite.exe \
_releases/parasite-$(VERSION)-win/
cd _releases && zip -r9 parasite-$(VERSION)-win.zip parasite-$(VERSION)-win/

release-linux32:
echo "Building linux 32-bit release" $(VERSION)
mkdir -p _releases _releases/parasite-$(VERSION)-linux32
cp -R assets/font/ _releases/parasite-$(VERSION)-linux32/
cp -R assets/graphics/ _releases/parasite-$(VERSION)-linux32/gfx/
cp _release.linux32/* _releases/parasite-$(VERSION)-linux32/
cp parasite.cfg _releases/parasite-$(VERSION)-linux32/
openfl build project.nmml linux -neko -32 -Dmydebug
cp .bin/linux/neko/bin/parasite \
_releases/parasite-$(VERSION)-linux32/parasite-debug
openfl build project.nmml linux -neko -32
cp .bin/linux/neko/bin/parasite \
_releases/parasite-$(VERSION)-linux32/
cd _releases && tar -c parasite-$(VERSION)-linux32/ | gzip - > \
parasite-$(VERSION)-linux32.tar.gz

release-linux64:
echo "Building linux 64-bit release" $(VERSION)
mkdir -p _releases _releases/parasite-$(VERSION)-linux64
cp -R assets/font/ _releases/parasite-$(VERSION)-linux64/
cp -R assets/graphics/ _releases/parasite-$(VERSION)-linux64/gfx/
cp _release.linux64/* _releases/parasite-$(VERSION)-linux64/
cp parasite.cfg _releases/parasite-$(VERSION)-linux64/
openfl build project.nmml linux -neko -Dmydebug
cp .bin/linux64/neko/bin/parasite \
_releases/parasite-$(VERSION)-linux64/parasite-debug
openfl build project.nmml linux -neko
cp .bin/linux64/neko/bin/parasite \
_releases/parasite-$(VERSION)-linux64/
cd _releases && tar -c parasite-$(VERSION)-linux64/ | gzip - > \
parasite-$(VERSION)-linux64.tar.gz

release-mac64:
echo "Building MacOSX 64-bit release" $(VERSION)
mkdir -p _releases _releases/parasite-$(VERSION)-mac64
# openfl build project.nmml mac -neko -Dmydebug
# cp .bin/mac64/neko/bin/parasite \
# _releases/parasite-$(VERSION)-mac64/parasite-debug
openfl build project.nmml mac -neko
cp parasite.cfg .bin/mac64/neko/bin/parasite.app/Contents/MacOS/
cp -R .bin/mac64/neko/bin/parasite.app \
_releases/parasite-$(VERSION)-mac64/
cd _releases && zip -r9 parasite-$(VERSION)-mac64.zip parasite-$(VERSION)-mac64/


linux32-mydebug:
openfl build project.nmml linux -neko -32 -Dmydebug

linux32-clean:
openfl build project.nmml linux -neko
openfl build project.nmml linux -neko -32

linux64-mydebug:
openfl build project.nmml linux -neko -Dmydebug
Expand Down
3 changes: 0 additions & 3 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
2) release 0.2
3) add stage 3 to debug and test playthrough of the goal completion

compile in VERSION and display it on start
make release

roads on region map leading to facilities
faster travel on roads when in car?
disallow travel outside of city bounds by foot (no sewers)?
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2
11 changes: 11 additions & 0 deletions Version.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import haxe.macro.Expr;

class Version
{
// get current game version from VERSION file
public static macro function getVersion(): ExprOf<String>
{
var version = StringTools.trim(sys.io.File.getContent("VERSION"));
return macro $v{version};
}
}
3 changes: 2 additions & 1 deletion _Math.hx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class _Math
s.add(' }, { ');
}
}
s.add(' }]');
if (game.config.extendedInfo)
s.add(' }]');
}

// clamp value
Expand Down
2 changes: 2 additions & 0 deletions game/Game.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Game
// init game stuff - called from GameScene.begin()
public function init()
{
log('Parasite v' + Version.getVersion());
Const.todo('proper title screen');
turns = 0;
turnsArea = 0;
Expand Down Expand Up @@ -293,3 +294,4 @@ class Game
messageList.pop();
}
}

0 comments on commit ec15949

Please sign in to comment.