Pull commands from popkirby/oneshot-macos-installer

Thank you to @popkirby for this great installer!
This commit is contained in:
Vinyl Darkscratch 2018-02-26 00:08:23 -08:00
parent 3c811fedc3
commit 32c1c7c102
7 changed files with 57 additions and 10 deletions

View file

@ -54,3 +54,13 @@ All option entries can alternatively be specified as command line options. Any o
The syntax is: `--<option>=<value>`
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.

39
install.command Normal file
View file

@ -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"

View file

@ -1,9 +1,10 @@
#!/bin/sh
set -e
cd `dirname $0`
# User-configurable variables
mac_version="0.4.1"
steam_game_dir=~/Library/Application\ Support/Steam/SteamApps/common/OneShot
make_threads=8
# Colors
@ -61,14 +62,6 @@ m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.a
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
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
echo "-> ${cyan}Cleanup files...${color_reset}"
# make clean
@ -76,4 +69,4 @@ rm -rf journal/mac/__pycache__
rm -rf build
rm -rf dist
echo "\n${green}Complete! ${white}Please report any issues to https://github.com/vinyldarkscratch/synglechance/issues${color_reset}"
echo "\n${green}Complete! ${white}Please report any issues to https://github.com/vinyldarkscratch/synglechance/issues${color_reset}"

5
patches/mac/bin/LICENSE Normal file
View file

@ -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.

BIN
patches/mac/bin/convert Normal file

Binary file not shown.

BIN
patches/mac/bin/extract-bmp Normal file

Binary file not shown.

BIN
patches/mac/bin/upx Normal file

Binary file not shown.