Skip to content
Open
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
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ option(USE_KEYCHAIN "Store the token in the keychain (default)" ON)
option(ENABLE_NOTIFICATION_SOUNDS "Enable notification sounds (default)" ON)
option(ENABLE_RNNOISE "Enable RNNoise for voice activity detection (default)" ON)
option(ENABLE_QRCODE_LOGIN "Enable QR code login (default)" ON)
option(BUNDLE_MACOSX_APP "Bundle the application as a .app on macOS (default)" ON)

find_package(nlohmann_json REQUIRED)
find_package(CURL)
Expand Down Expand Up @@ -50,6 +51,10 @@ list(FILTER ABADDON_SOURCES EXCLUDE REGEX ".*notifier_gio\\.cpp$")
list(FILTER ABADDON_SOURCES EXCLUDE REGEX ".*notifier_fallback\\.cpp$")

add_executable(abaddon ${ABADDON_SOURCES})
if (APPLE AND BUNDLE_MACOSX_APP)
set_target_properties(abaddon PROPERTIES MACOSX_BUNDLE TRUE)
endif()

target_include_directories(abaddon PUBLIC ${PROJECT_SOURCE_DIR}/src)
target_include_directories(abaddon PUBLIC ${PROJECT_BINARY_DIR})
target_include_directories(abaddon PUBLIC ${GTKMM_INCLUDE_DIRS})
Expand Down Expand Up @@ -221,7 +226,11 @@ foreach (COMPILER_DEF IN LISTS ABADDON_COMPILER_DEFS)
target_compile_definitions(abaddon PRIVATE "${COMPILER_DEF}")
endforeach ()

install(TARGETS abaddon RUNTIME)
if (APPLE AND BUNDLE_MACOSX_APP)
install(TARGETS abaddon BUNDLE DESTINATION ".")
else()
install(TARGETS abaddon RUNTIME)
endif()
install(DIRECTORY res/css DESTINATION ${ABADDON_RESOURCE_DIR})
install(DIRECTORY res/fonts DESTINATION ${ABADDON_RESOURCE_DIR})
install(DIRECTORY res/res DESTINATION ${ABADDON_RESOURCE_DIR})
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ the result of fundamental issues with Discord's thread implementation.
5. `make`
6. [Copy resources](#resources)

For an unbundled build (i.e., a standalone unix executable instead of a macOS .app), pass `cmake -DBUNDLE_MACOSX_APP=OFF ..` for step 4 instead.

#### Linux:

1. Install dependencies
Expand Down Expand Up @@ -133,8 +135,8 @@ Latest release version: https://github.com/uowuo/abaddon/releases/latest
#### Resources

The two folders within the `res` folder (`res/res` and `res/css`) are necessary. Windows also uses the `fonts` folder.
You can put them directly next to the executable. On Linux, `css` and `res` can also be loaded from
`~/.local/share/abaddon` or `/usr/share/abaddon`
On Windows & Linux, you can put them directly next to the executable. On Linux, `css` and `res` can also be loaded from
`~/.local/share/abaddon` or `/usr/share/abaddon`. On a bundled macOS build, you can put them inside of `abaddon.app/Contents/Resources/`.

`abaddon.ini` will also be automatically used if located at `~/.config/abaddon/abaddon.ini` and there is
no `abaddon.ini` in the working directory
Expand Down