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

Update SDL and fix windows builds #172

Merged
merged 9 commits into from
Jul 4, 2024
Merged

Conversation

hugglesfox
Copy link
Contributor

Description

This is the sibling PR to splashkit-external#7. Additionally this PR removes linking to sqlite for windows, removes the prebuilt dependencies for windows (talked to Andrew, these are redundant as we can use the system libraries from Msys2) and updates the cmake minimum version (removes a deprecation warning).

Untested for MacOS

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • Documentation (update or new)

How Has This Been Tested?

Successfully builds tests on Linux and Windows

Testing Checklist

  • Tested with sktest
  • Tested with skunit_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

This change is to be commited alongside the changes in
splashkit-external
Also update the linker flags to link with the Msys provided libs
@macite
Copy link
Member

macite commented Apr 9, 2024

We need to keep the lib/win64 libraries as these are used in the deploy to avoid people having to install the different package separately (though maybe we should change this)

Have a look at the cmake file in the scripts/cmake/libsplashkit subfolder and copy the idea of using the pacman installed sdl libraries.

Copy link
Member

@macite macite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Retain libraries for now
  • Update projects to use pacman installed libraries

@hugglesfox hugglesfox force-pushed the update_sdl branch 3 times, most recently from eb24cd6 to aa87f1f Compare April 16, 2024 01:51
When changing over to using pkg-config for configuring the windows
builds, it added the -mwindows link flag. This causes the compiler to
load the problem via WinMain rather then main.

However SDL2 is able to provide a WinMain which does windows specific
setup then calls main as expected on unix system. In order to use it we
need to include the SDL header where the test main functions are
defined.
@hugglesfox
Copy link
Contributor Author

hugglesfox commented Apr 16, 2024

I believe this is now done. Check the commit description in regards to why the SDL headers have been added to the test main files.

In regrads to the CI failures, the macOS build depends on the changes in splashkit-external before it'll pass and it appears the windows build environment doesn't have SDL installed (EDIT: Fixed!).

@hugglesfox hugglesfox requested a review from macite April 16, 2024 02:47
@macite macite merged commit 2c2e875 into splashkit:develop Jul 4, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants