[rkward] /: Compile in kxmlgui .rc files
Thomas Friedrichsmeier
null at kde.org
Fri May 4 11:47:27 UTC 2018
Git commit 36f464d9b9e22282472c92512bdd3cd08fa97913 by Thomas Friedrichsmeier.
Committed on 04/05/2018 at 11:46.
Pushed by tfry into branch 'master'.
Compile in kxmlgui .rc files
This should fix some cross-platform worries.
(needs KF5 >= 5.4, but that should be tolerable)
M +1 -1 CMakeLists.txt
M +1 -0 ChangeLog
M +4 -4 rkward/CMakeLists.txt
M +1 -8 rkward/dataeditor/CMakeLists.txt
M +0 -6 rkward/misc/CMakeLists.txt
A +19 -0 rkward/resources.qrc
M +0 -13 rkward/windows/CMakeLists.txt
https://commits.kde.org/rkward/36f464d9b9e22282472c92512bdd3cd08fa97913
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16820f92..650432ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ INCLUDE(ECMMarkNonGuiExecutable)
INCLUDE(FeatureSummary)
FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network WebKitWidgets Script PrintSupport)
-FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem OPTIONAL_COMPONENTS Crash)
+FIND_PACKAGE(KF5 5.4 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem OPTIONAL_COMPONENTS Crash)
FIND_PACKAGE(Gettext REQUIRED)
# FindIntl in cmake is broken for MSVC on Windows, (and only included from 3.2.3 upwards).
diff --git a/ChangeLog b/ChangeLog
index 88a7721d..d01639a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- Compile in ui definitions, instead of providing them as separate files
- Fix printing of strings with R 3.5.0 on Windows in the console
- Offer R_LIBS_USER, instead of ~/.rkward/library as standard library installation location
- Support R version placeholder (%v) in custom library locations.
diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index 564ea869..7bc7f567 100755
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -5,9 +5,9 @@ ENDIF(NOT ${PROJECT_NAME} STREQUAL "rkward")
INCLUDE(SetVersionNumber.cmake)
IF(APPLE)
- SET(CPACK_BUNDLE_ICON rkward.icns)
- SET(CPACK_BUNDLE_NAME RKWard)
- SET(CPACK_BUNDLE_STARTUP_COMMAND rkward)
+ SET(CPACK_BUNDLE_ICON rkward.icns)
+ SET(CPACK_BUNDLE_NAME RKWard)
+ SET(CPACK_BUNDLE_STARTUP_COMMAND rkward)
ENDIF()
# once tested and working this could become the default on Mac:
@@ -36,6 +36,7 @@ SET(RKWard_Sources
robjectviewer.cpp
rkconsole.cpp
)
+QT5_ADD_RESOURCES(RKWard_Sources resources.qrc)
# somehow the detected R paths from FindR.cmake do not get passed down automatically
GET_DIRECTORY_PROPERTY(R_EXECUTABLE DIRECTORY rbackend DEFINITION R_EXECUTABLE)
@@ -84,7 +85,6 @@ ENDIF(KF5Crash_FOUND)
INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward
PATTERN .svn EXCLUDE)
-INSTALL(FILES rkwardui.rc rkconsolepart.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/rkward)
INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
IF(APPLE)
diff --git a/rkward/dataeditor/CMakeLists.txt b/rkward/dataeditor/CMakeLists.txt
index a6866d09..6c2af5e8 100644
--- a/rkward/dataeditor/CMakeLists.txt
+++ b/rkward/dataeditor/CMakeLists.txt
@@ -1,7 +1,4 @@
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
-
-
-########### next target ###############
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
SET(dataeditor_STAT_SRCS
twintable.cpp
@@ -14,7 +11,3 @@ SET(dataeditor_STAT_SRCS
ADD_LIBRARY(dataeditor STATIC ${dataeditor_STAT_SRCS})
TARGET_LINK_LIBRARIES(dataeditor Qt5::Widgets KF5::WidgetsAddons KF5::Parts)
-
-########### install files ###############
-
-INSTALL(FILES rkeditordataframepart.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/rkward )
diff --git a/rkward/misc/CMakeLists.txt b/rkward/misc/CMakeLists.txt
index 97f5a16d..35ca2fa3 100644
--- a/rkward/misc/CMakeLists.txt
+++ b/rkward/misc/CMakeLists.txt
@@ -31,9 +31,3 @@ SET(misc_STAT_SRCS
ADD_LIBRARY(misc STATIC ${misc_STAT_SRCS})
TARGET_LINK_LIBRARIES(misc Qt5::Widgets KF5::WidgetsAddons KF5::KIOWidgets Qt5::Xml KF5::ConfigCore KF5::Parts KF5::WindowSystem KF5::TextEditor)
-
-########### install files ###############
-
-INSTALL(FILES
- rkdummypart.rc
- DESTINATION ${KXMLGUI_INSTALL_DIR}/rkward)
diff --git a/rkward/resources.qrc b/rkward/resources.qrc
new file mode 100644
index 00000000..f3bed08e
--- /dev/null
+++ b/rkward/resources.qrc
@@ -0,0 +1,19 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/kxmlgui5/rkward">
+ <file>rkwardui.rc</file>
+ <file>rkconsolepart.rc</file>
+
+ <file alias="rkcommandeditorwindowpart.rc">windows/rkcommandeditorwindowpart.rc</file>
+ <file alias="rkoutputwindow.rc">windows/rkoutputwindow.rc</file>
+ <file alias="rkhelpwindow.rc">windows/rkhelpwindow.rc</file>
+ <file alias="detachedwindowcontainer.rc">windows/detachedwindowcontainer.rc</file>
+ <file alias="rkcatchedx11windowpart.rc">windows/rkcatchedx11windowpart.rc</file>
+ <file alias="rkcommandlogpart.rc">windows/rkcommandlogpart.rc</file>
+ <file alias="rktoplevelwindowgui.rc">windows/rktoplevelwindowgui.rc</file>
+ <file alias="rkstandardactions.rc">windows/rkstandardactions.rc</file>
+
+ <file alias="rkeditordataframepart.rc">dataeditor/rkeditordataframepart.rc</file>
+
+ <file alias="rkdummypart.rc">misc/rkdummypart.rc</file>
+</qresource>
+</RCC>
diff --git a/rkward/windows/CMakeLists.txt b/rkward/windows/CMakeLists.txt
index cfb37497..75030df7 100644
--- a/rkward/windows/CMakeLists.txt
+++ b/rkward/windows/CMakeLists.txt
@@ -25,16 +25,3 @@ SET(windows_STAT_SRCS
ADD_LIBRARY(windows STATIC ${windows_STAT_SRCS})
TARGET_LINK_LIBRARIES(windows Qt5::Widgets Qt5::Xml Qt5::PrintSupport Qt5::WebKitWidgets KF5::TextEditor KF5::WebKit KF5::Notifications KF5::WindowSystem KF5::KIOFileWidgets)
-
-########### install files ###############
-
-INSTALL(FILES
- rkcommandeditorwindowpart.rc
- rkoutputwindow.rc
- rkhelpwindow.rc
- detachedwindowcontainer.rc
- rkcatchedx11windowpart.rc
- rkcommandlogpart.rc
- rktoplevelwindowgui.rc
- rkstandardactions.rc
- DESTINATION ${KXMLGUI_INSTALL_DIR}/rkward)
More information about the rkward-tracker
mailing list