mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 17:39:46 +00:00
add macOS .app bundle and dmg packaging
This commit is contained in:
parent
698fd32071
commit
f241e4c355
9 changed files with 180 additions and 16 deletions
28
dev/macos/Info.plist.in
Normal file
28
dev/macos/Info.plist.in
Normal file
|
|
@ -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>CFBundleName</key>
|
||||
<string>VoxelCore</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>VoxelCore</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.github.mihailris.voxelcore</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>VoxelCore</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>VoxelCore</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VC_BUNDLE_VERSION@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@VC_BUNDLE_VERSION@</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>VoxelCore uses the microphone for audio input when content requests it.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
dev/macos/VoxelCore.icns
Normal file
BIN
dev/macos/VoxelCore.icns
Normal file
Binary file not shown.
BIN
dev/macos/dmg-background.tiff
Normal file
BIN
dev/macos/dmg-background.tiff
Normal file
Binary file not shown.
36
dev/macos/dmg-setup.applescript
Normal file
36
dev/macos/dmg-setup.applescript
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
on run argv
|
||||
set volumeName to item 1 of argv
|
||||
tell application "Finder"
|
||||
set targetDisk to missing value
|
||||
set candidates to every disk whose name is volumeName
|
||||
repeat with i from 1 to count of candidates
|
||||
set d to item i of candidates
|
||||
set diskPath to POSIX path of (d as alias)
|
||||
try
|
||||
do shell script "test -w " & quoted form of diskPath
|
||||
set targetDisk to d
|
||||
exit repeat
|
||||
end try
|
||||
end repeat
|
||||
if targetDisk is missing value then error "writable disk not found: " & volumeName
|
||||
|
||||
tell targetDisk
|
||||
open
|
||||
set win to container window
|
||||
set current view of win to icon view
|
||||
set toolbar visible of win to false
|
||||
set statusbar visible of win to false
|
||||
set the bounds of win to {200, 120, 800, 548}
|
||||
set opts to the icon view options of win
|
||||
set arrangement of opts to not arranged
|
||||
set icon size of opts to 128
|
||||
set text size of opts to 13
|
||||
set background picture of opts to file ".background:background.tiff"
|
||||
set position of item "VoxelCore.app" of win to {180, 200}
|
||||
set position of item "Applications" of win to {420, 200}
|
||||
update without registering applications
|
||||
delay 2
|
||||
close
|
||||
end tell
|
||||
end tell
|
||||
end run
|
||||
7
dev/macos/launcher.sh
Executable file
7
dev/macos/launcher.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
USER_DIR="$HOME/Library/Application Support/VoxelCore"
|
||||
|
||||
mkdir -p "$USER_DIR"
|
||||
exec "$DIR/VoxelCore-bin" --res "$DIR/../Resources/res" --dir "$USER_DIR" "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue