-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from 0blu/macos_support
Macos support
- Loading branch information
Showing
27 changed files
with
785 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output/ | ||
output_dmg/ | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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>CFBundleExecutable</key> | ||
<string>launch_wrapper</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>WinterspringLauncher {{VERSION}}</string> | ||
<key>CFBundleVersion</key> | ||
<string>{{VERSION}}</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>{{VERSION}}</string> | ||
<key>CFBundleIconFile</key> | ||
<string>AppIcon.icns</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
CURRENTPATH=`dirname "${0}"` | ||
|
||
# Resize terminal | ||
printf '\e[8;27;110t' | ||
|
||
clear | ||
|
||
cd "$CURRENTPATH" | ||
|
||
DYLD_LIBRARY_PATH="$CURRENTPATH/Libs" ./WinterspringLauncher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
CURRENTPATH=`dirname "${0}"` | ||
|
||
open "$CURRENTPATH/WinterspringLauncherTerminal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ $# -ne 2 ]; then | ||
echo "Error: Invalid arguments" | ||
echo "Run: buid_app.sh <version> <WinterspringLauncherBinary>" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "AppTemplate" ]; then | ||
echo "Error: AppTemplate folder is not in cwd" | ||
exit 1 | ||
fi | ||
|
||
VERSION="$1" | ||
EXE_FILE="$2" | ||
|
||
if [ ! -f "$EXE_FILE" ]; then | ||
echo "Error: '$EXE_FILE' is not a valid file" | ||
exit 1 | ||
fi | ||
|
||
OPENSSL_DL="https://github.com/0blu/prebuilt-openssl3-for-macos/releases/download/openssl-3.0.7/openssl-3.0.7.zip" | ||
APP_PATH="output/Winterspring Launcher.app" | ||
|
||
echo "Building for:" | ||
echo "- Version: $VERSION" | ||
echo "- Binary: $EXE_FILE" | ||
echo "- Result: $APP_PATH" | ||
|
||
echo "Deleting existing app" | ||
rm -rf "$APP_PATH" | ||
mkdir -p "$APP_PATH" | ||
|
||
echo "Copy template" | ||
cp -r AppTemplate/* "$APP_PATH/." | ||
|
||
echo "Download openssl3" | ||
mkdir "$APP_PATH/Libs" | ||
curl --fail -SL "$OPENSSL_DL" -o "$APP_PATH/Libs/openssl3.zip" | ||
(cd "$APP_PATH/Libs/" \ | ||
&& unzip ./openssl3.zip \ | ||
&& mv openssl-3.*/*.3.dylib . \ | ||
&& rm openssl3.zip \ | ||
&& rm -rf openssl-3.* \ | ||
) | ||
|
||
echo "Copying launcher executable" | ||
cp "$EXE_FILE" "$APP_PATH" | ||
|
||
echo "Replace version in info.plist" | ||
sed -i.bak "s/{{VERSION}}/$VERSION/g" "$APP_PATH/Resources/info.plist" | ||
|
||
echo "Making everthing executable" | ||
chmod -R a+x "$APP_PATH" | ||
|
||
echo "Done building '$APP_PATH'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -d "output" ]; then | ||
echo "Error: no 'output' directory" | ||
exit 1 | ||
fi | ||
|
||
sips --setProperty dpiWidth 144 --setProperty dpiHeight 144 dmg_backgroung.png | ||
|
||
rm -rf output_dmg | ||
mkdir output_dmg | ||
create-dmg \ | ||
--volname "Winterspring Launcher Installer" \ | ||
--background dmg_background.png \ | ||
--window-size 525 310 \ | ||
--icon-size 90 \ | ||
--icon "Winterspring Launcher.app" 0 120 \ | ||
--hide-extension "Winterspring Launcher.app" \ | ||
--app-drop-link 280 120 \ | ||
output_dmg/WinterspringLauncher.dmg output |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.