-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Basic support for web wallpapers (#153) #196
Conversation
endif() | ||
endif() | ||
include(DownloadCEF) | ||
DownloadCEF("${CEF_PLATFORM}" "${CEF_VERSION}" "${CMAKE_SOURCE_DIR}/third_party/cef") |
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.
Download CEF to third_party/cef directory
@@ -41,9 +100,19 @@ include_directories( | |||
${FREEIMAGE_INCLUDE_DIR} | |||
${PULSEAUDIO_INCLUDE_DIR} | |||
src | |||
${CEF_INCLUDE_PATH} |
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.
Is not needed, because of 403 line
@@ -324,7 +397,16 @@ add_executable( | |||
${WAYLAND_SOURCES} | |||
) | |||
|
|||
target_link_libraries(linux-wallpaperengine | |||
COPY_FILES(linux-wallpaperengine "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${TARGET_OUTPUT_DIRECTORY}") | |||
COPY_FILES(linux-wallpaperengine "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${TARGET_OUTPUT_DIRECTORY}") |
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.
Copy files needed for CEF
if(!g_CEFused){ | ||
sLog.debug("No web wallpapers, shutting down CEF"); | ||
CefShutdown(); | ||
} |
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 wallpaper is not web, than close CEF
if (property != nullptr) | ||
project->insertProperty (property); | ||
std::string dependency = jsonFindDefault<std::string> (content, "dependency", "No dependency"); | ||
if(dependency=="No dependency"){ |
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 wallpaper have no dependencies, proceed normally
@@ -0,0 +1,387 @@ | |||
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights |
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.
CopyPasted this file
) | ||
list(APPEND CEF_CXX_COMPILER_FLAGS | ||
# -fno-exceptions # Disable exceptions | ||
# -fno-rtti # Disable real-time type information |
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.
Won't compile with this flag
libEGL.so | ||
libGLESv2.so | ||
libvk_swiftshader.so | ||
# libvulkan.so.1 |
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 don't want this file
appPointer = nullptr; | ||
if(g_CEFused){ | ||
sLog.debug("Shutting down CEF"); | ||
CefShutdown(); |
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.
Shutdown CEF if we had web wallpaper
|
||
sLog.exception ("Unsupported wallpaper type"); | ||
else if (wallpaper->is <Core::CWeb> ()) | ||
return new WallpaperEngine::Render::CWeb (wallpaper->as <Core::CWeb> (), context, audioContext, scalingMode); |
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.
Web is now supported
PR looks good and the backgrounds I tested seemed to work fine as long as no dependencies were required. Lacks support for multiple screens but I think this is something I can add on my own or can be done in a different PR. I'm merging it! Thanks for your contribution and sorry for the delay |
Fix for issue #153.
Short description
Added support for simple web wallpapers(like 3026516467 consisting of single html file) . If wallpaper have dependencies(like 3108493067), then program prints to user that dependencies are not supported and closes.