-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
base: development
Are you sure you want to change the base?
Conversation
9d5b905
to
c2eeeb3
Compare
There was a problem hiding this 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/
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
d14dbdd
to
9ce726b
Compare
There was a problem hiding this 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.
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/azframework_xcb_files.cmake
Outdated
Show resolved
Hide resolved
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will also require an update the documentation here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that you will need to work with sig-build to get the changes to the AR jenkins nodes from #17925 before this change, otherwise it will not pass AR.
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
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. |
Code/Framework/AzFramework/Platform/Common/Xcb/azframework_xcb_files.cmake
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.cpp
Outdated
Show resolved
Hide resolved
564b59a
to
88a7357
Compare
Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbNativeWindow.h
Outdated
Show resolved
Hide resolved
Ok, changes applied |
Code/Framework/AzFramework/Platform/Linux/platform_nativeui_linux.cmake
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/generate_splash_screen_header.cmake
Outdated
Show resolved
Hide resolved
Code/Framework/AzFramework/Platform/Common/Xcb/azframework_xcb_files.cmake
Outdated
Show resolved
Hide resolved
Ok this should do the trick, if you will give it a green light I will squash it all |
Please rebase and squash, fix DCO. |
dbc608d
to
9184367
Compare
If this is true, then we either have to update the minimum version of cmake in the documentation and in the cmake scripts. The other alternative is explicitly do a |
0e96b45
to
65d48cb
Compare
This version builds with older cmake |
Code/Framework/AzFramework/Platform/Linux/platform_nativeui_linux.cmake
Outdated
Show resolved
Hide resolved
Hi, @spham-amzn |
Also there is update of build config: #17925 |
@spham-amzn thank you for the help on this PR. It would be beneficial for this PR, if you would consider a second review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you will still need to work with sig-build to get the new xcb library on the jenkins build machines for AR or this may not pass. And you may want to send out an impactful change message on discord to broadcast the fact that new packages are needed now to build on Linux
@amzn-changml I think we need a issue for adding for xcb on build machines |
https://github.com/amzn-changml is there any update on this? |
The required dependencies have been updated. I ran AR, but it appears be failing on Windows. You might want to merge latest in Development |
d7067dc
to
3efde82
Compare
@amzn-changml Hi, do you know what might be the deal with failed tests there are failed tests in Android and windows but both of those mention libraries I haven't even touched and are not even remotely connected with this pr |
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]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time. (cleanup) Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time. (cleanup 2) Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time. (cleanup 3) Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time. (cleanup 4) Signed-off-by: Krzysztof Rymski <[email protected]> Now generates logo.h based on logo.png, this is then unpacked using lib png, so user can specify logo.png on compile time. (cleanup 4) Signed-off-by: Krzysztof Rymski <[email protected]> Removed lambda and logo is now tracked may change this later Signed-off-by: Krzysztof Rymski <[email protected]> Cleanup of variables Signed-off-by: Krzysztof Rymski <[email protected]> Now works with new file per project and all is behind ifdef so if file 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]> Applying requested changes xcb 3rdParty prefix removed xdd existance check Signed-off-by: Krzysztof Rymski <[email protected]> Removed prefix Signed-off-by: Krzysztof Rymski <[email protected]> Update Code/Framework/AzFramework/Platform/Linux/platform_nativeui_linux.cmake Co-authored-by: Michał Pełka <[email protected]> Signed-off-by: Krzysztof Rymski <[email protected]> Added license Added copyright license Signed-off-by: Krzysztof Rymski <[email protected]>
3efde82
to
6952798
Compare
Rebased onto development |
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.