Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation directory, added instructions for creating a working .app on macOS (with needed scripts), and added macOS icon #88

Merged
merged 5 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added GModCEFCodecFixIcon.icns
Binary file not shown.
9 changes: 9 additions & 0 deletions docs/macOS/appgen.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// To generate .app version, use the following process from the repository's root instead of the normal pyinstaller script. This method creates a .app release which we modify to our needs.

pyinstaller --add-data version.txt:. --add-data LICENSE.txt:. --add-data README.md:. --onefile GModCEFCodecFix.py --windowed --icon=GModCEFCodecFixIcon.icns
mv "./dist/GModCEFCodecFix.app/Contents/MacOS/GModCEFCodecFix" "./dist/GModCEFCodecFix.app/Contents/MacOS/GModCEFCodecFix-macOS"
./docs/macOS/scripts/appify.sh ./docs/macOS/scripts/launcher.sh "GModCEFCodecFix"
mv "./GModCEFCodecFix.app/Contents/MacOS/GModCEFCodecFix" "./dist/GModCEFCodecFix.app/Contents/MacOS/GModCEFCodecFix"
rm -R "./dist/GModCEFCodecFix.app/Contents/_CodeSignature" && rm -R "./GModCEFCodecFix.app"

// We've now created a functional .app package for GModCEFCodecFix located in "./dist/GModCEFCodecFix.app"
28 changes: 28 additions & 0 deletions docs/macOS/scripts/appify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
Note that you cannot rename appified apps. If you want to give your app
a custom name, use the second argument:
`basename "$0"` my-script.sh "My App"
Copyright (c) Thomas Aylott <http://subtlegradient.com/>
Modified by Mathias Bynens <http://mathiasbynens.be/>
EOF
exit; fi

APPNAME=${2:-$(basename "$1" ".sh")}
DIR="$APPNAME.app/Contents/MacOS"

if [ -a "$APPNAME.app" ]; then
echo "$PWD/$APPNAME.app already exists :("
exit 1
fi

mkdir -p "$DIR"
cp "$1" "$DIR/$APPNAME"
chmod +x "$DIR/$APPNAME"

echo "$PWD/$APPNAME.app"
3 changes: 3 additions & 0 deletions docs/macOS/scripts/launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
scriptPath=$(dirname "$0")'/GModCEFCodecFix-macOS'
open -a Terminal "$scriptPath"