mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 20:20:06 +02:00
Julius: use BeGameLauncher
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
about="Julius is an open source re-implementation of Caesar III.
|
||||
|
||||
The aim of this project is to create an open-source version of Caesar 3, \
|
||||
with the same logic as the original, but with some UI enhancements, that \
|
||||
is able to be played on multiple platforms. The same logic means that the\
|
||||
saved games are 100% compatible, and any gameplay bugs present in the or\
|
||||
iginal Caesar 3 game will also be present in Julius.
|
||||
|
||||
Julius requires the original assets (graphics, sounds, etc) from Caesar 3\
|
||||
to run.
|
||||
|
||||
"
|
||||
|
||||
configFile="/boot/home/config/settings/julius.ini"
|
||||
testFile="c3.inf"
|
||||
|
||||
dataFolder=$(cat "$configFile")
|
||||
scriptFile=$(realpath "$0")
|
||||
workFolder=$(dirname "$scriptFile")
|
||||
|
||||
while true
|
||||
do
|
||||
if [[ "$dataFolder" == "" ]]; then
|
||||
idx=`alert --empty "$about Data folder: not selected" \
|
||||
"Select game data folder" "Exit"`
|
||||
else
|
||||
if [ -f "$dataFolder/$testFile" ]; then
|
||||
valid="[OK]"
|
||||
else
|
||||
valid="[ERROR]"
|
||||
fi
|
||||
idx=`alert --empty "$about Data folder: $dataFolder $valid" \
|
||||
"Select game data folder" "Exit" "Play game"`
|
||||
fi
|
||||
|
||||
if [[ "$idx" == "Select game data folder" ]]; then
|
||||
selected=`filepanel -l -k d --single -t "Select game data folder"`
|
||||
if [ -d $selected ]; then
|
||||
dataFolder="$selected"
|
||||
echo "$dataFolder" > "$configFile"
|
||||
continue
|
||||
else
|
||||
dataFolder=""
|
||||
fi
|
||||
if [ -f $selected ]; then
|
||||
dataFolder=`dirname "$selected"`
|
||||
echo "$dataFolder" > "$configFile"
|
||||
continue
|
||||
else
|
||||
dataFolder=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$idx" == "Play game" ]]; then
|
||||
if [ -f "$dataFolder/$testFile" ]; then
|
||||
$workFolder/Julius "$dataFolder" &
|
||||
else
|
||||
alert "Game files not found!"
|
||||
continue
|
||||
fi
|
||||
break
|
||||
fi
|
||||
|
||||
if [[ "$idx" == "Exit" ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -11,14 +11,15 @@ Julius requires the original assets (graphics, sounds, etc) from Caesar 3 to run
|
||||
HOMEPAGE="https://github.com/bvschaik/julius/"
|
||||
COPYRIGHT="Bianca van Schaik"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/bvschaik/julius/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d558a13645508bf3a1055698a201d7d089a78b150362d861e57a07686cb82a9a"
|
||||
srcGitRev2="0eaa8f0d4c7e92d522974a3530da8e5d63a722de"
|
||||
SOURCE_URI_2="https://github.com/EXL/BeGameLauncher/archive/$srcGitRev2.tar.gz"
|
||||
CHECKSUM_SHA256_2="85e94ba8174879d986f3a9d35898bfa5eb67728c3910a41aca2ad143db803a88"
|
||||
SOURCE_DIR_2="BeGameLauncher-$srcGitRev2"
|
||||
PATCHES="julius-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
julius.rdef.in
|
||||
JuliusLauncher.sh
|
||||
"
|
||||
ADDITIONAL_FILES="julius.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -63,6 +64,14 @@ BUILD()
|
||||
-DSDL2_MIXER_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \
|
||||
-DHAIKU_BUILD=ON
|
||||
make $jobArgs
|
||||
|
||||
cd $sourceDir2
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLAUNCHER=julius
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
@@ -72,7 +81,7 @@ INSTALL()
|
||||
mkdir -p $appsDir/Julius
|
||||
|
||||
cp julius $appsDir/Julius/Julius
|
||||
cp $portDir/additional-files/JuliusLauncher.sh "$appsDir/Julius/Julius Launcher"
|
||||
cp $sourceDir2/build/JuliusLauncher "$appsDir/Julius/Julius Launcher"
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.julius"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
@@ -87,8 +96,6 @@ INSTALL()
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/julius.rdef.in > $sourceDir/build/julius.rdef
|
||||
|
||||
rc julius.rdef
|
||||
resattr -o "$appsDir/Julius/Julius Launcher" julius.rsrc
|
||||
addResourcesToBinaries $sourceDir/build/julius.rdef $appsDir/Julius/Julius
|
||||
|
||||
addAppDeskbarSymlink "$appsDir/Julius/Julius Launcher" "Julius"
|
||||
|
||||
Reference in New Issue
Block a user