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

Working splash screen in Linux GameLauncher #17913

Open
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

Fireronin
Copy link

@Fireronin Fireronin commented May 13, 2024

What does this PR do?

This PR allows for setting of splash screen that is rendered using xcb, therefore it removes black screen while renderer is working.

Splash screen image is passed via xxd generated .h file during compilation, from png file named logo.png

The use of generic malloc for data vector and not AZ vectors is due to the fact that functions like xcb_destroy_image, expect ability to deallocate vector with data.

It adds dependency on libxcb-image0-dev

How was this PR tested?

It was tested in debug builds, of project.

@Fireronin Fireronin requested review from a team as code owners May 13, 2024 09:36
@michalpelka michalpelka changed the title Working splash screen Working splash screen in Linux GameLauncher May 13, 2024
Copy link
Contributor

@michalpelka michalpelka left a comment

Choose a reason for hiding this comment

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

I cannot accept a change, since it needs a hardcoded location of the cache folder concerning executable. It, most probably, works only with developers' setup when the GameLauncher target is built. I would suggest testing the monolithic build and trying to run the install target.
Refer to https://development--o3deorg.netlify.app/docs/user-guide/interactivity/robotics/deploying-simulation/ https://development--o3deorg.netlify.app/docs/user-guide/packaging/

Signed-off-by: Krzysztof Rymski <[email protected]>

Initial fixes

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part2

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part3

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part4

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part4

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part4

Signed-off-by: Krzysztof Rymski <[email protected]>

Undoing formating part4

Signed-off-by: Krzysztof Rymski <[email protected]>

Cleanup

Signed-off-by: Krzysztof Rymski <[email protected]>

Cleanup - move function as private

Signed-off-by: Krzysztof Rymski <[email protected]>
Copy link
Contributor

@spham-amzn spham-amzn left a comment

Choose a reason for hiding this comment

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

We cannot use the approach of checking in the splash screen as binary data for the splash screen since the splash screen will be specific to the launcher. It needs to be an image that is specific to the project itself, so there probably needs a mechanism to do this that is outside of the asset processor itself during the build to generate the splash screen image as part of the build process.

…ib png, so user can specify logo.png on compile time

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time. (cleanup)

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time. (cleanup 2)

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time. (cleanup 3)

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time. (cleanup 4)

Signed-off-by: Krzysztof Rymski <[email protected]>
…ib png, so user can specify logo.png on compile time. (cleanup 4)

Signed-off-by: Krzysztof Rymski <[email protected]>
@byrcolin byrcolin added sig/build Categorizes an issue or PR as relevant to SIG Build. sig/core Categorizes an issue or PR as relevant to SIG Core labels May 14, 2024
@byrcolin byrcolin requested review from a team May 14, 2024 16:15
@@ -48,6 +48,7 @@ elseif("$ENV{O3DE_PACKAGE_TYPE}" STREQUAL "DEB")
libxkbcommon-dev # For xcb keyboard input
libxcb-xfixes0-dev # For mouse input
libxcb-xinput-dev # For mouse input
libxcb-image0-dev # For xcb image support
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are adding another xcb package dependency, then it also needs to be added to the build node initialization list, i.e. https://github.com/o3de/o3de/blob/development/scripts/build/build_node/Platform/Linux/package-list.ubuntu-jammy.txt .
And also in order for AR to run successfully, the linux nodes will need to be rebuilt first with the new nodes, which means that change may need a separate PR to go in first, and then coordination with sig-build is needed to propogate the changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Fireronin could you prepare a separate PR as @spham-amzn proposed and link here.

Copy link
Author

Choose a reason for hiding this comment

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

Here is pr you asked for

#17925

@spham-amzn
Copy link
Contributor

I think the logic to process the splash screen for the launcher belongs in the LauncherUnified project and not in AzFramework. The generation of the logo.h should be based on a png file that exists in the game project itself, and that file should go into the intermediate build folder with the include path appended instead of placing it directly in AzFramework.

Signed-off-by: Krzysztof Rymski <[email protected]>
@michalpelka michalpelka self-requested a review May 16, 2024 14:03
@michalpelka michalpelka dismissed their stale review May 16, 2024 14:05

By mistake.

@Fireronin Fireronin force-pushed the xcb-splashScreen branch 2 times, most recently from f0bc6fe to d922f44 Compare May 27, 2024 15:31
…e is not present functionality will not be compiled in

Signed-off-by: Krzysztof Rymski <[email protected]>

Fancy cmake, and bug fix

Removed todo

Signed-off-by: Krzysztof Rymski <[email protected]>

Reduced macro use, dco retrigger

Signed-off-by: Krzysztof Rymski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/build Categorizes an issue or PR as relevant to SIG Build. sig/core Categorizes an issue or PR as relevant to SIG Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants