View Issue Details

IDProjectCategoryView StatusLast Update
0004822The Dark ModCodingpublic02.05.2019 08:50
ReporterstgatilovAssigned Tostgatilov 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0004822: Restructure third-party libraries in code SVN
DescriptionThe idea is described here:
  http://forums.thedarkmod.com/topic/19473-redesign-directory-structure-of-tdm-dependencies/

Put in simple words, there would be the following structure of third-party libraries:

code_svn
 # ...
 # ThirdParty
   * zlib
     ...
   * minizip
     ...
   * ffmpeg
     + include
       (public headers here)
     + source
       (source code here)
     + lib
       - win_32
         (built libs here)
       - win_64
         (built libs here)
       - linux_32
         (built libs here)
       - linux_64
         (built libs here)
       - macosx??
         (built libs here)
   ...
 ...
TagsNo tags attached.

Relationships

related to 0004810 resolvedstgatilov Stop shipping/using outdated bundles of dependencies 
related to 0004533 closedstgatilov VC++ build cleaning 
related to 0004826 resolvedstgatilov Remove ID hacks from third-party libraries: minizip and libjpeg 
related to 0005026 resolvedstgatilov Move to non-XP VC toolset 

Activities

stgatilov

stgatilov

05.04.2019 09:38

developer   ~0011713

From forum:
  http://forums.thedarkmod.com/topic/19840-208-third-party-libraries-overhaul/page-2#entry436498


Right now all libraries are contained inside ThirdParty directory, all the final builds are inside artefacts subdirectory with strict structure.
Every build is named according to options (like: compiler, bitness, static/dynamic, runtime, debug/release).

The libraries are classified into three categories:
1) header-only --- no builds.
2) pure-C libs --- only release build is created.
3) C++ libs (pugixml) --- both release and debug builds are created.

Every library has a single set of public headers (include) --- like before.
I noticed that this rule is not universal, because some libraries put a config header into includes.
In case of libjpeg, jconfig.h is different on Linux and Windows. Although both platforms build well by using Linux version :laugh:
Probably some change will be needed in future.

Right now all the libraries are managed by conan, except for minizip: TDM still has embedded code. I will extract it after branch merge.
The converted libraries include ogg/vorbis, openal, curl, libjpeg, pugixml, tinyformat, doctest.
All the libraries are also updated to more recent versions.

The only problem which I faced is doctest crashing on startup.
I had to define DOCTEST_THREAD_LOCAL to empty to remove the crash.
If someone wants to investigate, comment out this define and run debugging 10 times in a row.

 
Up to this moment, I did not remove old trash (mostly).
I intend to do it after branch merge.
Here is the list of stuff to be deleted:
1) include, lib, win32, win64, linux, macosx --- all the old places with 3rd party stuff
2) ExtLibs project --- it is not used any more. If we ever decide to switch to full dynamic, I suggest using every single lib as a separate DLL.
3) Move unused scons files and MSVC props into "old" or "unused" subdirectory.
4) Delete "memory log" configuration, and add "Release Incremental" if it would be helpful.
stgatilov

stgatilov

05.04.2019 09:39

developer   ~0011714

Note that the bunch of changes were done in branch 3rdparty_4822.
stgatilov

stgatilov

09.04.2019 02:38

developer   ~0011717

Merged branch to trunk in svn rev 8158.
stgatilov

stgatilov

09.04.2019 17:06

developer   ~0011718

Extracted minizip in svn rev 8161.

Only minizip_extra.{c|h} are now compiled as a part of TDM, which contain all the custom minizip functions.
In fact, two features are currently present there:
1) Some sort of file handle cloning.
2) Fast seeking in uncompressed files.

The downside of this extraction is we have to redefine all unzip's private data structures in minizip_extra.c.
If minizip changes their them, we will have to adapt this extra code immediately.
stgatilov

stgatilov

02.05.2019 07:58

developer   ~0011774

Removed ExtLibs directory in svn rev 8205.
stgatilov

stgatilov

02.05.2019 08:36

developer   ~0011775

Removed all the old libraries and their binaries in svn rev 8206.
stgatilov

stgatilov

02.05.2019 08:50

developer   ~0011776

Updated the article on wiki:
  http://wiki.thedarkmod.com/index.php?title=Libraries_and_Dependencies

Issue History

Date Modified Username Field Change
05.06.2018 16:19 stgatilov New Issue
05.06.2018 16:19 stgatilov Status new => assigned
05.06.2018 16:19 stgatilov Assigned To => stgatilov
05.06.2018 16:20 stgatilov Relationship added related to 0004810
06.06.2018 03:57 stgatilov Relationship added related to 0004533
11.06.2018 09:40 stgatilov Target Version TDM 2.07 =>
20.01.2019 07:17 stgatilov Target Version => TDM 2.08
05.04.2019 09:38 stgatilov Note Added: 0011713
05.04.2019 09:39 stgatilov Note Added: 0011714
09.04.2019 02:38 stgatilov Note Added: 0011717
09.04.2019 02:42 stgatilov Relationship added related to 0004826
09.04.2019 17:06 stgatilov Note Added: 0011718
13.04.2019 15:43 stgatilov Relationship added related to 0005026
02.05.2019 07:58 stgatilov Note Added: 0011774
02.05.2019 08:36 stgatilov Note Added: 0011775
02.05.2019 08:50 stgatilov Note Added: 0011776
02.05.2019 08:50 stgatilov Status assigned => resolved
02.05.2019 08:50 stgatilov Fixed in Version => TDM 2.08
02.05.2019 08:50 stgatilov Resolution open => fixed