SRCDS Steam group


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Utility] - Dedicated Server Installer
#16
Rolleyes 
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...)
Download My Dedicated Server Installer! - Click Here
Did I help? 'Reputation' Me! - Click Here
Reply
#17
What language is it written in?(Script language).
Reply
#18
Visual Basic .Net Probably.

Reply
#19
Yes, but is it C++, C+ or C#? Smile.
Reply
#20
Visual Basic
Download My Dedicated Server Installer! - Click Here
Did I help? 'Reputation' Me! - Click Here
Reply
#21
:O Visual Basic? No waiz

Reply
#22
jackaL Wrote::O Visual Basic? No waiz

Yes Sir. Toungue
Download My Dedicated Server Installer! - Click Here
Did I help? 'Reputation' Me! - Click Here
Reply
#23
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
[Image: 76561197965445574.png]
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.
Reply
#24
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. Wink
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...

Code:
Removed.
Download My Dedicated Server Installer! - Click Here
Did I help? 'Reputation' Me! - Click Here
Reply
#25
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
[Image: 3386928252.png]
Reply
#26
That can be easily done, the server config part.

Reply
#27
true, but it would be a nice little addon Toungue
[Image: 3386928252.png]
Reply
#28
I mean, easily done in coding.

Reply
#29
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:
Code:
/s /x ./

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
[Image: 76561197965445574.png]
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.
Reply
#30
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:
Code:
/s /x ./

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.
Download My Dedicated Server Installer! - Click Here
Did I help? 'Reputation' Me! - Click Here
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)