diff --git a/.travis.yml b/.travis.yml index 5f465f73..0e5d6201 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,9 +54,12 @@ before_deploy: strip "./target/i686-pc-windows-msvc/release/btm"; mv "./target/i686-pc-windows-msvc/release/btm" "btm.exe"; zip bottom_i686-pc-windows-msvc.zip "btm.exe"; - python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $TRAVIS_TAG "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template"; + python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $TRAVIS_TAG "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/chocolateyinstall.ps1"; zip choco.zip "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/"; - choco install wixtoolset; + # Generating msi + # See https://travis-ci.community/t/unable-to-install-wix-toolset/1071 for why we do nuget. + choco install nuget.commandline; + nuget install WiX.Toolset; cargo install cargo-wix; cargo wix init; cargo wix; diff --git a/.vscode/settings.json b/.vscode/settings.json index 78825f33..895f2975 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,12 +13,14 @@ "Qudsi", "SIGTERM", "Tebibytes", + "Toolset", "Ungrouped", "WASD", "Wojnarowski", "andys", "choco", "cmdline", + "commandline", "crossterm", "curr", "czvf", @@ -33,6 +35,7 @@ "minwindef", "noheader", "ntdef", + "nuget", "paren", "pmem", "processthreadsapi", diff --git a/deployment/windows/choco/choco_packager.py b/deployment/windows/choco/choco_packager.py index f791cf2d..445349a4 100644 --- a/deployment/windows/choco/choco_packager.py +++ b/deployment/windows/choco/choco_packager.py @@ -12,6 +12,8 @@ deployment_file_path_64 = args[2] version = args[3] nuspec_template = args[4] ps1_template = args[5] +generated_nuspec = args[6] +generated_ps1 = args[7] print("Generating Chocolatey package for:") print(" 32-bit: %s", deployment_file_path_32) @@ -19,6 +21,8 @@ print(" 64-bit: %s", deployment_file_path_64) print(" VERSION: %s" % version) print(" NUSPEC TEMPLATE: %s" % nuspec_template) print(" PS1 TEMPLATE: %s" % ps1_template) +print(" GENERATED NUSPEC: %s" % generated_nuspec) +print(" GENERATED_PS1: %s" % generated_ps1) with open(deployment_file_path_32, "rb") as deployment_file_32, open( deployment_file_path_64, "rb" @@ -36,7 +40,7 @@ with open(deployment_file_path_32, "rb") as deployment_file_32, open( print(substitute) print("\n============================================================\n") - with open("./bottom.nuspec", "w") as generated_file: + with open(generated_nuspec, "w") as generated_file: generated_file.write(substitute) os.makedirs("tools") @@ -47,6 +51,6 @@ with open(deployment_file_path_32, "rb") as deployment_file_32, open( print(substitute) print("\n============================================================\n") - with open("./tools/chocolateyinstall.ps1", "w") as generated_file: + with open(generated_ps1, "w") as generated_file: generated_file.write(substitute)