Skip to content

Commit

Permalink
appveyor: start building the installer in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Nov 23, 2018
1 parent 45a2e0a commit 13c5ac7
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
44 changes: 44 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Build version
version: "{build}"

branches:
only:
- /^v[0-9].*$/

# Build worker image (build VM template)
image: Visual Studio 2017

# build platform, i.e. Win32 (instead of x86), x64, Any CPU. This setting is optional.
platform:
- x64

# scripts that are called at very beginning, before repo cloning
init:
- ver

install:
# install the whole toolchain from online sources
- call toolchain\scripts\install-all-components.bat
# fetch the Windows Installer XML Toolset binaries
- call installer\wix-binaries\install-wix-binaries.bat

build_script:
# extract version number from git tag
- git describe --tags > version
- set /p version= < version
- del version
- set version=%version:~1%
- echo Building Windows Toolchain Installer %version%

# generate the toolchain installer MSI file using WiX
- call installer\wix-project\generate-msi.bat %version%

artifacts:
- path: installer\wix-project\build\PX4 Windows Cygwin Toolchain*.msi
name: Installer

deploy:
- provider: GitHub
auth_token:
secure: Za5Kwd1s8umbE1ipD2voQR031N/2VfJQPjr3qF2pFqteJjkLGr6ie4iNANBi6O8z
artifact: Installer
2 changes: 1 addition & 1 deletion installer/wix-project/PX4.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- basic installer configuration (https://www.firegiant.com/wix/tutorial/getting-started/the-software-package/)
UpgradeCode="EED21B28-B4E2-4F96-91EC-DCC54227CF52" needs to stay unique for this "product"! -->
<Product Name="PX4 Toolchain" Id="*" UpgradeCode="EED21B28-B4E2-4F96-91EC-DCC54227CF52"
Language="1033" Codepage="1252" Version="0.5.0" Manufacturer="Dronecode">
Language="1033" Codepage="1252" Version="$(env.version).0" Manufacturer="Dronecode">
<Package Id="*" Keywords="Installer" Description="PX4 Windows Toolchain Installer"
Comments="Created by MaEtUgR" Manufacturer="Dronecode"
InstallerVersion="100" Languages="1033" Compressed="yes" SummaryCodepage="1252" InstallScope="perMachine" />
Expand Down
11 changes: 10 additions & 1 deletion installer/wix-project/generate-msi.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
SETLOCAL
ECHO ** Generating PX4 Toolchain MSI Installer

REM determine version number from script call parameter
SET version=%1
IF "version" == "" (
ECHO Please pass a version number to the script [0.0, 255.255]
PAUSE
EXIT /b
)
ECHO Version number: %version%

REM base directory of the source files
SET BASEDIR=%~dp0..\..
REM get rid of the ..\.. in the variable
Expand Down Expand Up @@ -42,7 +51,7 @@ ECHO *** Running WiX Light to link the installer file
heat.wixobj PX4.wixobj ui.wixobj ^
-b %BASEDIR% ^
-loc ..\custom_ui_text.wxl ^
-out "PX4 Toolchain.msi"
-out "PX4 Windows Cygwin Toolchain %version%.msi"

REM remove the symbolic link backup archive from the source directory
ECHO *** Symbolic links: Removing Backup
Expand Down
1 change: 1 addition & 0 deletions toolchain/scripts/setup-environment.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ IF "%1" == "" (
ECHO This file is automatically run by the other scripts, no need to execute manually.
ECHO Open environment-setup.bat in an editor to modify the toolchain!
PAUSE
EXIT /b
)

REM this is the PX4 directory which is two layers above this script
Expand Down

0 comments on commit 13c5ac7

Please sign in to comment.