XMoto: bump version, add icon

This commit is contained in:
Gerasim Troeglazov
2020-05-20 12:23:52 +10:00
parent 551db0feb2
commit c163de3ecd
3 changed files with 162 additions and 56 deletions

View File

@@ -0,0 +1,34 @@
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "XMoto",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource vector_icon array {
$"6E63696607050103D15205020016023CDD5938D24FBA08443E103846649E4909"
$"E20073FC1E020006023A66533B1C07BD2AA93C719E4A4DD247250C008A8F92FF"
$"323232040059020106033A0BD33E5D6BBE2EC039C6E5491C1D45778200FFE2AC"
$"81FAC060FEF49806020016023D32A738A22FB739F83BEAF649F9BD4AB1D80054"
$"FF0108060AEEEE0F27363528B80DB7B140234A27583B572AC9A4C35750544957"
$"C47DC93AC24EC8A2455145C3EF45C54945C307413FC1EEC0ABBEC3BE53323BBB"
$"90BE47B774BCBD0608B6DB283F482C4E284CB90FC5F7354C3E4ABD6CC387C069"
$"C3ED464F413542BE40C0DBB8AEC04206073A3B22392835363CB8C4BD7ABEEFBE"
$"DF474A3E4A3C4A4048413542BF20C134B72EBFD00606AE0B2F4F395A3057C030"
$"CB2F485747563A57425BBA50C764324E0606BA0E345837553C57BD2EC8A6BF59"
$"C93D4258405B3A5BBE87CACCBC23CA3302044942C6DB42BFD0422F4D2F462FC8"
$"73455ABE385AC5435A604F60C93F60C2340604EE4F4850495048504B4F4B4E4A"
$"4E4B4E480408AEBB2E353032B8E5BAEFB9E4B958342E3234BB95BA5DBAE1BAAA"
$"BC46BA1139313634BC49BA3DBB4ABBA13438090A040105000A00050001020304"
$"1001178300040A020101000A050100000A030102000A060103000A050104000A"
$"0401060241000000000000000041FFFFC92000CA8FFF0A010107100117821004"
};

View File

@@ -1,11 +1,11 @@
From c612bc7c0b5e4fe8ff2c8d5d3cfc8751c743f6c8 Mon Sep 17 00:00:00 2001
From 15988873a3087de63eb0a74af6969cb88ca328e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kamil=20Krzy=C5=BCanowski?= <kamnxt@kamnxt.com>
Date: Fri, 12 Dec 2014 16:46:15 +0000
Subject: Patched the files to make them work on haiku.
diff --git a/configure.in b/configure.in
index 452f196..0948bc8 100644
index c97ad4b..e623007 100644
--- a/configure.in
+++ b/configure.in
@@ -155,7 +155,7 @@ fi
@@ -57,75 +57,125 @@ index 1803710..0d130aa 100644
#define SOCKET int
--
2.21.0
2.26.0
From f45479caa1d47c8adcd8413383933794131a0405 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 1 Jun 2019 13:41:31 +0200
Subject: Fix build for error false vs (boolean)false
From 430e807d6f38d97965f5943d849aac3daab43c83 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 30 Oct 2019 13:49:11 +1000
Subject: Fix build
diff --git a/src/PolyDraw.h b/src/PolyDraw.h
index aa2e6af..9a49f22 100644
--- a/src/PolyDraw.h
+++ b/src/PolyDraw.h
@@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef __POLYDRAW_H__
#define __POLYDRAW_H__
+#include <SDL.h>
+
class PolyDraw {
public:
struct EdgeValue {
diff --git a/src/WWW.cpp b/src/WWW.cpp
index a61e753..40bcba0 100644
index a61e753..c717010 100644
--- a/src/WWW.cpp
+++ b/src/WWW.cpp
@@ -24,6 +24,10 @@
#include "md5sum/md5file.h"
#include <sstream>
+#ifdef __HAIKU__
+typedef int boolean;
+#endif
+
#define DEFAULT_WWW_MSGFILE(A) "wwwMsg" A ".xml"
bool WebRoom::downloadReplayExists(const std::string& i_url) {
@@ -206,7 +210,7 @@ void FSWeb::downloadFile(const std::string &p_local_file,
@@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::string &p_local_file,
std::string v_www_agent = WWW_AGENT;
/* open the file */
- if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
+ if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == (boolean)false) {
+ if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
throw Exception("error : unable to open output file "
+ v_local_file_tmp);
}
@@ -320,7 +324,7 @@ void FSWeb::uploadReplay(const std::string& p_replayFilename,
@@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::string& p_replayFilename,
LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
/* open the file */
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
}
@@ -478,7 +482,7 @@ void FSWeb::sendVote(const std::string& p_id_level,
@@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string& p_id_level,
LogInfo("Sending vote");
/* open the file */
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
}
@@ -562,7 +566,7 @@ void FSWeb::sendReport(const std::string& p_reportauthor,
@@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string& p_reportauthor,
LogInfo("Sending report");
/* open the file */
- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == (boolean)false) {
+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
}
@@ -677,7 +681,7 @@ void FSWeb::uploadDbSync(const std::string& p_dbSyncFilename,
@@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::string& p_dbSyncFilename,
LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
/* open the file */
- if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
+ if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == (boolean)false) {
+ if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
throw Exception("error : unable to open output file " + p_answerFile);
}
--
2.21.0
2.26.0
From cd5ae07d2e4aaa059957c7c006fef70dffdc004a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 20 May 2020 12:21:50 +1000
Subject: Use find_directory
diff --git a/src/VFileIO.cpp b/src/VFileIO.cpp
index cd95f58..d9b57ab 100644
--- a/src/VFileIO.cpp
+++ b/src/VFileIO.cpp
@@ -42,6 +42,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "XMSession_default.h"
#include "UserConfig.h"
+#ifdef __HAIKU__
+#include <Path.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
+#endif
+
#ifdef WIN32
std::string win32_getHomeDir(bool i_asUtf8 = false) {
HANDLE hToken;
@@ -1191,6 +1197,20 @@ void XMFS::init(const std::string& AppDir, const std::string& i_binFile, const s
m_UserDataDirUTF8 = m_UserDataDir;
}
+#ifdef __HAIKU__
+ BPath settingsDir;
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, &settingsDir) == B_OK) {
+ m_UserDataDir = std::string(settingsDir.Path()) + std::string("/") + AppDir;
+ m_UserConfigDir = std::string(settingsDir.Path()) + std::string("/") + AppDir;
+ m_UserDataDirUTF8 = m_UserDataDir;
+ }
+ BPath cacheDir;
+ if (find_directory(B_USER_CACHE_DIRECTORY, &cacheDir) == B_OK) {
+ m_UserCacheDir = std::string(cacheDir.Path()) + std::string("/") + AppDir;
+ }
+#endif
+
+
/* And the data dir? */
m_SystemDataDir = std::string(GAMEDATADIR);
if(isDir(m_SystemDataDir)) {
--
2.26.0

View File

@@ -9,13 +9,14 @@ COPYRIGHT="2006-2014 Nicolas Adenis-Lamarre
2009-2010 Jens Erler
2005-2006 Rasmus Neckelmann"
LICENSE="GNU GPL v2"
REVISION="4"
SOURCE_URI="https://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz"
CHECKSUM_SHA256="a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2"
REVISION="1"
SOURCE_URI="https://download.tuxfamily.org/xmoto/xmoto/dev/xmoto-$portVersion-src-svn3427.tar.gz"
CHECKSUM_SHA256="19785f67cc7bc575fa621adb4073a48314cb436ea4fe7a90fa4c03a12bde0325"
PATCHES="xmoto-$portVersion.patchset"
ADDITIONAL_FILES="xmoto.rdef.in"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
xmoto$secondaryArchSuffix = $portVersion
@@ -23,39 +24,35 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
mesa_swrast
lib:libbz2$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libode$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libSDL_net_1.2$secondaryArchSuffix
lib:libSDL_ttf_2.0$secondaryArchSuffix
lib:libSDL_ttf$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblua$secondaryArchSuffix
devel:liblua5.1$secondaryArchSuffix
devel:libode$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libSDL$secondaryArchSuffix
devel:libSDL_gfx$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_net$secondaryArchSuffix
devel:libSDL_ttf$secondaryArchSuffix
@@ -64,30 +61,55 @@ BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
haiku${secondaryArchSuffix}_devel
cmd:autoconf
cmd:automake
cmd:awk
cmd:bison
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:grep
cmd:make
cmd:ode_config$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
BUILD()
{
autoreconf -vfi
export CFLAGS="-lGL"
export CXXFLAGS="-lGL"
runConfigure ./configure --with-internal-xdg=1
autoconf
export CFLAGS="-lGL -lbe"
export CXXFLAGS="-lGL -lbe"
runConfigure ./configure \
--bindir=$appsDir/XMoto \
--datarootdir=$appsDir/XMoto/data \
--datadir=$appsDir/XMoto/data \
--with-internal-xdg=1 \
--with-renderer-openGl=1 \
--with-renderer-sdlGfx=0 \
--disable-rpath
make $jobArgs
}
INSTALL()
{
make install
rm -rf $docDir
mv $appsDir/XMoto/xmoto $appsDir/XMoto/XMoto
local APP_SIGNATURE="application/x-vnd.xmoto"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/xmoto.rdef.in > $sourceDir/xmoto.rdef
addResourcesToBinaries $sourceDir/xmoto.rdef $appsDir/XMoto/XMoto
addAppDeskbarSymlink $appsDir/XMoto/XMoto
}