Skip to content
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

Upgrade Windows projects to VS 2019 #2241

Open
3 tasks
ivan-mogilko opened this issue Nov 26, 2023 · 5 comments · May be fixed by #2591
Open
3 tasks

Upgrade Windows projects to VS 2019 #2241

ivan-mogilko opened this issue Nov 26, 2023 · 5 comments · May be fixed by #2591
Labels
context: deployment related to deploying AGS releases and related materials context: project related to the project and its organization what: editor related to the game editor what: engine related to the game engine what: installer related to the editor's installation program

Comments

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Nov 26, 2023

VS 2015 free Community Edition is deprecated by Microsoft, and is no longer available for download from their official page (although there are still "unofficial" ways to acquire it).

At the same time the latest VS 2022 does not install on Windows 7, which I still use unfortunately. I might have to upgrade to Win10 or 11 soon, as more and more apps stop supporting it in their updates, but that will take some time.

Therefore I suggest to first move to VS 2019, as a temporary measure. According to this Microsoft's page the VS 2019's lifecycle is scheduled to end in 2029.

As we have a 3.6.1 coming towards a full stable release, I would not like to apply these changes to ags3 branch just yet. Instead I propose to begin with ags4 branch, and apply this change to ags3 only after 3.6.1 is fixed in a separate "release-3.6.1" branch. EDIT: 3.6.2 is still in beta, so theoretically we may switch it to 2019.

The changes to the project might include:

  1. Upgrade the VS solutions and projects.
  2. Fix any new compilation errors and outstanding warnings.
  3. Switch to the newer "VC runtime" dependency, make certain that it runs on Windows 7 at least.
  4. Replace VC runtime dependency in the AGS Editor's installer, readmes etc.
  5. Low priority: check if it's still possible to build engine for Windows XP, using a separate configuration.

Task list, for keeping the record:

  • Update to VS 2019 in ags3 branch
  • Update to VS 2019 in ags4 branch
  • Update projects and make/cmake scripts to C++14.
@ivan-mogilko ivan-mogilko added what: editor related to the game editor what: installer related to the editor's installation program context: deployment related to deploying AGS releases and related materials what: engine related to the game engine context: project related to the project and its organization labels Nov 26, 2023
@ivan-mogilko ivan-mogilko added this to the 4.0.0 (preliminary) milestone Nov 26, 2023
@ericoporto
Copy link
Member

ericoporto commented Nov 26, 2023

This has to be done in a PR and not with direct commits, as I believe after it's all done it won't build due to #1508, so once this is upgraded, the Windows Docker has to be changed too.

Questions:

  • which Windows SDK to use? (we are using Windows 8.1)
  • which build tools (we are using v140)

@ivan-mogilko
Copy link
Contributor Author

ivan-mogilko commented Mar 7, 2024

I think we might as well move to at least to C++14 already.
I would also consider C++17, because it has generic filesystem api, but will have to investigate if all ports will be able to support that, so this may be done later.

@ericoporto
Copy link
Member

ericoporto commented Mar 7, 2024

C++14 is holdback for how old Linux we want to go. We are using Debian 8 (Jessie) and currently the stable release is Debian 12 (Bookworm).

Debian 10 (Buster) which is LTS already includes C++17 support.

In C++17, std::optional requires a polyfill for Apple Clang (which doesn't support it). I used this when I wrote my parsing of acsetup.cfg in my tool agsconfig.

One good thing of having C++14 is the possibility to upgrade Google Test library, we are using two different old versions for specifically working around some issues in it. It appears this issues having been minimized in more recent versions. The other good thing is currently MinGW fails to build our tests due to some issue with the specific googletest we use, MinGW and SDL, and it looks like this error doesn't happen in recent googletest. I am still looking around to actually see if there's something on our code that could fix the specific compile error that happens - this is why I haven't put a CI with MinGW yet, I can build AGS but not the tests.

@edmundito
Copy link
Contributor

FWIW, I've been using 2022/C++ 17 with trivial adjustments and can contribute to the engine and editor without issues. So, the 2019 upgrade is OK with me.

@edmundito
Copy link
Contributor

I pushed my changes for VS 2022 here for reference:
master...edmundito:ags:edmundito/vs2022-compat

I just updated the latest version of 2022 (17.10.3) and had to:

  • Specify all versions of C# to 8.0 (maybe the lowest compatible version it currently supports)
  • Add an x86 as target (I just saw any CPU when I loaded)
  • Let VS update the version info in the solution

@ivan-mogilko ivan-mogilko linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: deployment related to deploying AGS releases and related materials context: project related to the project and its organization what: editor related to the game editor what: engine related to the game engine what: installer related to the editor's installation program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants