Posts: 127
Threads: 14
Joined: Feb 2008
Reputation:
1
11-20-2008, 08:38 AM
assmunk Wrote:Sorry for the noob question, but how do things like this actually work?
Well, I'm not posting my source code for reasons of personal property...
It gets the HLDS Updater from my site, and then starts each installer.
As simple as that although it takes quite a long time to code.
(500 something lines of code...)
Posts: 7,778
Threads: 176
Joined: May 2008
Reputation:
83
What language is it written in?(Script language).
Posts: 230
Threads: 23
Joined: Feb 2006
Reputation:
0
Visual Basic .Net Probably.
Posts: 7,778
Threads: 176
Joined: May 2008
Reputation:
83
Yes, but is it C++, C+ or C#? .
Posts: 127
Threads: 14
Joined: Feb 2008
Reputation:
1
Posts: 230
Threads: 23
Joined: Feb 2006
Reputation:
0
11-20-2008, 10:22 AM
(This post was last modified: 11-20-2008, 10:22 AM by jackaL.)
:O Visual Basic? No waiz
Posts: 127
Threads: 14
Joined: Feb 2008
Reputation:
1
jackaL Wrote::O Visual Basic? No waiz
Yes Sir.
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
The programs downloads the hldsupdate tool, auto-installs it, updates it (theoretically) and then passes the correct install line.
Many programing languages have a way to pass commands to the command line.
I've written batch scripts that do similar things. My friend then ported it over to C++ (I think) which was basically just sending my command to the command line. We used C++ because it lets us as the user for things that we otherwise could not.
Also, 500 lines seems VERY long for such a program. However I don't have much GUI exp...
~ Mooga ...w00t? - SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Posts: 127
Threads: 14
Joined: Feb 2008
Reputation:
1
11-20-2008, 11:42 AM
(This post was last modified: 11-20-2008, 12:56 PM by andersonmat.)
Mooga Wrote:The programs downloads the hldsupdate tool, auto-installs it, updates it (theoretically) and then passes the correct install line.
Many programing languages have a way to pass commands to the command line.
I've written batch scripts that do similar things. My friend then ported it over to C++ (I think) which was basically just sending my command to the command line. We used C++ because it lets us as the user for things that we otherwise could not.
Also, 500 lines seems VERY long for such a program. However I don't have much GUI exp...
It's 190 something lines, because its the same commands over and over.
I was thinking of another program when I said 500.. I really don't know where that came from...
I'll show you the source code... I guess...
Posts: 365
Threads: 20
Joined: Feb 2008
Reputation:
4
seams like a very useful tool, however it would be nice if i created every thing (server.cfg,motd, etc) and installed mods such has mani admin plugin
Posts: 230
Threads: 23
Joined: Feb 2006
Reputation:
0
That can be easily done, the server config part.
Posts: 365
Threads: 20
Joined: Feb 2008
Reputation:
4
true, but it would be a nice little addon
Posts: 230
Threads: 23
Joined: Feb 2006
Reputation:
0
I mean, easily done in coding.
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
Here's some problems and fixs.
Your making the installer download from YOUR server. That's a problem.
Download the hldsupdatetool from valve but re-name it something else. Then install it with these peramators:
Also, you should let the user chose where to install the server or put it where the file in running (like we did). Putting it in a set location makes your program only usable once (can't install in different areas). Also there are many reasons why someone might not want to install to that spot.
Here's part of the code me and LART used.
This code is open under the GNU license.
Code:
/*
* Copyright 2008 Brian Engert (lart@engert.us)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cout << "Downloading hldsupdatetool\n";
system("wget http://storefront.steampowered.com/download/hldsupdatetool.exe -O Hldsinstaller.exe");
cout << "\n\nextracting hldsupdatetool\n";
system("Hldsinstaller.exe /s /x ./");
system("del Hldsinstaller.exe");
cout << "\n\ninstalling tf2\n";
system("@title Installing TF2");
system("HldsUpdateTool.exe -command update");
_sleep(20000);
system("@title Installing TF2");
system("HldsUpdateTool.exe -command update -game tf -dir .");
~ Mooga ...w00t? - SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Posts: 127
Threads: 14
Joined: Feb 2008
Reputation:
1
Mooga Wrote:Here's some problems and fixs.
Your making the installer download from YOUR server. That's a problem.
Download the hldsupdatetool from valve but re-name it something else. Then install it with these peramators:
Also, you should let the user chose where to install the server or put it where the file in running (like we did). Putting it in a set location makes your program only usable once (can't install in different areas). Also there are many reasons why someone might not want to install to that spot.
Here's part of the code me and LART used.
This code is open under the GNU license.
Code:
/*
* Copyright 2008 Brian Engert (lart@engert.us)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cout << "Downloading hldsupdatetool\n";
system("wget http://storefront.steampowered.com/download/hldsupdatetool.exe -O Hldsinstaller.exe");
cout << "\n\nextracting hldsupdatetool\n";
system("Hldsinstaller.exe /s /x ./");
system("del Hldsinstaller.exe");
cout << "\n\ninstalling tf2\n";
system("@title Installing TF2");
system("HldsUpdateTool.exe -command update");
_sleep(20000);
system("@title Installing TF2");
system("HldsUpdateTool.exe -command update -game tf -dir .");
I was planning on adding a text box so that they could define the location that they wanted. I just never got around to it, because it would take some significant changes.
|