This commit is contained in:
parent
0367a342f2
commit
16c87db06c
4 changed files with 185 additions and 46 deletions
|
@ -13,10 +13,9 @@ steps:
|
||||||
- apk update
|
- apk update
|
||||||
- apk upgrade
|
- apk upgrade
|
||||||
- apk --no-cache add curl zip git
|
- apk --no-cache add curl zip git
|
||||||
- curl -s -L https://github.com/dmoa/love-export/releases/download/v1.2/install.sh | bash
|
- chmod +x tools/build.sh
|
||||||
- love-export -D
|
- bash tools/build.sh
|
||||||
- ls
|
- ls release
|
||||||
- ls releases
|
|
||||||
# - name: release
|
# - name: release
|
||||||
# image: plugins/gitea-release
|
# image: plugins/gitea-release
|
||||||
# settings:
|
# settings:
|
||||||
|
|
42
Boon.toml
42
Boon.toml
|
@ -1,42 +0,0 @@
|
||||||
[project]
|
|
||||||
authors = "The Impossible Astronaut"
|
|
||||||
description = "A small game about a set of spaceships"
|
|
||||||
email = "buildartifacts@sexybiggetje.nl"
|
|
||||||
package_name = "vision"
|
|
||||||
title = "Vision"
|
|
||||||
url = "https://git.biggetje.net/martijn/vision/"
|
|
||||||
uti = "com.theimpossibleastronaut.vision"
|
|
||||||
version = "v0.1"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
output_directory = "release"
|
|
||||||
ignore_list = [
|
|
||||||
# Git
|
|
||||||
"^.git.*",
|
|
||||||
|
|
||||||
# Binary files
|
|
||||||
".zip$",
|
|
||||||
".tar.gz$",
|
|
||||||
".love$",
|
|
||||||
".exe$",
|
|
||||||
".psd$",
|
|
||||||
|
|
||||||
# Boon-specific files and directories
|
|
||||||
"Boon.toml",
|
|
||||||
"build.sh",
|
|
||||||
"release",
|
|
||||||
"tools",
|
|
||||||
".drone.yml",
|
|
||||||
".luacheckrc",
|
|
||||||
"vision.sublime-.*"
|
|
||||||
]
|
|
||||||
|
|
||||||
# List of targets to build for
|
|
||||||
# Possible values: "love", "windows", "macos", "all"
|
|
||||||
targets = ["all"]
|
|
||||||
|
|
||||||
# If this is set to true, then the default ignore list will not be
|
|
||||||
# merged with the project specific ignore list. This allows the
|
|
||||||
# ignore list to be completely overwritten.
|
|
||||||
exclude_default_ignore_list = false
|
|
||||||
|
|
75
tools/build.sh
Normal file
75
tools/build.sh
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Slightly based on love-exporter at https://github.com/dmoa/love-export/blob/master/main.sh
|
||||||
|
|
||||||
|
VISION_COMMIT=`git ls-remote https://git.biggetje.net/martijn/vision.git | grep "refs/heads/main" | cut -f 1 | head -c 8`
|
||||||
|
LOVE_VERSION=11.4
|
||||||
|
LOVE_WIN64=https://github.com/love2d/love/releases/download/$LOVE_VERSION/love-$LOVE_VERSION-win64.zip
|
||||||
|
LOVE_MACOS=https://github.com/love2d/love/releases/download/$LOVE_VERSION/love-$LOVE_VERSION-macos.zip
|
||||||
|
|
||||||
|
build() {
|
||||||
|
echo "Building release"
|
||||||
|
cp -Rf {assets,bullet,captain,planet,scene,shaders,ship,vendor} build/game/
|
||||||
|
cp -f *.lua build/game/
|
||||||
|
find build/game -maxdepth 5 -type f -name '*.psd' -delete
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadlove() {
|
||||||
|
echo "Downloading binaries"
|
||||||
|
cd build
|
||||||
|
|
||||||
|
curl -L -O $LOVE_WIN64
|
||||||
|
unzip love-$LOVE_VERSION-win64.zip
|
||||||
|
mv ./*win64 win
|
||||||
|
rm love-$LOVE_VERSION-win64.zip
|
||||||
|
cd win
|
||||||
|
rm love.ico game.ico lovec.exe readme.txt changes.txt
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
mkdir mac
|
||||||
|
cd mac
|
||||||
|
curl -L -O $LOVE_MACOS
|
||||||
|
unzip love-$LOVE_VERSION-macos.zip
|
||||||
|
rm love-$LOVE_VERSION-macos.zip
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# todo appimage
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
makelove() {
|
||||||
|
cd build/game
|
||||||
|
echo "Generating love file"
|
||||||
|
zip -9 -r ../../release/vision-$VISION_COMMIT.love .
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
|
||||||
|
makewin64() {
|
||||||
|
echo "Generating Win64 build"
|
||||||
|
cat "build/win/love.exe" "release/vision-$VISION_COMMIT.love" > "build/win/vision.exe"
|
||||||
|
rm "build/win/love.exe"
|
||||||
|
cd build/win
|
||||||
|
zip -9 -r ../../release/vision-$VISION_COMMIT-win64.zip .
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
|
||||||
|
makemac() {
|
||||||
|
echo "Generating MacOS build"
|
||||||
|
cp "release/vision-$VISION_COMMIT.love" "build/mac/love.app/Contents/Resources"
|
||||||
|
mv "build/mac/love.app" "build/mac/vision.app"
|
||||||
|
cd build/mac
|
||||||
|
cp -f "../../tools/macos-info.plist" "vision.app/Contents/Info.plist"
|
||||||
|
zip -9 -r ../../release/vision-$VISION_COMMIT-macos.zip .
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Building the game on LÖVE $LOVE_VERSION!"
|
||||||
|
rm -Rf build/* release/*
|
||||||
|
mkdir -p build/game
|
||||||
|
mkdir -p release
|
||||||
|
|
||||||
|
build
|
||||||
|
downloadlove
|
||||||
|
makelove
|
||||||
|
makewin64
|
||||||
|
makemac
|
107
tools/macos-info.plist
Normal file
107
tools/macos-info.plist
Normal file
|
@ -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>21D49</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>com.theimpossibleastronaut.vision</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Vision</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>11.4a</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>
|
Loading…
Reference in a new issue