File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ use std:: env;
2
+
1
3
fn main ( ) {
2
4
println ! ( "cargo:rustc-link-lib=dylib=msi" ) ;
3
5
println ! ( "cargo:rustc-link-lib=dylib=wcautil" ) ;
4
6
println ! ( "cargo:rustc-link-lib=dylib=dutil" ) ;
5
7
println ! ( "cargo:rustc-link-lib=dylib=user32" ) ;
6
8
println ! ( "cargo:rustc-link-lib=dylib=mincore" ) ;
7
9
8
- // TODO: maybe don't hardcode path to WiX 3.10
9
- println ! ( "cargo:rustc-link-search=native=C:\\ Program Files (x86)\\ WiX Toolset v3.10\\ SDK\\ VS2015\\ lib\\ x86" ) ;
10
+ let wix_path = env:: var ( "WIX" ) . unwrap ( ) ;
11
+ // x86 target is hard-coded because we only build an x86 installer (works just fine on x64)
12
+ println ! ( "cargo:rustc-link-search=native={}SDK\\ VS2015\\ lib\\ x86" , wix_path) ;
10
13
}
Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ $env:CFG_VER_MINOR = $version[1]
5
5
$env: CFG_VER_PATCH = $version [2 ]
6
6
7
7
foreach ($file in Get-ChildItem * .wxs) {
8
- & ' C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe' - nologo - arch x86 - ext WixUIExtension - ext WixUtilExtension - out " target\$ ( $file.Name.Replace (" .wxs" , " .wixobj" )) " $ ($file.Name )
8
+ $in = $file.Name
9
+ $out = $ ($file.Name.Replace (" .wxs" , " .wixobj" ))
10
+ & " $ ( $env: WIX ) bin\candle.exe" - nologo - arch x86 - ext WixUIExtension - ext WixUtilExtension - out " target\$out " $in
9
11
if ($LASTEXITCODE -ne 0 ) { exit }
10
12
}
11
13
12
14
# ICE57 wrongly complains about per-machine data in per-user install, because it doesn't know that INSTALLLOCATION is in per-user directory
13
- & ' C:\Program Files (x86)\WiX Toolset v3.10\ bin\light.exe' - nologo - ext WixUIExtension - ext WixUtilExtension - out " target\rustup.msi" - sice:ICE57 $ (Get-ChildItem target\* .wixobj)
15
+ & " $ ( $ env: WIX ) \ bin\light.exe" - nologo - ext WixUIExtension - ext WixUtilExtension - out " target\rustup.msi" - sice:ICE57 $ (Get-ChildItem target\* .wixobj)
You can’t perform that action at this time.
0 commit comments