Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
desktop/windows: add single-line build script
This gives us a single-line command that can be run from a Windows build machine to create a signed installer binary: $CHAIN/desktop/windows/build /path/to/signing.key signingKeyPassword Closes #1343
- Loading branch information
1 parent
6d39296
commit 147f205
Showing
9 changed files
with
142 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ ChainBundle/bin/ | |
ChainBundle/obj/ | ||
ChainPackage/bin/ | ||
ChainBundle/obj/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
buildDir=$CHAIN/desktop/windows/build | ||
rm -rf $buildDir | ||
mkdir -p $buildDir | ||
|
||
$CHAIN/bin/build-cored-release chain-core-server-1.2.0 $buildDir | ||
mv $buildDir/cored $buildDir/cored.exe | ||
rm $buildDir/corectl | ||
|
||
echo "Building ChaingMgr..." | ||
mkdir $buildDir/ChainMgr | ||
go build -o $buildDir/ChainMgr/ChainMgr.exe chain/desktop/windows/ChainMgr | ||
|
||
cp -R $CHAIN/desktop/windows/ChainBundle $buildDir/ChainBundle | ||
cp -R $CHAIN/desktop/windows/ChainPackage $buildDir/ChainPackage | ||
|
||
echo "Downloading install-time dependencies..." | ||
mkdir $buildDir/Postgres | ||
curl https://s3.amazonaws.com/chain-engineering-internal/windows-build-deps/build-deps/postgresql-9.5.5-1-windows-x64.exe \ | ||
-s -o $buildDir/Postgres/postgresql-9.5.5-1-windows-x64.exe | ||
curl https://s3.amazonaws.com/chain-engineering-internal/windows-build-deps/build-deps/vcredist_x64.exe \ | ||
-s -o $buildDir/Postgres/vcredist_x64.exe | ||
|
||
certPath=$1 | ||
certPass=$2 | ||
version=${3:-"Latest"} | ||
|
||
cd $buildDir | ||
|
||
echo "Signing executables..." | ||
signtool sign -v -f $certPath -p $certPass cored.exe | ||
signtool sign -v -f $certPath -p $certPass ChainMgr/ChainMgr.exe | ||
|
||
cd ChainPackage | ||
|
||
echo "Building and signing ChainPackage..." | ||
candle -ext WixHttpExtension -ext WixUtilExtension ChainCoreInstaller.wxs | ||
light -ext WixHttpExtension -ext WixUtilExtension ChainCoreInstaller.wixobj | ||
signtool sign -v -f $certPath -p $certPass cab1.cab | ||
|
||
cd ../ChainBundle | ||
|
||
echo "Building and signing installer executable..." | ||
candle Bundle.wxs -arch x64 -ext WixBalExtension \ | ||
-dChainPackage.TargetPath="$buildDir\ChainPackage\ChainCoreInstaller.msi" \ | ||
-dPostgresPackage.TargetPath="$buildDir\Postgres\postgresql-9.5.5-1-windows-x64.exe" \ | ||
-dVCRPackage.TargetPath="$buildDir\Postgres\vcredist_x64.exe" | ||
light Bundle.wixobj -ext WixBalExtension | ||
insignia -ib Bundle.exe -o engine.exe | ||
signtool sign -v -f $certPath -p $certPass engine.exe | ||
insignia -ab engine.exe Bundle.exe -o Chain_Core_$version.exe -v | ||
signtool sign -v -f $certPath -p $certPass Chain_Core_$version.exe |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
public final class RevId { | ||
public final String Id = "main/rev3246"; | ||
public final String Id = "main/rev3247"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package rev | ||
|
||
const ID string = "main/rev3246" | ||
const ID string = "main/rev3247" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
export const rev_id = "main/rev3246" | ||
export const rev_id = "main/rev3247" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
module Chain::Rev | ||
ID = "main/rev3246".freeze | ||
ID = "main/rev3247".freeze | ||
end |