mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
fix installer errors on Windows (#602)
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
<CompiledToolkitPath>$(CompiledRootPath)\SMAPI.Toolkit\net4.5</CompiledToolkitPath>
|
||||
<PackagePath>$(SolutionDir)\..\bin\SMAPI installer</PackagePath>
|
||||
<PackageDevPath>$(SolutionDir)\..\bin\SMAPI installer for developers</PackageDevPath>
|
||||
<PackageBundlePlatform>windows</PackageBundlePlatform>
|
||||
<PackageBundlePlatform Condition="$(OS) != 'Windows_NT'">mono</PackageBundlePlatform>
|
||||
<PlatformName>windows</PlatformName>
|
||||
<PlatformName Condition="$(OS) != 'Windows_NT'">unix</PlatformName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<CompiledMods Include="$(SolutionDir)\..\bin\$(Configuration)\Mods\**\*.*" />
|
||||
@@ -28,8 +28,8 @@
|
||||
<Copy SourceFiles="$(TargetDir)\unix-install.sh" DestinationFiles="$(PackagePath)\install on Mac.command" />
|
||||
<Copy SourceFiles="$(TargetDir)\windows-install.bat" DestinationFiles="$(PackagePath)\install on Windows.bat" />
|
||||
<Copy SourceFiles="$(TargetDir)\README.txt" DestinationFiles="$(PackagePath)\README.txt" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\internal\install.exe" />
|
||||
<Copy SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\internal\install.exe.config" />
|
||||
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe" />
|
||||
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe.config" />
|
||||
|
||||
<!--copy bundle files-->
|
||||
<Copy SourceFiles="$(TargetDir)\unix-launcher.sh" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI" />
|
||||
@@ -62,12 +62,12 @@
|
||||
<PackageFiles Include="$(PackagePath)\**\*.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(PackageDevPath)\%(RecursiveDir)" />
|
||||
<ZipDirectory FromDirPath="$(PackageDevPath)\bundle" ToFilePath="$(PackageDevPath)\internal\$(PackageBundlePlatform).dat" />
|
||||
<ZipDirectory FromDirPath="$(PackageDevPath)\bundle" ToFilePath="$(PackageDevPath)\internal\$(PlatformName)-install.dat" />
|
||||
<RemoveDir Directories="$(PackageDevPath)\bundle" />
|
||||
|
||||
<!-- finalise normal installer -->
|
||||
<ReplaceFileText FilePath="$(PackagePath)\bundle\smapi-internal\StardewModdingAPI.config.json" Search=""DeveloperMode": true" Replace=""DeveloperMode": false" />
|
||||
<ZipDirectory FromDirPath="$(PackagePath)\bundle" ToFilePath="$(PackagePath)\internal\$(PackageBundlePlatform).dat" />
|
||||
<ZipDirectory FromDirPath="$(PackagePath)\bundle" ToFilePath="$(PackagePath)\internal\$(PlatformName)-install.dat" />
|
||||
<RemoveDir Directories="$(PackagePath)\bundle" />
|
||||
</Target>
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Release notes
|
||||
## 2.8.1
|
||||
* Fixed installer error on Windows.
|
||||
|
||||
## 2.8
|
||||
* For players:
|
||||
* Reorganised SMAPI files:
|
||||
|
||||
@@ -58,12 +58,12 @@ on the wiki for the first-time setup.
|
||||
|
||||
2. In Windows:
|
||||
1. Rebuild the solution in Release mode.
|
||||
2. Copy `windows.dat` from `bin/SMAPI installer` and `bin/SMAPI installer for developers` to
|
||||
2. Copy `windows-install.*` from `bin/SMAPI installer` and `bin/SMAPI installer for developers` to
|
||||
Linux/Mac.
|
||||
|
||||
3. In Linux/Mac:
|
||||
1. Rebuild the solution in Release mode.
|
||||
2. Add the `windows.dat` files to the `bin/SMAPI installer` and
|
||||
2. Add the `windows-install.*` files to the `bin/SMAPI installer` and
|
||||
`bin/SMAPI installer for developers` folders.
|
||||
3. Rename the folders to `SMAPI <version> installer` and `SMAPI <version> installer for developers`.
|
||||
4. Zip the two folders.
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace StardewModdingApi.Installer
|
||||
{
|
||||
// find install bundle
|
||||
PlatformID platform = Environment.OSVersion.Platform;
|
||||
FileInfo zipFile = new FileInfo(Path.Combine(Program.InstallerPath, $"{(platform == PlatformID.Win32NT ? "windows" : "mono")}.dat"));
|
||||
FileInfo zipFile = new FileInfo(Path.Combine(Program.InstallerPath, $"{(platform == PlatformID.Win32NT ? "windows" : "unix")}-install.dat"));
|
||||
if (!zipFile.Exists)
|
||||
{
|
||||
Console.WriteLine($"Oops! Some of the installer files are missing; try redownloading the installer. (Missing file: {zipFile.FullName})");
|
||||
|
||||
@@ -24,8 +24,8 @@ Manual install
|
||||
THIS IS NOT RECOMMENDED FOR MOST PLAYERS. See instructions above instead.
|
||||
If you really want to install SMAPI manually, here's how.
|
||||
|
||||
1. Unzip "internal/windows.dat" (on Windows) or "internal/mono.dat" (on Linux/Mac). You can change
|
||||
'.dat' to '.zip', it's just a normal zip file renamed to prevent confusion.
|
||||
1. Unzip "internal/windows-install.dat" (on Windows) or "internal/unix-install.dat" (on Linux/Mac).
|
||||
You can change '.dat' to '.zip', it's just a normal zip file renamed to prevent confusion.
|
||||
2. Copy the files from the folder you just unzipped into your game folder. The
|
||||
`StardewModdingAPI.exe` file should be right next to the game's executable.
|
||||
3.
|
||||
|
||||
@@ -14,7 +14,7 @@ fi
|
||||
|
||||
# validate Mono & run installer
|
||||
if $COMMAND mono >/dev/null 2>&1; then
|
||||
mono internal/install.exe
|
||||
mono internal/unix-install.exe
|
||||
else
|
||||
echo "Oops! Looks like Mono isn't installed. Please install Mono from https://mono-project.com, reboot, and run this installer again."
|
||||
read
|
||||
|
||||
@@ -1 +1 @@
|
||||
START /WAIT /B internal/install.exe
|
||||
START /WAIT /B internal/windows-install.exe
|
||||
|
||||
Reference in New Issue
Block a user