upgrade to physfs 2.1 and change location of configuration directory #4693
Comments
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Per commented I think we should release 3.2.4/3.3.0 first. Making such a big platforms-related change just before release seems like a bad idea. |
Forgon commented Replying to Warzone2100/old-trac-import#4693 (comment:1):
The absense of this patch has already caused problems in ArchLinux, which uses physfs-3.* since months. There, the warzone2100-git package now includes this patch series (replacing a broken patch someone else attempted before), and so will the warzone2100 package with the next release. |
vexed commented Replying to Warzone2100/old-trac-import#4693 (comment:2):
I agree with Per here, we have been bitten by these type of things before, so it is better to be overly cautious here, since it does change the way we do things now, and a release is sooner rather than later. If however the release won't be done for months, then it is safe to apply the patch (didn't really look at it yet, but assuming it is correct). |
pastdue commented Are there any major stable distros that are stuck shipping versions of Physfs that are < 2.1? If so, we can add some code to detect the Physfs version at compile-time and use the existing (old) APIs to maintain compatibility. |
Forgon commented Replying to Warzone2100/old-trac-import#4693 (comment:4):
Unfortunately, almost all of them. We could require their users to install a newer version of physfs, but their packages are not allowed to require such a dependency. Some people might never install the game due to such a complication that does not even result in better UX. Therefore, it is probably best to wait until a reasonable number of distributions have upgraded physfs. Ubuntu 16.0.4.3 LTS will expire in 2021, which is the latest date to consider. I suggest to investigate which major distributions do not provide packages satisfying the current Qt requirements (please upgrade the Linux Compile Guide if you know them) so that support for systems not meeting that minimum standard could be dropped. In the meantime, distributions that use a newer version of physfs, like ArchLinux, should use this patch series for packaging. |
pastdue commented @forgon: Alright, I've gone through and created a modified version of the "safe" subset of your patches here: Warzone2100/warzone2100#143 Highlighted changes from your patches:
Because of these changes, we should be able to safely apply https://github.com/Warzone2100/warzone2100/pull/143.patch now, resolving all but a single deprecation warning when compiling with PhysFS 2.1+, and maintaining compatibility with PhysFS 2.0. We can then later investigate the remaining two "behavior changing" patches ( |
Forgon2100 <950973@...> changed status from |
Forgon2100 <950973@...> changed owner from `` to |
Forgon2100 <950973@...> changed resolution from `` to |
Forgon2100 <950973@...> committed [8] In Warzone2100/warzone2100@8e97ece:
|
past-due <30942300+past-due@...> committed [609] In Warzone2100/warzone2100@609a9da:
|
past-due <30942300+past-due@...> committed [862] In Warzone2100/warzone2100@862bf95:
|
past-due <30942300+past-due@...> committed [2448] In Warzone2100/warzone2100@2448e89:
|
past-due <30942300+past-due@...> committed [127807027] In Warzone2100/warzone2100@1278070:
|
past-due <30942300+past-due@...> commented In Warzone2100/warzone2100@ea648d3:
|
past-due <30942300+past-due@...> commented In Warzone2100/warzone2100@ad37dc8:
|
pastdue changed status from |
pastdue changed resolution from |
pastdue commented I've gone ahead and merged the safe / modified ("no-behavior-change") patches in PR 143, since they do not impact the ability to compile with PhysFS 2.0, but are targeted to prevent a bunch of compilation errors / warnings when attempting to compile with PhysFS 2.1+. The remaining bits of Forgon's original patch that need to be discussed are |
Forgon commented The patch [raw-attachment:physfs_mods_regular_files.patch] was updated so that it now works with PhysFS 2.0 (almost) as well as with PhysFS 2.1+. In addition, it fixes a bug: nonexisting mods were kept in the search path and thus displayed as part of the mod list in the upper left corner of the screen.
I also noticed that
|
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon uploaded file patch file created with |
Forgon2100 <forgon2100@...> changed status from |
Forgon2100 <forgon2100@...> changed resolution from `` to |
Forgon2100 <forgon2100@...> committed [827] In Warzone2100/warzone2100@827cd59:
|
Forgon2100 <forgon2100@...> committed [0] In Warzone2100/warzone2100@0d33e57:
|
Forgon2100 <forgon2100@...> committed [8] In Warzone2100/warzone2100@8b82c5c:
|
Forgon commented Pastdue amended this patch series with a further commit, which changed the location of the home directory: `
' It introduced the following compiler warning for physfs 2.1+ users:
The problem is now fixed. |
Forgon changed title from |
Forgon uploaded file patch file created with |
Forgon2100 <forgon2100@...> committed [0675] In Warzone2100/warzone2100@0675a20:
|
resolution_fixed
type_patch (an actual patch, not a request for one)
| by ForgonThis patch series ensures compatibility with physfs versions >= 2.1.
Physfs is currently in version 3.0.1 (read the latest release note).
Versions 2.0 and 2.1 replaced several functions (read the deprecated list), 8 of which are part of this game. These are now deprecated and lead to hundreds of compiler warnings:
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.
Issue migrated from trac:4693 at 2022-04-16 12:58:53 -0700
The text was updated successfully, but these errors were encountered: