Pull commands from popkirby/oneshot-macos-installer
Thank you to @popkirby for this great installer!
This commit is contained in:
parent
3c811fedc3
commit
32c1c7c102
10
README.md
10
README.md
|
|
@ -54,3 +54,13 @@ All option entries can alternatively be specified as command line options. Any o
|
||||||
The syntax is: `--<option>=<value>`
|
The syntax is: `--<option>=<value>`
|
||||||
|
|
||||||
Example: `./oneshot --gameFolder="oneshot" --vsync=true`
|
Example: `./oneshot --gameFolder="oneshot" --vsync=true`
|
||||||
|
|
||||||
|
## Troubleshooting (macOS)
|
||||||
|
|
||||||
|
### cannot open `~.command` file or `OneShot.app`: unidentified developer
|
||||||
|
|
||||||
|
Right-click the file and select 'Open'.
|
||||||
|
|
||||||
|
### An error `Unable to open 'Data/xScripts.rxdata'` occurs
|
||||||
|
|
||||||
|
Move `_______.app` and `OneShot.app` to somewhere outside the OneShot directory, open and quit them, then move them again to OneShot directory.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Credit to popkirby on GitHub for creating the majority of this file
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
||||||
|
|
||||||
|
echo "-> ${cyan}Extracting images from EXE...${color_reset}"
|
||||||
|
./patches/mac/bin/upx -d -o ./uncompressed.exe "$ONESHOT_PATH/_______.exe"
|
||||||
|
./patches/mac/bin/extract-bmp
|
||||||
|
|
||||||
|
echo "-> ${cyan}Converting bitmap images to PNG...${color_reset}"
|
||||||
|
for bmp in ./images/*.bmp; do
|
||||||
|
./patches/mac/bin/convert "$bmp" -alpha on -transparent "#00ff00" "./images/$(basename "$bmp" .bmp).png"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "-> ${cyan}Copy images to application...${color_reset}"
|
||||||
|
cp -rf ./images ./_______.app/Contents/Resources/
|
||||||
|
|
||||||
|
echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
||||||
|
cp -f "./xScripts.rxdata" "$ONESHOT_PATH/Data"
|
||||||
|
cp -rf "./OneShot.app" "$ONESHOT_PATH/OneShot.app"
|
||||||
|
cp -rf "./_______.app" "$ONESHOT_PATH/_______.app"
|
||||||
|
ln -sfh "$ONESHOT_PATH/OneShot.app" "$HOME/Applications/OneShot.app"
|
||||||
|
|
||||||
|
echo "-> ${cyan}Cleaning up...${color_reset}"
|
||||||
|
rm ./images/*.bmp
|
||||||
|
|
||||||
|
echo "\n${green}Complete! ${white}Please report any issues to https://github.com/vinyldarkscratch/synglechance/issues${color_reset}"
|
||||||
|
open "$ONESHOT_PATH"
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
# User-configurable variables
|
# User-configurable variables
|
||||||
mac_version="0.4.1"
|
mac_version="0.4.1"
|
||||||
steam_game_dir=~/Library/Application\ Support/Steam/SteamApps/common/OneShot
|
|
||||||
make_threads=8
|
make_threads=8
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
|
|
@ -61,14 +62,6 @@ m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.a
|
||||||
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
||||||
ruby rpgscript.rb ./scripts "${steam_game_dir}"
|
ruby rpgscript.rb ./scripts "${steam_game_dir}"
|
||||||
|
|
||||||
# Install to Steam directory
|
|
||||||
echo "-> ${cyan}Install to Steam directory...${color_reset}"
|
|
||||||
cp "${steam_game_dir}/Data/xScripts.rxdata" .
|
|
||||||
rm -rf "${steam_game_dir}/OneShot.app"
|
|
||||||
rm -rf "${steam_game_dir}/_______.app"
|
|
||||||
cp -r OneShot.app "${steam_game_dir}/OneShot.app"
|
|
||||||
cp -r _______.app "${steam_game_dir}/_______.app"
|
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
echo "-> ${cyan}Cleanup files...${color_reset}"
|
echo "-> ${cyan}Cleanup files...${color_reset}"
|
||||||
# make clean
|
# make clean
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
bin/upx: https://github.com/upx/upx
|
||||||
|
The Ultimate Packer for eXecutables Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser. Licensed under GPL with exceptions.
|
||||||
|
|
||||||
|
bin/convert: https://github.com/ImageMagick/ImageMagick
|
||||||
|
ImageMagick, Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue