-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to enable desktop app distribution.
- Switch from 'dofile' to 'require' (needed to enable packaging as love app) - Update settings order, and hide Vita-specific settings on desktop - Remove circle and cross icons on desktop platform - Update README accordingly
- Loading branch information
Showing
11 changed files
with
370 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ ignore | |
|
||
flowit-vita/build | ||
flowit-vita/usb_update_files.sh | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
BUILD_MAC=0 | ||
BUILD_WIN=0 | ||
|
||
options=$(getopt -l "win,mac,help" -o "w,m,h" -a -- "$@") | ||
eval set -- "$options" | ||
while true | ||
do | ||
case $1 in | ||
-w|--win) | ||
BUILD_WIN=1 | ||
;; | ||
-m|--mac) | ||
BUILD_MAC=1 | ||
;; | ||
-h|--help) | ||
echo "Produce flowit.love in the build directory." | ||
echo "" | ||
echo "Usage:" | ||
echo " $0 [-w | --win] [-m | --mac]" | ||
echo "" | ||
echo " -w, --win also build windows executable (.exe)" | ||
echo " -m, --mac also build mac app (.app)" | ||
exit 0 | ||
;; | ||
--) | ||
shift | ||
break;; | ||
esac | ||
shift | ||
done | ||
|
||
shopt -s extglob | ||
mkdir -p build | ||
|
||
echo "Compressing flowit.love..." | ||
zip -9 -q -r build/flowit.love lib/!(*_vita.lua) fonts images levels LICENSE main.lua sounds | ||
|
||
|
||
cd build | ||
|
||
if [[ $BUILD_WIN -eq 1 ]]; then | ||
echo "Packaging Windows exe..." | ||
|
||
WIN_FLOWIT_DIR="flowit-win" | ||
WIN_FLOWIT_ZIP="$WIN_FLOWIT_DIR.zip" | ||
|
||
WIN_LOVE_DIR="love-11.4-win32" | ||
WIN_LOVE_ZIP="$WIN_LOVE_DIR.zip" | ||
|
||
# download zip if it doesn't exist | ||
if [ ! -f "$WIN_LOVE_ZIP" ]; then | ||
curl -L -O "https://github.com/love2d/love/releases/download/11.4/love-11.4-win32.zip" | ||
fi | ||
|
||
# delete directories built previously | ||
if [ -d "$WIN_LOVE_DIR" ]; then | ||
rm -r "$WIN_LOVE_DIR" | ||
fi | ||
if [ -d "$WIN_FLOWIT_DIR" ]; then | ||
rm -r "$WIN_FLOWIT_DIR" | ||
fi | ||
|
||
|
||
unzip -q "$WIN_LOVE_ZIP" | ||
mkdir -p "$WIN_FLOWIT_DIR" | ||
|
||
cat "$WIN_LOVE_DIR/love.exe" flowit.love > "$WIN_FLOWIT_DIR/Flowit.exe" | ||
cp "$WIN_LOVE_DIR/"*.dll "$WIN_FLOWIT_DIR" | ||
|
||
cp "$WIN_LOVE_DIR/license.txt" "$WIN_FLOWIT_DIR/love_license.txt" | ||
cp "../README.md" "$WIN_FLOWIT_DIR/flowit_readme_license.md" | ||
cat "../LICENSE" >> "$WIN_FLOWIT_DIR/flowit_readme_license.md" | ||
|
||
zip -q -r "$WIN_FLOWIT_ZIP" "$WIN_FLOWIT_DIR" | ||
|
||
rm -r "$WIN_FLOWIT_DIR" | ||
rm -r "$WIN_LOVE_DIR" | ||
|
||
fi | ||
|
||
if [[ $BUILD_MAC -eq 1 ]]; then | ||
echo "Packaging Mac app..." | ||
|
||
MAC_LOVE_APP_DIR="love.app" | ||
MAC_FLOWIT_APP_DIR="Flowit.app" | ||
MAC_FLOWIT_APP_ZIP="Flowit.app.zip" | ||
|
||
MAC_LOVE_DIR="love-11.4-macos" | ||
MAC_LOVE_ZIP="$MAC_LOVE_DIR.zip" | ||
|
||
# download zip if it doesn't exist | ||
if [ ! -f "$MAC_LOVE_ZIP" ]; then | ||
curl -L -O "https://github.com/love2d/love/releases/download/11.4/love-11.4-macos.zip" | ||
fi | ||
|
||
# delete directories built previously | ||
if [ -d "$MAC_LOVE_DIR" ]; then | ||
rm -r "$MAC_LOVE_DIR" | ||
fi | ||
if [ -d "$MAC_LOVE_APP_DIR" ]; then | ||
rm -r "$MAC_LOVE_APP_DIR" | ||
fi | ||
if [ -d "$MAC_FLOWIT_APP_DIR" ]; then | ||
rm -r "$MAC_FLOWIT_APP_DIR" | ||
fi | ||
|
||
|
||
unzip -q "$MAC_LOVE_ZIP" | ||
|
||
mv "$MAC_LOVE_APP_DIR" "$MAC_FLOWIT_APP_DIR" | ||
|
||
|
||
cp flowit.love "$MAC_FLOWIT_APP_DIR/Contents/Resources/Flowit.love" | ||
cp ../desktop_resources/Info.plist "$MAC_FLOWIT_APP_DIR/Contents/" | ||
cp ../desktop_resources/flowit.icns "$MAC_FLOWIT_APP_DIR/Contents/Resources/GameIcon.icns" | ||
cp ../desktop_resources/flowit.icns "$MAC_FLOWIT_APP_DIR/Contents/Resources/OS X AppIcon.icns" | ||
rm "$MAC_FLOWIT_APP_DIR/Contents/Resources/Assets.car" | ||
|
||
cp "../README.md" "$MAC_FLOWIT_APP_DIR/Contents/Resources/flowit_readme_license.md" | ||
cat "../LICENSE" >> "$MAC_FLOWIT_APP_DIR/Contents/Resources/flowit_readme_license.md" | ||
|
||
zip -q -r "$MAC_FLOWIT_APP_ZIP" "$MAC_FLOWIT_APP_DIR" | ||
|
||
rm -r "$MAC_FLOWIT_APP_DIR" | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?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>BuildMachineOSBuild</key> | ||
<string>21C52</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleDocumentTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleTypeExtensions</key> | ||
<array> | ||
<string>love</string> | ||
</array> | ||
<key>CFBundleTypeIconFile</key> | ||
<string>GameIcon</string> | ||
<key>CFBundleTypeName</key> | ||
<string>LÖVE Project</string> | ||
<key>CFBundleTypeRole</key> | ||
<string>Viewer</string> | ||
<key>LSHandlerRank</key> | ||
<string>Owner</string> | ||
<key>LSItemContentTypes</key> | ||
<array> | ||
<string>org.love2d.love-game</string> | ||
</array> | ||
<key>LSTypeIsPackage</key> | ||
<integer>1</integer> | ||
</dict> | ||
<dict> | ||
<key>CFBundleTypeName</key> | ||
<string>Folder</string> | ||
<key>CFBundleTypeOSTypes</key> | ||
<array> | ||
<string>fold</string> | ||
</array> | ||
<key>CFBundleTypeRole</key> | ||
<string>Viewer</string> | ||
<key>LSHandlerRank</key> | ||
<string>None</string> | ||
</dict> | ||
<dict> | ||
<key>CFBundleTypeIconFile</key> | ||
<string>Document</string> | ||
<key>CFBundleTypeName</key> | ||
<string>Document</string> | ||
<key>CFBundleTypeOSTypes</key> | ||
<array> | ||
<string>****</string> | ||
</array> | ||
<key>CFBundleTypeRole</key> | ||
<string>Editor</string> | ||
</dict> | ||
</array> | ||
<key>CFBundleExecutable</key> | ||
<string>love</string> | ||
<key>CFBundleIconFile</key> | ||
<string>OS X AppIcon</string> | ||
<key>CFBundleIconName</key> | ||
<string>OS X AppIcon</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>org.Flowit-Game.Flowit</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Flowit</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>11.4</string> | ||
<key>CFBundleSignature</key> | ||
<string>LoVe</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>MacOSX</string> | ||
</array> | ||
<key>DTCompiler</key> | ||
<string>com.apple.compilers.llvm.clang.1_0</string> | ||
<key>DTPlatformBuild</key> | ||
<string>13C100</string> | ||
<key>DTPlatformName</key> | ||
<string>macosx</string> | ||
<key>DTPlatformVersion</key> | ||
<string>12.1</string> | ||
<key>DTSDKBuild</key> | ||
<string>21C46</string> | ||
<key>DTSDKName</key> | ||
<string>macosx12.1</string> | ||
<key>DTXcode</key> | ||
<string>1321</string> | ||
<key>DTXcodeBuild</key> | ||
<string>13C100</string> | ||
<key>LSApplicationCategoryType</key> | ||
<string>public.app-category.games</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.7</string> | ||
<key>NSHighResolutionCapable</key> | ||
<true/> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>© 2006-2022 LÖVE Development Team</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
<key>NSSupportsAutomaticGraphicsSwitching</key> | ||
<false/> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.