-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper itch.io/universal Linux packages
Travis CI and build-packages now install the latest stable SDL2 and (minimal PNG-only) SDL2_image from source. These libs are stripped and included in the itch.io/Linux tar.bz2 packages. The tar.bz2 archives from CPack are flattened, and SDL2 libs, an itch.io manifest, a .desktop file, and a wrapper script is added, so that these archives can be unpacked and used as is, either manually, or via the itch.io app. Closes #361.
- Loading branch information
Showing
13 changed files
with
139 additions
and
8 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
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
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,39 @@ | ||
#!/bin/bash | ||
SOURCEDIR="$(pwd)" | ||
PKGPATH=$1 | ||
ARCHNAME=$(basename ${PKGPATH%}) | ||
PKGNAME=${ARCHNAME%.*.*} | ||
[[ ${PKGNAME} == *"demo"* ]] && DEMO="-demo" || DEMO="" | ||
|
||
cd $(dirname ${PKGPATH}) | ||
|
||
echo "Flattening package ${PKGNAME}..." | ||
|
||
# Extract | ||
tar -xjvf ${ARCHNAME} | ||
rm -f ${ARCHNAME} | ||
mv ${PKGNAME} orig-pkg | ||
|
||
# Rebuild | ||
mkdir ${PKGNAME} | ||
mv orig-pkg/usr/bin/kobord${DEMO} ${PKGNAME} | ||
mv orig-pkg/usr/share/koboredux${DEMO}/* ${PKGNAME} | ||
mv orig-pkg/usr/share/doc/koboredux${DEMO}/* ${PKGNAME} | ||
if [[ ${DEMO} == "" ]] ; then | ||
cp ${SOURCEDIR}/linux-bundle/.itch.toml ${PKGNAME} | ||
else | ||
cp ${SOURCEDIR}/linux-bundle/demo.itch.toml ${PKGNAME}/.itch.toml | ||
fi | ||
cp ${SOURCEDIR}/linux-bundle/kobord${DEMO}.sh ${PKGNAME} | ||
cp ${SOURCEDIR}/linux-bundle/koboredux${DEMO}.desktop ${PKGNAME} | ||
mkdir ${PKGNAME}/lib | ||
cp ${SOURCEDIR}/linux-bundle-lib/* ${PKGNAME}/lib | ||
|
||
# Archive | ||
BZIP2=--best tar -cvjSf ${ARCHNAME} ${PKGNAME} | ||
|
||
# Clean up | ||
rm -rf ${PKGNAME} | ||
rm -rf orig-pkg | ||
|
||
echo "Package ${PKGNAME} flattened!" |
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,41 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
SDLRELEASE=2.0.5 | ||
SDLURL="https://www.libsdl.org/release/SDL2-${SDLRELEASE}.tar.gz" | ||
|
||
IMGRELEASE=2.0.1 | ||
IMGURL="https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${IMGRELEASE}.tar.gz" | ||
|
||
rm -rf linux-bundle-lib | ||
mkdir linux-bundle-lib | ||
|
||
# SDL2 | ||
if pkg-config sdl2 --exists; then | ||
echo "SDL2 already installed in the system!" | ||
else | ||
curl -O ${SDLURL} | ||
tar -xzvf SDL2-${SDLRELEASE}.tar.gz | ||
cd SDL2-${SDLRELEASE} | ||
./configure --prefix=/usr | ||
make | ||
sudo make install | ||
cp -L build/.libs/libSDL2-*.so.0 ../linux-bundle-lib | ||
cd .. | ||
fi | ||
|
||
# SDL2_image | ||
if [ -f "/usr/include/SDL2/SDL_image.h" ]; then | ||
echo "SDL2_image already installed in the system!" | ||
else | ||
curl -O ${IMGURL} | ||
tar -xzvf SDL2_image-${IMGRELEASE}.tar.gz | ||
cd SDL2_image-${IMGRELEASE} | ||
./configure --prefix=/usr --disable-bmp --disable-gif --disable-jpg --disable-jpg-shared --disable-lbm --disable-pcx --enable-png --enable-png-shared --disable-pnm --disable-tga --disable-tif --disable-tif-shared --disable-xcf --disable-xpm --disable-xv --disable-webp --disable-webp-shared | ||
make | ||
sudo make install | ||
cp -L .libs/libSDL2_image-*.so.0 ../linux-bundle-lib | ||
cd .. | ||
fi | ||
|
||
strip linux-bundle-lib/* |
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,3 @@ | ||
[[actions]] | ||
name = "play" | ||
path = "kobord.sh" |
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,3 @@ | ||
[[actions]] | ||
name = "play" | ||
path = "kobord-demo.sh" |
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,4 @@ | ||
#!/bin/bash | ||
cd "`dirname "$0"`" | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib/ | ||
./kobord-demo $@ |
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,4 @@ | ||
#!/bin/bash | ||
cd "`dirname "$0"`" | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib/ | ||
./kobord $@ |
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,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=Kobo Redux Demo | ||
GenericName=Arcade Game | ||
Comment=Arcade style 2D shooter (Demo version) | ||
TryExec=kobord-demo | ||
Exec=bash -c '"$(dirname "$1")"/kobord-demo.sh' dummy %k | ||
Terminal=false | ||
Categories=Application;Game;ArcadeGame;2DGraphics; |
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,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=Kobo Redux | ||
GenericName=Arcade Game | ||
Comment=Arcade style 2D shooter | ||
TryExec=kobord | ||
Exec=bash -c '"$(dirname "$1")"/kobord.sh' dummy %k | ||
Terminal=false | ||
Categories=Application;Game;ArcadeGame;2DGraphics; |