Rewrite of packager script so it can be run per configuration

This commit is contained in:
x1nixmzeng 2017-12-07 09:26:56 +00:00
parent 30dd6de962
commit 56ac7f86a4
3 changed files with 37 additions and 9 deletions

View File

@ -1,6 +0,0 @@
if exist build\win32\$(configuration)\Cxbx.exe (
7z a export\$(configuration).zip COPYING README.md
cd build\win32\$(configuration)
7z u ..\..\..\export\$(configuration).zip Cxbx.exe glew32.dll subhook.dll
cd ..\..\..\
)

35
PackageBuild.bat Normal file
View File

@ -0,0 +1,35 @@
@echo off
@if "%1"=="" goto no_arg
set BUILD_PATH=build\win32\%1\
if not exist COPYING goto no_preq
if not exist README.md goto no_preq
if not exist %BUILD_PATH%Cxbx.exe goto no_build
if not exist %BUILD_PATH%glew32.dll goto no_build
if not exist %BUILD_PATH%subhook.dll goto no_build
set ZIP_APP="import\7za\7za.exe"
set EXPORT_ZIP=export\%1.zip
@call %ZIP_APP% a %EXPORT_ZIP% COPYING README.md
cd %BUILD_PATH%
@call ..\..\..\%ZIP_APP% u ..\..\..\%EXPORT_ZIP% Cxbx.exe glew32.dll subhook.dll
cd /d %~dp0
echo Finished packaging %EXPORT_ZIP%!
goto eof
:no_preq
echo Missing files from repo
goto eof
:no_build
echo Missing build at path %BUILD_PATH%
goto eof
:no_arg
echo "Usage: %0 <build_configuration>"
goto eof
:eof

View File

@ -13,10 +13,9 @@ build:
parallel: true
verbosity: minimal
after_build:
- ps: .\AppveyorPackager.ps1
- cmd: PackageBuild.bat "$env:configuration"
artifacts:
- path: export\Release.zip
- path: export\Debug.zip
- path: export
install:
# Git clone happens between init and install
- cmd: git submodule update --init --recursive