diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..91e22f2
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "thirdparty/simpleini"]
+ path = thirdparty/simpleini
+ url = https://github.com/brofield/simpleini
+[submodule "thirdparty/IXWebSocket"]
+ path = thirdparty/IXWebSocket
+ url = https://github.com/machinezone/IXWebSocket
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..8a77766
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,45 @@
+matrix:
+ include:
+ - os: osx
+ osx_image: xcode12
+ language: cpp
+ addons:
+ homebrew:
+ packages:
+ - gtkmm3
+ - zlib
+ - openssl
+ - nlohmann-json
+
+branches:
+ only:
+ - cmake
+
+script:
+ - |
+ git submodule init
+ git submodule update
+ mkdir build
+ cd build
+ cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_PKGCONFIG=ON -DDISABLE_MBEDTLS=ON ../
+ make
+
+before_deploy:
+ - |
+ mkdir out
+ cp abaddon out/abaddon
+
+deploy:
+ provider: s3
+ local_dir: out
+ upload-dir: travis
+ skip_cleanup: true
+ bucket: "pogger-space"
+ access_key_id: $S3_ACCESS_KEY
+ secret_access_key: $S3_SECRET_KEY
+ endpoint: "https://nyc3.digitaloceanspaces.com"
+ region: nyc3
+ acl: public_read
+ overwrite: true
+ on:
+ all_branches: true
diff --git a/Abaddon.sln b/Abaddon.sln
deleted file mode 100644
index e9641b0..0000000
--- a/Abaddon.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30204.135
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Abaddon", "Abaddon.vcxproj", "{A2A67504-F7F1-4DD3-B86B-68033416FFF5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Debug|x64.ActiveCfg = Debug|x64
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Debug|x64.Build.0 = Debug|x64
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Debug|x86.ActiveCfg = Debug|Win32
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Debug|x86.Build.0 = Debug|Win32
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Release|x64.ActiveCfg = Release|x64
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Release|x64.Build.0 = Release|x64
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Release|x86.ActiveCfg = Release|Win32
- {A2A67504-F7F1-4DD3-B86B-68033416FFF5}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {CA30A7C6-E05A-4D4C-BC71-1D4C80E5647E}
- EndGlobalSection
-EndGlobal
diff --git a/Abaddon.vcxproj b/Abaddon.vcxproj
deleted file mode 100644
index afe6d28..0000000
--- a/Abaddon.vcxproj
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- 16.0
- Win32Proj
- {a2a67504-f7f1-4dd3-b86b-68033416fff5}
- Abaddon
- 10.0
-
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
- true
-
-
- false
-
-
-
- Level3
- true
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
-
-
- Level3
- true
- _DEBUG;_CONSOLE;USE_LOCAL_PROXY;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- stdcpp17
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- stdcpp17
- true
-
-
- Console
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Abaddon.vcxproj.filters b/Abaddon.vcxproj.filters
deleted file mode 100644
index 917577c..0000000
--- a/Abaddon.vcxproj.filters
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..7ebdc02
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,159 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(abaddon)
+
+set(CMAKE_CXX_STANDARD 17)
+
+option(USE_PKGCONFIG "Use pkg-config" OFF)
+option(DISABLE_MBEDTLS "Disable mbedtls" OFF)
+
+if(NOT USE_PKGCONFIG)
+ find_path(GTKMM_INCLUDE_DIRS gtkmm.h REQUIRED)
+ find_library(GTKMM_LIBRARY gtkmm)
+ link_libraries(${GTKMM_LIBRARY})
+ include_directories(${GTKMM_INCLUDE_DIRS})
+
+ find_path(GLIBMM_INCLUDE_DIRS glibmm.h)
+ find_library(GLIBMM_LIBRARY glibmm)
+ link_libraries(${GLIBMM_LIBRARY})
+ include_directories(${GLIBMM_INCLUDE_DIRS})
+
+ find_path(SIGC_INCLUDE_DIRS sigc++/sigc++.h)
+ find_library(SIGC_LIBRARY sigc-2.0)
+ link_libraries(${SIGC_LIBRARY})
+ include_directories(${SIGC_INCLUDE_DIRS})
+
+ find_path(GIOMM_INCLUDE_DIRS giomm.h)
+ find_library(GIOMM_LIBRARY giomm)
+ link_libraries(${GIOMM_LIBRARY})
+ include_directories(${GIOMM_INCLUDE_DIRS})
+
+ find_path(GDKMM_INCLUDE_DIRS gdkmm.h)
+ find_library(GDKMM_LIBRARY gdkmm)
+ link_libraries(${GDKMM_LIBRARY})
+ include_directories(${GDKMM_INCLUDE_DIRS})
+
+ find_path(ATKMM_INCLUDE_DIRS atkmm.h)
+ find_library(ATKMM_LIBRARY atkmm)
+ link_libraries(${ATKMM_LIBRARY})
+ include_directories(${ATKMM_INCLUDE_DIRS})
+
+ find_package(curl)
+ find_library(CURL_LIBRARY libcurl)
+ link_libraries(${CURL_LIBRARY})
+
+ find_path(CPR_INCLUDE_DIRS cpr/cpr.h)
+ find_library(CPR_LIBRARY cpr)
+ include_directories(${CPR_INCLUDE_DIRS})
+ link_libraries(${CPR_LIBRARY})
+
+ find_package(zlib)
+ find_library(ZLIB_LIBRARY zlib)
+ include_directories(${ZLIB_INCLUDE_DIRS})
+ link_libraries(${ZLIB_LIBRARY})
+
+ if(NOT DISABLE_MBEDTLS)
+ find_library(MBEDTLS_X509_LIBRARY mbedx509)
+ find_library(MBEDTLS_TLS_LIBRARY mbedtls)
+ find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto)
+ include_directories(${MBEDTLS_INCLUDE_DIRS})
+ link_libraries(${MBEDTLS_TLS_LIBRARY})
+ link_libraries(${MBEDTLS_X509_LIBRARY})
+ link_libraries(${MBEDTLS_CRYPTO_LIBRARY})
+ endif()
+
+ find_package(nlohmann_json 3.2.0 REQUIRED)
+
+ find_path(IXWEBSOCKET_INCLUDE_DIRS ixwebsocket/ixwebsocket.h)
+ find_library(IXWEBSOCKET_LIBRARY ixwebsocket)
+ link_libraries(${IXWEBSOCKET_LIBRARY})
+ include_directories(${IXWEBSOCKET_LIBRARY}})
+else()
+ find_package(PkgConfig)
+
+ set(BUILD_CPR_TESTS OFF)
+ set(BUILD_CPR_TESTS_SSL OFF)
+
+ include(FetchContent)
+ FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/whoshuu/cpr.git)
+ FetchContent_MakeAvailable(cpr)
+ include_directories(${CPR_INCLUDE_DIRS})
+ link_libraries(cpr::cpr)
+
+ pkg_check_modules(NLOHMANN_JSON REQUIRED nlohmann_json)
+ include_directories(${NLOHMANN_JSON_INCLUDE_DIRS})
+
+ pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
+ link_directories(${GTKMM_LIBRARY_DIRS})
+ include_directories(${GTKMM_INCLUDE_DIRS})
+
+ pkg_check_modules(ATKMM REQUIRED atkmm-1.6)
+ link_directories(${ATKMM_LIBRARY_DIRS})
+ include_directories(${ATKMM_INCLUDE_DIRS})
+
+ pkg_check_modules(GDKMM REQUIRED gdkmm-3.0)
+ link_directories(${GDKMM_LIBRARY_DIRS})
+ include_directories(${GDKMM_INCLUDE_DIRS})
+
+ pkg_check_modules(GIOMM REQUIRED giomm-2.4)
+ link_directories(${GIOMM_LIBRARY_DIRS})
+ include_directories(${GIOMM_INCLUDE_DIRS})
+
+ pkg_check_modules(SIGC REQUIRED sigc++-2.0)
+ link_directories(${SIGC_LIBRARY_DIRS})
+ include_directories(${SIGC_INCLUDE_DIRS})
+
+ pkg_check_modules(GLIBMM REQUIRED glibmm-2.4)
+ link_directories(${GLIBMM_LIBRARY_DIRS})
+ include_directories(${GLIBMM_INCLUDE_DIRS})
+
+ set(USE_TLS TRUE)
+ set(USE_OPEN_SSL TRUE)
+ add_subdirectory(thirdparty/IXWebSocket)
+ include_directories("thirdparty/IXWebSocket")
+ link_libraries(ixwebsocket)
+
+ include_directories("thirdparty/simpleini")
+endif()
+
+if(mingw)
+ link_libraries(ws2_32 wsock2)
+endif()
+
+add_executable(abaddon
+ abaddon.hpp
+ util.hpp
+ settings.hpp
+ settings.cpp
+ abaddon.cpp
+ components/channels.hpp
+ components/channels.cpp
+ components/chatmessage.hpp
+ components/chatmessage.cpp
+ components/chatwindow.hpp
+ components/chatwindow.cpp
+ components/memberlist.hpp
+ components/memberlist.cpp
+ dialogs/editmessage.hpp
+ dialogs/editmessage.cpp
+ dialogs/token.hpp
+ dialogs/token.cpp
+ discord/discord.hpp
+ discord/discord.cpp
+ discord/http.hpp
+ discord/http.cpp
+ discord/objects.hpp
+ discord/objects.cpp
+ discord/store.hpp
+ discord/store.cpp
+ discord/websocket.hpp
+ discord/websocket.cpp
+ windows/mainwindow.hpp
+ windows/mainwindow.cpp
+)
+target_link_libraries(abaddon ${GTKMM_LIBRARIES})
+target_link_libraries(abaddon ${GDKMM_LIBRARIES})
+target_link_libraries(abaddon ${GLIBMM_LIBRARIES})
+target_link_libraries(abaddon ${SIGC_LIBRARIES})
+target_link_libraries(abaddon ${ATKMM_LIBRARIES})
+target_link_libraries(abaddon ${GIOMM_LIBRARIES})
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..ce74bab
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,51 @@
+version: '{branch}-{build}'
+configuration: RelWithDebInfo
+
+branches:
+ only:
+ - cmake
+
+environment:
+ APPVEYOR_SAVE_CACHE_ON_ERROR: true
+ AWS_ACCESS_KEY:
+ secure: tKX1t+B688FTnQihwAuDRAdHScCQtKpbIqHdvE1Ei/k=
+ AWS_SECRET_KEY:
+ secure: 3MTsVgpfoO5Jcs4Dl7WPKMPxNC0WC3ffOhIxRWdsU+8N7FEzKO53SbdjjkvgIcrI
+ AWS_BUCKET: pogger-space
+ AWS_ENDPOINT: nyc3.digitaloceanspaces.com
+ AWS_REGION: nyc3
+ APPVEYOR_RDP_PASSWORD:
+ secure: bAN2gK+THkzXNApDmTf05lfQDDq8s4itTyl7faCcanw=
+ matrix:
+ - job_name: Windows
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
+
+for:
+ - matrix:
+ only:
+ - job_name: Windows
+
+ cache:
+ - c:\tools\vcpkg\installed
+
+ install:
+ - cmd: |
+ vcpkg install gtkmm:x64-windows nlohmann-json:x64-windows ixwebsocket:x64-windows cpr:x64-windows zlib:x64-windows simpleini:x64-windows
+
+ cd c:\projects\abaddon
+ mkdir build && cd build
+ cmake -G"Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=c:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_TARGET_TRIPLET=x64-windows ..
+ cd ..
+
+ build:
+ project: c:\projects\abaddon
+ parallel: true
+
+ after_build:
+ - cmd: |
+ xcopy /E /I %APPVEYOR_BUILD_FOLDER%\css "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\css\"
+ 7z a %APPVEYOR_BUILD_FOLDER%\out\abaddon.zip "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%"
+
+ artifacts:
+ - path: out\abaddon.zip
+ name: Abaddon
diff --git a/thirdparty/IXWebSocket b/thirdparty/IXWebSocket
new file mode 160000
index 0000000..b74f731
--- /dev/null
+++ b/thirdparty/IXWebSocket
@@ -0,0 +1 @@
+Subproject commit b74f7319c61fb02cd7710e6cba37155db037e1f8
diff --git a/thirdparty/simpleini b/thirdparty/simpleini
new file mode 160000
index 0000000..7bca74f
--- /dev/null
+++ b/thirdparty/simpleini
@@ -0,0 +1 @@
+Subproject commit 7bca74f6535a37846162383e52071f380c99a43a