--- a/hedgewars/CMakeLists.txt Tue Nov 20 22:29:58 2012 +0400
+++ b/hedgewars/CMakeLists.txt Tue Nov 20 23:09:17 2012 +0400
@@ -233,11 +233,7 @@
message(STATUS "Video recording disabled by user")
endif()
-#if(MINGW)
-# get_filename_component(MINGWBINPATH ${CMAKE_C_COMPILER} PATH)
-# set(MINGWLIBPATH "${MINGWBINPATH}/../lib"
-# CACHE FILEPATH "Path to MinGW import libraries")
-#endif(MINGW)
+set(pascal_flags "-Fl${LIBRARY_OUTPUT_PATH}" ${pascal_flags})
set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
--- a/hedgewars/uPhysFSLayer.pas Tue Nov 20 22:29:58 2012 +0400
+++ b/hedgewars/uPhysFSLayer.pas Tue Nov 20 23:09:17 2012 +0400
@@ -1,14 +1,11 @@
unit uPhysFSLayer;
interface
-uses SDLh;
+uses SDLh, LuaPas;
{$IFDEF ANDROID}
{$linklib physfs}
{$ELSE}
- {$IFNDEF WIN32}
- {$linklib ../bin/libphysfs.a}
- {$ENDIF}
{$IFDEF DARWIN}
{$LINKFRAMEWORK IOKit}
{$ENDIF}
@@ -21,7 +18,7 @@
{$IFDEF DARWIN}
PhysfsLibName = 'physfs';
{$ELSE}
- PhysfsLibName = 'physfs.a';
+ PhysfsLibName = 'physfs';
{$ENDIF}
{$ENDIF}
@@ -42,6 +39,9 @@
function pfsExists(fname: shortstring): boolean;
+function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhysfsLibName;
+procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhysfsLibName;
+
implementation
uses uUtils, uVariables;
--- a/hedgewars/uScript.pas Tue Nov 20 22:29:58 2012 +0400
+++ b/hedgewars/uScript.pas Tue Nov 20 23:09:17 2012 +0400
@@ -1980,18 +1980,6 @@
// custom script loader via physfs, passed to lua_load
const BUFSIZE = 1024;
-{$IFDEF WIN32}
- PhysfsLibName = 'libphysfs';
-{$ELSE}
- {$IFDEF DARWIN}
- PhysfsLibName = 'physfs';
- {$ELSE}
- PhysfsLibName = 'physfs.a';
- {$ENDIF}
-{$ENDIF}
-function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhysfsLibName;
-procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhysfsLibName;
-
procedure ScriptLoad(name : shortstring);
var ret : LongInt;