-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing the if statements in handleCommand() #34
Comments
Hello, i tryed to run your program, but it doesn't have start script in this path (....\Server\src\scripts\run_exec.bat). Could you add it? |
According to the current configuration, the run_exec.bat script should be generated automatically upon running the Server.exe file by the create_start_script() function inside Server::setupPort(). This function is attempting to create the run_exec.bat file at the specified absolute path. The create_start_script() function also logs an error message "Failed to create start script" into a log object if it fails to create the script for some reason. Can you please check any logs or console outputs for this specific error message? Any error message you can provide will be very helpful in troubleshooting this further. |
Forget to say, the build.bat script couldn't create Server.exe, it was a problem with sqlite3.dll. May be i do smth wrong, but the sqlite3.dll is downloaded from official site and put in the root. In command line i get this error "C:\Users\ahvostov\sqlite-dll-win-x64-3450300\sqlite3.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x370 [C:\Users\ahvostov\Datatransmission\build\Server\Server.vcxproj]". Then i tried to do it with sqlite3.lib file and Server.exe was created, but "Failed to create start script". So problem apparantly that I shouldn't build with .lib file. When i change the CMakeLists.txt of Server like this: log.txt: Shouldn't it be a "run_exec.bat" in Server\src\scripts\run_exec.bat? |
Hmm, with the lib file it should work fine, you could try to comment this in Server::setupPort() if(create_start_script(cwd.string(), port) != 0) {
log << "Failed to create start script" << std::endl;
return false;
} and create your own run_exec.bat file like this for now
|
Now it just don't logs "Failed to create start script". In console "The system cannot find the path specified." and program hangs. |
Could you show me the .bat file you created and with what command line args you're running the program with? It's kinda hard for me to debug it without having the same issue, it might be a good idea to step through the program wiht a debugger |
.bat : ./Server.exe -p 27015 -n ahvostov password --set-startup |
The path should be "C:\Users\ahvostov\Datatransmission\build\Server\Release\Server.exe" instead of "\c\Users\ahvostov\Datatransmission\build\Server\Release\Server.exe" |
nothing changed... thx for your response, i'll keep trying myself, perhabs i'm too newbie for now |
Does it still say that it cant find the path? |
Yes, the same msg "The system cannot find the path specified." |
Have you tried to go to the executable in file explorer and copy the absolute path from there? |
Yes, this is exactly that path |
try to run the program without --set-startup |
without this it said : I put it near the Server.exe, and again : |
Did you install lz4 using vcpkg? |
yes |
I'll try to do everything from beginning at home in the evening and give you feedback. So, was i right, that it must be a sqlite3.lib instead of .dll in CMakeLists? |
Since I didn't get a .lib file i used the .dll to link with and it works fine on my machine, but typically it should be a .lib file yeah |
Have you added the vcpkg bin directory to your path? then you don't have to put it in the same directory and maybe it works then, I'm not really sure why it can't find the dll otherwise |
the same problem... $ ./build.bat "C:\Users\ZBook\vcpkg\installed\x64-windows\bin" "C:\Users\ZBook\vcpkg" sqlite3.dll, lz4.dll placed in bin folder. Got error: C:\Users\ZBook\vcpkg\installed\x64-windows\bin\sqlite3.dll : fatal error LNK1107: invalid or corrupt file: cannot read at |
This is really weird, I'll check tomorrow when I have time. I'm not really sure why that is though |
Instead of setting the direct path, i wrote this in CMakeLists:
With this it builds succesfully. Than i dealed with automatically creating of run_exec.bat, by changing helper.cpp:
instead of
Now it just wrights "Ok." in command line. Is it a right behavior? |
Yeah, that's the right behaviour, the issue was with the different ide build systems. I'm glad it works now. |
Now client don't see lz4.dll, i put it near him and it works. When i try to connect to server client says "Credentials are invalid" and server stops with msg "The system cannot find the path specified.". The name and password are the same. Did you have this problem? |
Don't know what's up with cmake, but i created new server project in VS with your code and it works without any problems... |
So everything works fine now? |
Yes, everything works fine. But I guess we should deal with cmake building
for other potential developers.
Can I write you here, on email ?
|
Do you have discord? I feel like thats easier |
I haven't, but ok, I'll install tomorrow
|
my nickname ahvostov |
I added you |
This can be done using this approach
The text was updated successfully, but these errors were encountered: