Skip to content

Commit

Permalink
Rewrite of packager script so it can be run per configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
x1nixmzeng committed Dec 7, 2017
1 parent 30dd6de commit 56ac7f8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
6 changes: 0 additions & 6 deletions AppveyorPackager.ps1

This file was deleted.

35 changes: 35 additions & 0 deletions PackageBuild.bat
@@ -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
5 changes: 2 additions & 3 deletions appveyor.yml
Expand Up @@ -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

0 comments on commit 56ac7f8

Please sign in to comment.