Skip to content

Commit

Permalink
Merge pull request #15 from 0blu/macos_support
Browse files Browse the repository at this point in the history
Macos support
  • Loading branch information
0blu authored Jan 20, 2023
2 parents a2ce0d6 + 7b6425c commit af46c16
Show file tree
Hide file tree
Showing 27 changed files with 785 additions and 197 deletions.
61 changes: 59 additions & 2 deletions .github/workflows/Build_Launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build Launcher
on: ['push']

env:
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '7.0.x'

jobs:
build:
build_windows:
strategy:
matrix:
os: ['windows']
Expand Down Expand Up @@ -38,3 +38,60 @@ jobs:
name: WinterspringLauncher-${{ matrix.os }}-${{ runner.arch }}-${{ github.sha }}
path: publish
if-no-files-found: error

build_macos:
strategy:
matrix:
os: ['macos']
runs-on: ${{ matrix.os }}-latest

steps:
- name: Checkout repository content
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore

- name: Publish
run: dotnet publish --configuration Release --runtime osx-arm64 -p:UsePublishBuildSettings=true

- name: Determinante tag
run: echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV

- name: Create .app
working-directory: MacAppBuilding
run: ./build_app.sh "$GIT_TAG" ../WinterspringLauncher/bin/Release/*/publish/WinterspringLauncher

- name: Create .app zip
working-directory: MacAppBuilding
run: |
cd output
zip -vr ../../WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}-APP.zip *
- name: Upload .app
uses: actions/upload-artifact@v3
with:
name: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}.app
path: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}-APP.zip
if-no-files-found: error

- name: Install create-dmg
run: brew install create-dmg

- name: Create .dmg
working-directory: MacAppBuilding
run: ./build_dmg.sh

- name: Upload .dmg
uses: actions/upload-artifact@v3
with:
name: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}.dmg
path: MacAppBuilding/output_dmg/
if-no-files-found: error
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,5 @@ FodyWeavers.xsd
# End of https://www.toptal.com/developers/gitignore/api/visualstudio,visualstudiocode,rider,dotnetcore

.idea/
.DS_Store

5 changes: 0 additions & 5 deletions EverlookClassic.sln.DotSettings

This file was deleted.

3 changes: 3 additions & 0 deletions MacAppBuilding/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output/
output_dmg/

Binary file added MacAppBuilding/AppTemplate/AppIcon.icns
Binary file not shown.
16 changes: 16 additions & 0 deletions MacAppBuilding/AppTemplate/Resources/Info.plist
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>
12 changes: 12 additions & 0 deletions MacAppBuilding/AppTemplate/WinterspringLauncherTerminal
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
5 changes: 5 additions & 0 deletions MacAppBuilding/AppTemplate/launch_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

CURRENTPATH=`dirname "${0}"`

open "$CURRENTPATH/WinterspringLauncherTerminal"
58 changes: 58 additions & 0 deletions MacAppBuilding/build_app.sh
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'"
22 changes: 22 additions & 0 deletions MacAppBuilding/build_dmg.sh
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
Binary file added MacAppBuilding/dmg_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<figure>
<img align="right" src="./everlook-classic-icon.png" alt="icon">
<img align="right" src="./winterspring-launcher-icon.png" alt="icon">
</figure>

# Winterspring Launcher
Expand All @@ -13,27 +13,22 @@ The launcher will do everything for you.
It will download the 1.14 client, setup HermesProxy and launch the game.
When HermesProxy has an update it is automatically applied.

1. **Download [the latest release](https://github.com/0blu/EverlookClassicLauncher/releases)**
### Windows
1. **Download [the latest .exe release](https://github.com/0blu/EverlookClassicLauncher/releases)**
2. Place it in a separate directory (On first launch it will create subfolders and a desktop icon)
3. Run it
4. **Enjoy your stay on Everlook**

## Why?
The modern WoW-Classic client provides many improvements in hardware compatibility and accessibility.

With Everlook we have the unique chance to improve HermesProxy with a large testing audience.
The launcher will make the classic client accessible to everyone.
So if you find any bugs [please report them](https://github.com/WowLegacyCore/HermesProxy/issues/new/choose).
(If you find any bugs associated to the launcher report them [here](https://github.com/0blu/WinterspringLauncher/issues))

## Is this allowed?
Currently HermesProxy is tolerated on Everlook.
⚠️You **will** get suspended if you exploit any game breaking bugs.
So far no-one has been banned for using official HermesProxy.
Just use common sense and <u>**play fair**</u>!
### MacOS
1. **Download [the latest .dmg release](https://github.com/0blu/EverlookClassicLauncher/releases)**
2. Click on the downloaded .dmg file to open the installer
3. Drag the Launcher into your Applications folder
4. Go into your Applications folder, right click the Launcher and **click "Open"**
5. **Enjoy your stay on Everlook**
_On MacOS the client will be stored in `/Users/<your name>/WinterspringLauncher/`_

## Addons
Most addons for 1.14.x should work.
Most addons for 1.14.0 should work.
You can download older versions from CurseForge under the "Files" tab. ([Example](https://www.curseforge.com/wow/addons/questie/files/all?filter-game-version=2020709689%3A9094))
Here are some working recommendations:
(click the [[dl](#)] link to get a working zip)
Expand All @@ -49,6 +44,20 @@ Here are some working recommendations:

(Feel free to give me new recommendations to extend the list)

## Why?
The modern WoW-Classic client provides many improvements in hardware compatibility and accessibility.

With Everlook we have the unique chance to improve HermesProxy with a large testing audience.
The launcher will make the classic client accessible to everyone.
So if you find any bugs [please report them](https://github.com/WowLegacyCore/HermesProxy/issues/new/choose).
(If you find any bugs associated to the launcher report them [here](https://github.com/0blu/WinterspringLauncher/issues))

## Is this allowed?
Currently HermesProxy is tolerated on Everlook.
⚠️You **will** get suspended if you exploit any game breaking bugs.
So far no-one has been banned for using official HermesProxy.
Just use common sense and <u>**play fair**</u>!

# Many thanks to
- [HermesProxy](https://github.com/WowLegacyCore/HermesProxy) to translate legacy traffic to modern one
- [Arctium WoW-Launcher](https://github.com/Arctium/WoW-Launcher) to patch client for custom server connections
Loading

0 comments on commit af46c16

Please sign in to comment.