Author Topic: cRPG updater - Temporary replacement of cRPG Launcher  (Read 27031 times)

0 Members and 1 Guest are viewing this topic.

Offline Gurgumul

  • Duke
  • *******
  • Renown: 595
  • Infamy: 99
  • cRPG Player
    • View Profile
Elio & Switchtense give more dev feedback in one thread than the entire Burro Battalion in all of their threads and videos.

Offline Elio

  • Marshall
  • ********
  • Renown: 737
  • Infamy: 20
  • cRPG Player Sir Black Pawn A Gentleman and a Scholar
  • The treeee!
    • View Profile
    • Calradia's Maps Explorer
  • Game nicks: Elio
@Switchtense

(click to show/hide)

Offline Switchtense

  • King
  • **********
  • Renown: 1137
  • Infamy: 137
  • cRPG Player Sir White Bishop
  • poking you where the sun dont shine!
    • View Profile
  • Faction: Unicorns, BIRD CLAN BEST CLAN!
  • Game nicks: All sorts of Switch's
  • IRC nick: Switchtense
@Switchtense

(click to show/hide)

Is your script now able to create the cRPG folder?

Cause currently the GUI needs admin rights to do so. (If the Warband folder is inside the programs-folder)

Your update does not need admin rights at all.

My problem at the moment is that I can tell whether the application is run as an admin, but it is difficult to check whether, as a standard user, it is possible to write into the Warband folder, without throwing an UnauthorizedAccessException (Or whichever is used when trying to do something you need admin for)
I cannto seem to find a reliable method which lets you know whether you need admin for whatever you are about to do.

I could only check what folder the user selected, if it contains "programs" I can ask for an alternative path. But that is even more quick & dirty than it already is. A lot more than I'd like.


If the app is being run as an admin, I can just proceed whatever happens, but the case of being a standard user is giving me a headache.
For all the non-believers, look no further than this thread for proof that while strat battles are won/lost in NA3/EU3, strat wars are won and lost on the forums.
visitors can't see pics , please register or login

Offline Switchtense

  • King
  • **********
  • Renown: 1137
  • Infamy: 137
  • cRPG Player Sir White Bishop
  • poking you where the sun dont shine!
    • View Profile
  • Faction: Unicorns, BIRD CLAN BEST CLAN!
  • Game nicks: All sorts of Switch's
  • IRC nick: Switchtense
Actually, I can just go ahead and start creating the cRPG folder.

If the user does not have the rights to do so, I can just catch the exception and ask the user to choose an alternative path.

Then the same game. I try to create the folder, if it does not work, ask for another path again. (With a message saying what the problem is obviously)

Will properly test tomorrow. Gotta take admin off my windows account to properly test it. Cannot be bothered to do that tonight.
For all the non-believers, look no further than this thread for proof that while strat battles are won/lost in NA3/EU3, strat wars are won and lost on the forums.
visitors can't see pics , please register or login

Offline Elio

  • Marshall
  • ********
  • Renown: 737
  • Infamy: 20
  • cRPG Player Sir Black Pawn A Gentleman and a Scholar
  • The treeee!
    • View Profile
    • Calradia's Maps Explorer
  • Game nicks: Elio
Is your script now able to create the cRPG folder?

I only update existing module that contains at least version.txt.

But of course I could implement the same thing you made to create/install cRPG if necessary.

(click to show/hide)

I don't have time to work on it until this week-end, if you want feel free to try a solution on your side.

visitors can't see pics , please register or login

« Last Edit: April 14, 2016, 10:28:49 pm by Elio »

Offline Switchtense

  • King
  • **********
  • Renown: 1137
  • Infamy: 137
  • cRPG Player Sir White Bishop
  • poking you where the sun dont shine!
    • View Profile
  • Faction: Unicorns, BIRD CLAN BEST CLAN!
  • Game nicks: All sorts of Switch's
  • IRC nick: Switchtense
Yes, I know whether the update finished successfully.

And I changed it just now.
I now just try to create the folder.
If the user is an admin, it is all good and I just start your updater and all good.

If the user is no admin, the exception is thrown when trying to create the folder.
I catch the exception and ask the user for a different path to install the game to. (User can also say 'no', then the update cancels)
If the program can create the folder in the chosen path without requiring admin, all good. Update starts and perfect.

If the new path needs admin to create a folder again, same thing as before. Thrown exception is caught. Does user want a different path? No - Cancel, Yes - Try to create folder.
(Used recursion on this one)


Will test it tomorrow
For all the non-believers, look no further than this thread for proof that while strat battles are won/lost in NA3/EU3, strat wars are won and lost on the forums.
visitors can't see pics , please register or login

Offline andreakarasho

  • Knight
  • ***
  • Renown: 46
  • Infamy: 10
  • cRPG Player
  • MEMENTO AVDERE SEMPER
    • View Profile
  • Game nicks: _ReaL_DeaL_ - Macrone_Legionarivs
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #66 on: April 17, 2016, 12:50:42 pm »
0
Nice app!

If i had time i would write a c# app to update
visitors can't see pics , please register or login

Offline WITCHCRAFT

  • Highborn
  • King
  • **********
  • Renown: 2174
  • Infamy: 227
  • cRPG Player Madam Black Queen
  • get hexed
    • View Profile
  • Game nicks: WITCHCRAFT, A_Hot_Elf_Princess, Yurnero_of_the_High_Plains, and secret alts
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #67 on: April 18, 2016, 08:25:38 pm »
+1
Fantastic work Elio and Switch!

You have saved many people that would just go "eh, it won't work" and play a different game.  :)
visitors can't see pics , please register or login


irl something shorted on the shuttle and laika overheated and died within a few hours of liftoff and for a brief while one could look up to the stars and see a light shooting across the sky that was actually a warm dog corpse slingshoting about the earth at thousands of miles per hour which was arguably humanity's greatest achievement so far

Offline Switchtense

  • King
  • **********
  • Renown: 1137
  • Infamy: 137
  • cRPG Player Sir White Bishop
  • poking you where the sun dont shine!
    • View Profile
  • Faction: Unicorns, BIRD CLAN BEST CLAN!
  • Game nicks: All sorts of Switch's
  • IRC nick: Switchtense
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #68 on: April 18, 2016, 11:08:30 pm »
+1
Fantastic work Elio and Switch!

You have saved many people that would just go "eh, it won't work" and play a different game.  :)

So basically we ruined many people's lives?
For all the non-believers, look no further than this thread for proof that while strat battles are won/lost in NA3/EU3, strat wars are won and lost on the forums.
visitors can't see pics , please register or login

Offline WITCHCRAFT

  • Highborn
  • King
  • **********
  • Renown: 2174
  • Infamy: 227
  • cRPG Player Madam Black Queen
  • get hexed
    • View Profile
  • Game nicks: WITCHCRAFT, A_Hot_Elf_Princess, Yurnero_of_the_High_Plains, and secret alts
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #69 on: April 18, 2016, 11:39:52 pm »
+1
they were going to waste hours in front of their computer anyway, so
visitors can't see pics , please register or login


irl something shorted on the shuttle and laika overheated and died within a few hours of liftoff and for a brief while one could look up to the stars and see a light shooting across the sky that was actually a warm dog corpse slingshoting about the earth at thousands of miles per hour which was arguably humanity's greatest achievement so far

Offline Butan

  • King
  • **********
  • Renown: 1713
  • Infamy: 214
  • cRPG Player A Gentleman and a Scholar
  • Best tincan EU
    • View Profile
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #70 on: April 18, 2016, 11:41:47 pm »
+1
So basically we ruined many people's lives?

Only a few, still worth it!

Offline Jambi

  • Earl
  • ******
  • Renown: 410
  • Infamy: 166
  • cRPG Player
  • Walks with God.
    • View Profile
  • Game nicks: Jambi
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #71 on: April 19, 2016, 02:48:29 am »
0
Eh, it won't work.
Love will tear us apart.
Quote
Also, most fucked up brain of the year award goes to jambi. Well done.

https://www.youtube.com/watch?v=cX9Cpuj4igk

Offline Switchtense

  • King
  • **********
  • Renown: 1137
  • Infamy: 137
  • cRPG Player Sir White Bishop
  • poking you where the sun dont shine!
    • View Profile
  • Faction: Unicorns, BIRD CLAN BEST CLAN!
  • Game nicks: All sorts of Switch's
  • IRC nick: Switchtense
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #72 on: April 19, 2016, 08:22:16 am »
+2
Eh, it won't work.

Thanks to the very detailed explanation you provided I was able to instantly find the problem and fix it. Try again, just make sure to turn your computer off and on again first.
For all the non-believers, look no further than this thread for proof that while strat battles are won/lost in NA3/EU3, strat wars are won and lost on the forums.
visitors can't see pics , please register or login

Offline _RXN_

  • Count
  • *****
  • Renown: 254
  • Infamy: 40
  • cRPG Player A Gentleman and a Scholar
    • View Profile
  • Faction: Chadzina
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #73 on: April 19, 2016, 11:35:52 am »
+2
Eh, it won't work.

Download cRPG update 1.02, unzip, launch crpgUpdaterGUI.exe, enter Warband path, update, close, run C-RPG launcher, play.

Offline Jepekula

  • Noble
  • **
  • Renown: 21
  • Infamy: 0
  • cRPG Player
    • View Profile
Re: cRPG updater - Temporary replacement of cRPG Launcher
« Reply #74 on: April 19, 2016, 12:27:28 pm »
+2
I think someone here has missed a joke.
(click to show/hide)