Skip to content

Commit f75fc6f

Browse files
authored
Merge pull request #226 from SubnauticaModding/Dev
QMM 4.1.3
2 parents 3882526 + 73c5dc3 commit f75fc6f

File tree

25 files changed

+507
-107
lines changed

25 files changed

+507
-107
lines changed

Data/latest-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.2
1+
4.1.3

Executable/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("4.1.2")]
16-
[assembly: AssemblyFileVersion("4.1.2")]
15+
[assembly: AssemblyVersion("4.1.3")]
16+
[assembly: AssemblyFileVersion("4.1.3")]

Installer/BZ.EXP.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.2"
8+
#define Version "4.1.3"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"

Installer/BZ.STABLE.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.2"
8+
#define Version "4.1.3"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"

Installer/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
[assembly: Guid("8c6c9a0b-80c4-43d2-89f2-749e6f09fdda")]
1616

17-
[assembly: AssemblyVersion("4.1.2")]
18-
[assembly: AssemblyFileVersion("4.1.2")]
17+
[assembly: AssemblyVersion("4.1.3")]
18+
[assembly: AssemblyFileVersion("4.1.3")]

Installer/SN.EXP.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.2"
8+
#define Version "4.1.3"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"

Installer/SN.STABLE.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#endif
66

77
#define Name "QModManager" ; The name of the game will be added after it
8-
#define Version "4.1.2"
8+
#define Version "4.1.3"
99
#define Author "QModManager"
1010
#define URL "https://github.com/QModManager/QModManager"
1111
#define SupportURL "https://discord.gg/UpWuWwq"

MacOSX/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Building on OSX
2+
3+
## Preparation
4+
5+
### Prepare Solution
6+
* Open `QModManager.sln` with Visual Code to initialize packages
7+
8+
### Create Publicized Assemblies
9+
* Follow instructions at the [SMLHelper GitHub page](https://github.com/SubnauticaModding/SMLHelper)
10+
* Download [AssemblyPublicizer.zip](https://github.com/CabbageCrow/AssemblyPublicizer/releases/download/v1.1.0/AssemblyPublicizer.zip) and extract to `~/AssemblyPublicizer.exe`
11+
* Create publizised assemblies:
12+
* `cd "~/Library/Application Support/Steam/steamapps/common/SubnauticaZero/SubnauticaZero.app/Contents/Resources/Data/Managed"`
13+
* `mono ~/AssemblyPublicizer.exe -i Assembly-CSharp.dll`
14+
* `mono ~/AssemblyPublicizer.exe -i Assembly-CSharp-firstpass.dll`
15+
* Copy the dlls from `publicized_assemblies/` to `Dependencies/BZ.STABLE/`
16+
17+
## Build
18+
* Create distribution package by running `MacOSX/build.sh`
19+
20+
## Installation
21+
* Copy distribution package contents to `~/Library/Application Support/Steam/steamapps/common/SubnauticaZero`
22+
* Update Steam Launch options to `"/Users/username/Library/Application Support/Steam/steamapps/common/SubnauticaZero/QModManager.sh" %command%`

MacOSX/build.sh

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/bin/bash
2+
3+
# Variables
4+
CONFIGURATION="BZ.STABLE"
5+
VERSION="4.0.2.3"
6+
echo "[$CONFIGURATION]"
7+
8+
# Clean up build and dist folder
9+
DEPS="./Dependencies"
10+
BUILD="./Build/$CONFIGURATION"
11+
DIST="./Build/MacOSX/$CONFIGURATION"
12+
rm -rf ./Build
13+
rm -rf $DIST
14+
mkdir -p $DIST
15+
mkdir -p "./$DIST/BepInEx/patchers/QModManager/"
16+
mkdir -p "./$DIST/BepInEx/plugins/QModManager/"
17+
mkdir -p "./$DIST/doorstop_libs"
18+
19+
# Download QModManager.exe
20+
echo "~> downloading QModManager.exe"
21+
wget -q -O "$DIST/QModManager.zip" "https://github.com/SubnauticaModding/QModManager/archive/refs/tags/v$VERSION.zip"
22+
unzip -qq "$DIST/QModManager.zip" -d "$DIST/QModManager"
23+
cp "$DIST/QModManager/QModManager-$VERSION/Build/QModManager.exe" "./$DIST/BepInEx/patchers/QModManager/QModManager.exe"
24+
cp "$DIST/QModManager/QModManager-$VERSION/Build/QModManager.exe.config" "./$DIST/BepInEx/patchers/QModManager/QModManager.exe.config"
25+
rm "$DIST/QModManager.zip"
26+
rm -rf "$DIST/QModManager"
27+
28+
# Download doorstop libs
29+
echo "~> downloading doorstop libs"
30+
wget -q -O "./$DIST/doorstop_libs/libdoorstop_x64.dylib" https://github.com/SphereII/DMTBridgeLoaderPlugin/raw/main/doorstop_libs/libdoorstop_x64.dylib
31+
wget -q -O "./$DIST/doorstop_libs/libdoorstop_x86.dylib" https://github.com/SphereII/DMTBridgeLoaderPlugin/raw/main/doorstop_libs/libdoorstop_x86.dylib
32+
33+
# Build projects
34+
echo "~> building OculusNewtonsoftRedirect"
35+
msbuild ./OculusNewtonsoftRedirect/QModManager.OculusNewtonsoftRedirect.csproj -property:Configuration=$CONFIGURATION -verbosity:quiet 2>&1 > /dev/null
36+
echo "~> building QModManager"
37+
msbuild ./QModManager/QModManager.csproj -property:Configuration=$CONFIGURATION -verbosity:quiet 2>&1 > /dev/null
38+
echo "~> building UnityAudioFixer"
39+
msbuild ./UnityAudioFixer/QModManager.UnityAudioFixer.csproj -property:Configuration=$CONFIGURATION -verbosity:quiet 2>&1 > /dev/null
40+
echo "~> building QModPluginGenerator"
41+
msbuild ./QModPluginEmulator/QModManager.QModPluginGenerator.csproj -property:Configuration=$CONFIGURATION -property:PostBuildEvent= -verbosity:quiet 2>&1 > /dev/null
42+
43+
# Copy Build Files
44+
echo "~> creating distribution package"
45+
cp -r "$DEPS/BepInEx/BepInEx" "./$DIST"
46+
cp "$DEPS/BepInEx/doorstop_config.ini" "./$DIST"
47+
cp "$DEPS/BepInEx/winhttp.dll" "./$DIST"
48+
cp "$DEPS/cldb.dat" "./$DIST/BepInEx/patchers/QModManager/"
49+
cp "./packages/AssetsTools.NET.2.0.3/lib/net35/AssetsTools.NET.dll" "./$DIST/BepInEx/patchers/QModManager/"
50+
cp "$BUILD/QModManager.QModPluginGenerator.dll" "./$DIST/BepInEx/patchers/QModManager/"
51+
cp "$BUILD/QModManager.UnityAudioFixer.dll" "./$DIST/BepInEx/patchers/QModManager/"
52+
cp "$BUILD/QModManager.UnityAudioFixer.xml" "./$DIST/BepInEx/patchers/QModManager/"
53+
cp "$BUILD/QModInstaller.dll" "./$DIST/BepInEx/plugins/QModManager/"
54+
cp "$BUILD/QModInstaller.xml" "./$DIST/BepInEx/plugins/QModManager/"
55+
56+
# Copy Build Files for SN.SABLE
57+
if [ "$CONFIGURATION" != "SN.STABLE" ]; then
58+
cp "$DEPS/Oculus.Newtonsoft.Json.dll" "./$DIST/BepInEx/patchers/QModManager/"
59+
cp "$BUILD/QModManager.OculusNewtonsoftRedirect.dll" "./$DIST/BepInEx/patchers/QModManager/"
60+
fi
61+
62+
# Copy Launcher
63+
cp "./MacOSX/dist/QModManager.sh" "./$DIST/QModManager.sh"
64+
chmod +x "./$DIST/QModManager.sh"
65+
echo "~> distribution package created at $DIST"
66+
67+
# Build Installer Package
68+
chmod -R 755 $DIST
69+
PKG_BUILD="./MacOSX/PKG.$CONFIGURATION"
70+
mkdir -p $PKG_BUILD
71+
pkgbuild --identifier org.QModManager.$VERSION --version $VERSION --install-location "/Library/Application Support/Steam/steamapps/common/SubnauticaZero" --root "$DIST" $PKG_BUILD/QModManager.pkg > /dev/null 2>&1
72+
productbuild --distribution ./MacOSX/dist/Distribution --resources ./MacOSX/dist/Resources --package-path $PKG_BUILD "./Build/MacOSX/QModManager-$VERSION.$CONFIGURATION.pkg" > /dev/null 2>&1
73+
rm -rf $PKG_BUILD
74+
echo "~> installer package created at Build/MacOSX/QModManager-$VERSION.$CONFIGURATION.pkg"

MacOSX/dist/Distribution

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<installer-script minSpecVersion="1.000000">
3+
<title>QModManager</title>
4+
<background mime-type="image/png" file="banner.png" scaling="proportional"/>
5+
<background-darkAqua mime-type="image/png" file="banner.png" scaling="proportional"/>
6+
<welcome file="welcome.html" mime-type="text/html" />
7+
<conclusion file="conclusion.html" mime-type="text/html" />
8+
<license file="LICENSE.html" mime-type="text/html"/>
9+
<options customize="never" allow-external-scripts="no"/>
10+
<domains enable_localSystem="false" />
11+
<domains enable_anywhere="true" />
12+
<domains enable_currentUserHome="true" />
13+
<installation-check script="installCheck()"/>
14+
<script>
15+
function installCheck() {
16+
if (!(system.compareVersions(system.version.ProductVersion, '10.6.0') >= 0)) {
17+
my.result.title = 'Unable to install'
18+
my.result.message = 'QModManager requires Mac OS X 10.6 or later.'
19+
my.result.type = 'Fatal'
20+
return false
21+
}
22+
if (system.files.fileExistsAtPath('/Library/QModManager/4.0.2.3/')) {
23+
my.result.title = 'Previous Installation Detected'
24+
my.result.message = 'A previous installation of QModManager exists at /Library/QModManager/4.0.2.3/. This installer will remove the previous installation prior to installing. Please back up any data before proceeding.'
25+
my.result.type = 'Warning'
26+
return false
27+
}
28+
return true
29+
}
30+
</script>
31+
<choices-outline>
32+
<line choice="QModManager"/>
33+
</choices-outline>
34+
<choice id="QModManager" title="QModManager">
35+
<pkg-ref id="QModManager.pkg"/>
36+
</choice>
37+
<pkg-ref id="QModManager.pkg" auth="Root">QModManager.pkg</pkg-ref>
38+
</installer-script>

MacOSX/dist/QModManager.sh

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
EXECUTABLE_NAME="SubnauticaZero.app"
3+
4+
export DOORSTOP_ENABLE=TRUE
5+
export DOORSTOP_INVOKE_DLL_PATH="${PWD}/BepInEx/core/BepInEx.Preloader.dll"
6+
7+
ARCH=""
8+
EXECUTABLE_NAME=`basename "${EXECUTABLE_NAME}" .app`
9+
REAL_EXECUTABLE_NAME=`defaults read "${PWD}/${EXECUTABLE_NAME}.app/Contents/Info" CFBundleExecutable`
10+
EXECUTABLE_PATH="${PWD}/${EXECUTABLE_NAME}.app/Contents/MacOS/${REAL_EXECUTABLE_NAME}"
11+
EXECUTABLE_TYPE=`LD_PRELOAD="" file -b "${EXECUTABLE_PATH}"`;
12+
13+
case $EXECUTABLE_TYPE in
14+
*64-bit*)
15+
arch="x64"
16+
;;
17+
*32-bit*|*i386*)
18+
arch="x86"
19+
;;
20+
*)
21+
echo "Cannot identify executable type (got ${EXECUTABLE_TYPE})!"
22+
echo "Please create an issue at https://github.com/BepInEx/BepInEx/issues."
23+
exit 1
24+
;;
25+
esac
26+
27+
DOORSTOP_LIBS="${PWD}/doorstop_libs"
28+
DOORSTOP_LIBNAME=libdoorstop_${arch}.dylib
29+
30+
export LD_LIBRARY_PATH="${DOORSTOP_LIBS}":${LD_LIBRARY_PATH}
31+
export LD_PRELOAD=$DOORSTOP_LIBNAME:$LD_PRELOAD
32+
export DYLD_LIBRARY_PATH="${DOORSTOP_LIBS}"
33+
export DYLD_INSERT_LIBRARIES="${DOORSTOP_LIBS}/$DOORSTOP_LIBNAME"
34+
35+
"${EXECUTABLE_PATH}"

MacOSX/dist/Resources/banner.png

59.8 KB
Loading

MacOSX/dist/Resources/conclusion.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head><meta charset="utf-8" /></head>
5+
<body>
6+
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
7+
<h3>QModManager</h3>
8+
<p style="color: #020202; font-size: 11px;">Thank you for installing QModManager.</p>
9+
<h5>Configure Steam</h5>
10+
<p style="color: #020202; font-size: 11px;">Set the Launch Options for Subnautica Below Zero to:</p>
11+
<code style="font-size: 11px;">
12+
"/Users/{USERNAME}/Library/Application Support/Steam/steamapps/common/SubnauticaZero/QModManager.sh" %command%
13+
</code>
14+
</div>
15+
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
16+
<br/>
17+
<h5>Resources</h5>
18+
<p style="color: #020202; font-size: 11px;">Go through following links for additional information.</p>
19+
<ul>
20+
<li><a href="https://github.com/SubnauticaModding/QModManager" style="font-size: 11px;">GitHub Page</a></li>
21+
</ul>
22+
</div>
23+
<div style="font-family: Helvetica; padding-left: 10px;" align="left"><br />
24+
<p style="color: #abb0b0; font-size: 10px;">Copyright © 2021 QModManager Inc. All rights reserved.</p>
25+
</div>
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)