Jump to content
The Dark Mod Forums

tdm_update return value


honzi

Recommended Posts

Hey, so I was messing with the updater trying to write a pkgbuild for my Arch system and noticed that the updater always returns 1 on success. Is that behavior intended?

Digging around in the updater code it seems that _outcome is never set to Ok when UpdateController goes through all the steps, so after the update is done and exitCode is determined, it falls into this thing:

case ConsoleUpdater::None:
            // should not happen?
            break;

Is that something you would accept a patch for?

Link to comment
Share on other sites

i dont know, honzi. :)

maybe alberto (or other arch users)  figured that out. (i dont know how those pkgbuilds/repo/things work) (and havent read the sourcecode for the updater. but i tried to create deb's and rpm's binarypackages for tdm) 

Did you know and have you seen, there is an aur for this game and that alberto building it?

more info see:

https://aur.archlinux.org/packages/darkmod/

and topics

 

 

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

Yeah I've seen it on the AUR, but it depends on the availability of an external repo which seems a little convoluted to me. And it didn't work for me when I tried it. I'd rather have a clean install script if only for myself.

Of course one can ignore the return value in PKGBUILD (which is a workaround I've been using), but aside from repo-specific packaging, having the updater return 1 on success seems a bug to me.

Link to comment
Share on other sites

yes, if that pkgbuild script compiles the tdm source, add a codeline that fixes that value in the tdm updater source. 

and please also add some codelines that follows the following installationguide (especially setting the write permissions):

http://wiki.thedarkmod.com/index.php?title=Installer_and_Manual_Installation#Linux

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Link to comment
Share on other sites

@honzi Call it necessary complexity, there's no simpler way to make this game work on Arch than the AUR package itself. The official installer leads to an standalone download only usable to one user, where the AUR package makes it available system wide.

And yes that exit status is a bug, and it's not the only one. For example the official installer frequently hangs forever on a transient Internet disconnection on any platform. That's why I coded a separate installer, cause otherwise many times the package never finished building.

Don't insult my software boy! Everything I do is for a reason, think thoroughly ?

Link to comment
Share on other sites

On 10/24/2019 at 8:57 PM, Alberto Salvia Novella said:

@honzi Call it necessary complexity, there's no simpler way to make this game work on Arch than the AUR package itself. The official installer leads to an standalone download only usable to one user, where the AUR package makes it available system wide.

And yes that exit status is a bug, and it's not the only one. For example the official installer frequently hangs forever on a transient Internet disconnection on any platform. That's why I coded a separate installer, cause otherwise many times the package never finished building.

Don't insult my software boy! Everything I do is for a reason, think thoroughly ?

I never had any problems running it without Arch packaging on my Arch system. And to make it system-wide, there's always /opt and a manual creation of /usr/share/applications/*.desktop. To me, an AUR package is always optional.

And I'm not knocking your package, it's just not my thing.

Also I'd just really like to submit my patch to the installer.

Edited by honzi
Link to comment
Share on other sites

21 hours ago, honzi said:

And to make it system-wide, there's always /opt and a manual creation of /usr/share/applications/*.desktop

No because the game has to write its own config files in its own folder, so this creates two problems:

- All users share config, save-games and campaigns. Any user can freely modify other user's data.

- And the fact the game can write in that directory means that they can also delete it.

So this is why the code I made. It creates a separate game folder for each user, and it links all the shared resources to the system wide folder. Plus it regenerates this folder in case of update.

21 hours ago, honzi said:

I never had any problems running it without Arch packaging on my Arch system.

I saw the bug more than once, and a friend of mine was also unable to install the game. Any transient Internet disconnection will hang the installer, as it isn't coded to retry. That isn't reliable enough to be a method for packaging.

Also my installer uses a faster mirror than the default ran by the official installer, making downloads faster. The official installer doesn't check mirror speed before downloading, and the mirror list is outdated with servers no longer working.

21 hours ago, honzi said:

I'd just really like to submit my patch to the installer.

That's good, although if I was in that situation I would simply rewrite it on a higher level language. And if it's error proofed like Go, the best option.

Nevertheless the repository has been down for a week.

Link to comment
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.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 3 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...