Skip to content

Commit

Permalink
Create a packaging script for WIndows
Browse files Browse the repository at this point in the history
  • Loading branch information
dglmoore committed Jul 21, 2016
1 parent 324d732 commit e36d057
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dist/package.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$version = (cmake . -Bbuild/production -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" | Select-String '-- inform version: ')
$version = $version.ToString().Split(' ')[3]

$prefix = "inform-$version"
$target = "dist/$prefix"
$archive = "$($target)_win-amd64.zip"

cmake . -Bbuild/production -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$target" | Out-Null
cd build/production
nmake
test/inform_unittest.exe
nmake install
cd ../..


Add-Type -Assembly System.IO.Compression.FileSystem
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($target, $archive, $compressionLevel, $false)

0 comments on commit e36d057

Please sign in to comment.