aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-06 09:59:51 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-06 09:59:51 +0000
commite0f79449eedac343fbac90b72b7a6792e8e940e9 (patch)
tree9a6b4a1d9e92c355593272f454db71a19f6fbdb4 /Game
parent6fb575e34735f50f68f31cff7159b2bbd6019f40 (diff)
downloadusdx-e0f79449eedac343fbac90b72b7a6792e8e940e9.tar.gz
usdx-e0f79449eedac343fbac90b72b7a6792e8e940e9.tar.xz
usdx-e0f79449eedac343fbac90b72b7a6792e8e940e9.zip
fixed the configure stuff though it needs some further adjustments
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@835 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas21
-rw-r--r--Game/Code/config.inc.in10
-rw-r--r--Game/Code/configure.ac40
3 files changed, 28 insertions, 43 deletions
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas
index b962d8a5..fe4bbf11 100644
--- a/Game/Code/Classes/UPlatformLinux.pas
+++ b/Game/Code/Classes/UPlatformLinux.pas
@@ -43,7 +43,8 @@ uses
{$ELSE}
oldlinux,
{$ENDIF}
- SysUtils;
+ SysUtils,
+ UConfig;
{$IFDEF FPC_VERSION_2_2_0_PLUS}
Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
@@ -137,7 +138,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := '/var/log/UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := LogPath+'/';
+{$ENDIF}
end;
function TPlatformLinux.GetGameSharedPath : WideString;
@@ -145,7 +150,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := '/usr/share/UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := SharedPath+'/';
+{$ENDIF}
end;
function TPlatformLinux.GetGameUserPath : WideString;
@@ -153,7 +162,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := get_homedir()+'/.UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := get_homedir()+'/.'+PathSuffix+'/';
+{$ENDIF}
end;
function TPlatformLinux.get_homedir(): string;
diff --git a/Game/Code/config.inc.in b/Game/Code/config.inc.in
index a0bece8a..a51ce23b 100644
--- a/Game/Code/config.inc.in
+++ b/Game/Code/config.inc.in
@@ -1,5 +1,6 @@
{*****************************************************************
* Configuration file for @PACKAGE_NAME@ @PACKAGE_VERSION@
+ * @configure_input@
*****************************************************************}
{* Misc options *}
@@ -8,9 +9,12 @@
{* Paths *}
-PathSuffix : WideString = '@suffix@';
-LogPath : WideString = '@logrootdir@/'+USDXPathSuffix+'/';
-SharedPath : WideString = '@datarootdir@/'+USDXPathSuffix+'/';
+{$@DEFINE_USE_LOCAL_DIRS@ UseLocalDirs}
+{$IF not Defined(UseLocalDirs) and Defined(IncludeConstants)}
+ PathSuffix = WideString('@suffix@');
+ LogPath = WideString('@logrootdir@/'+PathSuffix);
+ SharedPath = WideString('@sharerootdir@/'+PathSuffix);
+{$IFEND}
{* Libraries *}
diff --git a/Game/Code/configure.ac b/Game/Code/configure.ac
index ef0516d5..40e8a6d2 100644
--- a/Game/Code/configure.ac
+++ b/Game/Code/configure.ac
@@ -19,9 +19,6 @@ PACKAGE_WEBSITE="http://www.ultrastardeluxe.org/"
# specify the IRC-channel here
PACKAGE_IRC="#ultrastardx at quakenet.org"
-AUTOCONF_INFO=[generated automatically by -*- Autoconf -*-
-Do NOT edit this file. Edit ... instead.]
-
# Specify a source-file so autoconf can check if the source-dir exists
AC_CONFIG_SRCDIR(UltraStar.lpr)
@@ -49,15 +46,6 @@ if [[ x$with_lazarus = xno ]] ; then
AC_MSG_ERROR([Lazarus is required. It is impossible to build without it.]);
fi
-# add jedi-sdl option
-AC_ARG_WITH([jedi-sdl],
- [AS_HELP_STRING([--with-jedi-sdl=DIR],
- [Directory of JEDI-SDL @<:@lib/JEDI-SDLv1.0@:>@])],
- [with_jedi_sdl=$withval], [with_jedi_sdl="lib/JEDI-SDLv1.0"])
-if [[ x$with_jedi_sdl = xno -o x$with_jedi_sdl = xyes ]]; then
- AC_MSG_ERROR([JEDI-SDL is required. Specify its directory.]);
-fi
-
# add portaudio option
AC_ARG_WITH([portaudio],
[AS_HELP_STRING([--with-portaudio=DIR],
@@ -279,27 +267,6 @@ AC_MSG_RESULT(@<:@$LAZARUS_VERSION@:>@)
# find sdl
AC_PKG_CHECK_VERSION(SDL, [sdl], yes)
-# check if JEDI-SDL pascal headers exist
-AC_MSG_CHECKING(for JEDI-SDL pascal headers)
-
-JEDISDL_DIR="$with_jedi_sdl"
-if [[ ! -d "$JEDISDL_DIR" ]]; then
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Path specified for JEDI-SDL is not a directory.]);
-fi
-#http://delphi-jedi.org
-# -d "$JEDISDL_DIR/SDL_ttf" -a
-# -d "$JEDISDL_DIR/SDL_Image" -a
-# -d "$JEDISDL_DIR/OpenGL" -a
-# TODO: add further tests and check the version
-if [[ -d "$JEDISDL_DIR/sdl" ]]; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-# AC_MSG_ERROR([JEDI-SDL is not available.
-#Download it and extract it to "$JEDISDL_DIR".]);
-fi
-
# find sqlite3
AC_PKG_CHECK_VERSION(SQLITE3, [sqlite3], yes)
@@ -362,8 +329,10 @@ AC_SUBST_DEFINE(HAVE_PORTMIXER, $PORTMIXER_HAVE)
AC_SUBST(LAZARUS_DIR)
-logrootdir=$with_logrootdir
-AC_SUBST(logrootdir)
+AC_SUBST_DEFINE(USE_LOCAL_DIRS, $enable_dev_install)
+AC_SUBST(suffix)
+AC_SUBST(logrootdir, [$with_logrootdir])
+AC_DEFINE_DIR(sharerootdir, datarootdir)
AC_SUBST(PACKAGE_WEBSITE)
@@ -401,7 +370,6 @@ AC_MSG_NOTICE([
!!! $PACKAGE_IRC
!!!
!!! Known issues:
-!!! - "make" might not work correctly
!!! - Audio-output and -input are not working yet
!!! - The editor is broken
!!!