From 54842db34973cbc8a8d1a4db55bd076a48c028a7 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 25 Sep 2016 15:16:30 -0700 Subject: [PATCH] Windows release process now creates .msi installer --- build_release_windows.ps1 | 14 ++- res/{SampleConfig.toml => DefaultConfig.toml} | 0 res/installer.wxs | 89 +++++++++++++++++++ src/main.rs | 2 +- 4 files changed, 101 insertions(+), 4 deletions(-) rename res/{SampleConfig.toml => DefaultConfig.toml} (100%) create mode 100644 res/installer.wxs diff --git a/build_release_windows.ps1 b/build_release_windows.ps1 index bb8e0ac..1de981c 100644 --- a/build_release_windows.ps1 +++ b/build_release_windows.ps1 @@ -1,19 +1,27 @@ "Compiling resource file" RC /fo res\application.res res\application.rc +"" "Compiling executable" cargo rustc --release --features "ui" -- -C link-args="/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup res\application.res" +"" "Creating output directory" -New-Item .\release\windows -type directory -Force +New-Item .\release\windows -type directory -Force | Out-Null Remove-Item -Recurse .\release\windows\* +"" "Copying to output directory" Copy-Item .\target\release\polaris.exe .\release\windows\ Copy-Item .\res\libeay32.dll .\release\windows\ Copy-Item .\res\libeay32md.dll .\release\windows\ -Copy-Item .\res\SampleConfig.toml .\release\windows\Polaris.toml -Copy-Item .\Polaris.toml .\release\windows\ +Copy-Item .\res\DefaultConfig.toml .\release\windows\polaris.toml Copy-Item .\web\ .\release\windows\ -recurse +"" +"Creating installer" +candle -wx -arch x64 -out .\release\windows\installer.wixobj .\res\installer.wxs +light -wx -out .\release\windows\Polaris_0.1.0.msi .\release\windows\installer.wixobj + +"" Read-Host -Prompt "All clear! Press Enter to exit" diff --git a/res/SampleConfig.toml b/res/DefaultConfig.toml similarity index 100% rename from res/SampleConfig.toml rename to res/DefaultConfig.toml diff --git a/res/installer.wxs b/res/installer.wxs new file mode 100644 index 0000000..bfca2dc --- /dev/null +++ b/res/installer.wxs @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main.rs b/src/main.rs index 8f0ba58..a49c486 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,7 @@ mod error; mod ui; mod vfs; -const DEFAULT_CONFIG_FILE_NAME: &'static str = "Polaris.toml"; +const DEFAULT_CONFIG_FILE_NAME: &'static str = "polaris.toml"; fn main() {