Jump to content
The Dark Mod Forums

Windows installer issues


Samus_Aran

Recommended Posts

I am trying to install the latest version of TDM, I think the last version I played was 2.09a.

  1. I am installing to a new folder
  2. My user created the folder and has full write access to it
  3. I am running the extracted .exe file in this new folder

 

Problem 1:

Why is the installer using the .exe filename as the URL for updating?

This is absolute nonsense.  I name my installers by the date or version number of the installer.  This wasn't a problem in the past for TDM, or for any other thousands of installer I've used over the past 35 years.  Never once have I seen an app look for a local file or external URL based on the name of the installer executable!

According to https://wiki.thedarkmod.com/index.php?title=Tdm_installer_and_zipsync#tdm_installer about the installer "The config file is automatically downloaded from hardcoded URL.  It describes all official versions of TDM and mirrors used to download them."

Clearly this is not the case, it is literally using a URL based on the executable name!  I should not be forced to keep a stupid name like tdm_installer.exe that doesn't even specify the version number (in this case v1.11).  I have the previous installers in my downloads folder named/dated appropriately.  The installer won't even work if you change the case of the executable to title case "TDM_Installer.exe"!  It's ridiculous.

84pH3Zz.png

 

Problem 2:

Why is the install directory listed in red?

My user created the folder and has full write permissions to it.  The installer has no difficulties creating log files in the folder, so it obviously has write permissions.

 

Problem 3:

Why does the installer not provide any way to specify a new folder to install to?

There is no "New Folder" button anywhere in the GUI.

I'm not sure if typing in a folder name works or not, because it remains red either way, and won't let me continue the install with permission problems.  But regular users should not be required to know this hack.  Also, when you select a folder, the installer does not add "The_Dark_Mod" or whatever as a default folder name like most apps do.  It is left entirely up to the user to create an install folder beforehand.  Kind of defeats the purpose of an installer being quick and easy.

 

Problem 2 - Follow Up:

I am still unable to install TDM after renaming the .exe to the original lowercase name.  It still complains that I don't have permissions to the folder, but obviously I do!  tdm_installer.exe is creating log files in the folder while telling me that it doesn't have permissions to write to that very same folder!  It's beyond absurd.  Why is the installer lying?

I have solved the issues by changing Security settings so ALL LOGGED IN USERS have full write permissions to the folder, but that is not desired -- why is that necessary?  My user already had full permissions to the folder when creating it, and the installer had write permissions to the folder.

 

Possible Solution For Problem 1:

The installer should never use the name of the executable for anything to do with local filenames or external URLs.  Update the installer so it does what the Wiki says it does -- uses a fixed URL to get the list of TDM versions.

 

Possible Solution For Problem 2:

The installer should be updated so it automatically changes permissions to the install folder as-needed.  Requesting UAC privilege escalation if needed to alter the folder permissions.  At the very least it should tell the user what permissions it needs for the folder (it already had full write permissions!).  Heck, just make the installer ATTEMPT to create a file to see if it has permissions.  Clearly it is checking permissions incorrectly and misinforming the user about it, then refusing to continue.

 

Possible Solution For Problem 3:

Have a way to create a new folder from the installer GUI, such as an "Add Folder" button or a right-click menu with "New Folder".

 

 

  • Like 1
Link to comment
Share on other sites

[posted a lot of text, that it doesnt make sense]

Edit: those are some classic problems, but apparently not solved.
Look at the file organization and the installers code, try to discus about it in this topic and change it.
More info, see compilation guide and tdm installer source.

 

 

Edited by freyk

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

Link to comment
Share on other sites

On 8/18/2023 at 4:03 AM, Samus_Aran said:

Problem 1:

 

Why is the installer using the .exe filename as the URL for updating?

I guess the reason is that there are several platforms (3 actually), and this behavior was a simple way to support them all without hardcoding all the platforms into source code.
But yes, the fact it stops working after rename is not good 😁

I'll try to fix it somehow.

Quote

Problem 2 - Follow Up:

I am still unable to install TDM after renaming the .exe to the original lowercase name.  It still complains that I don't have permissions to the folder, but obviously I do!  tdm_installer.exe is creating log files in the folder while telling me that it doesn't have permissions to write to that very same folder!  It's beyond absurd.  Why is the installer lying?

I have solved the issues by changing Security settings so ALL LOGGED IN USERS have full write permissions to the folder, but that is not desired -- why is that necessary?  My user already had full permissions to the folder when creating it, and the installer had write permissions to the folder.

 

I'm not sure what the problem is exactly.

The red color for installation path is set based only on the text only.
As I see in the code, having a dot character in path is the reason.
I cannot recall why exactly I did it, but I'm pretty sure I was aware of some problem with this case, so I blocked it out.
 

Quote

 

Possible Solution For Problem 3:

Have a way to create a new folder from the installer GUI, such as an "Add Folder" button or a right-click menu with "New Folder".

 

I'll try to add this button, why not.

  • Like 1
Link to comment
Share on other sites

I uploaded a new version of installer.
Of course, you need to rename old version to its original name for it to self-update.

On 8/18/2023 at 4:03 AM, Samus_Aran said:

Problem 1:

Why is the installer using the .exe filename as the URL for updating?
This is absolute nonsense.

The nonsense is fixed 🥺

Now self-update URL is hardcoded at build time.

Quote

Problem 2:

Why is the install directory listed in red?

My user created the folder and has full write permissions to it.  The installer has no difficulties creating log files in the folder, so it obviously has write permissions.

I did not remember whether periods in path are forbidden because they don't work or because they would result in confusion for Windows users (accidentally writing/copying filename would result in installer eagerly creating a directory with such name).

I simply added this information to the tooltip.

Apparently, your confusion came from the fact that you read the tooltip, but its contents did not mention that periods are not allowed (it's not mentioned anywhere at all).
 

Quote

Problem 3:

Why does the installer not provide any way to specify a new folder to install to?

There is no "New Folder" button anywhere in the GUI.

I added the button to "Browse" GUI.

The installer is using lightweight FLTK for GUI, so it looks different from native applications, but it should work.

Quote

Possible Solution For Problem 2:

The installer should be updated so it automatically changes permissions to the install folder as-needed.  Requesting UAC privilege escalation if needed to alter the folder permissions.  At the very least it should tell the user what permissions it needs for the folder (it already had full write permissions!).  Heck, just make the installer ATTEMPT to create a file to see if it has permissions.  Clearly it is checking permissions incorrectly and misinforming the user about it, then refusing to continue.

The problem had nothing to do with permissions.

But speaking of permissions, the installer shows a warning if user runs if with escalated privilages and discourages user from proceeding. That's because the installer does not mess with OS-specific stuff, so if it creates all the files under admin, the game will only be properly playable under admin too.

  • Like 1
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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • 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.
      · 7 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
×
×
  • Create New...