# HG changeset patch # User koda # Date 1361524337 -3600 # Node ID 2d7703d6bc229a9266189cc36323f2f3456ebfde # Parent 66cedf3e9d1e8bf955ba239c7beb5447faf99763 this should make physfs happy to link on windows too, forcing every function in its proper dll and skipping linklib diff -r 66cedf3e9d1e -r 2d7703d6bc22 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