Skip to content

Commit c34f641

Browse files
committed
compile for 6.4.2 debian bookworm and Ubuntu The Noble Numbat
1 parent 4ab23c6 commit c34f641

File tree

4 files changed

+82
-15
lines changed

4 files changed

+82
-15
lines changed

CMakeLists.txt

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,26 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/libbacktrace/configure")
6969
)
7070
endif()
7171
if(EXISTS "${CMAKE_SOURCE_DIR}/libs/libbacktrace/configure")
72-
message(STATUS "Running autoconf to prepare libbacktrace")
73-
execute_process(
74-
COMMAND bash "${CMAKE_SOURCE_DIR}/libs/libbacktrace/configure"
75-
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/libs/libbacktrace"
76-
RESULT_VARIABLE AUTOCONF_RESULT
77-
)
78-
if(NOT AUTOCONF_RESULT EQUAL 0)
79-
message(
80-
FATAL_ERROR
81-
"Autoconf failed with exit code ${AUTOCONF_RESULT}"
72+
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/libbacktrace/Makefile")
73+
message(STATUS "Running autoconf to prepare libbacktrace")
74+
execute_process(
75+
COMMAND bash "${CMAKE_SOURCE_DIR}/libs/libbacktrace/configure"
76+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/libs/libbacktrace"
77+
RESULT_VARIABLE AUTOCONF_RESULT
8278
)
79+
if(NOT AUTOCONF_RESULT EQUAL 0)
80+
message(
81+
FATAL_ERROR
82+
"Autoconf failed with exit code ${AUTOCONF_RESULT}"
83+
)
84+
endif()
85+
if(UBUNTU)
86+
execute_process(
87+
COMMAND bash -c
88+
"sed -i 's|^SHELL = /bin/sh$|SHELL = /bin/bash|' Makefile"
89+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/libs/libbacktrace"
90+
)
91+
endif()
8392
endif()
8493
execute_process(
8594
COMMAND make
@@ -176,13 +185,24 @@ set(INCLUDE_DIR
176185
set(CMAKE_CXX_STANDARD 17)
177186
set(CMAKE_CXX_STANDARD_REQUIRED ON)
178187

188+
set(COMPILE_MICROS)
189+
190+
if(UBUNTU)
191+
list(APPEND COMPILE_MICROS
192+
UBUNTU
193+
)
194+
endif()
195+
179196
if(TEST)
180197
enable_testing()
181198
set(SOURCES ${SOURCES_MC} ${SOURCES_TESTS})
182199
add_executable(${PROJECT_NAME}Test ${SOURCES})
183200
add_test(NAME ${PROJECT_NAME}Test COMMAND ${PROJECT_NAME}Test)
184201
target_link_libraries(${PROJECT_NAME}Test PUBLIC ${LINK_COMMON} Qt6::Test)
185-
target_include_directories(${PROJECT_NAME}Test PRIVATE ${INCLUDE_DIR} test)
202+
target_include_directories(${PROJECT_NAME}Test PRIVATE ${INCLUDE_DIR}
203+
${COMPILE_MICROS}
204+
test
205+
)
186206
target_compile_definitions(${PROJECT_NAME}Test PRIVATE TEST)
187207
set_target_properties(${PROJECT_NAME}Test PROPERTIES
188208
CXX_STANDARD 17
@@ -206,6 +226,7 @@ else()
206226
add_executable(${PROJECT_NAME} ${SOURCES})
207227
target_link_libraries(${PROJECT_NAME} PUBLIC ${LINK_COMMON} ${LINK_GUI})
208228
target_include_directories(${PROJECT_NAME} PRIVATE ${INCLUDE_DIR})
229+
target_compile_definitions(${PROJECT_NAME} PRIVATE ${COMPILE_MICROS})
209230
set_target_properties(${PROJECT_NAME} PROPERTIES
210231
CXX_STANDARD 17
211232
CXX_STANDARD_REQUIRED ON

src/FileManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <QtCore>
2020
#include <QByteArray>
2121
#include <QDataStream>
22-
#include <QtLogging>
22+
#include <qlogging.h>
2323
#include "../miniz/miniz.h" // IWYU pragma: keep
2424
#include "../miniz/miniz_zip.h"
2525
#include "../src/gameFileTreeData.hpp"

src/LevelViewList.cpp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,65 +195,114 @@ bool LevelListProxy::getInstalled(const QModelIndex &i) const {
195195
}
196196

197197
void LevelListProxy::setClassFilter(const QString &c) {
198+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
199+
#else
198200
beginFilterChange();
201+
#endif
199202
if (c == m_all) {
200203
m_class = 0;
201204
} else {
202205
m_class = StaticData::getClassID().at(c);
203206
}
207+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
208+
invalidateFilter();
209+
#else
204210
endFilterChange();
211+
#endif
205212
}
206213

207214
void LevelListProxy::setTypeFilter(const QString &t) {
215+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
216+
#else
208217
beginFilterChange();
218+
#endif
209219
if (t == m_all) {
210220
m_type = 0;
211221
} else {
212222
m_type = StaticData::getTypeID().at(t);
213223
}
224+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
225+
invalidateFilter();
226+
#else
214227
endFilterChange();
228+
#endif
215229
}
216230

217231
void LevelListProxy::setDifficultyFilter(const QString &d) {
232+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
233+
#else
218234
beginFilterChange();
235+
#endif
219236
if (d == m_all) {
220237
m_difficulty = 0;
221238
} else {
222239
m_difficulty = StaticData::getDifficultyID().at(d);
223240
}
241+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
242+
invalidateFilter();
243+
#else
224244
endFilterChange();
245+
#endif
225246
}
226247

227248
void LevelListProxy::setDurationFilter(const QString &d) {
249+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
250+
#else
228251
beginFilterChange();
252+
#endif
229253
if(d == m_all) {
230254
m_duration = 0;
231255
} else {
232256
m_duration = StaticData::getDurationID().at(d);
233257
}
258+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
259+
invalidateFilter();
260+
#else
234261
endFilterChange();
262+
#endif
235263
}
236264

237265
void LevelListProxy::setSearchFilter(const QString &s) {
266+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
267+
#else
238268
beginFilterChange();
269+
#endif
239270
m_search = s;
271+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
272+
invalidateFilter();
273+
#else
240274
endFilterChange();
275+
#endif
241276
}
242277

243278
void LevelListProxy::setSearchType(const QString &t) {
279+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
280+
#else
244281
beginFilterChange();
282+
#endif
245283
if (t == "Level") {
246284
m_searchType = 0;
247285
} else if (t == "Author") {
248286
m_searchType = 1;
249287
}
288+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
289+
invalidateFilter();
290+
#else
250291
endFilterChange();
292+
#endif
251293
}
252294

253295
void LevelListProxy::setInstalledFilter(bool on) {
296+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
297+
#else
254298
beginFilterChange();
299+
#endif
255300
m_installed = on;
301+
#if QT_VERSION <= QT_VERSION_CHECK(6, 4, 2)
302+
invalidateFilter();
303+
#else
256304
endFilterChange();
305+
#endif
257306
}
258307

259308
void LevelListProxy::setSortMode(SortMode mode) {

src/TombRaiderLinuxLauncher.ui

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,9 +1797,6 @@
17971797
<property name="selectionMode">
17981798
<enum>QAbstractItemView::SelectionMode::SingleSelection</enum>
17991799
</property>
1800-
<property name="supportedDragActions">
1801-
<set>Qt::DropAction::IgnoreAction</set>
1802-
</property>
18031800
<attribute name="horizontalHeaderVisible">
18041801
<bool>true</bool>
18051802
</attribute>

0 commit comments

Comments
 (0)