Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004538Doomseeker[All Projects] Cleanuppublic2025-05-04 14:512025-05-14 04:12
ReporterZalewa 
Assigned ToBlzut3 
PrioritynormalSeveritytweakReproducibilityN/A
StatusfeedbackResolutionopen 
PlatformOSOS Version
Product Version1.5.1 
Target VersionFixed in Version 
Summary0004538: Layout of Wadseeker's archived source-code
DescriptionWhen the makesourcepackages.sh script is used, the directory tree layout in Doomseeker's base archive is the same as in the repository, but in Wadseeker it's drastically different. The "src/wadseeker" directory gets "unrolled" into the top level of the archive.

I propose to keep the "src/wadseeker" structure. The wadseeker tarball should remain minified to the Wadseeker related stuff, but the directory tree layout can be kept the same as in the repo.

Reasons:

1. I don't think there's a particular reason to change the layout.
2. Source-code being tucked away in "src/" or even "src/<project-name>" keeps things neat and modular.
3. Currently the compilation scripts for Wadseeker must assume that the layout will change. Note the use of $CMAKE_SOURCE_DIR variable that would not be necessary if the layout wasn't changing.
4. $CMAKE_SOURCE_DIR makes it difficult to compile Wadseeker as a dependency in internal projects other than Doomseeker itself (such as in the wadseekerapp tool).
Steps To Reproduce1. Run ./releasescripts/makesourcepackages.sh --no-sign
2. Inspect the resulting wadseeker tarball.
Attached Filespatch file icon 0001-makesourcepackages-keep-the-dir-layout-in-Wadseeker-.patch [^] (4,740 bytes) 2025-05-13 17:40 [Show Content]

- Relationships

-  Notes
User avatar (0024539)
Zalewa (developer)
2025-05-04 14:54

Blzut, I have the necessary change ready already, but I would like to consult with you first. Is it okay to change this?
User avatar (0024543)
Blzut3 (administrator)
2025-05-12 07:08

Since you say you have the change ready, can you share the patch? My immediate reaction is that I don't really see how it makes things simpler (since handling the root CMakeLists.txt seems complicated), but I don't really have any strong objections if it is.

The only problematic usage of CMAKE_SOURCE_DIR is probably the LICENSE file install. The Macros.cmake case can probably be simplified by simply adding the cmake directory to CMAKE_MODULE_PATH with list(APPEND). It can be added blindly since the directory not existing should be harmless. Then you don't need the full path for the include() calls.
User avatar (0024544)
Zalewa (developer)
2025-05-13 17:59

It's my unfortunate feature to not mention the things I assume are obvious or unimportant, then I find out they are neither. The "obvious" reason to not do this is that the current archiving model has proven itself to work for years now and, as with any change, if we change that, we open ourselves to new problems that may not be immediately apparent.

I got frustrated with not being able to achieve what I wanted to achieve, which is having the `tools/wadseekerapp` depend on the libwadseeker target, and having it all compile from source in a single solution. And the reason I couldn't achieve that is because Wadseeker's CMakeLists.txt makes an assumption about where the CMAKE_SOURCE_DIR points to. (Plus, there is also a target name collision between the lib and the app, but that's a separate issue, unrelated to the directory layout.)

The patch is now attached.

The root CMakeLists.txt is indeed a problem. I solved this by having a miniscule dormant one in the releasescripts directory. The makesourcepackages script now copies it over to the archive. It's a trade-off, which means that in either case (current or the proposed), the archive's layout is still not the same as the repository's layout and it's not possible to know if the exported archive will produce a proper binary output unless it's thoroughly tested after exporting (which we don't have any test scripts for).

However, if there's a less drastic way of having the subproject working the way I want it to, I would be more inclined to go with it rather than following through with this archiving change. Also, one reason why I wanted to discuss this matter was because you always find a way to use a scalpel where I pull out a cannon.
User avatar (0024545)
Blzut3 (administrator)
2025-05-14 04:12

I can't say I have a super strong argument for going one way or the other. I will note that beyond your goals which should come out the same either way. Perhaps consider testing building Wadseeker standalone without having to run a script:

cmake .. --project-file CMakeLists.wadseeker.txt

cmake ../src/wadseeker -DCMAKE_MODULE_PATH=../../cmake


The former isn't documented in --help and the full manual says that CMake always warns when using --project-file, so the latter is more kosher. However your solution probably just works since my solution doesn't account for the dependencies directory.

For handling the LICENSE file an if(EXISTS "LICENSE") could be done before prefixing with ../../. Either that and/or check if PROJECT_NAME is Doomseeker. (Alternatively it wouldn't be the end of the world to just have a duplicate LICENSE file.)

Similar handling could be done for the dependencies, but I suppose at that point it's becoming kind of a wash on either method. So go ahead with whichever feels better to you.

One note on your CMakeLists.wadseeker.txt: I don't think you need to call project() in that file. Probably best to leave that to src/wadseeker/CMakeLists.txt otherwise some variables will potentially behave differently between standalone builds and Doomseeker/wadseekerapp.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2025-05-04 14:51 Zalewa New Issue
2025-05-04 14:51 Zalewa Summary Wadseeker exported source-code layout => Layout of Wadseeker's archived source-code
2025-05-04 14:53 Zalewa Description Updated View Revisions
2025-05-04 14:53 Zalewa Assigned To => Blzut3
2025-05-04 14:53 Zalewa Status new => assigned
2025-05-04 14:54 Zalewa Note Added: 0024539
2025-05-12 07:08 Blzut3 Note Added: 0024543
2025-05-13 17:40 Zalewa File Added: 0001-makesourcepackages-keep-the-dir-layout-in-Wadseeker-.patch
2025-05-13 17:59 Zalewa Note Added: 0024544
2025-05-13 17:59 Zalewa Status assigned => feedback
2025-05-14 04:12 Blzut3 Note Added: 0024545






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker