aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-04 23:10:16 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-04 23:10:16 +0000
commit6fa012e73a04959d69307911b90f526148c8352a (patch)
tree5410f877c356096b8101236062dfe4d2a94b7789
parentffd5faaf020fa5f8504c2b8b90e5daf93ed1edaf (diff)
downloadusdx-6fa012e73a04959d69307911b90f526148c8352a.tar.gz
usdx-6fa012e73a04959d69307911b90f526148c8352a.tar.xz
usdx-6fa012e73a04959d69307911b90f526148c8352a.zip
small changes to check linux compilation.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@808 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas11
-rw-r--r--Game/Code/UltraStarDeluxe.control2
-rwxr-xr-xGame/Code/linux-build.sh8
-rw-r--r--Game/Code/switches.inc142
4 files changed, 84 insertions, 79 deletions
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas
index 2115428f..882376a2 100644
--- a/Game/Code/Classes/UPlatformLinux.pas
+++ b/Game/Code/Classes/UPlatformLinux.pas
@@ -128,7 +128,7 @@ end;
function TPlatformLinux.GetLogPath : WideString;
begin
if FindCmdLineSwitch( cUseLocalPaths ) then
- result := inherited
+ result := ExtractFilePath(ParamStr(0))
else
result := '/var/log/UltraStarDeluxe/';
end;
@@ -136,7 +136,7 @@ end;
function TPlatformLinux.GetGameSharedPath : WideString;
begin
if FindCmdLineSwitch( cUseLocalPaths ) then
- result := inherited
+ result := ExtractFilePath(ParamStr(0))
else
result := '/usr/share/UltraStarDeluxe/';
end;
@@ -144,7 +144,7 @@ end;
function TPlatformLinux.GetGameUserPath : WideString;
begin
if FindCmdLineSwitch( cUseLocalPaths ) then
- result := inherited
+ result := ExtractFilePath(ParamStr(0))
else
result := get_homedir()+'/.UltraStarDeluxe/';
end;
@@ -164,7 +164,7 @@ end;
// Maybe this should be TPlatformBase.Halt()
procedure TPlatformLinux.Halt;
begin
- application.terminate;
+ halt();
end;
function TPlatformLinux.TerminateIfAlreadyRunning(var WndTitle : String) : Boolean;
@@ -182,7 +182,8 @@ var
SR: TSearchRec; // for parsing song directory
begin
Result := '';
- if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then begin
+ if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then
+ begin
Result := SR.Name;
end; // if
SysUtils.FindClose(SR);
diff --git a/Game/Code/UltraStarDeluxe.control b/Game/Code/UltraStarDeluxe.control
index cfbbfc13..f85408f1 100644
--- a/Game/Code/UltraStarDeluxe.control
+++ b/Game/Code/UltraStarDeluxe.control
@@ -1,7 +1,7 @@
Package: UltraStar-Deluxe
Priority: optional
Section: games
-Installed-Size: 45
+Installed-Size: 18400
Maintainer: Jay Binks <jaybinks@gmail.com>
Architecture: i386
Version: 1.1.1
diff --git a/Game/Code/linux-build.sh b/Game/Code/linux-build.sh
index 54938479..7a1b82a2 100755
--- a/Game/Code/linux-build.sh
+++ b/Game/Code/linux-build.sh
@@ -1,4 +1,6 @@
-clear
-fpc -S2cgi -OG1 -gl -vewnhi -l -Filib/JEDI-SDLv1.0/SDL/Pas/ -Fu/usr/bin/lazarus/components/images/lib/i386-linux/ -Fu/usr/bin/lazarus/lcl/units/i386-linux/ -Fu/usr/bin/lazarus/lcl/units/i386-linux/gtk2/ -Fu/usr/bin/lazarus/packager/units/i386-linux/ -Fu. -oUltraStar -dLCL -dLCLgtk2 UltraStar.lpr
-mv ./UltraStar /home/jay/src/ultrastardx/output/
+fpc -S2cgi -OG1 -gl -vewnhi -l -Filib/JEDI-SDLv1.0/SDL/Pas/ -Fu/usr/share/lazarus/components/images/lib/i386-linux/ -Fu/usr/share/lazarus/lcl/units/i386-linux/ -Fu/usr/share/lazarus/lcl/units/i386-linux/gtk2/ -Fu/usr/share/lazarus/packager/units/i386-linux/ -Fu. -oUltraStar -dLCL -dLCLgtk2 UltraStar.lpr
+
+cp ./UltraStar ../../../output/
+
+
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index d89e89b3..fc21a373 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -1,70 +1,72 @@
-{$DEFINE DEBUG} // to-do : Remove b4 release
-
-// Comment by eddie:
-// The mac port currently also uses the WIN32 define.
-// Once I get the beast compiled, linked and running
-// I will change this.
-// There are some parts where the WIN32 define could not
-// be used. I changed the WIN32 to MSWINDOWS.
-// So, for Windows-only code use the MSWINDOWS define.
-
-
-{$IFDEF FPC}
- {$IFDEF DARWIN}
- {$H+}
- {$R-}
- {$DEFINE WIN32}
- {$DEFINE TRANSLATE}
- {$DEFINE UTF8_FILENAMES}
- {$ELSE}
- {$DEFINE LAZARUS}
- {$ENDIF}
-
-// {$MODE DELPHI} // JB - This is not allowed by the free pascal compiler for some reason ( At least on linux )
-
- {$DEFINE DLL_CDECL}
- {$UNDEF UseSerialPort}
- {$UNDEF UseMIDIPort}
-{$ELSE}
- {$DEFINE Delphi}
- {$DEFINE DLL_STDCALL}
- {$UNDEF UseSerialPort}
- {$DEFINE UseMIDIPort}
-{$ENDIF}
-
-
-{$IFDEF win32}
- {$DEFINE UseBASSPlayback}
- {$DEFINE UseBASSInput}
-
- //{$DEFINE UseFFMpegDecoder}
- //{$DEFINE UsePortaudioPlayback}
- //{$DEFINE UsePortaudioInput}
- //{$DEFINE UsePortmixer}
-
- {$DEFINE UseProjectM_0_9}
- //{$DEFINE UseProjectM_1_0}
-
- {$IFDEF DEBUG}
- {$IFNDEF DARWIN}
- {$APPTYPE CONSOLE}
- {$ENDIF}
- {$ENDIF}
-{$ELSE}
- {$DEFINE UseFFMpegAudio}
- {$DEFINE UsePortaudio}
- {$DEFINE UseProjectM_0_9}
-{$ENDIF}
-
-{$IF Defined(UseBASSInput) or Defined(UseBASSPlayback)}
- {$DEFINE UseBASS}
-{$IFEND}
-
-{$IF Defined(UsePortaudioInput) or Defined(UsePortaudioPlayback)}
- {$DEFINE UsePortaudio}
-{$IFEND}
-
-{$IF Defined(UseProjectM_0_9) or Defined(UseProjectM_1_0)}
- {$DEFINE UseProjectM}
-{$IFEND}
-
+{$DEFINE DEBUG} // to-do : Remove b4 release
+
+// Comment by eddie:
+// The mac port currently also uses the WIN32 define.
+// Once I get the beast compiled, linked and running
+// I will change this.
+// There are some parts where the WIN32 define could not
+// be used. I changed the WIN32 to MSWINDOWS.
+// So, for Windows-only code use the MSWINDOWS define.
+
+
+{$IFDEF FPC}
+ {$IFDEF DARWIN}
+ {$H+}
+ {$R-}
+ {$DEFINE WIN32}
+ {$DEFINE TRANSLATE}
+ {$DEFINE UTF8_FILENAMES}
+ {$ELSE}
+ {$DEFINE LAZARUS}
+ {$ENDIF}
+
+ {$DEFINE DLL_CDECL}
+ {$UNDEF UseSerialPort}
+ {$UNDEF UseMIDIPort}
+{$ELSE}
+ {$DEFINE Delphi}
+ {$DEFINE DLL_STDCALL}
+ {$UNDEF UseSerialPort}
+ {$DEFINE UseMIDIPort}
+{$ENDIF}
+
+
+{$IFDEF win32}
+ {$DEFINE UseBASSPlayback}
+ {$DEFINE UseBASSInput}
+
+ //{$DEFINE UseFFMpegDecoder}
+ //{$DEFINE UsePortaudioPlayback}
+ //{$DEFINE UsePortaudioInput}
+ //{$DEFINE UsePortmixer}
+
+ {$DEFINE UseProjectM_0_9}
+ //{$DEFINE UseProjectM_1_0}
+
+ {$IFDEF DEBUG}
+ {$IFNDEF DARWIN}
+ {$APPTYPE CONSOLE}
+ {$ENDIF}
+ {$ENDIF}
+{$ELSE}
+ {$DEFINE UseFFMpegAudio}
+ {$DEFINE UsePortaudio}
+ {$DEFINE UseProjectM_0_9}
+{$ENDIF}
+
+{$IF Defined(UseBASSInput) or Defined(UseBASSPlayback)}
+ {$DEFINE UseBASS}
+{$IFEND}
+
+{$IF Defined(UsePortaudioInput) or Defined(UsePortaudioPlayback)}
+ {$DEFINE UsePortaudio}
+{$IFEND}
+
+{$IF Defined(UseProjectM_0_9) or Defined(UseProjectM_1_0)}
+ {$DEFINE UseProjectM}
+{$IFEND}
+
+// I had to add these (jay)... but maybe henny has some way that the config script is meant to do this ?
+// Ill need to check with him.
+//{$DEFINE FPC_V220}
+//{$DEFINE LAZARUS_V0924}