Merge branch 'appimage' into 'master'
Appimage builds See merge request alexjgriffith/min-love2d-fennel!2
This commit is contained in:
commit
314dac0818
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,5 @@
|
|||
*~
|
||||
/releases
|
||||
/appimage/love-prepared/
|
||||
/appimage/AppRun-x86_64
|
||||
/appimage/appimagetool-x86_64.AppImage
|
||||
|
|
92
appimage/build.sh
Executable file
92
appimage/build.sh
Executable file
|
@ -0,0 +1,92 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo >/dev/null
|
||||
|
||||
CURRENT_APPIMAGEKIT_RELEASE=9
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Usage: $0 <version>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
VERSION="$1"
|
||||
LOVEFILE="$2"
|
||||
|
||||
LOVE_TAR_URL=https://bitbucket.org/rude/love/downloads/love-${VERSION}-${ARCH}.tar.gz
|
||||
LOVE_TAR=${HOME}/.cache/love-release/love/love-${VERSION}-${ARCH}.tar.gz
|
||||
if ! test -f ${LOVE_TAR}; then
|
||||
curl -L -o "${LOVE_TAR}" "${LOVE_TAR_URL}"
|
||||
fi
|
||||
|
||||
download_if_needed() {
|
||||
if ! test -f "$1"; then
|
||||
if ! curl -L -o "$1" "https://github.com/AppImage/AppImageKit/releases/download/${CURRENT_APPIMAGEKIT_RELEASE}/$1"; then
|
||||
echo "Failed to download appimagetool"
|
||||
echo "Please supply it manually"
|
||||
exit 1
|
||||
fi
|
||||
chmod +x "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
download_if_needed appimagetool-${ARCH}.AppImage
|
||||
download_if_needed AppRun-${ARCH}
|
||||
|
||||
# Extract the tarball build into a folder
|
||||
rm -rf love-prepared
|
||||
mkdir love-prepared
|
||||
tar xf ${LOVE_TAR} -C love-prepared --strip-components=1
|
||||
|
||||
cd love-prepared
|
||||
|
||||
# Add our small wrapper script (yay, more wrappers), and AppRun
|
||||
cp ../wrapper usr/bin/wrapper-love
|
||||
cp ../AppRun-${ARCH} AppRun
|
||||
|
||||
local desktopfile="love.desktop"
|
||||
local icon="love"
|
||||
local target="love-${VERSION}"
|
||||
|
||||
if test -f ../../game.desktop.in; then
|
||||
desktopfile="game.desktop"
|
||||
cp ../../game.desktop.in .
|
||||
fi
|
||||
if test -f ../../game.svg; then
|
||||
icon="game"
|
||||
cp ../../game.svg .
|
||||
fi
|
||||
if test -f ${LOVEFILE}; then
|
||||
target="game"
|
||||
cat usr/bin/love ${LOVEFILE} > usr/bin/love-fused
|
||||
mv usr/bin/love-fused usr/bin/love
|
||||
chmod +x usr/bin/love
|
||||
else
|
||||
echo "Love file ${LOVEFILE} not found"
|
||||
fi
|
||||
|
||||
# Add our desktop file
|
||||
sed -e 's/%BINARY%/wrapper-love/' -e "s/%ICON%/${icon}/" "${desktopfile}.in" > "$desktopfile"
|
||||
rm "${desktopfile}.in"
|
||||
|
||||
# Add a DirIcon
|
||||
cp "${icon}.svg" .DirIcon
|
||||
|
||||
# Clean up
|
||||
if test -f ../../game.desktop.in; then
|
||||
rm love.desktop.in
|
||||
fi
|
||||
if test -f ../../game.svg; then
|
||||
rm love.svg
|
||||
fi
|
||||
|
||||
# Now build the final AppImage
|
||||
cd ..
|
||||
|
||||
# Work around missing FUSE/docker
|
||||
./appimagetool-${ARCH}.AppImage --appimage-extract
|
||||
./squashfs-root/AppRun love-prepared "${target}-${ARCH}.AppImage"
|
||||
}
|
||||
|
||||
main "$@"
|
1
appimage/squashfs-root/.DirIcon
Symbolic link
1
appimage/squashfs-root/.DirIcon
Symbolic link
|
@ -0,0 +1 @@
|
|||
appimagetool.svg
|
11
appimage/squashfs-root/AppRun
Executable file
11
appimage/squashfs-root/AppRun
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
|
||||
export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
||||
export PYTHONPATH="${HERE}"/usr/share/pyshared/:"${PYTHONPATH}"
|
||||
export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
|
||||
export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
|
||||
export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
|
||||
export QT_PLUGIN_PATH="${HERE}"/usr/lib/qt4/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib32/qt4/plugins/:"${HERE}"/usr/lib64/qt4/plugins/:"${HERE}"/usr/lib/qt5/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib32/qt5/plugins/:"${HERE}"/usr/lib64/qt5/plugins/:"${QT_PLUGIN_PATH}"
|
||||
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
|
||||
exec "${EXEC}" $@
|
9
appimage/squashfs-root/appimagetool.desktop
Normal file
9
appimage/squashfs-root/appimagetool.desktop
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=appimagetool
|
||||
Exec=appimagetool
|
||||
Comment=Tool to generate AppImages from AppDirs
|
||||
Icon=appimagetool
|
||||
Categories=Development;
|
||||
Terminal=true
|
||||
|
320
appimage/squashfs-root/appimagetool.svg
Normal file
320
appimage/squashfs-root/appimagetool.svg
Normal file
|
@ -0,0 +1,320 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="48px"
|
||||
height="48px"
|
||||
id="svg3832"
|
||||
version="1.1"
|
||||
inkscape:version="0.47 r22583"
|
||||
sodipodi:docname="appimage-assistant_alt3.svg">
|
||||
<defs
|
||||
id="defs3834">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3308-4-6-931-761-0"
|
||||
id="linearGradient2975"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="24.3125"
|
||||
y1="22.96875"
|
||||
x2="24.3125"
|
||||
y2="41.03125" />
|
||||
<linearGradient
|
||||
id="linearGradient3308-4-6-931-761-0">
|
||||
<stop
|
||||
id="stop2919-2"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2921-76"
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4222"
|
||||
id="linearGradient2979"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.3704967,-0.3617496,0,33.508315,6.1670925)"
|
||||
x1="7.6485429"
|
||||
y1="26.437023"
|
||||
x2="41.861729"
|
||||
y2="26.437023" />
|
||||
<linearGradient
|
||||
id="linearGradient4222">
|
||||
<stop
|
||||
id="stop4224"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop4226"
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3308-4-6-931-761"
|
||||
id="linearGradient2982"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(0,0.9999987)"
|
||||
x1="23.99999"
|
||||
y1="4.999989"
|
||||
x2="23.99999"
|
||||
y2="43" />
|
||||
<linearGradient
|
||||
id="linearGradient3308-4-6-931-761">
|
||||
<stop
|
||||
id="stop2919"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2921"
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3575"
|
||||
id="radialGradient2985"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,1.0262008,-1.6561124,9.4072203e-4,-56.097482,-45.332325)"
|
||||
cx="48.42384"
|
||||
cy="-48.027504"
|
||||
fx="48.42384"
|
||||
fy="-48.027504"
|
||||
r="38.212933" />
|
||||
<linearGradient
|
||||
id="linearGradient3575">
|
||||
<stop
|
||||
id="stop3577"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3579"
|
||||
style="stop-color:#e6e6e6;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3993"
|
||||
id="radialGradient2990"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,2.0478765,-2.7410544,-8.6412258e-8,47.161382,-8.837436)"
|
||||
cx="9.3330879"
|
||||
cy="8.4497671"
|
||||
fx="9.3330879"
|
||||
fy="8.4497671"
|
||||
r="19.99999" />
|
||||
<linearGradient
|
||||
id="linearGradient3993">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#a3c0d0;stop-opacity:1"
|
||||
id="stop3995" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#427da1;stop-opacity:1"
|
||||
id="stop4001" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2508"
|
||||
id="linearGradient2992"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(0,0.9674382)"
|
||||
x1="14.048676"
|
||||
y1="44.137306"
|
||||
x2="14.048676"
|
||||
y2="4.0000005" />
|
||||
<linearGradient
|
||||
id="linearGradient2508">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#2e4a5a;stop-opacity:1"
|
||||
id="stop2510" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#6e8796;stop-opacity:1"
|
||||
id="stop2512" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="4.9929786"
|
||||
cy="43.5"
|
||||
r="2.5"
|
||||
fx="4.9929786"
|
||||
fy="43.5"
|
||||
id="radialGradient2873-966-168"
|
||||
xlink:href="#linearGradient3688-166-749"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.003784,0,0,1.4,27.98813,-17.4)" />
|
||||
<linearGradient
|
||||
id="linearGradient3688-166-749">
|
||||
<stop
|
||||
id="stop2883"
|
||||
style="stop-color:#181818;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2885"
|
||||
style="stop-color:#181818;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="4.9929786"
|
||||
cy="43.5"
|
||||
r="2.5"
|
||||
fx="4.9929786"
|
||||
fy="43.5"
|
||||
id="radialGradient2875-742-326"
|
||||
xlink:href="#linearGradient3688-464-309"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.003784,0,0,1.4,-20.01187,-104.4)" />
|
||||
<linearGradient
|
||||
id="linearGradient3688-464-309">
|
||||
<stop
|
||||
id="stop2889"
|
||||
style="stop-color:#181818;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2891"
|
||||
style="stop-color:#181818;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="25.058096"
|
||||
y1="47.027729"
|
||||
x2="25.058096"
|
||||
y2="39.999443"
|
||||
id="linearGradient2877-634-617"
|
||||
xlink:href="#linearGradient3702-501-757"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3702-501-757">
|
||||
<stop
|
||||
id="stop2895"
|
||||
style="stop-color:#181818;stop-opacity:0"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2897"
|
||||
style="stop-color:#181818;stop-opacity:1"
|
||||
offset="0.5" />
|
||||
<stop
|
||||
id="stop2899"
|
||||
style="stop-color:#181818;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="7"
|
||||
inkscape:cx="24"
|
||||
inkscape:cy="24"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="603"
|
||||
inkscape:window-height="484"
|
||||
inkscape:window-x="417"
|
||||
inkscape:window-y="162"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata3837">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="g2036"
|
||||
transform="matrix(1.1,0,0,0.4444449,-2.4000022,25.11107)">
|
||||
<g
|
||||
style="opacity:0.4"
|
||||
id="g3712"
|
||||
transform="matrix(1.052632,0,0,1.285713,-1.263158,-13.42854)">
|
||||
<rect
|
||||
style="fill:url(#radialGradient2873-966-168);fill-opacity:1;stroke:none"
|
||||
id="rect2801"
|
||||
y="40"
|
||||
x="38"
|
||||
height="7"
|
||||
width="5" />
|
||||
<rect
|
||||
style="fill:url(#radialGradient2875-742-326);fill-opacity:1;stroke:none"
|
||||
id="rect3696"
|
||||
transform="scale(-1,-1)"
|
||||
y="-47"
|
||||
x="-10"
|
||||
height="7"
|
||||
width="5" />
|
||||
<rect
|
||||
style="fill:url(#linearGradient2877-634-617);fill-opacity:1;stroke:none"
|
||||
id="rect3700"
|
||||
y="40"
|
||||
x="10"
|
||||
height="7.0000005"
|
||||
width="28" />
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
style="fill:url(#radialGradient2990);fill-opacity:1;stroke:url(#linearGradient2992);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect5505"
|
||||
y="5.4674392"
|
||||
x="4.5"
|
||||
ry="2.2322156"
|
||||
rx="2.2322156"
|
||||
height="39"
|
||||
width="39" />
|
||||
<path
|
||||
style="opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00178742;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="path4294-1"
|
||||
d="m 21,6.9687498 a 2.0165107,2.0165107 0 0 0 -2.03125,2.03125 l 0,3.9687502 -1.15625,0 a 2.0165107,2.0165107 0 0 0 -1.5,3.375 l 5.0625,5.75 c -0.06312,0.110777 -0.178724,0.246032 -0.21875,0.34375 -0.195898,0.478256 -0.25,0.83653 -0.25,1.21875 l 0,0.125 L 20.8125,23.6875 C 20.534322,23.409323 20.213169,23.162739 19.71875,22.96875 19.47154,22.87176 19.185456,22.791748 18.75,22.8125 c -0.435456,0.02075 -1.054055,0.210302 -1.46875,0.625 L 15.75,24.96875 c -0.414689,0.414689 -0.604245,1.033294 -0.625,1.46875 -0.02075,0.435456 0.05925,0.721537 0.15625,0.96875 C 15.475241,27.900677 15.721817,28.221821 16,28.5 l 0.09375,0.09375 -0.125,0 c -0.382218,0 -0.740493,0.0541 -1.21875,0.25 -0.239128,0.09795 -0.538285,0.214988 -0.84375,0.53125 -0.305465,0.316262 -0.625,0.914788 -0.625,1.53125 l 0,2.1875 c 0,0.616465 0.319536,1.214989 0.625,1.53125 0.305464,0.316261 0.604622,0.433301 0.84375,0.53125 0.478256,0.195898 0.83653,0.25 1.21875,0.25 l 0.125,0 L 16,35.5 c -0.278175,0.278176 -0.52476,0.599329 -0.71875,1.09375 -0.09699,0.24721 -0.177003,0.533292 -0.15625,0.96875 0.02075,0.435458 0.210304,1.054058 0.625,1.46875 l 1.53125,1.53125 c 0.414691,0.414697 1.033292,0.604245 1.46875,0.625 0.435458,0.02076 0.721537,-0.05926 0.96875,-0.15625 0.494425,-0.19399 0.81557,-0.440568 1.09375,-0.71875 l 0.09375,-0.09375 0,0.125 c 0,0.38222 0.0541,0.740495 0.25,1.21875 0.09795,0.239127 0.214989,0.538285 0.53125,0.84375 0.316261,0.305465 0.914783,0.625 1.53125,0.625 l 2.1875,0 c 0.616466,0 1.214989,-0.319534 1.53125,-0.625 0.316261,-0.305466 0.433302,-0.604622 0.53125,-0.84375 0.195896,-0.478255 0.25,-0.836532 0.25,-1.21875 l 0,-0.125 0.09375,0.09375 c 0.278176,0.278175 0.599329,0.52476 1.09375,0.71875 0.24721,0.09699 0.533292,0.177003 0.96875,0.15625 0.435458,-0.02075 1.054058,-0.210304 1.46875,-0.625 L 32.875,39.03125 C 33.289697,38.616559 33.479245,37.997958 33.5,37.5625 33.52076,37.127042 33.44074,36.840963 33.34375,36.59375 33.14976,36.099325 32.903182,35.77818 32.625,35.5 l -0.09375,-0.09375 0.125,0 c 0.38222,0 0.740494,-0.0541 1.21875,-0.25 0.239128,-0.09795 0.538286,-0.214988 0.84375,-0.53125 0.305464,-0.316262 0.625,-0.914787 0.625,-1.53125 l 0,-2.1875 c 0,-0.61646 -0.319535,-1.214987 -0.625,-1.53125 -0.305465,-0.316263 -0.604621,-0.433301 -0.84375,-0.53125 -0.478257,-0.195898 -0.836532,-0.25 -1.21875,-0.25 l -0.125,0 L 32.625,28.5 c 0.278177,-0.278177 0.52476,-0.599329 0.71875,-1.09375 C 33.44074,27.15904 33.520753,26.872957 33.5,26.4375 33.47925,26.002043 33.289697,25.383443 32.875,24.96875 L 31.34375,23.4375 c -0.414688,-0.414694 -1.03329,-0.604245 -1.46875,-0.625 -0.43546,-0.02076 -0.721537,0.05925 -0.96875,0.15625 -0.494426,0.193991 -0.815572,0.44057 -1.09375,0.71875 l -0.09375,0.09375 0,-0.125 c 0,-0.382218 -0.0541,-0.740493 -0.25,-1.21875 -0.09112,-0.22245 -0.228127,-0.500183 -0.5,-0.78125 l 4.71875,-5.3125 a 2.0165107,2.0165107 0 0 0 -1.5,-3.375 l -1.15625,0 0,-3.9687502 A 2.0165107,2.0165107 0 0 0 27,6.9687498 l -6,0 z M 24.3125,31.25 c 0.427097,0 0.75,0.322904 0.75,0.75 0,0.427096 -0.322903,0.75 -0.75,0.75 -0.427094,0 -0.75,-0.322906 -0.75,-0.75 0,-0.427094 0.322906,-0.75 0.75,-0.75 z" />
|
||||
<path
|
||||
style="opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00178742;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="path4294"
|
||||
d="m 20.90625,8.0312498 a 0.96385067,0.96385067 0 0 0 -0.875,0.96875 l 0,5.0312502 -2.21875,0 A 0.96385067,0.96385067 0 0 0 17.09375,15.625 l 5.78125,6.53125 c -0.158814,0.0616 -0.341836,0.0951 -0.4375,0.1875 -0.169161,0.163386 -0.252971,0.323419 -0.3125,0.46875 -0.119058,0.290663 -0.15625,0.566746 -0.15625,0.84375 l 0,1.65625 C 21.718163,25.40233 21.485871,25.509772 21.25,25.625 l -1.1875,-1.1875 c -0.199651,-0.19965 -0.421433,-0.352095 -0.71875,-0.46875 -0.148659,-0.05833 -0.329673,-0.104846 -0.5625,-0.09375 -0.232827,0.0111 -0.53583,0.09833 -0.75,0.3125 L 16.5,25.71875 c -0.214168,0.214168 -0.301403,0.517173 -0.3125,0.75 -0.0111,0.232827 0.03542,0.41384 0.09375,0.5625 0.116655,0.297321 0.269096,0.519099 0.46875,0.71875 l 1.1875,1.1875 c -0.115228,0.235871 -0.222668,0.468163 -0.3125,0.71875 l -1.65625,0 c -0.277003,0 -0.553087,0.03719 -0.84375,0.15625 -0.145332,0.05953 -0.305363,0.143338 -0.46875,0.3125 -0.163387,0.169162 -0.3125,0.46403 -0.3125,0.78125 l 0,2.1875 c 0,0.317221 0.149114,0.612089 0.3125,0.78125 0.163386,0.169161 0.323419,0.252971 0.46875,0.3125 0.290663,0.119058 0.566746,0.15625 0.84375,0.15625 l 1.65625,0 c 0.08983,0.250587 0.197272,0.482879 0.3125,0.71875 L 16.75,36.25 c -0.199649,0.19965 -0.352095,0.421432 -0.46875,0.71875 -0.05833,0.148659 -0.104846,0.329672 -0.09375,0.5625 0.0111,0.232828 0.09833,0.535831 0.3125,0.75 l 1.53125,1.53125 c 0.214168,0.214172 0.517172,0.301403 0.75,0.3125 0.232828,0.0111 0.41384,-0.03542 0.5625,-0.09375 0.29732,-0.116655 0.519098,-0.269096 0.71875,-0.46875 L 21.25,38.375 c 0.235871,0.115228 0.468164,0.222668 0.71875,0.3125 l 0,1.65625 c 0,0.277003 0.03719,0.553087 0.15625,0.84375 0.05953,0.145331 0.143339,0.305364 0.3125,0.46875 0.169161,0.163386 0.464028,0.3125 0.78125,0.3125 l 2.1875,0 c 0.317221,0 0.612089,-0.149113 0.78125,-0.3125 0.169161,-0.163387 0.252971,-0.323419 0.3125,-0.46875 0.119057,-0.290663 0.15625,-0.566748 0.15625,-0.84375 l 0,-1.65625 c 0.250586,-0.08983 0.482879,-0.197272 0.71875,-0.3125 l 1.1875,1.1875 c 0.19965,0.199649 0.421432,0.352095 0.71875,0.46875 0.148659,0.05833 0.329672,0.104846 0.5625,0.09375 0.232828,-0.0111 0.535831,-0.09833 0.75,-0.3125 L 32.125,38.28125 c 0.214172,-0.214168 0.301403,-0.517172 0.3125,-0.75 0.0111,-0.232828 -0.03542,-0.41384 -0.09375,-0.5625 C 32.227095,36.67143 32.074654,36.449652 31.875,36.25 L 30.6875,35.0625 C 30.802728,34.82663 30.910168,34.594337 31,34.34375 l 1.65625,0 c 0.277004,0 0.553087,-0.03719 0.84375,-0.15625 0.145332,-0.05953 0.305364,-0.143339 0.46875,-0.3125 0.163386,-0.169161 0.3125,-0.46403 0.3125,-0.78125 l 0,-2.1875 c 0,-0.317219 -0.149114,-0.612088 -0.3125,-0.78125 C 33.805364,29.955838 33.645332,29.872029 33.5,29.8125 33.209336,29.693442 32.933253,29.65625 32.65625,29.65625 l -1.65625,0 C 30.91017,29.405663 30.802728,29.17337 30.6875,28.9375 L 31.875,27.75 c 0.19965,-0.19965 0.352095,-0.421432 0.46875,-0.71875 0.05833,-0.148659 0.104846,-0.329672 0.09375,-0.5625 -0.0111,-0.232828 -0.09833,-0.535831 -0.3125,-0.75 L 30.59375,24.1875 c -0.214167,-0.21417 -0.517171,-0.301403 -0.75,-0.3125 -0.232829,-0.0111 -0.41384,0.03542 -0.5625,0.09375 -0.29732,0.116656 -0.519099,0.269097 -0.71875,0.46875 L 27.375,25.625 c -0.235871,-0.115228 -0.468163,-0.222668 -0.71875,-0.3125 l 0,-1.65625 c 0,-0.277003 -0.03719,-0.553087 -0.15625,-0.84375 -0.05953,-0.145332 -0.143338,-0.305363 -0.3125,-0.46875 -0.169162,-0.163387 -0.46403,-0.3125 -0.78125,-0.3125 l -0.15625,0 5.65625,-6.40625 A 0.96385067,0.96385067 0 0 0 30.1875,14.03125 l -2.21875,0 0,-5.0312502 A 0.96385067,0.96385067 0 0 0 27,8.0312498 l -6,0 a 0.96385067,0.96385067 0 0 0 -0.09375,0 z M 24.3125,30.1875 c 1.002113,0 1.8125,0.810388 1.8125,1.8125 0,1.002112 -0.810387,1.8125 -1.8125,1.8125 C 23.31039,33.8125 22.5,33.002111 22.5,32 c 0,-1.002111 0.81039,-1.8125 1.8125,-1.8125 z" />
|
||||
<path
|
||||
style="fill:url(#radialGradient2985);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00178742;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="path2317"
|
||||
d="M 21,8.9999996 21,15 17.8125,15 24,22 30.1875,15 27,15 l 0,-6.0000004 -6,0 z M 23.21875,23 c -0.172892,0 -0.28125,0.294922 -0.28125,0.65625 l 0,2.28125 C 22.24145,26.095996 21.585954,26.379869 21,26.75 l -1.625,-1.625 c -0.255498,-0.255497 -0.533998,-0.372253 -0.65625,-0.25 l -1.53125,1.53125 c -0.122254,0.122254 -0.0055,0.400753 0.25,0.65625 l 1.625,1.625 c -0.37013,0.585953 -0.654003,1.24145 -0.8125,1.9375 l -2.28125,0 c -0.361328,0 -0.65625,0.108357 -0.65625,0.28125 l 0,2.1875 c 0,0.172892 0.294922,0.28125 0.65625,0.28125 l 2.28125,0 c 0.158497,0.69605 0.44237,1.351546 0.8125,1.9375 l -1.625,1.625 c -0.255497,0.255498 -0.372254,0.533997 -0.25,0.65625 l 1.53125,1.53125 c 0.122252,0.122254 0.400752,0.0055 0.65625,-0.25 L 21,37.25 c 0.585954,0.37013 1.24145,0.654002 1.9375,0.8125 l 0,2.28125 C 22.9375,40.705077 23.045858,41 23.21875,41 l 2.1875,0 c 0.172893,0 0.28125,-0.294924 0.28125,-0.65625 l 0,-2.28125 c 0.69605,-0.158498 1.351546,-0.44237 1.9375,-0.8125 l 1.625,1.625 c 0.255498,0.255497 0.533997,0.372254 0.65625,0.25 l 1.53125,-1.53125 c 0.122254,-0.122252 0.0055,-0.400752 -0.25,-0.65625 l -1.625,-1.625 c 0.370129,-0.585954 0.654003,-1.24145 0.8125,-1.9375 l 2.28125,0 c 0.361329,0 0.65625,-0.108358 0.65625,-0.28125 l 0,-2.1875 c 0,-0.172893 -0.294921,-0.28125 -0.65625,-0.28125 l -2.28125,0 c -0.158497,-0.69605 -0.442371,-1.351547 -0.8125,-1.9375 l 1.625,-1.625 c 0.255497,-0.255497 0.372254,-0.533997 0.25,-0.65625 L 29.90625,24.875 C 29.783997,24.752745 29.505498,24.8695 29.25,25.125 l -1.625,1.625 c -0.585954,-0.370131 -1.24145,-0.654004 -1.9375,-0.8125 l 0,-2.28125 C 25.6875,23.294922 25.579143,23 25.40625,23 l -2.1875,0 z m 1.09375,6.21875 c 1.528616,0 2.78125,1.252635 2.78125,2.78125 0,1.528615 -1.252634,2.78125 -2.78125,2.78125 -1.528614,0 -2.78125,-1.252635 -2.78125,-2.78125 0,-1.528615 1.252636,-2.78125 2.78125,-2.78125 z" />
|
||||
<rect
|
||||
style="opacity:0.4;fill:none;stroke:url(#linearGradient2982);stroke-width:0.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect6741"
|
||||
y="6.4999886"
|
||||
x="5.4999981"
|
||||
ry="1.365193"
|
||||
rx="1.365193"
|
||||
height="37.000011"
|
||||
width="36.999985" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2979);stroke-width:0.99829447;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
|
||||
id="path2777"
|
||||
d="M 28.926376,15.466668 24,21.177578 18.963089,15.5 21.5,15.5 l 0,-6.0000004 5,0 0,6.0000004 2.426376,-0.03333 z" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2975);stroke-width:1;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="path4243"
|
||||
d="m 23.4375,23.46875 c -0.01166,0.05381 -0.03125,0.100205 -0.03125,0.1875 l 0,2.28125 a 0.48185467,0.48185467 0 0 1 -0.375,0.46875 c -0.638467,0.145384 -1.238423,0.407111 -1.78125,0.75 a 0.48185467,0.48185467 0 0 1 -0.59375,-0.0625 l -1.625,-1.625 C 18.9779,25.4154 18.9477,25.40242 18.90625,25.375 l -1.21875,1.21875 c 0.02742,0.04145 0.0404,0.07165 0.09375,0.125 l 1.625,1.625 a 0.48185467,0.48185467 0 0 1 0.0625,0.59375 c -0.342888,0.542826 -0.604615,1.142782 -0.75,1.78125 a 0.48185467,0.48185467 0 0 1 -0.46875,0.375 l -2.28125,0 c -0.08729,0 -0.133695,0.01959 -0.1875,0.03125 l 0,1.75 c 0.05381,0.01166 0.100205,0.03125 0.1875,0.03125 l 2.28125,0 a 0.48185467,0.48185467 0 0 1 0.46875,0.375 c 0.145385,0.638468 0.407112,1.238423 0.75,1.78125 a 0.48185467,0.48185467 0 0 1 -0.0625,0.59375 l -1.625,1.625 c -0.05335,0.05335 -0.06633,0.08355 -0.09375,0.125 l 1.21875,1.21875 c 0.04145,-0.02742 0.07165,-0.0404 0.125,-0.09375 l 1.625,-1.625 A 0.48185467,0.48185467 0 0 1 21.25,36.84375 c 0.542827,0.342888 1.142781,0.604614 1.78125,0.75 a 0.48185467,0.48185467 0 0 1 0.375,0.46875 l 0,2.28125 c 0,0.08729 0.01959,0.133695 0.03125,0.1875 l 1.75,0 c 0.01166,-0.0538 0.03125,-0.100206 0.03125,-0.1875 l 0,-2.28125 a 0.48185467,0.48185467 0 0 1 0.375,-0.46875 c 0.638469,-0.145386 1.238423,-0.407112 1.78125,-0.75 a 0.48185467,0.48185467 0 0 1 0.59375,0.0625 l 1.625,1.625 c 0.05335,0.05335 0.08355,0.06633 0.125,0.09375 l 1.21875,-1.21875 c -0.02742,-0.04145 -0.0404,-0.07165 -0.09375,-0.125 l -1.625,-1.625 a 0.48185467,0.48185467 0 0 1 -0.0625,-0.59375 c 0.342888,-0.542828 0.604615,-1.142783 0.75,-1.78125 a 0.48185467,0.48185467 0 0 1 0.46875,-0.375 l 2.28125,0 c 0.08729,0 0.133695,-0.01959 0.1875,-0.03125 l 0,-1.75 c -0.0538,-0.01166 -0.100204,-0.03125 -0.1875,-0.03125 l -2.28125,0 a 0.48185467,0.48185467 0 0 1 -0.46875,-0.375 c -0.145385,-0.638467 -0.407113,-1.238424 -0.75,-1.78125 a 0.48185467,0.48185467 0 0 1 0.0625,-0.59375 l 1.625,-1.625 c 0.05335,-0.05335 0.06633,-0.08355 0.09375,-0.125 L 29.71875,25.375 c -0.04145,0.02742 -0.07165,0.0404 -0.125,0.09375 l -1.625,1.625 a 0.48185467,0.48185467 0 0 1 -0.59375,0.0625 c -0.542827,-0.342889 -1.142783,-0.604616 -1.78125,-0.75 a 0.48185467,0.48185467 0 0 1 -0.375,-0.46875 l 0,-2.28125 c 0,-0.0873 -0.01959,-0.133695 -0.03125,-0.1875 l -1.75,0 z m 0.875,5.28125 c 1.791829,0 3.25,1.458172 3.25,3.25 0,1.791828 -1.458171,3.25 -3.25,3.25 -1.791827,0 -3.25,-1.458172 -3.25,-3.25 0,-1.791828 1.458173,-3.25 3.25,-3.25 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 21 KiB |
BIN
appimage/squashfs-root/usr/bin/appimagetool
Executable file
BIN
appimage/squashfs-root/usr/bin/appimagetool
Executable file
Binary file not shown.
BIN
appimage/squashfs-root/usr/bin/mksquashfs
Executable file
BIN
appimage/squashfs-root/usr/bin/mksquashfs
Executable file
Binary file not shown.
BIN
appimage/squashfs-root/usr/bin/zsyncmake
Executable file
BIN
appimage/squashfs-root/usr/bin/zsyncmake
Executable file
Binary file not shown.
4
appimage/wrapper
Executable file
4
appimage/wrapper
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# For some reason this runs from the usr subdirectory
|
||||
exec ../love "$@"
|
|
@ -1,15 +0,0 @@
|
|||
-- https://love2d.org/wiki/General_math
|
||||
return function(l1p1x,l1p1y, l1p2x,l1p2y, l2p1x,l2p1y, l2p2x,l2p2y)
|
||||
local a1,b1,a2,b2 = l1p2y-l1p1y, l1p1x-l1p2x, l2p2y-l2p1y, l2p1x-l2p2x
|
||||
local c1,c2 = a1*l1p1x+b1*l1p1y, a2*l2p1x+b2*l2p1y
|
||||
local det,x,y = a1*b2 - a2*b1
|
||||
if det==0 then return false, "The lines are parallel." end
|
||||
x,y = (b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det
|
||||
if not (math.min(l1p1x,l1p2x) <= x and x <= math.max(l1p1x,l1p2x) and
|
||||
math.min(l1p1y,l1p2y) <= y and y <= math.max(l1p1y,l1p2y)) or
|
||||
not (math.min(l2p1x,l2p2x) <= x and x <= math.max(l2p1x,l2p2x) and
|
||||
math.min(l2p1y,l2p2y) <= y and y <= math.max(l2p1y,l2p2y)) then
|
||||
return false, "The lines don't intersect."
|
||||
end
|
||||
return x,y
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# LÖVE version
|
||||
LOVE_DEF_VERSION=0.11.1
|
||||
LOVE_DEF_VERSION=0.11.2
|
||||
|
||||
|
||||
|
||||
|
|
25
makefile
25
makefile
|
@ -1,12 +1,22 @@
|
|||
VERSION=0.1.0
|
||||
NAME=min-love2d-fennel
|
||||
NAME=change-me
|
||||
URL=https://gitlab.com/alexjgriffith/min-love2d-fennel
|
||||
AUTHOR="Alexander Griffith"
|
||||
DESCRIPTION="Minimal setup for trying out Phil Hagelberg's fennel/love game design process."
|
||||
|
||||
LIBS := $(wildcard lib/*)
|
||||
LUA := $(wildcard *.lua)
|
||||
SRC := $(wildcard *.fnl)
|
||||
OUT := $(patsubst %.fnl,%.lua,$(SRC))
|
||||
|
||||
$(LOVEFILE): $(LUA) $(OUT) $(LIBS) assets text
|
||||
LOVEFILE=releases/$(NAME)-$(VERSION).love
|
||||
|
||||
run: ; love $(PWD)
|
||||
|
||||
%.lua: %.fnl ; lua lib/fennel --compile --correlate $< > $@
|
||||
clean: ; rm -rf $(OUT)
|
||||
|
||||
$(LOVEFILE): $(LUA) $(OUT) $(LIBS) assets
|
||||
mkdir -p releases/
|
||||
find $^ -type f | LC_ALL=C sort | env TZ=UTC zip -r -q -9 -X $@ -@
|
||||
|
||||
|
@ -16,24 +26,27 @@ love: $(LOVEFILE)
|
|||
|
||||
REL="$(PWD)/love-release.sh" # https://p.hagelb.org/love-release.sh
|
||||
FLAGS=-a "$(AUTHOR)" --description $(DESCRIPTION) \
|
||||
--love 11.1 --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
|
||||
--love 11.2 --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
|
||||
|
||||
releases/$(NAME)-$(VERSION)-x86_64.AppImage: $(LOVEFILE)
|
||||
cd appimage && ./build.sh 11.1 $(PWD)/$(LOVEFILE)
|
||||
cd appimage && ./build.sh 11.2 $(PWD)/$(LOVEFILE)
|
||||
mv appimage/game-x86_64.AppImage $@
|
||||
|
||||
releases/$(NAME)-$(VERSION)-macos.zip: $(LOVEFILE)
|
||||
$(REL) $(FLAGS) -M
|
||||
mv releases/EXO_encounter-667-macos.zip $@
|
||||
mv releases/$(NAME)-macos.zip $@
|
||||
|
||||
releases/$(NAME)-$(VERSION)-win.zip: $(LOVEFILE)
|
||||
$(REL) $(FLAGS) -W32
|
||||
mv releases/EXO_encounter-667-win32.zip $@
|
||||
mv releases/$(NAME)-win32.zip $@
|
||||
|
||||
linux: releases/$(NAME)-$(VERSION)-x86_64.AppImage
|
||||
mac: releases/$(NAME)-$(VERSION)-macos.zip
|
||||
windows: releases/$(NAME)-$(VERSION)-win.zip
|
||||
|
||||
# If you release on itch.io, you should install butler:
|
||||
# https://itch.io/docs/butler/installing.html
|
||||
|
||||
uploadlinux: releases/$(NAME)-$(VERSION)-x86_64.AppImage
|
||||
butler push $^ technomancy/exo-encounter-667:linux
|
||||
uploadmac: releases/$(NAME)-$(VERSION)-macos.zip
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
(var time 0)
|
||||
|
||||
{:draw (fn draw [message]
|
||||
(love.graphics.print "This window should close in 3s") 32 16)
|
||||
(love.graphics.print (: "This window should close in %0.2f seconds"
|
||||
:format (- 3 time))) 32 16)
|
||||
:update (fn update [dt set-mode]
|
||||
(if (< counter 65535)
|
||||
(set counter (+ counter 1))
|
||||
|
|
12
wrap.fnl
12
wrap.fnl
|
@ -1,5 +1,6 @@
|
|||
(local repl (require "lib.stdio"))
|
||||
(local canvas (love.graphics.newCanvas 720 450))
|
||||
(local canvas (let [(w h) (love.window.getMode)]
|
||||
(love.graphics.newCanvas w h)))
|
||||
|
||||
(var scale 1)
|
||||
|
||||
|
@ -16,6 +17,8 @@
|
|||
(repl.start))
|
||||
|
||||
(fn love.draw []
|
||||
;; the canvas allows you to get sharp pixel-art style scaling; if you
|
||||
;; don't want that, just skip that and call mode.draw directly.
|
||||
(love.graphics.setCanvas canvas)
|
||||
(love.graphics.clear)
|
||||
(love.graphics.setColor 1 1 1)
|
||||
|
@ -25,14 +28,11 @@
|
|||
(love.graphics.draw canvas 0 0 0 scale scale))
|
||||
|
||||
(fn love.update[dt]
|
||||
(mode.update dt set-mode)
|
||||
)
|
||||
(mode.update dt set-mode))
|
||||
|
||||
(fn love.keypressed [key]
|
||||
(if
|
||||
(and (love.keyboard.isDown "lctrl" "rctrl" "capslock") (= key "q"))
|
||||
(love.event.quit)
|
||||
;; add what each keypress should do in each mode
|
||||
(mode.keypressed key set-mode)
|
||||
))
|
||||
|
||||
(mode.keypressed key set-mode)))
|
||||
|
|
Loading…
Reference in a new issue