Skip to content

Commit

Permalink
add HEF build (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonsfor authored Jun 13, 2023
1 parent bed32cb commit b2f2b84
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 74 deletions.
51 changes: 44 additions & 7 deletions build-everything.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -e
sudo apt-get update -y -qq && sudo apt-get upgrade -y -qq
sudo apt-get install -y -qq --no-install-recommends build-essential git nasm libpng-dev zlib1g-dev libsdl2-dev libsdl2-mixer-dev libgme-dev libopenmpt-dev libcurl4-openssl-dev rapidjson-dev cmake fuse3 pkg-config


git clone --branch master --single-branch --no-tags https://github.com/discord/discord-rpc.git
cd discord-rpc
mkdir build
Expand All @@ -14,6 +15,7 @@ cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr
sudo cmake --build . --config Release --target install
cd ../..


git clone --branch master --single-branch --no-tags -n https://github.com/STJr/Kart-Public.git kart
cd kart
git checkout 20a5adde02d134a1badaf22fa6f680eba0580308
Expand All @@ -28,45 +30,80 @@ patch src/d_netfil.c < ../d_netfil.c.patch
LIBGME_CFLAGS= LIBGME_LDFLAGS=-lgme make -C src/ LINUX64=1 NOUPX=1 NOOBJDUMP=1 HAVE_DISCORDRPC=1
cd ..

git clone --branch Glalxy --single-branch --no-tags -n https://git.do.srb2.org/haya_/Kart-Public.git HEP
cd HEP
git checkout 4b8471c232f2024a679b546259d3b6dd943dc095
patch src/d_netfil.c < ../d_netfil.c.patch
LIBGME_CFLAGS= LIBGME_LDFLAGS=-lgme make -C src/ LINUX64=1 NOUPX=1 NOOBJDUMP=1 HAVE_DISCORDRPC=1
cd ..


wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -q https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
chmod +x appimagetool-x86_64.AppImage


install -Dm755 kart/bin/Linux64/Release/lsdl2srb2kart AppDir/usr/bin/srb2kart
install -Dm755 AppRun AppDir/
install -Dm644 kart/src/sdl/srb2icon.png AppDir/usr/share/icons/hicolor/64x64/apps/org.srb2.SRB2Kart.png
install -Dm644 kart/srb2.png AppDir/usr/share/icons/hicolor/256x256/apps/org.srb2.SRB2Kart.png
install -Dm644 org.srb2.SRB2Kart.desktop AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
install -Dm644 org.srb2.SRB2Kart.appdata.xml AppDir/usr/share/metainfo/org.srb2.SRB2Kart.appdata.xml
install -Dm644 org.srb2.SRB2Kart.metainfo.xml AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

./linuxdeploy-x86_64.AppImage --appdir AppDir

export NEWVERSION=1.6-git-$(cd kart && git rev-parse --short HEAD)
export NEWCOMMITANDDATE=$(cd kart && git show --summary --pretty='format:"1.6-git-%h" date="%cs"')
sed -i 's/VERSION/'"$NEWVERSION"'/g' AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
sed -i 's/COMMITANDDATE/'"$NEWCOMMITANDDATE"'/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.appdata.xml
sed -i 's/COMMITANDDATE/'"$NEWCOMMITANDDATE"'/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/HOMEPAGELINK/https\:\/\/mb.srb2.org\/addons\/srb2kart.2435\//g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/SOURCELINK/https\:\/\/git.do.srb2.org\/KartKrew\/Kart-Public/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-noassets-x86_64.AppImage.zsync" AppDir srb2kart-noassets-x86_64.AppImage

wget -q https://github.com/STJr/Kart-Public/releases/download/v1.6/AssetsLinuxOnly.zip
mkdir -p AppDir/usr/games/SRB2Kart
unzip AssetsLinuxOnly.zip -d AppDir/usr/games/SRB2Kart *.kart *.srb mdls*
chmod +w AppDir/usr/games/SRB2Kart/mdls
mkdir -p AppDir/usr
mkdir -p games/SRB2Kart
unzip AssetsLinuxOnly.zip -d games/SRB2Kart *.kart *.srb mdls*
chmod +w games/SRB2Kart/mdls
cp -r games AppDir/usr

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-x86_64.AppImage.zsync" AppDir srb2kart-x86_64.AppImage


install -Dm755 galaxy/bin/Linux64/Release/lsdl2srb2kart AppDir/usr/bin/srb2kart
install -Dm644 org.srb2.SRB2Kart.desktop AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
install -Dm644 org.srb2.SRB2Kart.appdata.xml AppDir/usr/share/metainfo/org.srb2.SRB2Kart.appdata.xml
install -Dm644 org.srb2.SRB2Kart.metainfo.xml AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

export NEWVERSION=1.6-galaxy-$(cd galaxy && git rev-parse --short HEAD)
export NEWCOMMITANDDATE=$(cd galaxy && git show --summary --pretty='format:"1.6-galaxy-%h" date="%cs"')
sed -i 's/VERSION/'"$NEWVERSION"'/g' AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
sed -i 's/COMMITANDDATE/'"$NEWCOMMITANDDATE"'/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.appdata.xml
sed -i 's/COMMITANDDATE/'"$NEWCOMMITANDDATE"'/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/HOMEPAGELINK/https\:\/\/mb.srb2.org\/addons\/srb2kart-galaxy.4500\//g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/SOURCELINK/https\:\/\/git.do.srb2.org\/Galactice\/Kart-Public/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-galaxy-x86_64.AppImage.zsync" AppDir srb2kart-galaxy-x86_64.AppImage

rm -rf AppDir/usr/games

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-galaxy-noassets-x86_64.AppImage.zsync" AppDir srb2kart-galaxy-noassets-x86_64.AppImage


install -Dm755 HEP/bin/Linux64/Release/lsdl2srb2kart AppDir/usr/bin/srb2kart
install -Dm644 org.srb2.SRB2Kart.desktop AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
install -Dm644 org.srb2.SRB2Kart.metainfo.xml AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

export NEWVERSION=1.6-HEP-$(cd galaxy && git rev-parse --short HEAD)
export NEWCOMMITANDDATE=$(cd HEP && git show --summary --pretty='format:"1.6-HEP-%h" date="%cs"')
sed -i 's/VERSION/'"$NEWVERSION"'/g' AppDir/usr/share/applications/org.srb2.SRB2Kart.desktop
sed -i 's/COMMITANDDATE/'"$NEWCOMMITANDDATE"'/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/HOMEPAGELINK/https\:\/\/mb.srb2.org\/addons\/hayas-expansion-pak.5254\//g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml
sed -i 's/SOURCELINK/https\:\/\/git.do.srb2.org\/haya_\/Kart-Public/g' AppDir/usr/share/metainfo/org.srb2.SRB2Kart.metainfo.xml

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-HEP-noassets-x86_64.AppImage.zsync" AppDir srb2kart-HEP-noassets-x86_64.AppImage

cp -r games AppDir/usr
wget -O AppDir/usr/games/SRB2Kart/snowy_files.kart "https://drive.google.com/uc?export=download&id=1luvNekal7yFMAvwa7sTywaEB1akHFdP3"

./appimagetool-x86_64.AppImage -n -u "gh-releases-zsync|lonsfor|srb2k-appimage|latest|srb2kart-HEP-x86_64.AppImage.zsync" AppDir srb2kart-HEP-x86_64.AppImage
67 changes: 0 additions & 67 deletions org.srb2.SRB2Kart.appdata.xml

This file was deleted.

76 changes: 76 additions & 0 deletions org.srb2.SRB2Kart.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component type="desktop-application">
<id>org.srb2.SRB2Kart</id>
<name>Sonic Robo Blast 2 Kart</name>
<summary>A kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2</summary>
<developer_name>Kart Krew</developer_name>
<launchable type="desktop-id">org.srb2.SRB2Kart.desktop</launchable>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-2.0+</project_license>
<description>
<p>
Sonic Robo Blast 2 Kart (usually shortened to SRB2Kart or SRB2K) is a
kart racing game with Sonic-themed characters, items and race tracks.
SRB2Kart features over 100 maps for two game modes: the main Race mode
and a Battle mode where players fight each other using the items
available in the game.
</p>
</description>
<screenshots>
<screenshot type="default">
<caption>Title screen</caption>
<image type="source">https://wiki.srb2.org/w/images/a/ac/Srb2kart_title.png</image>
</screenshot>
<screenshot>
<caption>Game modes</caption>
<image type="source">https://user-images.githubusercontent.com/1964655/82821946-486b3780-9ea5-11ea-8818-f1a801000985.png</image>
</screenshot>
<screenshot>
<caption>Sonic</caption>
<image type="source">https://user-images.githubusercontent.com/1964655/82821921-3d180c00-9ea5-11ea-937b-e1f53fe6c686.png</image>
</screenshot>
<screenshot>
<caption>Tails</caption>
<image type="source">https://user-images.githubusercontent.com/1964655/82821933-41442980-9ea5-11ea-9146-38998161edae.png</image>
</screenshot>
<screenshot>
<caption>Eggman</caption>
<image type="source">https://user-images.githubusercontent.com/1964655/82821966-502adc00-9ea5-11ea-9cbd-274d7adb479e.png</image>
</screenshot>
<screenshot>
<caption>Metal Sonic</caption>
<image type="source">https://user-images.githubusercontent.com/1964655/82821980-5620bd00-9ea5-11ea-9eec-2835ebb2a262.png</image>
</screenshot>
</screenshots>
<releases>
<release version=COMMITANDDATE />
<release version="1.6" date="2022-10-24" type="stable"/>
<release version="1.5" date="2022-08-20" type="stable"/>
<release version="1.4" date="2022-08-19" type="stable"/>
<release version="1.3" date="2020-09-14" type="stable"/>
</releases>
<url type="homepage">HOMEPAGELINK</url>
<url type="vcs-browser">SOURCELINK</url>
<categories>
<category>Game</category>
<category>SportsGame</category>
</categories>
<recommends>
<control>keyboard</control>
<control>gamepad</control>
</recommends>
<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">moderate</content_attribute>
<content_attribute id="language-humor">mild</content_attribute>
<content_attribute id="social-chat">intense</content_attribute>
<content_attribute id="social-info">mild</content_attribute>
</content_rating>
<provides>
<binary>srb2kart</binary>
</provides>
<keywords>
<keyword>doom</keyword>
<keyword>multiplayer</keyword>
<keyword>racing</keyword>
</keywords>
</component>

0 comments on commit b2f2b84

Please sign in to comment.