mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Add automated macOS compile script and remove unneeded CMakeLists
This commit is contained in:
parent
cb77de041b
commit
f59bc1d76a
7 changed files with 112 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -13,12 +13,15 @@ Makefile*
|
||||||
/oneshot
|
/oneshot
|
||||||
/steamshim_parent/steamshim
|
/steamshim_parent/steamshim
|
||||||
|
|
||||||
|
__pycache__
|
||||||
/build*
|
/build*
|
||||||
|
/dist
|
||||||
/debug
|
/debug
|
||||||
/release
|
/release
|
||||||
|
|
||||||
object_script.*
|
object_script.*
|
||||||
rpgscript.bat
|
rpgscript.bat
|
||||||
|
xScripts.rxdata
|
||||||
|
|
||||||
.qmake.stash
|
.qmake.stash
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ source_group("Embedded Source" FILES ${EMBEDDED_INPUT} ${EMBEDDED_SOURCE})
|
||||||
## Setup binding source ##
|
## Setup binding source ##
|
||||||
|
|
||||||
if (BINDING STREQUAL "MRI")
|
if (BINDING STREQUAL "MRI")
|
||||||
set(MRIVERSION "2.1" CACHE STRING "Version of MRI to link with")
|
set(MRIVERSION "2.3" CACHE STRING "Version of MRI to link with")
|
||||||
pkg_check_modules(MRI REQUIRED ruby-${MRIVERSION})
|
pkg_check_modules(MRI REQUIRED ruby-${MRIVERSION})
|
||||||
list(APPEND DEFINES
|
list(APPEND DEFINES
|
||||||
BINDING_MRI
|
BINDING_MRI
|
||||||
|
|
|
||||||
35
make-oneshot-mac.sh
Executable file
35
make-oneshot-mac.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mac_version="0.3.1"
|
||||||
|
|
||||||
|
# Generate makefile and build main + journal
|
||||||
|
qmake MRIVERSION=2.3
|
||||||
|
make -j4
|
||||||
|
pyinstaller journal/mac/journal.spec --onefile --windowed
|
||||||
|
|
||||||
|
# Create app bundles
|
||||||
|
mv OneShot.app OneShot_new.app
|
||||||
|
cp -r patches/mac/OneShot_template.app ./OneShot.app
|
||||||
|
cp OneShot_new.app/Contents/MacOS/OneShot OneShot.app/Contents/Resources/OneShot
|
||||||
|
cp -r dist/_______.app _______.app
|
||||||
|
|
||||||
|
# Set version number
|
||||||
|
rm OneShot.app/Contents/Info.plist
|
||||||
|
rm _______.app/Contents/Info.plist
|
||||||
|
m4 patches/mac/Info.plist.in -DONESHOTMACVERSION=$mac_version > OneShot.app/Contents/Info.plist
|
||||||
|
m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.app/Contents/Info.plist
|
||||||
|
|
||||||
|
# Compile scripts and install to Steam directory
|
||||||
|
ruby rpgscript.rb ./scripts ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/
|
||||||
|
cp ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/Data/xScripts.rxdata .
|
||||||
|
rm -r ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/OneShot.app
|
||||||
|
rm -r ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/_______.app
|
||||||
|
cp -r OneShot.app ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/OneShot.app
|
||||||
|
cp -r _______.app ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/_______.app
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
make clean
|
||||||
|
rm -r OneShot_new.app
|
||||||
|
rm -r journal/mac/__pycache__
|
||||||
|
rm -r build
|
||||||
|
rm -r dist
|
||||||
36
patches/mac/Info.plist.in
Executable file
36
patches/mac/Info.plist.in
Executable file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>OneShot</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>OneShot</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>You only have one shot.</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>queengooborg.oneshot-game.osx</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>oneshot.sh</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>icon.icns</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>macOS Port v.ONESHOTMACVERSION (OneShot Solstice Update)</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>ONESHOTMACVERSION</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.games</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7</string>
|
||||||
|
<key>LSBackgroundOnly</key>
|
||||||
|
<string>0</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2017, OneShot team, all rights reserved. View CREDITS.txt for more. Ported for macOS by Vinyl Darkscratch.</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>False</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
36
patches/mac/JournalInfo.plist.in
Normal file
36
patches/mac/JournalInfo.plist.in
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>_______</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>_______</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>queengooborg.oneshot-game.osx-journal</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>MacOS/_______</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>icon_journal.icns</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>ONESHOTMACVERSION</string>
|
||||||
|
<key>LSBackgroundOnly</key>
|
||||||
|
<string>0</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>You only have one shot.</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>ONESHOTMACVERSION</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.games</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2017, OneShot team, all rights reserved. View CREDITS.txt for more. Port for macOS copyright © 2017, hunternet93 and Vinyl Darkscratch, MIT License. https://github.com/hunternet93/OneShot-Journal</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>True</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
1
patches/mac/readme-bad_patch_method.txt
Normal file
1
patches/mac/readme-bad_patch_method.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
This isn't the best way to make the OneShot.app as the OneShot_template.app is a copy of the .app provided by Steam, with some modifications to Info.plist and the icon. I (Vinyl Darkscratch) am not too familiar with QMake, sadly, and as such I'm not quite sure how to copy all the essential frameworks through the QMake file. If anyone can suggest a better way, please let me know by emailing me at vinyldarkscratch at the Gmail!
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
ruby rpgscript.rb ./scripts ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/
|
|
||||||
Loading…
Reference in a new issue