CasparCG server Build

Hello, I want to build the casparcg server from the source code. I am following this instruction “server/BUILDING.md at master · CasparCG/server · GitHub”.
My visual studio version is
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.11.1

Development using Visual Studio

  1. Install Visual Studio 2022.
  2. Install CMake (Download CMake).
  3. git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master
  4. cd casparcg-server-master
  5. mkdir build
  6. cd build
  7. cmake -G "Visual Studio 17 2022" -A x64 ../src
  8. Open CasparCG Server.sln
    I successfully build the CasparCG Server.sln

    I don’t know what is the next steps.
    I just open andtry to build the solution.

But getting error


Can anyone help me to build the solution

I have added a new section to the building guide, on how to make a distributable zip, instead of the development flow you are following.

And the build error you are seeing is also fixed, although wouldn’t happen with the newly documented flow.

1 Like

Can you share the link to that building guide?

Sorry, I meant to include that server/BUILDING.md at master · CasparCG/server · GitHub. The heading ‘Building distributable’

1 Like

Thanks a lot for the building guide.
I tried to build a following the instructions.
I didn’t install Cmake separately, It was already installed with my VisualStudio 2022 Ent.
Cmake

I successfully cloned the git.

Still getting errors while building.


Is there any additional requirement?

ah, that build script is assuming that it should be using visual studio community (except when running in github actions).

You will need to edit this line server/tools/windows/build.bat at 8ffe90740f3831c793df21f48952a0aa17d45973 · CasparCG/server · GitHub in your local copy of that file, replacing the Community with Enterprise.

Hopefully that will be enough to make it happy, I don’t have access to visual studio enterprise, so can’t test this myself

1 Like

Thanks a lot.

I tried another PC with Visual Studio 2022 Community
It runs the script But at the end, there is an error.
The system cannot find the path specified.

However, I checked the log and found casparcg.exe compiled.

I go to the directory and run casparcg.exe
wow, it’s run.

why getting this error?
The system cannot find the path specified.
You previously told me to change a line, but I am unable to find the exact line that needs to be changed.

Finally, it’s ok. I delete everything from the directory and start all processes again.

Now able to build with Visual Studio 2022 Ent
Just edit the batch file on this line.

set BUILD_VCVARSALL=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat

Again Thanks a lot for helping.

1 Like

I forgot to add to those steps that you need to install 7-zip for it to be able to make the zip file https://www.7-zip.org/

Or you can zip the dist/casparcg_server folder yourself