From 80b64b5bdda740a3545bcbe48e0ab354b5538b27 Mon Sep 17 00:00:00 2001 From: Patrick Reisert Date: Thu, 11 Aug 2016 11:55:38 +0200 Subject: [PATCH] Build MSI on AppVeyor --- appveyor.yml | 20 +++++++++++++++++--- ci/prepare-deploy-appveyor.ps1 | 5 +++++ src/rustup-win-installer/msi/rustup.wxs | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d4dee0c52d4..e360cd05cdc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,8 @@ environment: MSYS_BITS: 64 - TARGET: i686-pc-windows-msvc - TARGET: x86_64-pc-windows-msvc + - TARGET: i686-pc-windows-msvc + BUILD_MSI: 1 access_token: secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q branches: @@ -34,6 +36,10 @@ install: - if defined MINGW_ARCHIVE curl -L --retry 4 "%MINGW_URL%" -o "%MINGW_ARCHIVE%" - if defined MINGW_ARCHIVE 7z x -y "%MINGW_ARCHIVE%" > nul - if defined MINGW_ARCHIVE set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH% + + # set cargo features for MSI if requested (otherwise empty string) + - set FEATURES= + - if defined BUILD_MSI set FEATURES=--features msi-installed # let's see what we got - where gcc rustc cargo @@ -44,9 +50,17 @@ install: build: false test_script: - - cargo build --release --target %TARGET% - - cargo test --release -p rustup-dist --target %TARGET% - - cargo test --release --target %TARGET% + - cargo build --release --target %TARGET% %FEATURES + - cargo test --release -p rustup-dist --target %TARGET% %FEATURES% + - cargo test --release --target %TARGET% %FEATURES% + - ps: | + if($env:BUILD_MSI) { + cd src\rustup-win-installer + cargo build --release + cd msi + .\build.ps1 + cd ..\..\.. + } notifications: - provider: Webhook diff --git a/ci/prepare-deploy-appveyor.ps1 b/ci/prepare-deploy-appveyor.ps1 index 743fbb37601..b2dabd33728 100644 --- a/ci/prepare-deploy-appveyor.ps1 +++ b/ci/prepare-deploy-appveyor.ps1 @@ -6,6 +6,11 @@ if ($env:APPVEYOR_REPO_BRANCH -eq "auto") { exit 0 } +# Don't do anything for MSI (yet) +if ($env:BUILD_MSI) { + exit 0 +} + # Copy rustup-init to rustup-setup for backwards compatibility cp target\${env:TARGET}\release\rustup-init.exe target\${env:TARGET}release\rustup-setup.exe diff --git a/src/rustup-win-installer/msi/rustup.wxs b/src/rustup-win-installer/msi/rustup.wxs index 8671868bfcf..b175f9b688c 100644 --- a/src/rustup-win-installer/msi/rustup.wxs +++ b/src/rustup-win-installer/msi/rustup.wxs @@ -1,7 +1,7 @@ - +