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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...