Author Topic: Launcher shenanigans  (Read 10781 times)

Creat

  • Newbie
  • *
  • Posts: 43
    • View Profile
Launcher shenanigans
« on: June 06, 2014, 04:02:59 pm »
Hello, I've got some experiences with the launcher for you. It's basically just a bug report, though I have some general feedback/criticism about that I'll post separately in the near future. In general, I'm very glad there is a launcher that can handle (hopefully) frequent patching in a graceful manner.

So I've got the launcher and downloaded my first version, which happened to be 0.8.0a at the time. I didn't have time to play though, so a day or so later I started the launcher again and was delighted to see that a patch was out and only about 2 MB had to be downloaded (leading to 0.8.2b). Unfortunately, patching failed with a checksum error (or something like that) and I was told to click repair. After that that the launcher was happy that all was good (I don't think anything was downloaded at this point, but I was out of the room for a little while so I don't know).

Forward a couple of hours and I finally have time to actually play. I start the game (via the .exe, not from launcher) and am immediately told that there is a new version. I didn't expect another version to be out again, so I didn't even start the launcher first... I exit, start the launcher and there doesn't seem to be anything new (still showing 0.8.2b and a green checkmark). The game itself displayed the version as 0.8.0 in the main menu, so I thought something had gone wrong, and I clicked on verify files. I'm told my copy is corrupt and it starts downloading the game again, even though there is a perfectly valid path to the current game version already downloaded: The 'downloads' folder of the launcher contains both full 0.8.0a and patch 0.8.0a --> 0.8.2.

If I start the game from the launcher, it's fine (and now it even displays the correct version, only the 'b' is missing). If I start it directly (via VoidExpanse.exe), it will still tell me that there is a new version available on the website (but it also shows 0.8.2 in the main menu), and ask if I want to go download it. Upon exit I can verify files with the launcher just fine though, everything seems to be OK (no checksum errors).
In the properties of the VoidExpanse.exe (on the details tab) I get a version of 4.5.0.18735 at the moment, that wasn't helping in finding out which game version I actually had when problems arose. Might be useful to set this to the actual version of the game ;)

I've uploaded the the log files that the launcher generated to here, but there isn't exactly much specific information in them (please allow small attachments to the forums!).

PS/Sidenote: The whole reason I want to launch the .exe directly is that this is a unity game, and therefore supports '-popupwindow' as a command line switch to start the game in borderless window mode (or rather turns a normal window mode into a borderless one). I have multiple monitors and I usually play with games full-screen on one without the game minimizing upon task switch (so I can use a music player or browser on the second monitor). Since the launcher doesn't allow specifying command line switches (yet?), I'd like to keep doing that. The only thing that seems to break at the moment (well, break is a bit too harsh a word for getting a popup) is that weird version check though, as I assume you disable that with "-fromLauncher"?
« Last Edit: June 06, 2014, 04:10:37 pm by Creat »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #1 on: June 06, 2014, 10:58:38 pm »
Hello!
Thank you for so detailed report and logs!
"patching failed with a checksum error"
Unfortunately, there was an issue with the Zip library ("DotNetZip") we used: sometimes it produced corrupted archives. We fixed it with the latest Game Launcher release yesterday.

"I'm told my copy is corrupt and it starts downloading the game again"
It's connected with the previous issue. Fixed now. Game Launcher is pretty smart, it knows what downloaded versions it has and will not download full distributive if it can be obtained by applying a patch.

"Since the launcher doesn't allow specifying command line switches (yet?)"
Thanks for notice. We just added this feature in the latest Game Launcher release, just create file with name ".launch_args_custom" near executable and put extra command line args in there.

Regards!

Seventitu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Launcher shenanigans
« Reply #2 on: June 07, 2014, 02:21:22 am »
Hi guys,

I am having a problem with the launcher as well. It just won't start. As soon as it appears there is an error window with the following message:

Unhandled exception occured:
System.FormatException: Stringa non riconosciuta come valore DateTime valido.
   in System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   in kWbm9CtBWsM5Ua3ZMWe.jLH3JBtxG l7IKs7Me2q.EbZDVSQKRQ(XDocument  )
   in wJqe23LMFu6SjgXNpCg.Cp09VOLuW YyAyrVeJjw.<>c__DisplayClass1.<GetAsync>b__0(Object s, DownloadStringCompletedEventA rgs e)
   in System.Windows.Threading.Exce ptionWrapper.InternalRealCall (Delegate callback, Object args, Int32 numArgs)
   in MS.Internal.Threading.Excepti onFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

When I click ok the launcher just shuts down.

I'm on windows7 64bit.

Let me know if there is something I am doing wrong. Thanks.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #3 on: June 07, 2014, 05:06:06 am »
I am having a problem with the launcher as well. It just won't start. As soon as it appears there is an error window with the following message.
Hello! Thanks for reporting! I've found the source of this issue. We have not tested Game Launcher under various Windows Region settings. The date format is different for Italian, but the application expects date format only for English language.
Fixed version will be released early next week!
As temporary workaround, you can switch format ("Start->Control Panel->Region") to the "English (United States)". Sorry for inconvenience.
Regards!

Seventitu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Launcher shenanigans
« Reply #4 on: June 07, 2014, 07:05:04 am »
That's fine I'll wait for the update early next week and thanks for the quick reply ! :)

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #5 on: June 08, 2014, 09:28:17 pm »
AtomicTorch GameLauncher v0.7.0 released! Fixes and auto-update (of GameLauncher itself) feature included!

Seventitu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Launcher shenanigans
« Reply #6 on: June 09, 2014, 11:42:45 am »
And it works fine now, thanks ! :)

daft73

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Launcher shenanigans
« Reply #7 on: June 09, 2014, 12:59:47 pm »
Not sure what happened, was playing the game when, all of a sudden, the game froze...or something. Basically the interface disappeared but the universe background stuck around. As I tried to get the game to respond I did the usual start pressing all the keyboard buttons ::), one at a time...nothing happened till I hit F7 or F8, that allowed me to change the universe color...it was quite bizarre to say the least. ???

Anyways the point of this post was to say that when I went back to the Launcher, selected 'check local data' it said my game was corrupt and to repair. Worked fine , so good job there..of note: I had to re-launch to 'Launcher' to replay the game, the option to 'Play' the game was not available till re-boot. :(

EDIT: Restarting the game took a little tweaking. The graphics on the game select screen were off. What eventually fixed that was to go to Windowed mode, the back to Fullscreen.
« Last Edit: June 09, 2014, 01:11:44 pm by daft73 »

Creat

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Launcher shenanigans
« Reply #8 on: June 09, 2014, 09:29:33 pm »
As for the new launcher, updating from 0.8.2b to .3 failed again (invalid checksum after decoding window), but repair fixed it without any re-download this time. Since there doesn't seem to be any information as to what exactly went wrong in the log (except for the fact that it did go wrong) I'll just paste the few relevant lines velow. Maybe add some information to the log as to which file failed? Unless that's basically encoded in the exception information printed, but it looks more just like scrambled function names, not actual variable contents...

Edit: I haven't tested the relocating content settings/option thing in the launcher yet, but can I assume it doesn't handle UAC elevation yet and therefore can't be put into "program files" or similarly protected folders? That's something I consider quite important (having executable files in %appdata% kinda completely defeats the purpose of UAC).

Code: [Select]
10.6.14 01:45:56.1227: Important:
Added download task: Title: Patch VoidExpanse from v0.8.2b to v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\Patch_VoidExpanse_Win_v0.8.2b_to_VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FilePatchDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False&platformKey=Win&fromVersion=0.8.2b

10.6.14 01:45:56.1277: Important:
Started download task: Title: Patch VoidExpanse from v0.8.2b to v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\Patch_VoidExpanse_Win_v0.8.2b_to_VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FilePatchDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False&platformKey=Win&fromVersion=0.8.2b

10.6.14 01:45:58.8708: Info:
Downloaded successfully: Title: Patch VoidExpanse from v0.8.2b to v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\Patch_VoidExpanse_Win_v0.8.2b_to_VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FilePatchDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False&platformKey=Win&fromVersion=0.8.2b

10.6.14 01:45:58.8748: Info:
File downloaded for update: DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\Patch_VoidExpanse_Win_v0.8.2b_to_VoidExpanse_Win_v0.8.3.zip, DownloadUrl: http://atomictorch.com/ClientService/FilePatchDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False&platformKey=Win&fromVersion=0.8.2b, Status: Success

10.6.14 01:45:58.8778: Important:
App "VoidExpanse" v0.8.2b status changed: Patching

10.6.14 01:46:19.5660: Error:
File patching error

Exception AtomicTorch.Launcher.Core.Helpers.Vcdiff.VcdiffFormatException: Invalid checksum after decoding window
   -------------------------stack-------------------------
   at JCjv5SYWrXsHRcdyBRh.iVlsRcY3gyIJCEAAk4i.QMOduJLmU0()
   at JCjv5SYWrXsHRcdyBRh.iVlsRcY3gyIJCEAAk4i.GEMdv5dDsx()
   at JCjv5SYWrXsHRcdyBRh.iVlsRcY3gyIJCEAAk4i.xStd4pcZ8F(Stream  , Stream  , Stream  )
   at eqTcCjYiSuLRjMkhLpt.JaH7dcYAvNoPWcTelMR.oZYw6Tg4BM(String  , String  , String  )
   at eqTcCjYiSuLRjMkhLpt.JaH7dcYAvNoPWcTelMR.LaZwKJbUMj(String  , String  , String  , Action`1 progressChanged)

10.6.14 01:46:19.6100: Important:
Button BtnOk focused

10.6.14 01:46:40.3832: Error:
Can't apply patch: "VoidExpanse" v0.8.2b

10.6.14 01:46:40.3852: Important:
App "VoidExpanse" v0.8.2b status changed: Corrupt

10.6.14 01:48:03.5020: Important:
App "VoidExpanse" v0.8.2b status changed: Repair

10.6.14 01:48:10.0043: Important:
App "VoidExpanse" v0.8.3 status changed: Repair

10.6.14 01:48:10.0053: Info:
App "VoidExpanse" v0.8.3 installed successfully
« Last Edit: June 09, 2014, 09:32:40 pm by Creat »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #9 on: June 10, 2014, 12:08:50 am »
Creat, thanks for reporting! An another user also reported that he has problem with patching. We can't say which file can't be patched, just because we patch whole zip-file to a newer version. Currently, patching implemented in somewhat tricky way:
1. download patch from X version to Y.
2. extract distributive of X version and pack it to ZIP without compression.
3. apply patch to these ZIP file (here we got your problem).
4. if patch applied successfully - now we have Y version distributive in ZIP without compression.
5. repack Y version ZIP with better compression (just to save some space).
6. delete X version if it's not required anymore.
So, problem may appear during step #2 - by some reason you get a different ZIP archive and patch can't be applied to it.

The 0.7.0 version of GameLauncher has a bug with repair code. So, you don't have real v0.8.3 :-(. We will release 0.7.1 right now with fix of this issue. Also will see how the new GameLauncher auto-update feature will work for you and other users.

About UAC elevated rights - if I understand you correctly, you want to have all launcher content/game data to be relocated into Program Files directory. But then it will require administrative rights to run the GameLauncher application - otherwise it just can't modify data files now stored at Program Files directory, and games also can't be launched without elevated rights (they're also would like to write something nearby). So that's why we decided to store everything in %appdata% directory. It will not ask for any administrative rights and users can store launcher data somewhere in convenient location like "D:\Games". If you know how to improve it, please share you thoughts. Thanks!

Creat

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Launcher shenanigans
« Reply #10 on: June 10, 2014, 12:57:39 am »
Patching mechanism
Ah ok I understand. It turned out that it didn't actually patch correctly to 0.8.3, I just started the game just to see, and it was still on 0.8.2. I exit the game and start the launcher, which updated itself nicely (to 0.7.1) and told me the installation was corrupted. It proceeded to download 0.8.3 (full zip), extracted it (I think) and is now stuck at "checking data" at 0%. See this screenshot of a few relevant windows.
It does seem to do somthing, but barely uses any CPU. Most notably, in the thread view of process explorer InitializePartitionManager seems to be stuck somewhere, but note the lack of disk access (the two right-most columns in PE are Disk Delta Read Bytes and Disk Delta Write Bytes, both show no values, meaning 0). The UI was still nicely responsive. I exited the launcher normally (not killing it, as that wasn't necessary), restarted it and it got stuck again immediately at the same position.

Corresponding log file of the launcher:
Code: [Select]
10.6.14 09:24:21.0996: Important:
Log file opened

10.6.14 09:24:22.1477: Important:
AtomicTorchGameLauncher v0.7.0 started. Current data directory: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\

10.6.14 09:24:23.1688: Important:
Added download task: Title: AtomicTorchGameLauncher v0.7.1, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\AtomicTorchGameLauncher v0.7.1.exe, Url: http://atomictorch.com/ClientService/GameLauncherDownload

10.6.14 09:24:23.1748: Important:
Started download task: Title: AtomicTorchGameLauncher v0.7.1, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\AtomicTorchGameLauncher v0.7.1.exe, Url: http://atomictorch.com/ClientService/GameLauncherDownload

10.6.14 09:24:23.3868: Important:
Application update download started: 0.7.1

10.6.14 09:24:23.6818: Important:
Sync apps view models: 1

10.6.14 09:24:23.8638: Important:
App "VoidExpanse" v0.8.3 status changed: Installed

10.6.14 09:24:26.3409: Info:
Downloaded successfully: Title: AtomicTorchGameLauncher v0.7.1, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\AtomicTorchGameLauncher v0.7.1.exe, Url: http://atomictorch.com/ClientService/GameLauncherDownload

10.6.14 09:24:26.3459: Important:
Application installation request: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\AtomicTorchGameLauncher v0.7.1.exe

10.6.14 09:24:26.3609: Info:
Applications list updated from server: 1 total items

10.6.14 09:24:26.3829: Important:
Sync apps view models: 1

10.6.14 09:24:26.3949: Important:
App "VoidExpanse" v0.8.3 status changed: Installed

10.6.14 09:24:27.0220: Important:
Log file closed

10.6.14 09:24:27.8800: Important:
Log file opened

10.6.14 09:24:27.9010: Important:
Application executable replaced: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\AtomicTorch GameLauncher.exe

10.6.14 09:24:28.1160: Important:
Log file closed

10.6.14 09:24:28.9091: Important:
Log file opened

10.6.14 09:24:28.9231: Important:
Application installed: 0.7.1

10.6.14 09:24:28.9671: Important:
IsRecheckingRequired set to True

10.6.14 09:24:28.9791: Important:
AtomicTorchGameLauncher v0.7.1 started. Current data directory: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\

10.6.14 09:24:29.5341: Important:
Re-checking of "VoidExpanse" v0.8.3 is required

10.6.14 09:24:29.5481: Important:
Sync apps view models: 1

10.6.14 09:24:29.6411: Important:
App "VoidExpanse" v0.8.3 status changed: Corrupt

10.6.14 09:24:29.6461: Error:
Error checking application "VoidExpanse" v0.8.3

Exception System.Exception: Distributive not available
   -------------------------stack-------------------------
   at h8Jg43iGWTDDXwC3ANq.deBF3WiVbMXPC9v3OAN.jAtgCU3Qeo(i0LMSIOle574OIG478D  )

10.6.14 09:24:29.7631: Important:
Button BtnOk focused

10.6.14 09:24:29.9812: Info:
Applications list updated from server: 1 total items

10.6.14 09:24:30.0002: Important:
Sync apps view models: 1

10.6.14 09:24:30.0132: Important:
App "VoidExpanse" v0.8.3 status changed: Corrupt

10.6.14 09:24:34.6334: Error:
Error checking application "VoidExpanse" v0.8.3

Exception System.Exception: Distributive not available
   -------------------------stack-------------------------
   at h8Jg43iGWTDDXwC3ANq.deBF3WiVbMXPC9v3OAN.jAtgCU3Qeo(i0LMSIOle574OIG478D  )

10.6.14 09:24:34.6424: Important:
App "VoidExpanse" v0.8.3 status changed: Downloading

10.6.14 09:24:34.6944: Important:
Added download task: Title: Distributive VoidExpanse v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FileDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False

10.6.14 09:24:34.7004: Important:
Started download task: Title: Distributive VoidExpanse v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FileDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False

10.6.14 09:27:18.9508: Info:
Downloaded successfully: Title: Distributive VoidExpanse v0.8.3, DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\VoidExpanse_Win_v0.8.3.zip, Url: http://atomictorch.com/ClientService/FileDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False

10.6.14 09:27:18.9568: Info:
File downloaded for repair: DownloadFilePath: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Downloads\VoidExpanse_Win_v0.8.3.zip, DownloadUrl: http://atomictorch.com/ClientService/FileDownload?masterToken=7c6e7479-b5a2-4f9f-a83c-6cd080f35a38&itemKey=20vyW0GXx4Ss!*X.yu9%7BGG%5D7(u5aRfWQyQ%3B%2BF%23%24EYI!pOWe%25)E8P%25rRt9n%7BqW61%5E&isExperimental=False, Status: Success

10.6.14 09:27:18.9578: Important:
App "VoidExpanse" v0.8.3 status changed: Checking

10.6.14 09:27:19.6929: Error:
Error checking application "VoidExpanse" v0.8.3

Exception System.Exception: Checksum error: C:\Users\Creat\AppData\Local\AtomicTorchStudio\Launcher\Games\VoidExpanse\Mods\core.cpk
   -------------------------stack-------------------------
   at h8Jg43iGWTDDXwC3ANq.deBF3WiVbMXPC9v3OAN.jAtgCU3Qeo(i0LMSIOle574OIG478D  )

10.6.14 09:30:15.6339: Important:
Sync apps view models: 1

10.6.14 09:30:15.6399: Important:
App "VoidExpanse" v0.8.3 status changed: Checking

10.6.14 09:30:15.9819: Info:
Applications list updated from server: 1 total items

10.6.14 09:30:15.9989: Important:
Sync apps view models: 1

10.6.14 09:30:16.0039: Important:
App "VoidExpanse" v0.8.3 status changed: Checking

Note: I've barely played ever since 0.8 came out (few minutes maybe), so I don't see any reason why something should've gotten scrambled... Before I start the launcher as described in the last few lines, I made a .7z of it so I should be able to continue testing this.
Another Note: I've tried attaching a debugger (VS 2013), but since this is obviously a release build and I have no debugging symbols (.pdb), I won't even get a callstack for the worker thread that is stuck. I do see one for the main thread, but that's just looking at the message queue (not surprisingly). So that's no help at all, sorry.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #11 on: June 10, 2014, 01:58:52 am »
Thank you for report!
Our quality control is somewhat "indie" :-)... the issue was just a small mistake in code, not a hang/freeze.
The issue was fixed, new release 0.7.1b published.
What about launcher auto-update? How this feature works for you? Is there any issues with it?

Creat

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Launcher shenanigans
« Reply #12 on: June 10, 2014, 02:02:47 am »
About UAC elevated rights - if I understand you correctly, you want to have all launcher content/game data to be relocated into Program Files directory. But then it will require administrative rights to run the GameLauncher application - otherwise it just can't modify data files now stored at Program Files directory, and games also can't be launched without elevated rights (they're also would like to write something nearby). So that's why we decided to store everything in %appdata% directory. It will not ask for any administrative rights and users can store launcher data somewhere in convenient location like "D:\Games". If you know how to improve it, please share you thoughts. Thanks!

Glad you asked ;) I originally intended to start a new thread about this, but might as well just continue the flow here. Having executable files in AppData is at the very least bad practice and at worst even dangerous (to a degree). The only software I know that has it's .exe in appdata is Spotify, and I really hate that about them. The only thing it 'saves' is a single UAC request upon installation or update, and it also means that every user has his own copy of Spotify (oh why...).
On windows there are different standard folders to separate executables and static data (Program Files [x86]) from user-data like save games, configurations/options etc (various types of AppData). If some data should be shared between multiple users (but also be modifiable), there is the ProgramData folder for that purpose.
This represents the MS guidelines for software development on windows [1], and the UAC elevation mechanic was introduced on Win Vista (and prevails ever since) with very good reason and builds upon that. It allows users to execute programs normally with limited privileges, and only elevate to admin status when it's actually needed. This in turn means that users can't (intentionally or not) modify the programs or their fixed data, but it also means that any malicious software can't. Whatever normal program those might use to gain access is only running with normal privileges. This way no virus can infect executables in Program Files to spread itself or persist (or just 'do damage'), because it simply can't write there.

If a program wants to write to Program Files because it has to (like an updater), it can request UAC elevation (prompting the standard dialog for this, like any software installer) and then write to the folders normally. Some basic example code on how to check for admin privileges and request elevation via UAC if it's needed: C++ Version, C# Version

Sot he patcher and game itself should be in program files, configuration files should go to appdata\roaming and savegames either also to appdata\roaming or a more convenient location like My Documents (or My Documents/My Games). This might also be a good place to place the Mods folder, as every user can find it easily to install them.

I would have the launcher check if it's in the 'right place' via a registry value or configuration file (in appdata) upon launch. If it's not, ask the user if he wants to install it somewhere, suggesting a new folder in 'Program Files (x86)'. If he accepts, request UAC elevation and copy the launcher.exe there. If he doesn't (i.e. he wants to keep the launcher.exe where it is now) just store that path as the installation path and it's also fine.
On later starts the launcher can simply check if there is an update normally like it does now, downloading the .zip files for installation and patching to ProgramData. Once done, ask for elevation, do the actual patching/installing, and drop elevation again. Dropping isn't critical, but ensures the game is not launched with admin privileges without any need.

The changes required for this are actually rather minimal. The suggested small installation routine could be skipped if necessary or too much work (though it should be rather simple). All other changes would basically just exchange a few fixed path entries for queries of the dynamic locations (like appdata, my documents and the like) and that's it. A change like this now is also rather trivial for users to migrate their stuff (which basically means copy a few savegames, if that), especially considering it's still early alpha and things like that are expected.

I really hope you consider this (at least to some extent), and sorry for writing this wall-of-text...

[1] This answer on StackOverflow nicely quotes the important parts of the technical requirements, and also links to the full document detailing the MS Guidelines.

Creat

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Launcher shenanigans
« Reply #13 on: June 10, 2014, 02:09:10 am »
Thank you for report!
Our quality control is somewhat "indie" :-)... the issue was just a small mistake in code, not a hang/freeze.
The issue was fixed, new release 0.7.1b published.
What about launcher auto-update? How this feature works for you? Is there any issues with it?

Basically yes, but there seem to be some thing going on at the same time. When I started the launcher just now, it popped up the progress dialog showing the new version download (as there is a new launcher, obviously). Then I get a popup, covering this dialog, telling me the installation is corrupt (and I should repair). Then that get's covered with a dialog that says it's done updating and needs to restart (I think?), but it restarts without problems to the new version.

Maybe just don't start checking the installation until the launcher has checked for a new self-update, and all is well?

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1936
    • View Profile
Re: Launcher shenanigans
« Reply #14 on: June 10, 2014, 04:00:40 am »
Creat, thanks for response!
About auto-updater - glad to hear it works for you! We will implement operations queue in next version, so it will not spam with popups anymore.

About UAC. Thanks for wall of text! At the early development, we're not consider making Launcher at all.  It was fairly easy to just copy game folder with all data/savegames and give it to friend for weekend test - in other words, we like it's 100% portable application. Also, we're playing Minecraft and notice it's store binaries in AppData... so, while implementing Launcher, we decide not to break how it works.

Unity3D engine also imposes some restrictions - for example, it's not possible to tell Unity to not create "output_log" file if you launch executable directly. So, if user want to run game not from the GameLauncher, and game executable located into Program Files, the security access exception occurs and break everything...

BTW, at mine PC, Google Chrome store it's binary at C:\Users\<user_name>\AppData\Local\Google\Chrome\Application ( http://superuser.com/questions/592015/where-is-chrome-exe-in-windows-8 )

I understand it doesn't complain with Microsoft Guidelines. And it's absolutely not too hard to implement it with separated executables and data (but, as I said above, it will broke executing of game binary directly), we're even already have UAC elevation code and UI for this purpose. But from our point of view, how it's implemented now feels just more convenient and reliable... and virus-friendly :-)
We need to reconsider this and make final decision.

Thanks for pointing on problem again!
Regards!