Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-02-14 10:54:55 -06:00
parent 733a038638
commit 47ed55ddb6
15 changed files with 10 additions and 24 deletions

View File

@ -1,51 +1,61 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "icon_16x16.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "1x", "scale" : "1x",
"size" : "16x16" "size" : "16x16"
}, },
{ {
"filename" : "icon_16x16@2x.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "2x", "scale" : "2x",
"size" : "16x16" "size" : "16x16"
}, },
{ {
"filename" : "icon_32x32.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "1x", "scale" : "1x",
"size" : "32x32" "size" : "32x32"
}, },
{ {
"filename" : "icon_32x32@2x.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "2x", "scale" : "2x",
"size" : "32x32" "size" : "32x32"
}, },
{ {
"filename" : "icon_128x128.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "1x", "scale" : "1x",
"size" : "128x128" "size" : "128x128"
}, },
{ {
"filename" : "icon_128x128@2x.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "2x", "scale" : "2x",
"size" : "128x128" "size" : "128x128"
}, },
{ {
"filename" : "icon_256x256.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "1x", "scale" : "1x",
"size" : "256x256" "size" : "256x256"
}, },
{ {
"filename" : "icon_256x256@2x.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "2x", "scale" : "2x",
"size" : "256x256" "size" : "256x256"
}, },
{ {
"filename" : "icon_512x512.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "1x", "scale" : "1x",
"size" : "512x512" "size" : "512x512"
}, },
{ {
"filename" : "icon_512x512@2x.png",
"idiom" : "mac", "idiom" : "mac",
"scale" : "2x", "scale" : "2x",
"size" : "512x512" "size" : "512x512"

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 792 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View File

@ -4,30 +4,12 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PYTHON_BIN="$ROOT_DIR/.venv/bin/python" PYTHON_BIN="$ROOT_DIR/.venv/bin/python"
APP_NAME="ManeshTrader" APP_NAME="ManeshTrader"
ICON_PATH="$ROOT_DIR/assets/icon/${APP_NAME}.icns"
if [[ ! -x "$PYTHON_BIN" ]]; then if [[ ! -x "$PYTHON_BIN" ]]; then
echo "Missing virtual environment. Run ./run.sh --setup-only first." >&2 echo "Missing virtual environment. Run ./run.sh --setup-only first." >&2
exit 1 exit 1
fi fi
if [[ ! -f "$ICON_PATH" ]]; then
"$PYTHON_BIN" "$ROOT_DIR/scripts/generate_app_icon.py"
ICONSET_DIR="$ROOT_DIR/assets/icon/${APP_NAME}.iconset"
mkdir -p "$ICONSET_DIR"
sips -z 16 16 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_16x16.png" >/dev/null
sips -z 32 32 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_16x16@2x.png" >/dev/null
sips -z 32 32 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_32x32.png" >/dev/null
sips -z 64 64 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_32x32@2x.png" >/dev/null
sips -z 128 128 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_128x128.png" >/dev/null
sips -z 256 256 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_128x128@2x.png" >/dev/null
sips -z 256 256 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_256x256.png" >/dev/null
sips -z 512 512 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_256x256@2x.png" >/dev/null
sips -z 512 512 "$ROOT_DIR/assets/icon/${APP_NAME}.png" --out "$ICONSET_DIR/icon_512x512.png" >/dev/null
cp "$ROOT_DIR/assets/icon/${APP_NAME}.png" "$ICONSET_DIR/icon_512x512@2x.png"
iconutil -c icns "$ICONSET_DIR" -o "$ICON_PATH"
fi
"$PYTHON_BIN" -m pip install -q pyinstaller "$PYTHON_BIN" -m pip install -q pyinstaller
TS="$(date +%Y%m%d-%H%M%S)" TS="$(date +%Y%m%d-%H%M%S)"
@ -42,7 +24,6 @@ mkdir -p "$DIST_PATH" "$WORK_PATH" "$SPEC_PATH"
--noconfirm \ --noconfirm \
--windowed \ --windowed \
--name "$APP_NAME" \ --name "$APP_NAME" \
--icon "$ICON_PATH" \
--distpath "$DIST_PATH" \ --distpath "$DIST_PATH" \
--workpath "$WORK_PATH" \ --workpath "$WORK_PATH" \
--specpath "$SPEC_PATH" \ --specpath "$SPEC_PATH" \

View File

@ -4,7 +4,6 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
APP_NAME="ManeshTrader" APP_NAME="ManeshTrader"
APP_PATH="$ROOT_DIR/${APP_NAME}.app" APP_PATH="$ROOT_DIR/${APP_NAME}.app"
ICON_PATH="$ROOT_DIR/assets/icon/${APP_NAME}.icns"
if ! command -v osacompile >/dev/null 2>&1; then if ! command -v osacompile >/dev/null 2>&1; then
echo "Error: osacompile is not available on this macOS installation." >&2 echo "Error: osacompile is not available on this macOS installation." >&2
@ -27,9 +26,5 @@ rm -rf "$APP_PATH"
osacompile -o "$APP_PATH" "$SCRIPT_FILE" osacompile -o "$APP_PATH" "$SCRIPT_FILE"
rm -f "$SCRIPT_FILE" rm -f "$SCRIPT_FILE"
if [[ -f "$ICON_PATH" ]]; then
cp "$ICON_PATH" "$APP_PATH/Contents/Resources/applet.icns"
fi
echo "Created: $APP_PATH" echo "Created: $APP_PATH"
echo "You can drag ${APP_NAME}.app into /Applications if desired." echo "You can drag ${APP_NAME}.app into /Applications if desired."