fix installer errors on Windows (#602)

This commit is contained in:
Jesse Plamondon-Willard
2018-11-19 13:37:46 -05:00
parent 5aed53e943
commit ad612da1a2
7 changed files with 16 additions and 13 deletions
+6 -6
View File
@@ -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="&quot;DeveloperMode&quot;: true" Replace="&quot;DeveloperMode&quot;: 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>
+3
View File
@@ -1,4 +1,7 @@
# Release notes
## 2.8.1
* Fixed installer error on Windows.
## 2.8
* For players:
* Reorganised SMAPI files:
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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})");
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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
View File
@@ -1 +1 @@
START /WAIT /B internal/install.exe
START /WAIT /B internal/windows-install.exe