KVIrc
KVIrc copied to clipboard
Please update steps to compiling KVIrc source code for VS 2019! Thanks.
The documentation at: "https://github.com/kvirc/KVIrc/wiki/Compiling-KVIrc-on-Windows" is all over the place and seems confusing. Please clarify it as to how we can import KVIrc source code in Windows 10 (VS 2019 CE) and compile it. It seems as if Visual Studio IDE is not even used in the compilation process (other than nmake on command line).
In certain section of the page Visual Studio Express is mentioned, then MINGW. It would be nice if the steps were clearer. Thanks
I have tried the following line to try to compile the code but it keeps giving me error regarding Qt5WebKitWidgets: https://pastebin.com/VvXpfERB
It's not an error, it's a warning. Qt5WebKitWidgets are available only up to Qt 5.5, they have been removed in 5.6.
How do I fully compile KVIrc for Windows? Have I entered the right commands on the CLI?
The problem you are experiencing seems due to these errors:
CMake Error at po/modules/CMakeLists.txt:7 (subdirs):
subdirs Incorrect SUBDIRS command. Directory: log does not exist.
CMake Error at src/modules/CMakeLists.txt:27 (subdirs):
subdirs Incorrect SUBDIRS command. Directory: log does not exist.
If we look at the content of the specified file, we can see it contains a list of some subdirectories: https://github.com/kvirc/KVIrc/blob/master/po/modules/CMakeLists.txt#L13 It looks like your copy of the kvirc repository is incomplete and is missing at least the "po/modules/log" "src/modules/log" and subdirectories.
Ok
Thank you!
So with my command I create the Cmake files for VS 2019 and then I can compile the rest of the code using VS 2019 IDE, correct?
Cmake "converts" the CMakeLists.txt into a Visual studio project/solution (.vsproj/.sln). You can then open the solution in the Visual Studio GUI or compile the project from a commandline (using msbuild)
KVIrc is made up of 3 different components:
- kvilib is a basic library, it needs to be compiled first;
- kvirc is the main executable, it has to be compiled second;
- modules are plugins, they have to be compiled last.
The error related to "kvilib.lib" seems to suggest you are trying to compile kvirc but kvilib has note been compiled yet. The error related to "zlib.lib.lib"looks strange because of the double extension.. it could be due to a problem in cmake looking for the libraries.. but you can correct it manually inside Visual studio
-- Git failed (not a repo, or no tags). Build will not contain Git revision info.
Did you download the repo as a zip instead of using a git checkout?
I used "git clone https://github.com/kvirc/KVIrc.git" By the way @ctrlaltca, after creating the VS .sln file after CMAKE and opening it with VS2019, why does VS2019 show me 77 projects in the Solution Explorer? Which file do I select to start the build process?
I guess I click on the main Solution 'kvirc' (77 of 77 projects) and click on Build, right?
If I do so, I see lots of vsproj related errors in the console window below while compiling.
These are the steps I used to get a working build in VS2019/Qt 5.12.6: > My repo dir was C:\dev\KVIrc > My build dir was C:\dev\KVIrc\build
In a command window, go to where you want to put the repo: > cd C:\dev
Clone repo > git clone https://github.com/kvirc/KVIrc.git
Enter repo, create and enter build directory *> cd KVIrc* > mkdir build > cd build
Setup environment. In the guide under the bold "Compilation" title, these are the commands from the second bullet point. You have to modify these paths according to your environment. I wanted the repo in a different directory than the guide, I'm using Qt 5.12.6 & VS2019. > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" > set PATH=%PATH%;%YOURENVIRONMENTPATHES%
Build shit. > cmake .. -G "NMake Makefiles" > nmake > nmake install
Now under C:\dev\KVIrc\build\src, I have a KVIrc.exe executable that I can now run. The website's guide covers copying the required files into C:\dev\KVIrc\build\src so that KVIrc will start. Since I had most of them in my %PATH%, i only needed to copy qplatform/qwindows.dll.
If I want to open in VS2019 I do: > Open VS2019. > Click continue without code. > File -> Open -> Cmake. > Select C:\dev\KVIrc\CMakeLists.txt.
I will say that this is my first experience with a Cmake project but it seems to be working for me. I'm still missing a few packages but I haven't had time to work on this further.
- 600 edits to fix formatting
Which prompt do I use to run all those commands above ("cmake, nmake") ? Using native tools (x86 or x64) ? Also did you use the 64 bit version of 32 bit version of ZLIb in your compilation?
Closing, feel free to reopen for any other question