Bruno Barbieri - 2014-02-16

I talked to Andrey and we both agreed that changing only some files to the AppData folder could cause some issues (unicode user names and what not), so loading everything from the same folder as the executable is still the best way to handle this.
He also suggested a different way to handle UAC in the installer.

So I kept only the cosmetic/refactoring changes in the code and made the suggested changes to the installer.


  • Edited the installer/uninstaller to support UAC:

    • If the user clicks "No" in the UAC prompt, the install folder will be automatically changed to "X:\Users[User Name]\AppData\Roaming\Subtitle Workshop"
    • In the same situation, if the user tries to change the install folder to a folder that needs admin permissions, the installer will show a message dialog informing the user of that fact, not allowing the install to progress
    • The uninstaller will check if admin permissions are needed, if that's not the case, it won't show an UAC prompt
  • Fixed a few bugs in the installer code:

    • The "Help" folder would be created in Start Menu even if you didn't select any manual during the install
    • The shortcuts for the manuals had the wrong path ($INSTDIR\Manual instead of $INSTDIR\Help) and had invalid values for icons
    • The working dir for executables' shortcuts would be set to the last value used for SetOutPath, this could cause some problems, so I made sure to set the right value before creating any shortcuts
  • I tried to add a few more name/dir constants and make sure the existing ones were used across the entire code.

 

Last edit: Bruno Barbieri 2014-02-16