Server Help

ASSS Custom Projects - Update.exe for ASSS

BDwinsAlt - Tue Sep 19, 2006 8:13 pm
Post subject: Update.exe for ASSS
[Instructions at the bottom of this post]

I made an update.exe for ASSS since there isn't one already added to the release. This one actually let's you download continuum 0.39 pr1 from a mirror that works. I'll supply the source code and an example file. (File attached at the bottom of this post.)

Code: Show/Hide

#include <windows.h>
#include <iostream>

using namespace std;

int main()
{
   cout << "Your browser will launch and you will be sent to a continuum upgrade site." << endl;
   cout << "This window will close in 10 seconds of popping up." << endl;
   ShellExecute(NULL, "open", "http://bradav.freehostia.com/contupgrade.html",
                NULL, NULL, SW_SHOWNORMAL);
   Sleep(10000);
   return 0;
}


If you think some other code would be better or something go ahead and make your own update.exe

1. Place update.exe in your ASSS folder under 'clients'. Do not rename this, you must have it named update.exe.
2. Try entering your ASSS zone with continuum 0.38 and watch what happens.

If you want to compile the code yourself (if you don't trust me), then compile it and follow the instructions above.

Hope this helps!
Mine GO BOOM - Wed Sep 20, 2006 3:14 am
Post subject:
Why in the world would you not use GetContinnum.com? It looks pretty and has extra information.

Simpler project (MSVC):
Code: Show/Hide
#include <windows.h>

#pragma comment (linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")

int main()
{
   ShellExecute(NULL, "open", "http://www.getcontinuum.com/", NULL, NULL, SW_SHOWNORMAL);
}

The pragma disables showing a blank command prompt. Problem is that MSVC 6.0 won't get this under 32k (ugh). So, Dev-C++ with a Windows project:
Code: Show/Hide
#include <windows.h>

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)
{
   ShellExecute(NULL, "open", "http://www.getcontinuum.com/", NULL, NULL, SW_SHOWNORMAL);
   return 0;
}

17.2k, a little better. Using upx on this got it to 15k, but I wouldn't trust that exe on all systems, so ignoring that.

A better option would be to have a program that actually would run a script to download the latest version, but this works just as well.
Solo Ace - Wed Sep 20, 2006 8:13 am
Post subject:
I knew my post would get 'junked', oh well.

Well, yeah, you should just have a .bat and wget do the work.
Dr Brain - Wed Sep 20, 2006 2:04 pm
Post subject:
'wget' is not recognized as an internal or external command,
operable program or batch file.
Doc Flabby - Wed Sep 20, 2006 2:48 pm
Post subject:
not all computers have wget.

Actutally this update.exe opens up an interesting idea. i will think more.
Solo Ace - Wed Sep 20, 2006 2:51 pm
Post subject:
Shaddap Brain, of course you'd have to include it.
Dr Brain - Wed Sep 20, 2006 3:33 pm
Post subject:
How would you include it inside update.exe, exactly?
Mine GO BOOM - Wed Sep 20, 2006 4:36 pm
Post subject:
Self extracting executable. Would extract wget to temporary folder, call it with the correct url, then execute that installer. But doing this would be pretty blind to the user running the executable, so a better option would just be to have the executable download the file itself, or be a graphical interface for wget showing the current download speed/percentage.

The best option I can think of is to use Nullsoft Scriptable Install System, which can create a tiny web install application. NSIS only has 34k overhead, which means the update.exe will still be tiny.
Solo Ace - Thu Sep 21, 2006 2:45 am
Post subject:
Actually, I was talking about a .bat. By "including" I meant including wget in the ASSS distribution.

Mine GO BOOM wrote:
A better option would be to have a program that actually would run a script to download the latest version, but this works just as well.

Solo Ace wrote:
Well, yeah, you should just have a .bat and wget do the work.

Dr Brain wrote:
'wget' is not recognized as an internal or external command,
operable program or batch file.

Doc Flabby wrote:
not all computers have wget.

Solo Ace wrote:
Shaddap Brain, of course you'd have to include it.

Dr Brain wrote:
How would you include it inside update.exe, exactly?

In a .bat you mean? You wouldn't, you'd include it in the asss distrubution, next to the .bat.
Otherwise, if in an .exe, I'd probably do it the way MGB just posted about.
Dr Brain - Thu Sep 21, 2006 8:47 am
Post subject:
Including it with asss wouldn't help the client that's trying to update continuum.
Solo Ace - Thu Sep 21, 2006 8:49 am
Post subject:
Oh is that the purpose of this? biggrin.gif Oops. icon_smile.gif
Smong - Sat Sep 23, 2006 5:05 am
Post subject:
Once I tried to make one of those self extracting zipfiles, I got a bit bogged down with trying to get colors.bm2 to go into the correct folder. I also spent a while trying to find one that didn't have an interactive element.

Anyway, I would have thought it would be better to be redirected to a download than to do it through the server. It also gives the player more control/choice.
D1st0rt - Sun Sep 24, 2006 5:09 pm
Post subject:
Wouldn't it be tricky to modify a running process? Or are we assuming they would have to restart the program before entering the zone.
Smong - Sun Sep 24, 2006 7:09 pm
Post subject:
I think cont executes update.exe and quits at the same time. Anyway I probably left the name of the new exe as continuum39pr1.exe or something so never ran into that issue, not very good for a seamless upgrade I must admit.
Doc Flabby - Mon Sep 25, 2006 11:54 am
Post subject:
Can u get continuum to prompt to update even if its version is the latest already (0.39pr1) ?
Anonymous - Mon Sep 25, 2006 8:17 pm
Post subject:
Probably, but it'd get annoying everytime you enter the zone, people will start to ignore it.
Quan Chi2 - Fri Sep 29, 2006 8:01 pm
Post subject:
D1st0rt wrote:
Wouldn't it be tricky to modify a running process?


I guess you could use FindWindow(), WriteProcessMemory(). Of course, those functions take temporary effect on the process targeted.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group