Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.34k stars 910 forks source link

Stuck with building the program #130

Closed dspaan closed 11 years ago

dspaan commented 11 years ago

Hey there and first off thanks for creating and releasing this!

I'm not a coder and have never written a program before. I am however familiar with setting up TF2 servers and editing config files. The readme file is clear for the most part but i'm stuck on how i should compile and run the program.

Do i need visual studio for this? I'm stuck on this part:

3.Build the program. Since SteamKit2 is licensed under the LGPL, and SteamBot should be released under the MIT license, SteamKit2's code cannot be included in SteamBot. This includes executables. 4.We'll probably make downloads available on GitHub. Continue on like normal.

Which file do i open? (i've opened SteamBot.sln in Visual Studio) How do i compile? (i used the Build button, what should the result be?) I don't follow the part about SteamKit2. What do i have to do?

cwhelchel commented 11 years ago

I'm working on updating the README to include some more info. I'll provide some very basic stuff. Here's a recap for you:

HTH

dspaan commented 11 years ago

I did all the steps including step 0 and i succesfully compiled SteamBot.exe with VS. But when i ran the exe nothing happened (saw a window popup and close). Do i need to install additional software?

PS: I didn't edit SimpleUserHandler.cs yet.

cwhelchel commented 11 years ago

You configure settings.json?

dspaan commented 11 years ago

Yes, i edited it with Notepad++

"Admins":["76561198000960203"], "ApiKey":"**", "mainLog": "syslog.log", "Bots": [ { "Username":"**_", "Password":"_", "DisplayName":"TestBot", "ChatResponse":"Hi there bro", "logFile": "TestBot.log", "BotControlClass": "SteamBot.SimpleUserHandler", "MaximumTradeTime":180, "MaximumActionGap":30, "DisplayNamePrefix":"[AutomatedBot] ", "TradePollingInterval":800, "LogLevel":"Success" } ] }

I have valid information where the ****\ are.

cwhelchel commented 11 years ago

Start the executable thru the command line directly (cmd.exe on windows). Not double clicking the executable. This will at least show you the error that its giving, instead of just shutting down automatically.

dspaan commented 11 years ago

It points to my settings file: C:\Users\Dennis\Documents\GitHub\SteamBot\SteamBot\bin\Debug>steambot.exe Configuration File Does not exist. Please rename 'settings-template.json' to 'se ttings.json' and modify the settings to match your environment

But that is already correctly renamed:

C:\Users\Dennis\Documents\GitHub\SteamBot\Bin\Debug>dir Volume in drive C has no label. Volume Serial Number is 6CFE-3CED

Directory of C:\Users\Dennis\Documents\GitHub\SteamBot\Bin\Debug

02-01-2013 01:14

. 02-01-2013 01:14 .. 01-01-2013 19:29 606 settings.json 01-01-2013 20:16 11.600 Src.vshost.exe 17-03-2010 22:39 490 Src.vshost.exe.manifest 3 File(s) 12.696 bytes 2 Dir(s) 3.613.057.024 bytes free

teliosdev commented 11 years ago

This is a problem of incorrect directory locations. You're running SteamBot.exe from C:\Users\Dennis\Documents\GitHub\SteamBot\SteamBot\bin\Debug, with settings that exist in C:\Users\Dennis\Documents\SteamBot\Bin\Debug, which are not the same directories. Move the settings.json file from the latter directory into the former directory.

cwhelchel commented 11 years ago

@redjazz96 Perhaps the settings-template.json should be moved to SteamBot\Steambot\bin\Debug. I've been thinking this would be a small issue and am working on a branch which does this and updates the README.

teliosdev commented 11 years ago

@cwhelchel Personally, I like it being in SteamBot\Bin\Debug; otherwise, what's the point of the SteamBot\Bin folder? So I, for one, think we should move the build path.

Besides, when you're using it for production, aren't you supposed to build it using Release instead of Debug?

cwhelchel commented 11 years ago

Yeah. The build output should point to SteamBot\Bin. Also the template should be copied to a new folder SteamBot\Bin\Release.

It's kind of a small point, as long as it's properly documented. I'll change what I've got to point to the build output to new location (so we won't have to tell people to move the settings file).