From c2086216fa0df15cb7e8035465996d6fcfdf6448 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 4 Mar 2022 20:27:17 -0500 Subject: add Pintail to install package (#830) --- build/windows/prepare-install-package.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/windows') diff --git a/build/windows/prepare-install-package.ps1 b/build/windows/prepare-install-package.ps1 index db7fadcb..9922cbc6 100644 --- a/build/windows/prepare-install-package.ps1 +++ b/build/windows/prepare-install-package.ps1 @@ -132,7 +132,7 @@ foreach ($folder in $folders) { cp -Recurse "$smapiBin/i18n" "$bundlePath/smapi-internal" # bundle smapi-internal - foreach ($name in @("0Harmony.dll", "0Harmony.xml", "Mono.Cecil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", "MonoMod.Common.dll", "Newtonsoft.Json.dll", "TMXTile.dll", "SMAPI.Toolkit.dll", "SMAPI.Toolkit.pdb", "SMAPI.Toolkit.xml", "SMAPI.Toolkit.CoreInterfaces.dll", "SMAPI.Toolkit.CoreInterfaces.pdb", "SMAPI.Toolkit.CoreInterfaces.xml")) { + foreach ($name in @("0Harmony.dll", "0Harmony.xml", "Mono.Cecil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", "MonoMod.Common.dll", "Newtonsoft.Json.dll", "Pintail.dll", "TMXTile.dll", "SMAPI.Toolkit.dll", "SMAPI.Toolkit.pdb", "SMAPI.Toolkit.xml", "SMAPI.Toolkit.CoreInterfaces.dll", "SMAPI.Toolkit.CoreInterfaces.pdb", "SMAPI.Toolkit.CoreInterfaces.xml")) { cp "$smapiBin/$name" "$bundlePath/smapi-internal" } -- cgit From a340c8b8ce8cf0c3b218162117cbc2e8f5acb2b8 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 29 Apr 2022 22:46:37 -0400 Subject: enable some disabled steps in Windows build script This simplifies preparing test Windows-only installers. --- build/windows/prepare-install-package.ps1 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'build/windows') diff --git a/build/windows/prepare-install-package.ps1 b/build/windows/prepare-install-package.ps1 index 9922cbc6..b6a23124 100644 --- a/build/windows/prepare-install-package.ps1 +++ b/build/windows/prepare-install-package.ps1 @@ -184,14 +184,13 @@ foreach ($folder in $folders) { # disable developer mode in main package In-Place-Regex -Path "$packagePath/internal/$folder/bundle/smapi-internal/config.json" -Search "`"DeveloperMode`": true" -Replace "`"DeveloperMode`": false" - # DISABLED: will be handled by Linux script # convert bundle folder into final 'install.dat' files - #foreach ($path in @("$packagePath/internal/$folder", "$packageDevPath/internal/$folder")) - #{ - # Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.zip" - # mv "$path/install.zip" "$path/install.dat" - # rm -Recurse -Force "$path/bundle" - #} + foreach ($path in @("$packagePath/internal/$folder", "$packageDevPath/internal/$folder")) + { + Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.zip" + mv "$path/install.zip" "$path/install.dat" + rm -Recurse -Force "$path/bundle" + } } @@ -208,10 +207,9 @@ if (!$version) { mv "$packagePath" "bin/SMAPI $version installer" mv "$packageDevPath" "bin/SMAPI $version installer for developers" -# DISABLED: will be handled by Linux script -## package files -#Compress-Archive -Path "bin/SMAPI $version installer" -DestinationPath "bin/SMAPI $version installer.zip" -CompressionLevel Optimal -#Compress-Archive -Path "bin/SMAPI $version installer for developers" -DestinationPath "bin/SMAPI $version installer for developers.zip" -CompressionLevel Optimal +# package files +Compress-Archive -Path "bin/SMAPI $version installer" -DestinationPath "bin/SMAPI $version installer.zip" -CompressionLevel Optimal +Compress-Archive -Path "bin/SMAPI $version installer for developers" -DestinationPath "bin/SMAPI $version installer for developers.zip" -CompressionLevel Optimal echo "" echo "Done! See docs/technical/smapi.md to create the release zips." -- cgit From f507bd0f9cebe68fa2adf176740a0d00b3e6f884 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 29 Apr 2022 22:55:12 -0400 Subject: set SMAPI version from main build script --- build/windows/prepare-install-package.ps1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'build/windows') diff --git a/build/windows/prepare-install-package.ps1 b/build/windows/prepare-install-package.ps1 index b6a23124..5a1e0bcc 100644 --- a/build/windows/prepare-install-package.ps1 +++ b/build/windows/prepare-install-package.ps1 @@ -12,6 +12,20 @@ . "$PSScriptRoot\lib\in-place-regex.ps1" + +########## +## Set version +########## +# get version number +$version = $args[0] +if (!$version) { + $version = Read-Host "SMAPI release version (like '4.0.0')" +} + +# set version +. "$PSScriptRoot/set-smapi-version.ps1" "$version" + + ########## ## Constants ########## @@ -197,12 +211,6 @@ foreach ($folder in $folders) { ########### ### Create release zips ########### -# get version number -$version = $args[0] -if (!$version) { - $version = Read-Host "SMAPI release version (like '4.0.0')" -} - # rename folders mv "$packagePath" "bin/SMAPI $version installer" mv "$packageDevPath" "bin/SMAPI $version installer for developers" -- cgit From 0e4aa65708df7ca4096b9019428d9fccabd37384 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 1 May 2022 17:33:41 -0400 Subject: fix crossplatform build scripts --- build/windows/prepare-install-package.ps1 | 66 +++++++++++++++++++------------ 1 file changed, 40 insertions(+), 26 deletions(-) (limited to 'build/windows') diff --git a/build/windows/prepare-install-package.ps1 b/build/windows/prepare-install-package.ps1 index 5a1e0bcc..5e116019 100644 --- a/build/windows/prepare-install-package.ps1 +++ b/build/windows/prepare-install-package.ps1 @@ -1,33 +1,19 @@ # # # This is the PowerShell equivalent of ../unix/prepare-install-package.sh, *except* that it doesn't -# set Linux permissions, create the install.dat files, or create the final zip. Due to limitations -# in PowerShell, the final changes are handled by the windows/finalize-install-package.sh file in -# WSL. +# set Linux permissions, create the install.dat files, or create the final zip (unless you specify +# --windows-only). Due to limitations in PowerShell, the final changes are handled by the +# windows/finalize-install-package.sh file in WSL. # # When making changes, make sure to update ../unix/prepare-install-package.ps1 too. # # - -. "$PSScriptRoot\lib\in-place-regex.ps1" +. "$PSScriptRoot/lib/in-place-regex.ps1" ########## -## Set version -########## -# get version number -$version = $args[0] -if (!$version) { - $version = Read-Host "SMAPI release version (like '4.0.0')" -} - -# set version -. "$PSScriptRoot/set-smapi-version.ps1" "$version" - - -########## -## Constants +## Fetch values ########## # paths $gamePath = "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley" @@ -39,6 +25,23 @@ $folders = "linux", "macOS", "windows" $runtimes = @{ linux = "linux-x64"; macOS = "osx-x64"; windows = "win-x64" } $msBuildPlatformNames = @{ linux = "Unix"; macOS = "OSX"; windows = "Windows_NT" } +# version number +$version = $args[0] +if (!$version) { + $version = Read-Host "SMAPI release version (like '4.0.0')" +} + +# Windows-only build +$windowsOnly = $false +foreach ($arg in $args) { + if ($arg -eq "--windows-only") { + $windowsOnly = $true + $folders = "windows" + $runtimes = @{ windows = "win-x64" } + $msBuildPlatformNames = @{ windows = "Windows_NT" } + } +} + ########## ## Move to SMAPI root @@ -62,7 +65,8 @@ echo "" ########## ## Compile files ########## -ForEach ($folder in $folders) { +. "$PSScriptRoot/set-smapi-version.ps1" "$version" +foreach ($folder in $folders) { $runtime = $runtimes[$folder] $msbuildPlatformName = $msBuildPlatformNames[$folder] @@ -106,6 +110,10 @@ foreach ($folder in $folders) { # copy base installer files foreach ($name in @("install on Linux.sh", "install on macOS.command", "install on Windows.bat", "README.txt")) { + if ($windowsOnly -and ($name -eq "install on Linux.sh" -or $name -eq "install on macOS.command")) { + continue; + } + cp "$installAssets/$name" "$packagePath" } @@ -199,11 +207,14 @@ foreach ($folder in $folders) { In-Place-Regex -Path "$packagePath/internal/$folder/bundle/smapi-internal/config.json" -Search "`"DeveloperMode`": true" -Replace "`"DeveloperMode`": false" # convert bundle folder into final 'install.dat' files - foreach ($path in @("$packagePath/internal/$folder", "$packageDevPath/internal/$folder")) + if ($windowsOnly) { - Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.zip" - mv "$path/install.zip" "$path/install.dat" - rm -Recurse -Force "$path/bundle" + foreach ($path in @("$packagePath/internal/$folder", "$packageDevPath/internal/$folder")) + { + Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.zip" + mv "$path/install.zip" "$path/install.dat" + rm -Recurse -Force "$path/bundle" + } } } @@ -216,8 +227,11 @@ mv "$packagePath" "bin/SMAPI $version installer" mv "$packageDevPath" "bin/SMAPI $version installer for developers" # package files -Compress-Archive -Path "bin/SMAPI $version installer" -DestinationPath "bin/SMAPI $version installer.zip" -CompressionLevel Optimal -Compress-Archive -Path "bin/SMAPI $version installer for developers" -DestinationPath "bin/SMAPI $version installer for developers.zip" -CompressionLevel Optimal +if ($windowsOnly) +{ + Compress-Archive -Path "bin/SMAPI $version installer" -DestinationPath "bin/SMAPI $version installer.zip" -CompressionLevel Optimal + Compress-Archive -Path "bin/SMAPI $version installer for developers" -DestinationPath "bin/SMAPI $version installer for developers.zip" -CompressionLevel Optimal +} echo "" echo "Done! See docs/technical/smapi.md to create the release zips." -- cgit