mac release script & bundle
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="143.653mm"
|
||||
height="143.653mm"
|
||||
viewBox="0 0 143.653 143.65301"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:export-filename="mxl-on-blue-square.png"
|
||||
inkscape:export-xdpi="300"
|
||||
inkscape:export-ydpi="300"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="mxl-on-blue-square.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.2479451"
|
||||
inkscape:cx="200.32933"
|
||||
inkscape:cy="276.05381"
|
||||
inkscape:window-width="2494"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-x="66"
|
||||
inkscape:window-y="663"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" /><defs
|
||||
id="defs2" /><g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="bg"
|
||||
style="display:inline"
|
||||
transform="matrix(0.61643941,0,0,1,4.1386047,-120.68901)"
|
||||
sodipodi:insensitive="true"><rect
|
||||
style="fill:#1b4098;fill-opacity:1;stroke:none;stroke-width:1.23722"
|
||||
id="rect3467"
|
||||
width="233.0367"
|
||||
height="143.653"
|
||||
x="-6.7137251"
|
||||
y="120.68901"
|
||||
inkscape:label="bg" /></g><g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="2" /><g
|
||||
inkscape:label="1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(21.246118,-169.37755)"
|
||||
style="display:inline"><g
|
||||
id="g6784"><g
|
||||
id="g860"
|
||||
transform="translate(3.0120144,38.690999)"><g
|
||||
aria-label="M"
|
||||
id="text113-7"
|
||||
style="fill:#ffffff;stroke-width:0.264582"
|
||||
transform="translate(-3.704032)"><path
|
||||
d="m 34.799623,220.64854 -7.823154,-25.26436 v 0 c 0.03387,0.67733 -0.06773,1.65945 0,2.94638 0.101599,1.25306 -0.06773,2.60772 0,4.06397 0.06773,1.45626 0,2.79399 0,4.01318 v 14.24083 h -7.721555 v -36.27098 h 11.683932 l 8.077152,24.17641 H 35.51503 l 8.331151,-24.17641 h 11.633132 v 36.27098 H 47.45296 v -14.44403 c 0,-1.15146 -0.03387,-2.42145 0,-3.80998 0.06773,-1.42239 -0.03387,-2.76011 0,-4.01317 0.06773,-1.28693 -0.03387,-2.26906 0,-2.94639 v 0 l -8.229552,25.21357 z"
|
||||
id="path10652"
|
||||
sodipodi:nodetypes="ccccssccccccccccscccccc" /></g><g
|
||||
aria-label="X"
|
||||
id="text113-0-35"
|
||||
style="fill:#ffffff;stroke-width:0.264582"><path
|
||||
d="m 84.156766,220.64854 h -9.956741 l -7.772355,-12.59832 -7.772354,12.59832 h -9.550344 l 12.03953,-18.64349 -11.328334,-17.62749 h 9.601144 l 7.264357,12.19193 7.010359,-12.19193 h 9.601143 l -11.379133,18.23709 z"
|
||||
id="path10672" /></g><g
|
||||
aria-label="L"
|
||||
id="text113-0-6-2"
|
||||
style="fill:#ffffff;stroke-width:0.264582"><path
|
||||
d="m 81.382722,220.64854 v -36.27098 h 8.635949 v 29.20983 h 14.376319 v 7.06115 z"
|
||||
id="path10669" /></g></g><rect
|
||||
style="fill:#ffffff;stroke-width:0.235289"
|
||||
id="rect526-1"
|
||||
width="23.011999"
|
||||
height="7.7199998"
|
||||
x="-6.2462406"
|
||||
y="223.06856" /><rect
|
||||
style="fill:#ffffff;stroke-width:0.235289"
|
||||
id="rect526-7-2"
|
||||
width="23.011999"
|
||||
height="7.7199998"
|
||||
x="-6.2462406"
|
||||
y="232.58556" /><rect
|
||||
style="display:inline;fill:#ffffff;stroke-width:0.259539"
|
||||
id="rect526-7-2-2"
|
||||
width="28"
|
||||
height="7.7199998"
|
||||
x="-6.2462406"
|
||||
y="242.10254" /><rect
|
||||
style="fill:#ffffff;stroke-width:0.235289"
|
||||
id="rect526-7-0-3-0"
|
||||
width="23.011999"
|
||||
height="7.7199998"
|
||||
x="-6.2462406"
|
||||
y="251.61954" /></g></g></svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
Executable
+123
@@ -0,0 +1,123 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# ELF building
|
||||
export MXL_SOURCE=/Users/jitten/extra/mxl
|
||||
export MXL_BUILD="${MXL_SOURCE}/build/Darwin-Clang-Release"
|
||||
|
||||
WORK_DIR="$(mktemp -d)"
|
||||
trap 'rm -rf "${WORK_DIR}"' EXIT
|
||||
|
||||
# libmxl.pc in the build tree hardcodes the install/ prefix; rewrite it so
|
||||
# cgo's pkg-config lookup gets the build tree's lib/include dirs.
|
||||
sed -e "s|${MXL_SOURCE}/install|${MXL_SOURCE}/build|g" \
|
||||
-e "s|^includedir=.*|includedir=${MXL_BUILD}/lib/include|" \
|
||||
"${MXL_BUILD}/lib/libmxl.pc" > "${WORK_DIR}/libmxl.pc"
|
||||
export PKG_CONFIG_PATH="${WORK_DIR}:${MXL_BUILD}/lib${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
export CGO_CFLAGS="-I${MXL_SOURCE}/lib/include"
|
||||
export CGO_LDFLAGS="-L${MXL_BUILD}/lib"
|
||||
|
||||
PLAYER_ELF_PATH="./build/mxl-player"
|
||||
go build \
|
||||
-trimpath \
|
||||
-ldflags="-s -w" \
|
||||
-o "${PLAYER_ELF_PATH}" \
|
||||
./cmd/mxl-player
|
||||
|
||||
# MacOS .app package
|
||||
export APP_BUNDLE="./release/mac/MXL-player.app"
|
||||
rm -rf "${APP_BUNDLE}"
|
||||
mkdir -p "${APP_BUNDLE}/Contents/MacOS"
|
||||
mkdir -p "${APP_BUNDLE}/Contents/Frameworks"
|
||||
mkdir -p "${APP_BUNDLE}/Contents/Resources"
|
||||
|
||||
cp "${PLAYER_ELF_PATH}" "${APP_BUNDLE}/Contents/MacOS/mxl-player"
|
||||
chmod 0755 "${APP_BUNDLE}/Contents/MacOS/mxl-player"
|
||||
|
||||
# App icon
|
||||
ICONSET="${WORK_DIR}/MXL-player.iconset"
|
||||
mkdir -p "${ICONSET}"
|
||||
for s in 16 32 128 256 512; do
|
||||
sips -z $s $s ./assets/mxl-on-blue-square.png \
|
||||
--out "${ICONSET}/icon_${s}x${s}.png" > /dev/null
|
||||
sips -z $((s*2)) $((s*2)) ./assets/mxl-on-blue-square.png \
|
||||
--out "${ICONSET}/icon_${s}x${s}@2x.png" > /dev/null
|
||||
done
|
||||
iconutil -c icns "${ICONSET}" \
|
||||
-o "${APP_BUNDLE}/Contents/Resources/AppIcon.icns"
|
||||
|
||||
# Info.plist
|
||||
cat << EOF > "${APP_BUNDLE}/Contents/Info.plist"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN"
|
||||
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>MXL Player</string>
|
||||
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>MXL Player</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.github.jitten.mxl-player</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>mxl-player</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/>
|
||||
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.video</string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>AppIcon</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
plutil -lint "${APP_BUNDLE}/Contents/Info.plist"
|
||||
|
||||
# copy runtime libs (install IDs must stay untouched: libmxl is already
|
||||
# @rpath/libmxl.1.dylib from the build tree; SDL3/MoltenVK are dlopen'ed by
|
||||
# leaf name, so their IDs are never referenced)
|
||||
cp -L "${MXL_BUILD}/lib/libmxl.1.dylib" \
|
||||
"${APP_BUNDLE}/Contents/Frameworks/libmxl.1.dylib"
|
||||
cp -L "$(brew --prefix sdl3)/lib/libSDL3.0.dylib" \
|
||||
"${APP_BUNDLE}/Contents/Frameworks/libSDL3.0.dylib"
|
||||
cp -L "$(brew --prefix molten-vk)/lib/libMoltenVK.dylib" \
|
||||
"${APP_BUNDLE}/Contents/Frameworks/libMoltenVK.dylib"
|
||||
|
||||
# resolve @rpath/libmxl.1.dylib and the dlopen'ed SDL3/MoltenVK leaf names
|
||||
# against the bundle's Frameworks dir
|
||||
install_name_tool \
|
||||
-add_rpath "@loader_path/../Frameworks" \
|
||||
"${APP_BUNDLE}/Contents/MacOS/mxl-player"
|
||||
|
||||
# install_name_tool invalidated the executable's ad-hoc signature; re-sign
|
||||
codesign --force --sign - "${APP_BUNDLE}"
|
||||
codesign --verify "${APP_BUNDLE}"
|
||||
|
||||
env -u SDL3_LIBRARY \
|
||||
-u VULKAN_LIBRARY \
|
||||
-u DYLD_LIBRARY_PATH \
|
||||
"${APP_BUNDLE}/Contents/MacOS/mxl-player"
|
||||
|
||||
# compress, preserve MacOS bundle meta
|
||||
ditto -c -k \
|
||||
--sequesterRsrc \
|
||||
--keepParent \
|
||||
"${APP_BUNDLE}" \
|
||||
./release/mac/mxl-player-0.1.0-macos-arm64.zip
|
||||
Vendored
BIN
Binary file not shown.
@@ -5,7 +5,7 @@ Collapsed=0
|
||||
|
||||
[Window][Settings & Info]
|
||||
Pos=0,0
|
||||
Size=700,1080
|
||||
Size=700,804
|
||||
Collapsed=0
|
||||
|
||||
[Window][Stats]
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN"
|
||||
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>MXL Player</string>
|
||||
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>MXL Player</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.github.jitten.mxl-player</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>mxl-player</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/>
|
||||
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.video</string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>AppIcon</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,155 @@
|
||||
<?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>files</key>
|
||||
<dict>
|
||||
<key>Resources/AppIcon.icns</key>
|
||||
<data>
|
||||
aOS6hffTaTtxQc0zhZI1xOsNz0I=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Frameworks/libMoltenVK.dylib</key>
|
||||
<dict>
|
||||
<key>cdhash</key>
|
||||
<data>
|
||||
ETd5I/t5G4xenebaPwHV0Q99lls=
|
||||
</data>
|
||||
<key>requirement</key>
|
||||
<string>cdhash H"11377923fb791b8c5e9de6da3f01d5d10f7d965b"</string>
|
||||
</dict>
|
||||
<key>Frameworks/libSDL3.0.dylib</key>
|
||||
<dict>
|
||||
<key>cdhash</key>
|
||||
<data>
|
||||
NNHvv93cCnUaCS7Jl7MJkRtCOKs=
|
||||
</data>
|
||||
<key>requirement</key>
|
||||
<string>cdhash H"34d1efbfdddc0a751a092ec997b309911b4238ab"</string>
|
||||
</dict>
|
||||
<key>Frameworks/libmxl.1.dylib</key>
|
||||
<dict>
|
||||
<key>cdhash</key>
|
||||
<data>
|
||||
MbqPNJYzYRFJ+VJyBwbTvnpRM0M=
|
||||
</data>
|
||||
<key>requirement</key>
|
||||
<string>cdhash H"31ba8f349633611149f952720706d3be7a513343"</string>
|
||||
</dict>
|
||||
<key>Resources/AppIcon.icns</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
30ycN9D9rWpkLESaFOwycI8ufPkx8qO20cW46sVar2Q=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Reference in New Issue
Block a user