#4693: upgrade to physfs 2.1
-------------------------------------------------+-------------------------
 Reporter:  Forgon                               |             Owner:
     Type:  patch (an actual patch, not a        |            Status:  new
  request for one)                               |         Milestone:
 Priority:  normal                               |  unspecified
Component:  other                                |           Version:
 Keywords:                                       |  git/master
 Blocking:                                       |        Blocked By:
                                                 |  Operating System:  All
                                                 |  /Non-Specific
-------------------------------------------------+-------------------------
 This patch series ensures compatibility with physfs versions >= 2.1.

 Physfs is currently in version 3.0.1 (read the
 [https://icculus.org/pipermail/physfs/2017-October/001251.html latest
 release note]).

 Versions 2.0 and 2.1 replaced several functions (read the
 [https://icculus.org/physfs/docs/html/deprecated.html deprecated list]), 8
 of which are part of this game. These are now deprecated and lead to
 hundreds of compiler warnings:

 * PHYSFS_addToSearchPath
 * PHYSFS_getLastError
 * PHYSFS_getLastModTime
 * PHYSFS_getUserDir
 * PHYSFS_isDirectory
 * PHYSFS_read
 * PHYSFS_removeFromSearchPath
 * PHYSFS_write

 The changes are trivial, yet 2 alter game behaviour:

 * function 'PHYSFS_getUserDir()', used to determine a user's home
 directory, has no equivalent replacement. While easily substituted with
 'getenv("HOME")' for Unix, it is no longer available for Windows and Mac
 OS, where it was a backup to set the location of the configuration
 directory if the original routine to do so failed. In this case, the
 configuration directory will now at once be placed in the current
 directory.

 * mods given in commandline options were accepted if they either existed
 or were directories. Assuming that mods are placed in archives based on
 the observation that directories containing mods have no effect, mods are
 now rejected unless they are regular files, using the 'PHYSFS_Stat' struct
 which contains metadata about a file or directory. There may be more
 locations in the source code where 'PHYSFS_exists()' would be better
 written as 'fileMetaData.filetype == PHYSFS_FILETYPE_REGULAR'.

 Many users will have to upgrade physfs and changes to installation scripts
 will likely be necessary, too.
 Nonetheless, I would like to push these overdue changes to the official
 master branch on Github immediately, unless Per or another developer
 object.

--
Ticket URL: <http://developer.wz2100.net/ticket/4693>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project

Reply via email to