Add macOS app bundle build
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.build/
|
.build/
|
||||||
|
dist/
|
||||||
Package.resolved
|
Package.resolved
|
||||||
*.xcodeproj/
|
*.xcodeproj/
|
||||||
*.xcworkspace/
|
*.xcworkspace/
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -0,0 +1,28 @@
|
|||||||
|
<?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>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>de</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>TonUinoNator</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>AppIcon</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>de.casaderoll.TonUinoNator</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>TonUinoNator</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>0.1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>13.0</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
APP_NAME="TonUinoNator"
|
||||||
|
APP_DIR="dist/${APP_NAME}.app"
|
||||||
|
CONTENTS_DIR="${APP_DIR}/Contents"
|
||||||
|
MACOS_DIR="${CONTENTS_DIR}/MacOS"
|
||||||
|
RESOURCES_DIR="${CONTENTS_DIR}/Resources"
|
||||||
|
ICONSET_DIR="dist/AppIcon.iconset"
|
||||||
|
|
||||||
|
swift build -c release
|
||||||
|
|
||||||
|
rm -rf "${APP_DIR}" "${ICONSET_DIR}"
|
||||||
|
mkdir -p "${MACOS_DIR}" "${RESOURCES_DIR}" "${ICONSET_DIR}"
|
||||||
|
|
||||||
|
cp ".build/release/${APP_NAME}" "${MACOS_DIR}/${APP_NAME}"
|
||||||
|
cp "Packaging/Info.plist" "${CONTENTS_DIR}/Info.plist"
|
||||||
|
|
||||||
|
sips -z 16 16 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_16x16.png" >/dev/null
|
||||||
|
sips -z 32 32 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_16x16@2x.png" >/dev/null
|
||||||
|
sips -z 32 32 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_32x32.png" >/dev/null
|
||||||
|
sips -z 64 64 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_32x32@2x.png" >/dev/null
|
||||||
|
sips -z 128 128 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_128x128.png" >/dev/null
|
||||||
|
sips -z 256 256 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_128x128@2x.png" >/dev/null
|
||||||
|
sips -z 256 256 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_256x256.png" >/dev/null
|
||||||
|
sips -z 512 512 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_256x256@2x.png" >/dev/null
|
||||||
|
sips -z 512 512 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_512x512.png" >/dev/null
|
||||||
|
sips -z 1024 1024 Assets/AppIcon.png --out "${ICONSET_DIR}/icon_512x512@2x.png" >/dev/null
|
||||||
|
|
||||||
|
iconutil -c icns "${ICONSET_DIR}" -o "${RESOURCES_DIR}/AppIcon.icns"
|
||||||
|
chmod +x "${MACOS_DIR}/${APP_NAME}"
|
||||||
|
|
||||||
|
echo "Built ${APP_DIR}"
|
||||||
Reference in New Issue
Block a user