mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Freesynd port (#12053)
This commit is contained in:
69
games-strategy/freesynd/additional-files/freesynd.rdef.in
Normal file
69
games-strategy/freesynd/additional-files/freesynd.rdef.in
Normal file
@@ -0,0 +1,69 @@
|
||||
resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "FreeSynd",
|
||||
long_info = "Syndicate engine reimplementation"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.freesynd";
|
||||
|
||||
resource large_icon array {
|
||||
$"FFFF01010101010101010101010101010101010101010101010101010101FFFF"
|
||||
$"FF01D7B7B7D7B7B7D7B7B7D7D7D7D7B7B7D7B7B7D7B7B7D7B7B7D7B7B7D701FF"
|
||||
$"01D7D7B7B7D7B7B7D7B7B7D7D7D7D7B7B7D7B7B7D7B7B7D7B7B7D7B7B7D7D701"
|
||||
$"01D73DD7DF3DD7D73DDFD7DFD7033DD7D73DDFD73DD7DF3DD7D73DDFD73DD701"
|
||||
$"01B7DFB7D7DFD7B7DFD7B7DFD7D7B7B7B7B7D7D7DFD7D7DFD7D7DFD7B7DFB701"
|
||||
$"01B7D7B7B7D7B7B7D7B7B7D7D7D7B7B7B7B7D7D7D7D7D7D7D7D7D7B7B7D7B701"
|
||||
$"01D73DD7DF3DD7D73DDFD73DD7DFDFD7D73DDFD73DD7DFDFD7D73DDFD73DD701"
|
||||
$"01B73CB7D73CD7D73CD7B7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7DFD701"
|
||||
$"01D7DFD7D7DFD7D7DFD7D7DFD7D7DFD7D7DFD7D7DFD7D7DFD7D7DFD7D7DFD701"
|
||||
$"01B7B7914B4B4B4BB19191914B4B71D7976B4B4B4B6BDF914B4B4B4B913DD701"
|
||||
$"01B7B74B6B8B8B8BB7914BD78B6B4BB7714B8B8B8BB1D74B6B8B8B8BD1DFD701"
|
||||
$"01B7B74B919191B7B7914BD1D7914BB1716BB791B7D7D74B6B9797B7D7DFD701"
|
||||
$"01B7B74B4B4B8BB7B7914BD1D7914BB1714B4B4BB1B7B74B4B4B4BD7D73DD701"
|
||||
$"01B7B74B8BB1B7B7B7914B4B4B4B6BD7716BB1B1D7D7D74B6BB1B1D7D73DD701"
|
||||
$"01B7B74B91B7B7B7B7914B6B6B4B91D7714B717171B7D74B6B717171D7DFD701"
|
||||
$"01B7D74B91D7D7D7D7914BD1DF916BD7714B4B4B4B6B3D6B4B4B4B4B913DD701"
|
||||
$"01D7D7D1D7D7D7D7D7D7D1D7DFD7D1D7D7D1D1D1D1D1D7D7D1D1D1D1D7DFD701"
|
||||
$"013D3D714B4B4B6B3DD771D73D97B73D91D76B4B4B91D791B76B4B6BB73D3D01"
|
||||
$"013D3D4B6B6B6B6BB1914BD13D914BD7716BB76B4B4B3D4B91916B4B713D3D01"
|
||||
$"013D3D4B71B7B7B73D914B9197914BB1716B3D3D716B3D4B713D3D4B6B3D3D01"
|
||||
$"013D3D4B4B4B4B4BB7D76B4B4B4B4BD1716B3D3D716B3D4B713D3D4B6B3D3D01"
|
||||
$"01DFDFD1ABABAB4B913DD74B6BABABF7716B3D3D716B3D4B713D3D4B6B3D3D01"
|
||||
$"013D3D919191914B913D3D4B8B3D3D3D716B3D3D716B3D4B6B91714B8B3D3D01"
|
||||
$"013D3D714B4B4B4BB13D3D4B8B3D3D3D716B3D3D718B3D6B4B4B4B6BD13D3D01"
|
||||
$"013D3DD7D1D1D1D13D3D3D31323D3D3D32313D3DD73D3DD7D1D1D1D73D3D3D01"
|
||||
$"013D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D01"
|
||||
$"013D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D0101010101010101013D3D3D01"
|
||||
$"013D3D3D3D3D3D3D3D010101010101010101010101010101010101013D3D3D01"
|
||||
$"0101010101010101010101010101010101010101010101010101010101010101"
|
||||
$"0101010101010101010101010101010101010101010101010101010101010101"
|
||||
$"FF010101010101010101010101010101010101010101010101010101010101FF"
|
||||
$"FFFF01010101010101010101010101010101010101010101010101010101FFFF"
|
||||
};
|
||||
|
||||
resource mini_icon array {
|
||||
$"FF3D03DF3D3D3DDFDF3DDF03DF3D3DFF"
|
||||
$"DFB7B7B7D7D7D7B7B7D7B7B7B7D7B7DF"
|
||||
$"3DD7DFD7DFDFDFB7B7DFD7DFDF3DD701"
|
||||
$"DFB7D7B7D7D7D7D7D7D7D7D7D7D7B7DF"
|
||||
$"D7B79191B19791B7919191B79191B73D"
|
||||
$"D7718B91917191716B91B1918B91D73D"
|
||||
$"D7716BB1916B71716B6BB7916B91D73D"
|
||||
$"D77191B7916B91916B4B71914B4BB73D"
|
||||
$"3DB79191D7B1B7D7B79191B7B191D73D"
|
||||
$"3D719191917191716BB16B91916B913D"
|
||||
$"3D916B4BB76B6B916B3D6B91B191913D"
|
||||
$"3D916B4BB791B13D6B3D6B914B6BB13D"
|
||||
$"3DD731313D32033D313DD73D31D73D3D"
|
||||
$"3D3D3D3D3D013D010101010101013D3D"
|
||||
$"01010101010101010101010101010101"
|
||||
$"FF0101010101010101010101010101FF"
|
||||
};
|
||||
84
games-strategy/freesynd/freesynd-0.8.recipe
Normal file
84
games-strategy/freesynd/freesynd-0.8.recipe
Normal file
@@ -0,0 +1,84 @@
|
||||
SUMMARY="Portable engine reimplementation for the classic Bullfrog game Syndicate"
|
||||
DESCRIPTION="FreeSynd is a work-in-progress reimplementation of the Syndicate game.
|
||||
|
||||
After installing the package the file '/boot/system/settings/freesynd/freesynd.ini' \
|
||||
has to be edited to point it at the original game's data files.
|
||||
|
||||
Currently the binaries are only compatible with the original Syndicate data files, \
|
||||
if you own Syndicate Plus (original + expansion) the data files have to be patched \
|
||||
as described here: https://community.pcgamingwiki.com/files/file/1201-syndicate-plus-patch-for-freesynd"
|
||||
HOMEPAGE="https://freesynd.sourceforge.io/"
|
||||
COPYRIGHT="2024 The FreeSynd Project"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://sourceforge.net/projects/freesynd/files/freesynd/freesynd-$portVersion/Freesynd-$portVersion-Source.zip"
|
||||
CHECKSUM_SHA256="a73de4657c5d945e338a14b915ccd976c473f9da5a965f0dc22fb2a233a5158b"
|
||||
SOURCE_DIR="Freesynd-$portVersion-Source"
|
||||
PATCHES="freesynd-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="freesynd.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURE="x86"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/freesynd/freesynd.ini keep-old
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
freesynd$secondaryArchSuffix = $portVersion
|
||||
cmd:freesynd = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_image_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_mixer_2.0$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libSDL2_image_2.0$secondaryArchSuffix
|
||||
devel:libSDL2_mixer_2.0$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:doxygen
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CXXFLAGS="-Wall -w"
|
||||
|
||||
cmake -Bbuild -S. \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DCMAKE_INSTALL_BINDIR=$prefix/bin
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
# Generate the rdef
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="0"
|
||||
sed \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
$portDir/additional-files/freesynd.rdef.in > freesynd.rdef
|
||||
|
||||
addResourcesToBinaries freesynd.rdef $prefix/bin/freesynd
|
||||
addAppDeskbarSymlink $prefix/bin/freesynd "FreeSynd"
|
||||
}
|
||||
44
games-strategy/freesynd/patches/freesynd-0.8.patchset
Normal file
44
games-strategy/freesynd/patches/freesynd-0.8.patchset
Normal file
@@ -0,0 +1,44 @@
|
||||
From 51a0992f5d8296286e66ef7413229fc8a1c28de2 Mon Sep 17 00:00:00 2001
|
||||
From: Peppersawce <michaelpeppers89@yahoo.it>
|
||||
Date: Sun, 23 Mar 2025 16:02:26 +0100
|
||||
Subject: Fix compiling, fix user settings dir location, disable gamedata
|
||||
testing
|
||||
|
||||
|
||||
diff --git a/engine/src/appcontext.cpp b/engine/src/appcontext.cpp
|
||||
index e7e0e26..1ff4de4 100644
|
||||
--- a/engine/src/appcontext.cpp
|
||||
+++ b/engine/src/appcontext.cpp
|
||||
@@ -114,7 +114,7 @@ bool AppContext::readOrCreateUserConf(const std::string& userConfFolder) {
|
||||
|
||||
fullscreen_ = userConf.read("fullscreen", false);
|
||||
playIntro_ = userConf.read("play_intro", true);
|
||||
- test_files_ = userConf.read("test_data", true);
|
||||
+ test_files_ = userConf.read("test_data", false);
|
||||
const int languageID = userConf.read("language", 0);
|
||||
std::string defaultDir;
|
||||
File::getDefaultSaveFolder(defaultDir);
|
||||
diff --git a/utils/src/file.cpp b/utils/src/file.cpp
|
||||
index 736277e..c11a699 100644
|
||||
--- a/utils/src/file.cpp
|
||||
+++ b/utils/src/file.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
+#include <algorithm>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@@ -227,7 +228,7 @@ bool File::getOrCreateUserConfFolder(const std::string& userConfFolder) {
|
||||
userConfFolderPath_ = getenv("HOME");
|
||||
#endif
|
||||
|
||||
- userConfFolderPath_ /= ".freesynd";
|
||||
+ userConfFolderPath_ /= "config/settings/freesynd";
|
||||
|
||||
if (!fs::exists(userConfFolderPath_)) {
|
||||
LOG(Log::k_FLG_IO, "File", "getOrCreateUserConfFolder", ("Creating user config folder %s", userConfFolderPath_.string().c_str()));
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user