diff --git a/.github/workflows/build-smapi.yml b/.github/workflows/build-smapi.yml index 828e4fef..18b8d46d 100644 --- a/.github/workflows/build-smapi.yml +++ b/.github/workflows/build-smapi.yml @@ -87,10 +87,8 @@ jobs: Write-Host "Building SMAPI $env:VERSION." ./build/scripts/prepare-install-package.ps1 "$env:VERSION" - - name: Rename build zips - run: | - mv "bin/SMAPI ${{env.VERSION}} installer.zip" "bin/SMAPI-${{env.VERSION}}-installer.zip" - mv "bin/SMAPI ${{env.VERSION}} installer for developers.zip" "bin/SMAPI-${{env.VERSION}}-installer-for-developers.zip" + - name: Rename build zip + run: mv "bin/SMAPI ${{env.VERSION}} installer.zip" "bin/SMAPI-${{env.VERSION}}-installer.zip" - name: Upload installer uses: actions/upload-artifact@v4 @@ -99,13 +97,6 @@ jobs: path: 'bin/SMAPI-${{env.VERSION}}-installer.zip' if-no-files-found: 'error' - - name: Upload installer for developers - uses: actions/upload-artifact@v4 - with: - name: 'SMAPI ${{env.VERSION}} installer for developers' - path: 'bin/SMAPI-${{env.VERSION}}-installer-for-developers.zip' - if-no-files-found: 'error' - - name: Create GitHub release uses: ncipollo/release-action@v1 if: github.ref_type == 'tag' @@ -121,6 +112,4 @@ jobs: - name: Generate artifact attestations uses: actions/attest-build-provenance@v2 with: - subject-path: | - bin/SMAPI-${{env.VERSION}}-installer.zip - bin/SMAPI-${{env.VERSION}}-installer-for-developers.zip + subject-path: bin/SMAPI-${{env.VERSION}}-installer.zip diff --git a/build/scripts/finalize-install-package.sh b/build/scripts/finalize-install-package.sh index 117e33e5..65abf731 100644 --- a/build/scripts/finalize-install-package.sh +++ b/build/scripts/finalize-install-package.sh @@ -24,44 +24,43 @@ buildFolders=("linux" "macOS" "windows") ########## ## Finalize release package ########## -for folderName in "SMAPI $version installer" "SMAPI $version installer for developers"; do - # move files to Linux filesystem - echo "Preparing $folderName.zip..." - echo "-------------------------------------------------" - echo "copying '$windowsBinPath/$folderName' to Linux filesystem..." - cp -r "$windowsBinPath/$folderName" . +# move files to Linux filesystem +folderName = "SMAPI $version installer" +echo "Preparing $folderName.zip..." +echo "-------------------------------------------------" +echo "copying '$windowsBinPath/$folderName' to Linux filesystem..." +cp -r "$windowsBinPath/$folderName" . - # fix permissions - echo "fixing permissions..." - find "$folderName" -type d -exec chmod 755 {} \; - find "$folderName" -type f -exec chmod 644 {} \; - find "$folderName" -name "*.sh" -exec chmod 755 {} \; - find "$folderName" -name "*.command" -exec chmod 755 {} \; - find "$folderName" -name "SMAPI.Installer" -exec chmod 755 {} \; - find "$folderName" -name "StardewModdingAPI" -exec chmod 755 {} \; +# fix permissions +echo "fixing permissions..." +find "$folderName" -type d -exec chmod 755 {} \; +find "$folderName" -type f -exec chmod 644 {} \; +find "$folderName" -name "*.sh" -exec chmod 755 {} \; +find "$folderName" -name "*.command" -exec chmod 755 {} \; +find "$folderName" -name "SMAPI.Installer" -exec chmod 755 {} \; +find "$folderName" -name "StardewModdingAPI" -exec chmod 755 {} \; - # convert bundle folder into final 'install.dat' files - for build in ${buildFolders[@]}; do - echo "packaging $folderName/internal/$build/install.dat..." - pushd "$folderName/internal/$build/bundle" > /dev/null - zip "install.dat" * --recurse-paths --quiet - mv install.dat ../ - popd > /dev/null +# convert bundle folder into final 'install.dat' files +for build in ${buildFolders[@]}; do + echo "packaging $folderName/internal/$build/install.dat..." + pushd "$folderName/internal/$build/bundle" > /dev/null + zip "install.dat" * --recurse-paths --quiet + mv install.dat ../ + popd > /dev/null - rm -rf "$folderName/internal/$build/bundle" - done - - # zip installer - echo "packaging installer..." - zip -9 "$folderName.zip" "$folderName" --recurse-paths --quiet - - # move zip back to Windows bin path - echo "moving release zip to $windowsBinPath/$folderName.zip..." - mv "$folderName.zip" "$windowsBinPath" - rm -rf "$folderName" - - echo "" - echo "" + rm -rf "$folderName/internal/$build/bundle" done +# zip installer +echo "packaging installer..." +zip -9 "$folderName.zip" "$folderName" --recurse-paths --quiet + +# move zip back to Windows bin path +echo "moving release zip to $windowsBinPath/$folderName.zip..." +mv "$folderName.zip" "$windowsBinPath" +rm -rf "$folderName" + +echo "" +echo "" + echo "Done!" diff --git a/build/scripts/prepare-install-package.ps1 b/build/scripts/prepare-install-package.ps1 index 738f9f80..fc512714 100644 --- a/build/scripts/prepare-install-package.ps1 +++ b/build/scripts/prepare-install-package.ps1 @@ -154,7 +154,6 @@ Write-Output "----------------------------" # init paths $installAssets = "src/SMAPI.Installer/assets" $packagePath = "bin/SMAPI installer" -$packageDevPath = "bin/SMAPI installer for developers" # init structure foreach ($folder in $folders) { @@ -268,19 +267,13 @@ else { } } -# split into main + for-dev folders -Copy-Item -Recurse "$packagePath" "$packageDevPath" +# convert bundle folder into final 'install.dat' files 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" + $path = "$packagePath/internal/$folder" - # 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.dat" - if (!$skipBundleDeletion) { - Remove-Item -Recurse -Force "$path/bundle" - } + Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.dat" + if (!$skipBundleDeletion) { + Remove-Item -Recurse -Force "$path/bundle" } } @@ -288,13 +281,9 @@ foreach ($folder in $folders) { ########### ### Create release zips ########### -# rename folders Move-Item "$packagePath" "bin/SMAPI $version installer" -Move-Item "$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 Write-Output "" Write-Output "Done! Package created in ${pwd.Path}/bin." diff --git a/docs/release-notes.md b/docs/release-notes.md index 241ce635..3cc4567a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -9,6 +9,9 @@ * SMAPI can now detect known malicious loose files in the `Mods` folder. * Updated internal mod blacklist. +* For mod authors: + * SMAPI no longer has a separate 'for developers' version. Instead, you can now use [Generic Mod Config Menu]() to enable 'developer mode' in the console window options. + ## 4.4.0 Released 10 January 2026 for Stardew Valley 1.6.14 or later. See [release highlights](https://www.patreon.com/posts/147916705). diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs index b840f82b..f21634be 100644 --- a/src/SMAPI.Web/Controllers/IndexController.cs +++ b/src/SMAPI.Web/Controllers/IndexController.cs @@ -57,8 +57,8 @@ internal class IndexController : Controller { // choose versions ReleaseVersion[] versions = await this.GetReleaseVersionsAsync(); - ReleaseVersion? stableVersion = versions.LastOrDefault(version => !version.IsForDevs); - ReleaseVersion? stableVersionForDevs = versions.LastOrDefault(version => version.IsForDevs); + ReleaseVersion? stableVersion = versions.LastOrDefault(); + ReleaseVersion? stableVersionForDevs = versions.LastOrDefault(); // render view IndexVersionModel stableVersionModel = stableVersion != null @@ -123,12 +123,11 @@ internal class IndexController : Controller if (asset.FileName.StartsWith("Z_")) continue; - Match match = Regex.Match(asset.FileName, @"SMAPI-(?[\d\.]+(?:-.+)?)-installer(?-for-developers)?.zip"); + Match match = Regex.Match(asset.FileName, @"SMAPI-(?[\d\.]+(?:-.+)?)-installer.zip"); if (!match.Success || !SemanticVersion.TryParse(match.Groups["version"].Value, out ISemanticVersion? version)) continue; - bool isForDevs = match.Groups["forDevs"].Success; - yield return new ReleaseVersion(release, asset, version, isForDevs); + yield return new ReleaseVersion(release, asset, version); } } @@ -147,9 +146,6 @@ internal class IndexController : Controller /// The SMAPI version. public ISemanticVersion Version { get; } - /// Whether this is a 'for developers' download. - public bool IsForDevs { get; } - /********* ** Public methods @@ -158,13 +154,11 @@ internal class IndexController : Controller /// The underlying GitHub release. /// The underlying download asset. /// The SMAPI version. - /// Whether this is a 'for developers' download. - public ReleaseVersion(GitRelease release, GitAsset asset, ISemanticVersion version, bool isForDevs) + public ReleaseVersion(GitRelease release, GitAsset asset, ISemanticVersion version) { this.Release = release; this.Asset = asset; this.Version = version; - this.IsForDevs = isForDevs; } } } diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 077da07c..588f8b9f 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -91,7 +91,6 @@

For mod creators

diff --git a/src/SMAPI/SMAPI.config.json b/src/SMAPI/SMAPI.config.json index 3b999ad0..27165ee8 100644 --- a/src/SMAPI/SMAPI.config.json +++ b/src/SMAPI/SMAPI.config.json @@ -49,7 +49,7 @@ in future SMAPI versions. * * Not recommended for most players. */ - "DeveloperMode": true, + "DeveloperMode": false, /** * Whether SMAPI should listen for console input. Disabling this will prevent you from using