this should make physfs happy to link on windows too, forcing every function in its proper dll and skipping linklib physfslayer
authorkoda
Fri, 22 Feb 2013 10:12:17 +0100
branchphysfslayer
changeset 8533 2d7703d6bc22
parent 8530 66cedf3e9d1e
child 8536 55365fccb075
this should make physfs happy to link on windows too, forcing every function in its proper dll and skipping linklib
hedgewars/uPhysFSLayer.pas
--- a/hedgewars/uPhysFSLayer.pas	Fri Feb 22 09:53:09 2013 +0100
+++ b/hedgewars/uPhysFSLayer.pas	Fri Feb 22 10:12:17 2013 +0100
@@ -3,22 +3,21 @@
 interface
 uses SDLh, LuaPas;
 
-{$LINKLIB physfs}
-{$LINKLIB physlayer}
-
-{$IFDEF DARWIN}
-    {$LINKFRAMEWORK IOKit}
-{$ENDIF}
-
 const
 {$IFDEF WIN32}
     PhysfsLibName = 'libphysfs';
     PhyslayerLibName = 'libphyslayer';
 {$ELSE}
+    {$LINKLIB physfs}
+    {$LINKLIB physlayer}
     PhysfsLibName = 'physfs';
     PhyslayerLibName = 'physlayer';
 {$ENDIF}
 
+{$IFDEF DARWIN}
+    {$LINKFRAMEWORK IOKit}
+{$ENDIF}
+
 procedure initModule;
 procedure freeModule;
 
@@ -37,16 +36,16 @@
 
 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;
+function  physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhyslayerLibName;
+procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName;
 
 implementation
 uses uUtils, uVariables, sysutils;
 
 function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external PhysfsLibName;
 function PHYSFS_deinit() : LongInt; cdecl; external PhysfsLibName;
-function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl ; external PhysfsLibName;
-function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhysfsLibName;
+function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl ; external PhyslayerLibName;
+function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
 
 function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : LongInt; cdecl; external PhysfsLibName;
 function PHYSFS_openRead(fname: PChar): PFSFile; cdecl; external PhysfsLibName;
@@ -55,7 +54,7 @@
 function PHYSFS_close(f: PFSFile): LongBool; cdecl; external PhysfsLibName;
 function PHYSFS_exists(fname: PChar): LongBool; cdecl; external PhysfsLibName;
 
-procedure hedgewarsMountPackages(); cdecl; external PhysfsLibName;
+procedure hedgewarsMountPackages(); cdecl; external PhyslayerLibName;
 
 function rwopsOpenRead(fname: shortstring): PSDL_RWops;
 begin