Skip to content

Commit

Permalink
Build MSI on AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
Boddlnagg committed Aug 11, 2016
1 parent 9310982 commit 80b64b5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
20 changes: 17 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions ci/prepare-deploy-appveyor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/rustup-win-installer/msi/rustup.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- TODO: Change paths and names accordingly -->
<?define RustupCustomActionDll="..\target\debug\rustup_msi.dll"?>
<?define RustupCustomActionDll="..\target\release\rustup_msi.dll"?>
<?define RustupExe="..\..\..\target\release\rustup-init.exe"?>

<Product Id="*" Name="rustup" Language="1033" Version="$(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR).$(env.CFG_VER_PATCH).0" Manufacturer="The Rust Project Developers" UpgradeCode="09acbb1c-7123-44ac-b2a9-4a04b28ced11">
Expand Down

0 comments on commit 80b64b5

Please sign in to comment.