build Win32 installer with gitlab-ci

call "make ziprelease" if needed
This commit is contained in:
Thomas Bernard 2018-05-13 22:51:44 +02:00
parent d72fb40b27
commit 1147a8f49f
4 changed files with 26 additions and 2 deletions

View File

@ -1,6 +1,6 @@
before_script:
- apt-get update -qq && apt-get install -y -qq libsdl1.2-dev libpng-dev libsdl-ttf2.0-dev libsdl-image1.2-dev liblua5.1-0-dev zip
- apt-get install -y -qq gcc-mingw-w64-i686 mingw-w64-tools
- apt-get install -y -qq gcc-mingw-w64-i686 mingw-w64-tools nsis
stages:
- build
@ -18,6 +18,8 @@ job_win32:
- "WIN32CROSS=1 make 3rdparty"
- "WIN32CROSS=1 make -j3"
- "WIN32CROSS=1 make ziprelease"
- "WIN32CROSS=1 make win32installer"
artifacts:
paths:
- "*.zip"
- "install/grafx2*.exe"

View File

@ -13,6 +13,7 @@ addons:
- libsdl-image1.2-dev
- libsdl-ttf2.0-dev
- liblua5.2-dev
- nsis
sudo: false

View File

@ -3,7 +3,7 @@ OPT = WIN32CROSS=1 \
endif
.PHONY: all tools grafx2 ziprelease 3rdparty
.PHONY: all tools grafx2 ziprelease 3rdparty win32installer
all: grafx2 tools
@ -18,3 +18,6 @@ tools:
3rdparty:
cd 3rdparty/ && $(OPT)$(MAKE)
win32installer:
$(MAKE) -C install/

18
install/Makefile Normal file
View File

@ -0,0 +1,18 @@
VERSIONTAG = ../obj/win32/versiontag
VERSION := $(shell cat $(VERSIONTAG))
SOURCES = ../src-$(VERSION).tgz
INSTALLER = ../grafx2-$(VERSION).win32.exe
all: $(INSTALLER)
$(INSTALLER): WinInstaller.nsi $(SOURCES) $(VERSIONTAG)
sed 's/src-.*.tgz/src-$(VERSION).tgz/' $< | \
sed 's/VERSION .*/VERSION $(VERSION)/' > new_$<
makensis new_$<
$(SOURCES): ../grafx2-$(VERSION)-win32.zip
cd .. && unzip grafx2-$(VERSION)-win32.zip src-$(VERSION).tgz
../grafx2-$(VERSION)-win32.zip:
cd ../src && WIN32CROSS=1 make ziprelease