Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Notes:
- Other packages may be required on other distributions.

When runing the installer, choose "Custom Installation". Then, in addition to the default selection, add the following:
- Select "Desktop" under Qt -> Qt 6.8.x
- Select "Qt Http Server" under Qt -> Qt 6.8.x -> Additional Libraries
- Select "Qt Network Authorization" under Qt -> Qt 6.8.x -> Additional Libraries
- Select "Qt WebSockets" under Qt -> Qt 6.8.x -> Additional Libraries
- Select "Desktop" under Qt -> Qt 6.9.x
- Select "Qt Http Server" under Qt -> Qt 6.9.x -> Additional Libraries
- Select "Qt Network Authorization" under Qt -> Qt 6.9.x -> Additional Libraries
- Select "Qt WebSockets" under Qt -> Qt 6.9.x -> Additional Libraries

If you are using a distribution that does not come with OpenSSL 3.x, you'll need to build and install it yourself:
- Select "OpenSSL 3.0.x Toolkit" under Qt -> Build Tools
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cmake_minimum_required(VERSION 3.29)
# version 0.10.5 will still need it, so we can't outright get rid of it.

project(acquisition
VERSION 0.13.5
VERSION 0.13.6
DESCRIPTION "Stash and forum shop management for Path of Exile (TM)"
HOMEPAGE_URL "https://github.com/gerwaric/acquisition"
LANGUAGES CXX
Expand Down Expand Up @@ -92,6 +92,7 @@ if(NOT TARGET boost-headers-only)
boost-headers-only
GIT_REPOSITORY https://github.com/gerwaric/boost-headers-only.git
GIT_TAG boost-1.88.0
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(boost-headers-only)
endif()
Expand All @@ -101,6 +102,7 @@ if(NOT TARGET json_struct)
json_struct
GIT_REPOSITORY https://github.com/jorgen/json_struct.git
GIT_TAG 1.0.1
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(json_struct)
endif()
Expand All @@ -110,6 +112,7 @@ if(NOT TARGET spdlog)
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.15.3
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(spdlog)
endif()
Expand Down
4 changes: 2 additions & 2 deletions cov-build-win.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo -------------------------------------------------------------

setlocal

set "QTBIN=C:\Qt\6.8.1\msvc2022_64\bin"
set "QTBIN=C:\Qt\6.9.1\msvc2022_64\bin"
if not exist "%QTBIN%\." (
echo ERROR: QTBIN directory not found: "%QTBIN%"
exit /B
Expand All @@ -39,7 +39,7 @@ if not exist "%VCVARSALL%" (
exit /B
)

set "BUILD_DIR=.\build\Desktop_Qt_6_8_1_MSVC2022_64bit-Release"
set "BUILD_DIR=.\build\Desktop_Qt_6_9_1_MSVC2022_64bit-Release"
if not exist "%BUILD_DIR%\." (
echo ERROR: build directory not found: "%BUILD_DIR%"
exit /B
Expand Down
20 changes: 18 additions & 2 deletions deps/Crashpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,21 @@ target_link_libraries(Crashpad PRIVATE
)

# Make sure the crash_handler executable is copied to the build directory.
get_target_property(CrashPadHanderPath CrashpadHandler IMPORTED_LOCATION)
file(COPY ${CrashPadHanderPath} DESTINATION ${CMAKE_BINARY_DIR})
get_target_property(CrashPadHandlerPath CrashpadHandler IMPORTED_LOCATION)

# Define the destination path
set(CrashpadHandlerOutput "${CrashpadHandlerDestination}/${CrashpadHandlerExe}")

# Copy it at build time, not configure time
add_custom_command(
OUTPUT "${CrashpadHandlerOutput}"
COMMAND ${CMAKE_COMMAND} -E copy "${CrashPadHandlerPath}" "${CrashpadHandlerOutput}"
DEPENDS "${CrashPadHandlerPath}"
COMMENT "Copying crashpad_handler to build directory"
VERBATIM
)

# Add a custom target so the file gets copied during builds
add_custom_target(copy_crashpad_handler ALL
DEPENDS "${CrashpadHandlerOutput}"
)
5 changes: 4 additions & 1 deletion deps/Crashpad/Crashpad-Linux.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set(CrashpadHandlerExe "crashpad_handler")
set(CrashpadHandlerDestination "${CMAKE_BINARY_DIR}")

add_executable(CrashpadHandler IMPORTED)
set_target_properties(CrashpadHandler PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/Linux/crashpad_handler"
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/Linux/${CrashpadHandlerExe}"
)

function(setup_linux_target target libname)
Expand Down
38 changes: 23 additions & 15 deletions deps/Crashpad/Crashpad-MacOS.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
set(CrashpadHandlerExe "crashpad_handler")
set(CrashpadHandlerDestination "${CMAKE_BINARY_DIR}/acquisition.app/Contents/MacOS")

add_executable(CrashpadHandler IMPORTED)
set_target_properties(CrashpadHandler PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/MacOS/${CMAKE_SYSTEM_PROCESSOR}/crashpad_handler"
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/MacOS/${CMAKE_SYSTEM_PROCESSOR}/${CrashpadHandlerExe}"
)

function(setup_macos_target target libname)

# Point to the precompiled libraries.

set(${target}_PREBUILT_LIBS
"${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Libraries/MacOS/arm64/lib${libname}.a"
"${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Libraries/MacOS/x86_64/lib${libname}.a"
)

# Define the output library, which will be multi-architecture.

set(${target}_OUTPUT_LIB "${CMAKE_BINARY_DIR}/crashpad/lib${libname}.a")
# Use a custom target to cause lipo to combine the two input libraries.
add_custom_target(${target}_MULTIARCH

add_custom_command(
OUTPUT ${${target}_OUTPUT_LIB}
DEPENDS ${${target}_PREBUILT_LIBS}
BYPRODUCTS ${${target}_OUTPUT_LIB}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/crashpad
COMMAND lipo ${${target}_PREBUILT_LIBS} -create -output ${${target}_OUTPUT_LIB}
COMMENT "Creating universal lib${libname}.a via lipo"
VERBATIM
)

# Create the target
add_library(${target} SHARED IMPORTED)

# Point the target to the generated multi-architecture library.
set_target_properties(${target} PROPERTIES IMPORTED_LOCATION ${${target}_OUTPUT_LIB})

add_custom_target(${target}_lipo ALL
DEPENDS ${${target}_OUTPUT_LIB}
)

add_library(${target} STATIC IMPORTED GLOBAL)
set_target_properties(${target} PROPERTIES
IMPORTED_LOCATION ${${target}_OUTPUT_LIB}
)

add_dependencies(${target} ${target}_lipo)

endfunction()

Expand Down
5 changes: 4 additions & 1 deletion deps/Crashpad/Crashpad-Windows.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set(CrashpadHandlerExe "crashpad_handler.exe")
set(CrashpadHandlerDestination "${CMAKE_BINARY_DIR}")

add_executable(CrashpadHandler IMPORTED)
set_target_properties(CrashpadHandler PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/Windows/crashpad_handler.exe"
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Crashpad/Bin/Windows/${CrashpadHandlerExe}"
)

function(setup_windows_target target libname)
Expand Down
9 changes: 4 additions & 5 deletions src/datastore/sqlitedatastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ SqliteDataStore::SqliteDataStore(const QString& filename)


SqliteDataStore::~SqliteDataStore() {
// Close and remove each database connection.
QMutexLocker locker(&m_mutex);
const auto& connections = m_connection_names;
for (const QString& connection : connections) {
const auto &connections = m_connection_names;
for (const QString &connection : connections) {
if (QSqlDatabase::contains(connection)) {
// Close and remove each database connection.
QSqlDatabase db = QSqlDatabase::database(connection);
db.close();
QSqlDatabase::database(connection).close();
QSqlDatabase::removeDatabase(connection);
};
};
Expand Down
Loading