Jump to content
The Dark Mod Forums

New tdm_installer and dev builds


Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Some time ago I started investigation for a better differential update algorithm. The first attempt was known as time-travelling tdmupdate (also "tdmsync"). The second attempt has been much more cumbe

Note that there are no gamepad input mappings active by default (except for the main menu). That's still something we need to sort out. Follow this guide to actually make the gamepad work: https://git

New version of installer is ready. The improvements are: Mirrors can be assigned weights to balance traffic. The situation of a mirror going down should be handled gracefully now.

Posted Images

Some sort of TODO:

  1. Icons.
  2. Some wording improvement (confusion about "Please wait" after installation is complete).
  3. Preliminary check of files, in case they are locked by someone.
  4. Generate different names for log file, so that they don't overwrite each other.
     
  • Thanks 1
Link to post
Share on other sites
Spoiler

 

I've recently obtained zipsync.exe (had to find the file at the new location on taaaki's mirrors and update the link on the wiki page) so I can make a small unofficial patch containing my upgraded security camera. The problem is that it closes down instantly when I open it. I've tried running it via cmd with administrator access with this line, but it was the same result:





start C:/personal/darkmod/zipsync.exe

My antivirus didn't like it, but putting it on the white list etc. made no difference.

I suppose you did say it requires command line skills, but making a small patch from a few files seems like it should be quite easy.

 

Edit: nevermind, looks like the problem was that I should use the above line without "start". I've started cmd and entered:

cd C:/personal/darkmod/packaging

Then

zipsync analyze -cn *.pk4 *.zip

 

Edit2: the main problem now is that there's no 2.09 equivalent of this manifest: release208_from_release207

So I can only base my patch on 2.09b6. Shouldn't really matter since 2.09b6 is identical to 2.09, but still - I wouldn't have been able to follow the wiki instructions without looking into taaaki's mirror.

So the 3rd command is currently:

zipsync patch -b http://darkmod.taaaki.za.net/zipsync/beta/209/beta209-06_from_beta209-05/manifest.iniz

 

Edit3: got it all established, now anyone can easily download (or undownload) the current state of my reworked security camera by doing the following:

  1. Start the tdm_installer, select "Get custom version", click on "Next".
  2. Click on beta209-06
  3. Paste this URL into the "Custom manifest URL" box and start the download: http://darkmod.taaaki.za.net/zipsync/dragofer/sec_cam/manifest.iniz
  4. When the download is done, you can click on "Restore old darkmod.cfg", since I made no graphics changes. Saves can only be loaded on the build they were made on.

Still got some more plans with this camera, but that's the distribution aspect sorted.

  • Like 1
Link to post
Share on other sites
22 hours ago, Dragofer said:

My antivirus didn't like it, but putting it on the white list etc. made no difference.

My Windows 10 does not like any executable downloaded from internet.

Quote

Edit2: the main problem now is that there's no 2.09 equivalent of this manifest release208_from_release207

So I can only base my patch on 2.09b6. Shouldn't really matter since 2.09b6 is identical to 2.09, but still - I wouldn't have been able to follow the wiki instructions without looking into taaaki's mirror.

That's because you were looking at the wrong place.

The initial location of zipsync packages (http://darkmod.taaaki.za.net/zipsync) is abandoned now. I have already deleted zipsync.exe from there, and just now I have deleted the core packages from there. Only tdm_installer executables and your packages are left.

Now the official TDM packages are at http://darkmod.taaaki.za.net/release/zipsync.
But you cannot put your own files there, because it is synchronized to TDM server (which is another location you don't have write access to). If you like to put your own patches on TDM servers, I guess the old location can be used for it (just as you did).

Quote

Still got some more plans with this camera, but that's the distribution aspect sorted.

I did not think people will really use zipsync packages, and I must admit that you have lowered the difficulty bar of it in my head 🤩

You can of course do any unofficial packages you like. Just keep in mind that I'll anyway do dev builds from trunk on regular basis. Just need some time for 2.09 release to settle...
 

Link to post
Share on other sites
3 hours ago, stgatilov said:

I did not think people will really use zipsync packages, and I must admit that you have lowered the difficulty bar of it in my head 🤩

Yeah, if you have basic knowledge of how .pk4's work in TDM, are told exactly what to enter into the console and have access to an HTTP server, then it can be done very easily. I've written out explicit step-by-step instructions for laymen on what exactly to do, based on your wiki and my experience:

 

1. Pack all your files into .pk4's:

  • If you want your files to be merged into existing .pk4's from TDM's base install, your .pk4's must have the same names as the existing .pk4's.
  • If you want your files to overwrite existing files from the base install, name their .pk4's so that they sort lexicographically later. An example is z_camera.pk4.
  • Unfortunately you can’t delete files with the patch method. To do that, you should use the differential patch method.
  • Things that are not usually in .zip archives, like the .exe's, should go into a .zip archive called tdm_shared_stuff.zip. They will automatically be unpacked at the user's end.

2. Move the archives and zipsync.exe into an empty folder, i.e. C:/games/darkmod/packaging.

3. Start the command prompt (search for the program “cmd” on your system) and enter the following commands:

  • cd c:/games/darkmod/packaging
    • This makes the command prompt navigate to the folder containing your patch files and zipsync.exe. Adjust as necessary.
  • zipsync analyze -cn *.pk4 *.zip
    • This runs zipsync.exe for the first time, generating a small manifest of your files.
  • zipsync patch -b http://update.thedarkmod.com/zipsync/release/release209_from_release208/manifest.iniz
    • This runs zipsync.exe a second time. It downloads the full manifest of the 2.09 release and combines it with the manifest of your files. If successful, your manifest should grow to upwards of 2 MB.
    • If you wanted your patch to be based on a different release, simply adjust the URL to point to a different manifest.
    • You will also have a slightly smaller temporary manifest in your folder, representing the original 2.09 manifest. You can delete it.

4. Upload your manifest.iniz and your archives to an HTTP server. This can be either your own or one of the TDM-affiliated servers, if you have access to them.

5. To let users download the patch, you will need to tell them:

  • the URL of your manifest.iniz
  • the version of TDM on which the patch is built upon

 


These download instructions can be provided to users (adjust to fit your own case):

  1. Start the tdm_installer, select "Get custom version", click on "Next".
  2. Click on release209
  3. Paste this URL into the "Custom manifest URL" box and start the download: http://darkmod.taaaki.za.net/zipsync/dragofer/sec_cam/manifest.iniz
  4. When the download is done, you can click on "Restore old darkmod.cfg", since no graphics changes were made. Saves can only be loaded on the build they were made on.
Link to post
Share on other sites
On 2/17/2021 at 10:43 AM, stgatilov said:

Some sort of TODO:

  1. Icons.
  2. Some wording improvement (confusion about "Please wait" after installation is complete).
  3. Preliminary check of files, in case they are locked by someone.
  4. Generate different names for log file, so that they don't overwrite each other.
     

Done all of that.

Sorry to players for leaving many logfiles around. The logfiles older than 30 days should get deleted automatically... but the amount of garbage will increase.

As for preliminary check for locked files. This works perfectly under Windows, all pk4/zip files and manifest.iniz are checked. I have tested: if TDM or DR is open, then the check complains about it. I had to use some Windows-specific function to implement it, because normally you can write to pk4 files while TDM holds read access to them (but cannot delete them).

However, it does not work under Linux. In fact, when TDM is running, everyone can overwrite and delete pk4 files. Only the actual executable cannot be modified. I'm afraid there is no special flag or state on pk4 files which would tell me that someone uses them: since TDM does not explicitly lock them using Linux-specific API, it basically says "everyone is free to modify them as they like".

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...