1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00

Add index.html copy step to macos version

This commit is contained in:
Elias Steurer 2021-11-01 19:02:39 +01:00
parent 83d4f425c4
commit c0cfef1536
2 changed files with 7 additions and 1 deletions

View File

@ -71,6 +71,12 @@ target_link_libraries(
if(APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/index.html
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}.app/Contents/MacOS/)
endif()
if(WIN32)

View File

@ -41,7 +41,7 @@ Item {
WebEngineView {
id: webView
anchors.fill: parent
url: Wallpaper.getApplicationPath() + "/index.html"
url: Qt.resolvedUrl("file://"+ Wallpaper.getApplicationPath() + "/index.html")
onJavaScriptConsoleMessage: (lineNumber, message) => print(lineNumber,
message)
onLoadProgressChanged: {