View Issue Details

IDProjectCategoryView StatusLast Update
0004817The Dark ModTDM Updaterpublic04.03.2019 14:50
Reporterstgatilov Assigned Tostgatilov  
Status resolvedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0004817: Remove boost (and libsvn) from tdm_update
DescriptionWe have already removed boost from the game itself.
Now it's time to get rid of it completely.

UPDATE: we decided to also remove libsubversion from packager. This is added to this task.
TagsNo tags attached.


related to 0004810 resolvedstgatilov Stop shipping/using outdated bundles of dependencies 




24.02.2019 12:55

administrator   ~0011652

Quote of the day (line breaks mine):
  // get the number of PK4 files in the target directory
  std::size_t totalFileOperations = std::count_if(
      static_cast<bool(*)(const fs::path&)>(File::IsPK4),
      std::bind(&fs::directory_entry::path, std::placeholders::_1)


24.02.2019 14:52

administrator   ~0011653

Last edited: 24.02.2019 14:52

View 2 revisions

Things are moderately good thus far.
Not as good as with TDM: updater and packager contain tons of boost.

I am using the same conversion model as with TDM: I have copied StdString and StdFilesystem files to libtdm_update. Had to expand it significantly.

The worst offenders are:

1) boost::filesystem::(recursive_)directory_iterator. Had to replace it with (recursive_d)irectory_enumerate, just as in TDM.

2) boost::program_options. Had to reimplement options parsing. Luckily, updater and packager use only very basic subset (as usual).

3) boost::spirit. I copied IniParser from TDM, now rewriting two other (even simpler) parsers.

4) boost::format. There are 121 occurrences of this. I'm not yet sure how to convert it.
Replacing with C-like wrapper around snprintf needs manual inspection of all the cases and is too error-prone. Writing own implementation which would work only for a limited set of types sounds stupid.
I'm afraid I will resort to some third-party library like tinyformat for this.

P.S. We have three independent implementations of the same CRC32 in our repository. I will reduce that to two =)



25.02.2019 14:28

administrator   ~0011659

I have decided to use tinyformat.
It replaces boost::format perfectly (after running a calls-replacing script).

The current state is: everything is already done, I'm testing all the stuff (package/update on Windows/Linux).
Hopefully, I will commit all the changes rather soon.


25.02.2019 15:27

administrator   ~0011660

I have tested tdm_update both on Windows (update from 2.06 to 2.07) and on Linux (update from 2.05 to 2.07).
Also, I have tested packaged on Windows (all 7 commands) and on Linux (create-manifest and create-package).

Everything looks good.

The only weird things are:
1) Calling "svn list -R ." causes svn to ask credentials for darkmod SVN.

2) When updater tries to delete its own executable, the old build reports error to logfile:
   Exception while removing file: boost::filesystem::remove: ...
The new build does not report this, just silently leaves the file intact.
I guess that unlike boost, std::filesystem does not consider "cannot remove" a hard error, instead it just returns false.


25.02.2019 16:47

administrator   ~0011661

Finally committed all the changes in svn revs 7981-7998.
I decided to split commit in parts to make bisecting easier in case of any problems.

The boost and libsvn libraries are yet in the repo.


04.03.2019 14:50

administrator   ~0011667

Removed the libraries from the repo in svn rev 8017-8020.

Issue History

Date Modified Username Field Change
04.06.2018 03:47 stgatilov New Issue
04.06.2018 03:47 stgatilov Status new => assigned
04.06.2018 03:47 stgatilov Assigned To => stgatilov
04.06.2018 03:49 stgatilov Relationship added related to 0004810
11.06.2018 09:41 stgatilov Target Version TDM 2.07 =>
20.01.2019 07:17 stgatilov Target Version => TDM 2.08
24.02.2019 12:55 stgatilov Note Added: 0011652
24.02.2019 14:52 stgatilov Note Added: 0011653
24.02.2019 14:52 stgatilov Note Edited: 0011653 View Revisions
25.02.2019 14:28 stgatilov Note Added: 0011659
25.02.2019 15:27 stgatilov Note Added: 0011660
25.02.2019 16:46 stgatilov Summary Remove boost from tdm_update (and from SVN) => Remove boost (and libsvn) from tdm_update
25.02.2019 16:46 stgatilov Description Updated View Revisions
25.02.2019 16:47 stgatilov Note Added: 0011661
04.03.2019 14:50 stgatilov Note Added: 0011667
04.03.2019 14:50 stgatilov Status assigned => resolved
04.03.2019 14:50 stgatilov Fixed in Version => TDM 2.08
04.03.2019 14:50 stgatilov Resolution open => fixed