thestr4ng3r / chiaki

Moved to https://git.sr.ht/~thestr4ng3r/chiaki - Free and Open Source PS4 Remote Play Client
https://git.sr.ht/~thestr4ng3r/chiaki
2.18k stars 373 forks source link

Facing an issue when I wanna compile the Chiaki source in Visual Studio 2017. #208

Open TalaChartShiraz opened 4 years ago

TalaChartShiraz commented 4 years ago

Hi All... Let me have a special thanks to "thestr4ng3r". When I wanna compile the source code of Chiaki in VS2017 I encounter this error : " Severity Code Description Project File Line Suppression State Error CMake Error at lib/protobuf/CMakeLists.txt:4 (message): Could not find protoc lib/protobuf/CMakeLists.txt " I have no idea about "PROTOC-NOTFOUND". Also, I used CMake3.17.1 to compile but as I had thought I faced the same error. I would be grateful to help and guide me. Alireza

TalaChartShiraz commented 4 years ago

Guys... Who can introduce a simple manual (Tutorial or any stuff) to compile Chiaki's source on Windows by Visual Studio 2017 or even CMake builder? I need to compile "Chiaki Source" on Windows and honestly, I don't get familiar with CMake. Thanks in advance, Alireza

carlosmax3D commented 4 years ago

I tried to compile on Linux and I figure out that protoc its a binary, go through the project protocolbuffers/protobuf and install the binary from your system, then try again maybe you'll have to install more dependencies.

Also I'll recommend you to use the commands (if you didnt use it already): Clone with all the submodules git clone --recurse-submodules https://github.com/thestr4ng3r/chiaki.git

To update your current project with all the updated modules git pull --recurse-submodules

carlosmax3D commented 4 years ago

I tried to build this on Windows and I have to tell you something, IT'S A NIGHTMARE!, but nothing imposible. First of all you need the project with all the dependencies, then download OPUS (if the page it's down, look the cache of google and try to download the source or directly from github).

Download protocolbuffers/protobuf, unzip the archive and add that path to your system PATH.

Inside OPUS, go to the folder win32 and navigate in the folder you need to open the SLN to compile opus.

Add a new env var with the name INCLUDE with the path of the includes of OPUS (add also the root path and create a copy of include folder and rename it to opus)

Add to your PATH the folder with the opus lib files created previously by VS or get it from appvoyeour.

Download strawberry perl and clone openssl from github, ensure RC command it's known by your command prompt, follow the steps to compile OPENSSL it tooks a lot of time but it creates a .LIB succesfully.

Add the env variable OPENSSL_ROOT_DIR with the root directory of your OPENSSL repository.

Download SDL2 and add to the environment vars

Also download FFMPEG but I recommend you to download it from zeranoe page, its more easy than build all the components by yourself

Then download QT5 from the webpage and install the sources, the prebuilted libs and all the little packages. Its around 7 GiB, I dont know if everything its necessary but anyway, add QT files to your environment variables and voila!, just execute again cmake . and all the dependencies should be found.

PD. maybe you have to install mingw to build openssl but I'm not sure.

hobby-lc commented 4 years ago

About the build instruction in VS2017, you may notice the Windows build is compiled using the AppVeyor services.

You may reference to the script appveyor.sh for the setup of the build environment and the steps for building the application. FYI.

https://github.com/thestr4ng3r/chiaki/blob/master/scripts/appveyor.sh

carlosmax3D commented 4 years ago

I don't know how appvoyeur takes SDL library, I can't compile the project, Ninja and VS request me the file 'SDL2::SDL2-NOTFOUND.obj', and I don't know why, I cloned the SDL repo and compile everything, then use the copiled files and always the same on Windows

hobby-lc commented 4 years ago

@carlosmax3D Use the release library from SDL You may need to adjust the CMAKE for SDL root folder (for setup the environment for including SDL library).

https://github.com/thestr4ng3r/chiaki/blob/e116d3fa4c6f9b85652a2e19158ffb60d04f2e96/scripts/appveyor.sh#L31-L36

I don't know how appvoyeur takes SDL library, I can't compile the project, Ninja and VS request me the file 'SDL2::SDL2-NOTFOUND.obj', and I don't know why, I cloned the SDL repo and compile everything, then use the copiled files and always the same on Windows