DO NOT DEAL WITH THIS MEMBER
Hello HF,
I want to make a special kind of launcher for my software:
I have got 2 exes (launcher and program) and I want to add an "auto-updater" feature, but I can't add it directly to the program because it must not have internet access so I made the launcher to be able to connect to my server and check if it has to be updated.
At this point everything is okay, but then if I got both exes separated, people will be able to open the program directly without opening the launcher, so they wont be asked to update the program.
What I had thought is: I merge/join/pack both exes in a single exe, so the default code (when I open the merged exe) will be the launcher, and once it has checked for updates it will go on with running the offline program, then this way everyone will be forced to have the latest version of my software.
I have tried to do it with a program called MoleBox, which joins all the files required to run a program in a single exe, but I couldn't be able to join both exes to make them work as I explained before (my launcher doesn't find the second exe when it tries to run it).
Could someone explain to me how could I manage to merge both exes and get them work as I want to?
Maybe other solutions to achieve this behavior would be welcome too.
I hope someone understands what I'm talking about, and thanks everyone in advance 😁
Jun 27, 2013 05:36 PM
(This post was last modified: Jun 27, 2013 05:37 PM by Cybride.)
(Jun 27, 2013 04:09 PM)Gordonfreeman75 Wrote: Hello HF,
I want to make a special kind of launcher for my software:
I have got 2 exes (launcher and program) and I want to add an "auto-updater" feature, but I can't add it directly to the program because it must not have internet access so I made the launcher to be able to connect to my server and check if it has to be updated. Why isn't it allowed to access the internet, but the launcher is? This doesn't make any sense at all for me.
DO NOT DEAL WITH THIS MEMBER
(Jun 27, 2013 05:36 PM)Cybride Wrote: Why isn't it allowed to access the internet, but the launcher is? This doesn't make any sense at all for me.
Because if someday I decide to release the standalone program (without the launcher) I must guarantee that it won't have internet access at all, but by now I need to be able to auto-update it, since it is more likely a beta version.
Second reason is that I can re-use the launcher code for future purposes such as other programs or my work-in-progress game 😝
Do you know a better way to do it? 🤨
Jun 28, 2013 03:42 AM
(This post was last modified: Jun 28, 2013 03:42 AM by Cybride.)
How about writing an auto-update class and including it in your main program?
Disabling/removing it for the final program won't take 5 minutes.
Btw. , in which language are you coding in?
DO NOT DEAL WITH THIS MEMBER
Jun 28, 2013 03:52 AM
(This post was last modified: Jun 28, 2013 03:57 AM by Gordonfreeman75.)
(Jun 28, 2013 03:42 AM)Cybride Wrote: How about writing an auto-update class and including it in your main program?
Disabling/removing it for the final program won't take 5 minutes.
Btw. , in which language are you coding in?
Well finally it's what I've done for the program:
Code if localversion = 1 then
end sub
else
update()
endif
This way it will never try to update again once I swap to v.1 😖
However now I'm REALLY stuck with my game launcher because I can't actually edit the game source (just a couple of things hex-editing), so I will be forced to do it the way I described in the first post ❓
What would you suggest me to do?
Edit: The launcher for the game will (probably) be in VB.NET4, but the actual game client is made in C++ (not by me, it's just something like WoW private servers, but with another game 🙂)
Jun 28, 2013 04:27 AM
(This post was last modified: Jun 28, 2013 04:30 AM by Cybride.)
Why do you check the local version before starting the update-routine?
It should be its job to compare the versions and, if necessary , to download and update the newest version.
You can't edit the game source? And again I'm not sure what you are talking about.
You won't be able to overwrite the running program, because of this your update-routine needs to drop a temporary updater scipt/program wich will close the actual program, download the new one, overwrite the old one and start the updated program.
Oh, and this should be moved to the programming section.
Jun 28, 2013 04:29 AM
(This post was last modified: Jun 28, 2013 04:29 AM by Cybride.)
--doublepost--
(website loading fail)
DO NOT DEAL WITH THIS MEMBER
Jun 28, 2013 04:37 AM
(This post was last modified: Jun 28, 2013 04:51 AM by Gordonfreeman75.)
(Jun 28, 2013 04:27 AM)Cybride Wrote: Why do you check the local version before starting the update-routine?
It should be its job to compare the versions and, if necessary , to download and update the newest version.
You can't edit the game source? And again I'm not sure what you are talking about.
You won't be able to overwrite the running program, because of this your update-routine needs to drop a temporary updater scipt/program wich will close the actual program, download the new one, overwrite the old one and start the updated program.
Oh, and this should be moved to the programming section.
I did it this way because the update() function is who decides if you have to update or not, but once I want to stop updating it, I will set version = 1, so it will never try to update again. Isn't this correct?
About the game, I know I won't be able to overwrite it if it is running, but it will be downloaded as a temp file and patched externally (batch or something), then as you said, it will overwrite the old file and start from the updated file again.
That's exactly what I'm trying to do 😝
How about you corrupt part of program and have launcher fix it before running file but it saves uncorrupted version in TEMP. Keep launcher running but hidden so once the program is closed launcher deletes uncorrupted file and closes itself.
2nd idea is to check which program opened it ? If program is opened by explorer.exe just create msgbox saying "Start launcher" and if it's opened by launcher go to what you already have coded.
Both of these techniques assume you can re code parts of both, launcher and program.
DO NOT DEAL WITH THIS MEMBER
(Jun 28, 2013 09:54 AM)SIM-574702 Wrote: How about you corrupt part of program and have launcher fix it before running file but it saves uncorrupted version in TEMP. Keep launcher running but hidden so once the program is closed launcher deletes uncorrupted file and closes itself.
2nd idea is to check which program opened it ? If program is opened by explorer.exe just create msgbox saying "Start launcher" and if it's opened by launcher go to what you already have coded.
Both of these techniques assume you can re code parts of both, launcher and program.
Thanks for your message, I couldn't imagine the first method (corrupting the file) but I think it is a quite rudimentary method xD
Note that I can't edit the game code, just the launcher code :S
DO NOT DEAL WITH THIS MEMBER
Anyone would know another way to do it assuming that I don't have the Game.exe source?
I think it's not possible. Maybe you can create some container which will update game and than run it. It's not 100% sure because you still have to extract game somewhere and update it.
DO NOT DEAL WITH THIS MEMBER
(Jul 2, 2013 08:36 AM)SIM-574702 Wrote: I think it's not possible. Maybe you can create some container which will update game and than run it. It's not 100% sure because you still have to extract game somewhere and update it.
Yeah I was thinking on this idea:
I corrupt Game.exe, so when you start the game from Launcher.exe, Game.exe is "uncorrupted" and executed, then once it is opened I corrupt it again, so users can't open it directly, but I can't edit it while it is running, I can only rename it or move it to another folder. So this method is not very useful I think. 🙃
|