-
Notifications
You must be signed in to change notification settings - Fork 0
/
homebrew_kf5_kdevelop.qrc.patch
286 lines (263 loc) · 10.6 KB
/
homebrew_kf5_kdevelop.qrc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
commit 0092e0a3cc067516451d35346e947d24952c3844
Author: Andrew McCann <[email protected]>
Date: Thu Nov 12 04:50:00 2015 -0800
Make kdevelop-app and kdev-plugins use Qt5 resources for splash, rc, knsrc
Summary: If resources are not found in filesystem, they will be read from binary via resource path
Test Plan: Compile, remove file from 'regular' system locations, ensure related feature still functions
Reviewers: kfunk, mwolff, #kdevelop
Reviewed By: kfunk, mwolff, #kdevelop
Subscribers: kdevelop-devel
Projects: #kdevelop
Differential Revision: https://phabricator.kde.org/D529
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 58ec196..9879fbc 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -65,10 +65,7 @@ endif (APPLE)
install( PROGRAMS kdevelop.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( PROGRAMS kdevelop_ps.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
-install( FILES kdeveloprc DESTINATION ${KDE_INSTALL_CONFDIR} )
-install( FILES kdevelopui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdevelop )
install( FILES kdevelop.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
install( FILES kdevelop.xml kdevelopinternal.xml DESTINATION ${KDE_INSTALL_MIMEDIR} )
-install( FILES splash.qml DESTINATION ${KDE_INSTALL_DATADIR}/kdevelop )
update_xdg_mimetypes( ${KDE_INSTALL_MIMEDIR} )
install( FILES "${CMAKE_CURRENT_SOURCE_DIR}/../pics/kdevelop.icns" DESTINATION ${BUNDLE_INSTALL_DIR}/kdevelop.app/Contents/Resources )
diff --git a/app/kdevelop.qrc b/app/kdevelop.qrc
new file mode 100644
index 0000000..a9263d9
--- /dev/null
+++ b/app/kdevelop.qrc
@@ -0,0 +1,12 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kdevelop">
+ <file>splash.qml</file>
+ </qresource>
+ <qresource prefix="/kconfig">
+ <file>kdeveloprc</file>
+ </qresource>
+ <qresource prefix="/kxmlgui5/kdevelop">
+ <file>kdevelopui.rc</file>
+ </qresource>
+</RCC>
diff --git a/app/splash.cpp b/app/splash.cpp
index 127177d..46796cf 100644
--- a/app/splash.cpp
+++ b/app/splash.cpp
@@ -38,10 +38,9 @@ KDevSplashScreen::KDevSplashScreen()
setFlags(Qt::FramelessWindowHint | Qt::SplashScreen);
setResizeMode(QQuickView::SizeViewToRootObject);
- QString splashScript = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kdevelop/splash.qml");
- setSource(QUrl::fromLocalFile(splashScript));
+ setSource(QUrl(QStringLiteral("qrc:/kdevelop/splash.qml")));
if (!rootObject()) {
- qWarning() << "Could not find KDevelop splash screen: kdevelop/splash.qml" << splashScript;
+ qWarning() << "Could not load KDevelop splash screen";
hide(); // hide instead of showing garbage
return;
}
diff --git a/debuggers/gdb/CMakeLists.txt b/debuggers/gdb/CMakeLists.txt
index 9d3c80a..d2d88d9 100644
--- a/debuggers/gdb/CMakeLists.txt
+++ b/debuggers/gdb/CMakeLists.txt
@@ -91,6 +91,7 @@ set(kdevgdb_UI
kde_enable_exceptions()
ki18n_wrap_ui(kdevgdb_SRCS ${kdevgdb_UI})
+qt5_add_resources(kdevgdb_SRCS kdevgdb.qrc)
kdevplatform_add_plugin(kdevgdb JSON kdevgdb.json SOURCES ${kdevgdb_SRCS})
target_link_libraries(kdevgdb
KDev::Sublime
@@ -128,7 +129,3 @@ endif()
if (HAVE_PATH_WITH_SPACES_TEST)
set_target_properties(test_gdb PROPERTIES COMPILE_FLAGS "-DHAVE_PATH_WITH_SPACES_TEST")
endif()
-
-########### install files ###############
-
-install( FILES kdevgdbui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdevgdb )
diff --git a/debuggers/gdb/kdevgdb.qrc b/debuggers/gdb/kdevgdb.qrc
new file mode 100644
index 0000000..9706684
--- /dev/null
+++ b/debuggers/gdb/kdevgdb.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevgdb">
+ <file>kdevgdbui.rc</file>
+ </qresource>
+</RCC>
diff --git a/documentation/qthelp/CMakeLists.txt b/documentation/qthelp/CMakeLists.txt
index acbe698..788fd0c 100644
--- a/documentation/qthelp/CMakeLists.txt
+++ b/documentation/qthelp/CMakeLists.txt
@@ -16,11 +16,10 @@ ki18n_wrap_ui(kdevqthelp_SRCS
qthelpconfigeditdialog.ui
)
+qt5_add_resources(kdevqthelp_SRCS kdevqthelp.qrc)
kdevplatform_add_plugin(kdevqthelp JSON kdevqthelp.json SOURCES ${kdevqthelp_SRCS})
target_link_libraries(kdevqthelp
KF5::KCMUtils KF5::I18n KF5::KIOWidgets KF5::TextEditor KF5::IconThemes Qt5::Help Qt5::WebKitWidgets KF5::NewStuff
KDev::Language KDev::Documentation KDev::Interfaces)
-install(FILES kdevelop-qthelp.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
-
add_subdirectory(tests)
diff --git a/documentation/qthelp/kdevqthelp.qrc b/documentation/qthelp/kdevqthelp.qrc
new file mode 100644
index 0000000..ea56812
--- /dev/null
+++ b/documentation/qthelp/kdevqthelp.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kconfig">
+ <file>kdevelop-qthelp.knsrc</file>
+ </qresource>
+</RCC>
diff --git a/languages/clang/CMakeLists.txt b/languages/clang/CMakeLists.txt
index aaaaf1b..719f64b 100644
--- a/languages/clang/CMakeLists.txt
+++ b/languages/clang/CMakeLists.txt
@@ -35,6 +35,8 @@ set(kdevclangsupport_SRCS
clanghighlighting.cpp
)
+qt5_add_resources(kdevclangsupport_SRCS kdevclangsupport.qrc)
+
kdevplatform_add_plugin(kdevclangsupport JSON kdevclangsupport.json SOURCES ${kdevclangsupport_SRCS})
target_link_libraries(kdevclangsupport
@@ -49,5 +51,3 @@ target_link_libraries(kdevclangsupport
KDev::Util
KDev::Project
)
-
-install(FILES kdevclangsupport.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevclangsupport)
diff --git a/languages/clang/kdevclangsupport.qrc b/languages/clang/kdevclangsupport.qrc
new file mode 100644
index 0000000..d53d792
--- /dev/null
+++ b/languages/clang/kdevclangsupport.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevclangsupport">
+ <file>kdevclangsupport.rc</file>
+ </qresource>
+</RCC>
diff --git a/languages/cpp/CMakeLists.txt b/languages/cpp/CMakeLists.txt
index fe1e19f..23bf2e4 100644
--- a/languages/cpp/CMakeLists.txt
+++ b/languages/cpp/CMakeLists.txt
@@ -45,6 +45,8 @@ if(BUILD_uiblocktester)
add_definitions(-DDEBUG_UI_LOCKUP)
endif(BUILD_uiblocktester)
+qt5_add_resources(kdevcpplanguagesupport_PART_SRCS kdevcppsupport.qrc)
+
kdevplatform_add_plugin(kdevcpplanguagesupport JSON kdevcppsupport.json
SOURCES ${kdevcpplanguagesupport_PART_SRCS})
target_link_libraries(kdevcpplanguagesupport
@@ -60,7 +62,3 @@ target_link_libraries(kdevcpplanguagesupport
KF5::IconThemes
KF5::TextEditor
)
-
-########### install files ###############
-
-install(FILES kdevcppsupport.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevcppsupport)
diff --git a/languages/cpp/kdevcppsupport.qrc b/languages/cpp/kdevcppsupport.qrc
new file mode 100644
index 0000000..d81be93
--- /dev/null
+++ b/languages/cpp/kdevcppsupport.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevcppsupport">
+ <file>kdevcppsupport.rc</file>
+ </qresource>
+</RCC>
diff --git a/projectbuilders/makebuilder/CMakeLists.txt b/projectbuilders/makebuilder/CMakeLists.txt
index aee0c16..a11042c 100644
--- a/projectbuilders/makebuilder/CMakeLists.txt
+++ b/projectbuilders/makebuilder/CMakeLists.txt
@@ -12,6 +12,7 @@ ki18n_wrap_ui(kdevmakebuilder_SRCS makeconfig.ui)
kconfig_add_kcfg_files( kdevmakebuilder_SRCS makebuilderconfig.kcfgc )
#add_library(kdevmakebuilder MODULE ${kdevmakebuilder_SRCS})
+qt5_add_resources(kdevmakebuilder_SRCS kdevmakebuilder.qrc)
kdevplatform_add_plugin(kdevmakebuilder JSON kdevmakebuilder.json SOURCES ${kdevmakebuilder_SRCS})
target_link_libraries(kdevmakebuilder
KF5::TextEditor
@@ -29,4 +30,3 @@ target_link_libraries(kdevmakebuilder
install(FILES imakebuilder.h DESTINATION ${INCLUDE_INSTALL_DIR}/kdevelop/make COMPONENT Devel)
#configure_file(kdevmakebuilder.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdevmakebuilder.desktop)
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdevmakebuilder.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-# install( FILES kdevmakebuilder.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevmakebuilder )
diff --git a/projectbuilders/makebuilder/kdevmakebuilder.qrc b/projectbuilders/makebuilder/kdevmakebuilder.qrc
new file mode 100644
index 0000000..66e9850
--- /dev/null
+++ b/projectbuilders/makebuilder/kdevmakebuilder.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevmakebuilder">
+ <file>kdevmakebuilder.rc</file>
+ </qresource>
+</RCC>
diff --git a/projectmanagers/custommake/CMakeLists.txt b/projectmanagers/custommake/CMakeLists.txt
index 1f8ecbc..0bf4ea4 100644
--- a/projectmanagers/custommake/CMakeLists.txt
+++ b/projectmanagers/custommake/CMakeLists.txt
@@ -12,15 +12,11 @@ set(kdevcustommakemanager_PART_SRCS
custommakemodelitems.cpp
)
+qt5_add_resources(kdevcustommakemanager_PART_SRCS kdevcustommakemanager.qrc)
kdevplatform_add_plugin(kdevcustommakemanager JSON kdevcustommakemanager.json SOURCES ${kdevcustommakemanager_PART_SRCS})
target_link_libraries(kdevcustommakemanager
KF5::KIOWidgets KDev::Interfaces KDev::Project KDev::Util KDev::Language
kdevmakefileresolver
)
-
-########### install files ###############
-
-install( FILES kdevcustommakemanager.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevcustommakemanager )
-
add_subdirectory(makefileresolver)
diff --git a/projectmanagers/custommake/kdevcustommakemanager.qrc b/projectmanagers/custommake/kdevcustommakemanager.qrc
new file mode 100644
index 0000000..771795b
--- /dev/null
+++ b/projectmanagers/custommake/kdevcustommakemanager.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevcustommakemanager">
+ <file>kdevcustommakemanager.rc</file>
+ </qresource>
+</RCC>
diff --git a/utils/okteta/CMakeLists.txt b/utils/okteta/CMakeLists.txt
index 185a0b5..784628b 100644
--- a/utils/okteta/CMakeLists.txt
+++ b/utils/okteta/CMakeLists.txt
@@ -21,6 +21,7 @@ SET( kdevokteta_PART_SRCS
oktetawidget.cpp
)
+qt5_add_resources(kdevokteta_PART_SRCS kdevokteta.qrc)
add_library(kdevokteta MODULE ${kdevokteta_PART_SRCS} )
TARGET_LINK_LIBRARIES( kdevokteta
@@ -39,4 +40,3 @@ install(TARGETS kdevokteta DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV
configure_file(kdevokteta.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdevokteta.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdevokteta.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-install(FILES kdevokteta.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevokteta )
diff --git a/utils/okteta/kdevokteta.qrc b/utils/okteta/kdevokteta.qrc
new file mode 100644
index 0000000..3bc0c1e
--- /dev/null
+++ b/utils/okteta/kdevokteta.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/kxmlgui5/kdevokteta">
+ <file>kdevokteta.rc</file>
+ </qresource>
+</RCC>