mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Update make script
Add progress messages and allow for user config of Steam game directory
This commit is contained in:
parent
55f6a4318c
commit
d4a22f2b81
1 changed files with 34 additions and 10 deletions
|
|
@ -1,35 +1,59 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
mac_version="0.3.2"
|
# User-configurable variables
|
||||||
|
mac_version="0.3.3"
|
||||||
|
steam_game_dir=~/Library/Application\ Support/Steam/SteamApps/common/OneShot
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
white="\033[0;37m" # White - Regular
|
||||||
|
bold="\033[1;37m" # White - Bold
|
||||||
|
cyan="\033[1;36m" # Cyan - Bold
|
||||||
|
green="\033[1;32m" # Green - Bold
|
||||||
|
color_reset="\033[0m" # Reset Colors
|
||||||
|
|
||||||
|
echo "${white}Compiling ${bold}SyngleChance v${mac_version} ${white}engine for macOS...${color_reset}\n"
|
||||||
|
|
||||||
# Generate makefile and build main + journal
|
# Generate makefile and build main + journal
|
||||||
|
echo "-> ${cyan}Generate makefile...${color_reset}"
|
||||||
qmake MRIVERSION=2.3
|
qmake MRIVERSION=2.3
|
||||||
|
echo "-> ${cyan}Compile engine...${color_reset}"
|
||||||
make -j4
|
make -j4
|
||||||
|
echo "-> ${cyan}Compile journal...${color_reset}"
|
||||||
pyinstaller journal/mac/journal.spec --onefile --windowed
|
pyinstaller journal/mac/journal.spec --onefile --windowed
|
||||||
|
|
||||||
# Create app bundles
|
# Create app bundles
|
||||||
|
echo "-> ${cyan}Create app bundles...${color_reset}"
|
||||||
mv OneShot.app OneShot_new.app
|
mv OneShot.app OneShot_new.app
|
||||||
cp -r patches/mac/OneShot_template.app ./OneShot.app
|
cp -r patches/mac/OneShot_template.app ./OneShot.app
|
||||||
cp OneShot_new.app/Contents/MacOS/OneShot OneShot.app/Contents/Resources/OneShot
|
cp OneShot_new.app/Contents/MacOS/OneShot OneShot.app/Contents/Resources/OneShot
|
||||||
cp -r dist/_______.app _______.app
|
cp -r dist/_______.app _______.app
|
||||||
|
|
||||||
# Set version number
|
# Set version number
|
||||||
|
echo "-> ${cyan}Set version number...${color_reset}"
|
||||||
rm OneShot.app/Contents/Info.plist
|
rm OneShot.app/Contents/Info.plist
|
||||||
rm _______.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/Info.plist.in -DONESHOTMACVERSION=$mac_version > OneShot.app/Contents/Info.plist
|
||||||
m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.app/Contents/Info.plist
|
m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.app/Contents/Info.plist
|
||||||
|
|
||||||
# Compile scripts and install to Steam directory
|
# Compile scripts
|
||||||
ruby rpgscript.rb ./scripts ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/
|
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
||||||
cp ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/Data/xScripts.rxdata .
|
ruby rpgscript.rb ./scripts "${steam_game_dir}"
|
||||||
rm -r ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/OneShot.app
|
|
||||||
rm -r ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/_______.app
|
# Install to Steam directory
|
||||||
cp -r OneShot.app ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/OneShot.app
|
echo "-> ${cyan}Install to Steam directory...${color_reset}"
|
||||||
cp -r _______.app ~/Library/Application\ Support/Steam/SteamApps/common/OneShot/_______.app
|
cp "${steam_game_dir}/Data/xScripts.rxdata" .
|
||||||
|
rm -r "${steam_game_dir}/OneShot.app"
|
||||||
|
rm -r "${steam_game_dir}/_______.app"
|
||||||
|
cp -r OneShot.app "${steam_game_dir}/OneShot.app"
|
||||||
|
cp -r _______.app "${steam_game_dir}/_______.app"
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
make clean
|
echo "-> ${cyan}Cleanup files...${color_reset}"
|
||||||
|
# make clean
|
||||||
rm -r OneShot_new.app
|
rm -r OneShot_new.app
|
||||||
rm -r journal/mac/__pycache__
|
rm -r journal/mac/__pycache__
|
||||||
rm -r build
|
rm -r build
|
||||||
rm -r dist
|
rm -r dist
|
||||||
|
|
||||||
|
echo "\n${green}Complete! ${white}Please report any issues to https://github.com/vinyldarkscratch/mkxp-oneshot/issues${color_reset}"
|
||||||
Loading…
Reference in a new issue