There is a new version of the forums ready for testing. Please post here if you're willing to help test! We could also use the help of coders!

Author Topic: Building solution 'Tests' on windows 10 with Visual Studio 2022  (Read 148 times)

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Trying to build the unit tests (Common.Lib.Test and Engine.app.Test, in solution Tests) of branch ags4
On windows 10 with Visual Studio 2022

Is there a help page? (I don't think so).
I think I need third-party libraries Allegro (4?)  and gtest. Anything else?


PS: Please tell me I can use a prebuilt version of Allegro and that I won't have to rebuild it myself.
« Last Edit: 08 Aug 2022, 13:22 by Monsieur OUXX »
 

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
I think I need third-party libraries Allegro (4?)  and gtest. Anything else?


PS: Please tell me I can use a prebuilt version of Allegro and that I won't have to rebuild it myself.


We no longer use a separate Allegro library. As of 3.6.0 (and similarly in ags4) we use stripped allegro4 sources, present in the libsrc directory, and link these directly in the project, as necessary.

Spoiler: ShowHide

Allegro4 is known to have a lot of internal dependencies, that make it difficult to link only few files. We did not resolve that yet (but it's still possible to do, probably, by editing the lib sources). So if you add one file there's a chance you'll have to add 10-20 others.
« Last Edit: 08 Aug 2022, 14:05 by Crimson Wizard »

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Sorry, I don't understand what you're saying. You're saying I need to use allegro.h from libsrc\allegro\include


But I don't need to build Allegro, right? Not even that stripped Allegro? Right?
 

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
What I am saying is: we no longer build Allegro as a library. We directly include its files into the project, when and if it is necessary.

If it's included into the project that you are trying to build, then it should be compiled automatically, along with the rest of the project's files.

What is the actual problem you are facing right now, are there any compilation or linking errors?
« Last Edit: 08 Aug 2022, 14:03 by Crimson Wizard »

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
If it's included into the project that you are trying to build, then it should be compiled automatically, along with the rest of the project's files.

Thanks.

Spoiler: ShowHide

New problem: In order to compile, Common.Lib.Test needs to have AGS_PLATFORM_TEST defined. am I supposed to set that manually (and if yes, how? Is it part of a larger configuration process), or am I missing something? (e.g. I'm not supposed to run that project myself but instead let the CI environment run it).

I see that this variable is mentioned in CMakeLists.txt but until now I didn't have to worry about CMake in Visual Studio. I don't even know how they integrate together, to be honest. I'm going to read this : https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170&viewFallbackFrom=vs-2019


This problem has disappeared, I don't even know how.



« Last Edit: 12 Aug 2022, 18:35 by Monsieur OUXX »