commit 2bd126f46f4783410702baef5a62bb6e9cc48371 Author: Lyra Date: Sun May 31 22:33:57 2026 -0400 Initial project setup diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..661aa6f --- /dev/null +++ b/.clang-format @@ -0,0 +1,358 @@ +--- +Language: Cpp +AlignAfterOpenBracket: true +AccessModifierOffset: -1 +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: true + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenBreakingDAGArgColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: + AlignPPAndNotPP: true + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowBreakBeforeNoexceptSpecifier: Never +AllowBreakBeforeQtProperty: false +AllowShortBlocksOnASingleLine: Never +AllowShortCaseExpressionOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortCompoundRequirementOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AllowShortNamespacesOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AttributeMacros: + - __capability + - absl_nonnull + - absl_nullable + - absl_nullability_unknown +BinPackArguments: true +BinPackLongBracedList: true +BinPackParameters: BinPack +BitFieldColonSpacing: Both +BracedInitializerIndentWidth: -1 +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterExternBlock: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakAdjacentStringLiterals: true +BreakAfterAttributes: Leave +BreakAfterJavaFieldAnnotations: false +BreakAfterOpenBracketBracedList: false +BreakAfterOpenBracketFunction: false +BreakAfterOpenBracketIf: false +BreakAfterOpenBracketLoop: false +BreakAfterOpenBracketSwitch: false +BreakAfterReturnType: None +BreakArrays: true +BreakBeforeBinaryOperators: None +BreakBeforeCloseBracketBracedList: false +BreakBeforeCloseBracketFunction: false +BreakBeforeCloseBracketIf: false +BreakBeforeCloseBracketLoop: false +BreakBeforeCloseBracketSwitch: false +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Attach +BreakBeforeInlineASMColon: OnlyMultiline +BreakBeforeTemplateCloser: false +BreakBeforeTernaryOperators: true +BreakBinaryOperations: Never +BreakConstructorInitializers: BeforeColon +BreakFunctionDefinitionParameters: false +BreakInheritanceList: BeforeColon +BreakStringLiterals: true +BreakTemplateDeclarations: Yes +ColumnLimit: 80 +CommentPragmas: "^ IWYU pragma:" +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: AlignFirstComment +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +EnumTrailingComma: Leave +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: "^<.*" + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: ".*" + Priority: 3 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: "([-_](test|unittest))?$" +IncludeIsMainSourceRegex: "" +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: true +IndentExportBlock: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true +IndentPPDirectives: None +IndentRequiresClause: true +IndentWidth: 4 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: None +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigitsInsert: 0 + BinaryMaxDigitsRemove: 0 + Decimal: 0 + DecimalMinDigitsInsert: 0 + DecimalMaxDigitsRemove: 0 + Hex: 0 + HexMinDigitsInsert: 0 + HexMaxDigitsRemove: 0 + BinaryMinDigits: 0 + DecimalMinDigits: 0 + HexMinDigits: 0 +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLines: + AtEndOfFile: false + AtStartOfBlock: false + AtStartOfFile: true +KeepFormFeed: false +LambdaBodyIndentation: Signature +LineEnding: DeriveLF +MacroBlockBegin: "" +MacroBlockEnd: "" +MainIncludeChar: Quote +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +NumericLiteralCase: + ExponentLetter: Leave + HexDigit: Leave + Prefix: Leave + Suffix: Leave +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 4 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +OneLineFormatOffRegex: "" +PackConstructorInitializers: NextLine +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakBeforeMemberAccess: 150 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakScopeResolution: 500 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +PPIndentWidth: -1 +QualifierAlignment: Leave +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - "c++" + - "C++" + CanonicalDelimiter: "" + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + - ParseTestProto + - ParsePartialTestProto + CanonicalDelimiter: pb + BasedOnStyle: google +ReferenceAlignment: Pointer +ReflowComments: Always +RemoveBracesLLVM: false +RemoveEmptyLinesInUnwrappedLines: false +RemoveParentheses: Leave +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SkipMacroDefinitionBody: false +SortIncludes: + Enabled: true + IgnoreCase: false + IgnoreExtension: false +SortJavaStaticImport: Before +SortUsingDeclarations: LexicographicNumeric +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterOperatorKeyword: false +SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeJsonColon: false +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterNot: false + AfterOverloadedOperator: false + AfterPlacementOperator: true + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBraces: Never +SpacesBeforeTrailingComments: 2 +SpacesInAngles: Never +SpacesInContainerLiterals: true +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParens: Never +SpacesInParensOptions: + ExceptDoubleParentheses: false + InCStyleCasts: false + InConditionalStatements: false + InEmptyParentheses: false + Other: false +SpacesInSquareBrackets: false +Standard: Auto +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TableGenBreakInsideDAGArg: DontBreak +TabWidth: 8 +UseTab: Never +VerilogBreakBetweenInstancePorts: true +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE +WrapNamespaceBodyWithEmptyLines: Leave +... + diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..adedb95 --- /dev/null +++ b/.clangd @@ -0,0 +1,3 @@ +CompileFlags: + Add: -Wno-unknown-warning-option + Remove: [-m*, -f*] diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..d1b59af --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,64 @@ +on: [push, pull_request] + +name: Build + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + persist-credentials: true + + - name: Checkout lfs + run: | + git lfs install --local + AUTH=$(git config --local http.${{ github.server_url }}/.extraheader) + git config --local --unset http.${{ github.server_url }}/.extraheader + git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH" + git lfs pull + + - name: Apt update + run: sudo apt update + + - name: Installing build chain + run: sudo apt-get install pigz ninja-build g++ clang pkg-config libssl-dev zlib1g-dev libopus-dev -y; + + - name: Cache CPM + uses: actions/cache@v5 + with: + path: "~/.cache/CPM/" + key: ${{ runner.os }}-CPM + + - name: Configure debug + run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-debug.sh + + - name: Configure release + run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-release.sh + + - name: Configure RelWithDeb + run: cd scripts; CPM_SOURCE_CACHE="~/.cache/CPM/" ./configure-relwithdeb.sh + + - name: Build debug + run: cd scripts; ./build-debug.sh + + - name: Build release + run: cd scripts; ./build-release.sh + + - name: Build Release with debug info + run: cd scripts; ./build-relwithdeb.sh + + - name: Packaging + run: |- + tar -I 'pigz -9' -cf dppbots-debug-amd64.tar.gz --transform 's,^,dppbots/,' bin/Debug src cmake CMakeLists.txt LICENSE; + tar -I 'pigz -9' -cf dppbots-rel-amd64.tar.gz --transform 's,^,dppbots/,' bin/Release src cmake CMakeLists.txt LICENSE; + tar -I 'pigz -9' -cf dppbots-relwithdeb-amd64.tar.gz --transform 's,^,dppbots/,' bin/Relwithdeb src cmake CMakeLists.txt LICENSE; + + - uses: akkuman/gitea-release-action@v1 + with: + files: |- + dppbots-debug-amd64.tar.gz + dppbots-rel-amd64.tar.gz + dppbots-relwithdeb-amd64.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9456119 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build/ +.cache +bin + diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..ec66a8b --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,77 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Configure: Debug", + "type": "shell", + "command": "cd scripts; ./configure-debug.sh", + "group": { + "isDefault": false + }, + "problemMatcher": [], + "detail": "Configure Debug" + }, + { + "label": "Build: Debug", + "type": "shell", + "command": "cd scripts; ./build-debug.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "detail": "Build Debug" + }, + { + "label": "Configure: Relwithdeb", + "type": "shell", + "command": "cd scripts; ./configure-relwithdeb.sh", + "group": { + "isDefault": false + }, + "problemMatcher": [], + "detail": "Configure Release with debug info" + }, + { + "label": "Build: Relwithdeb", + "type": "shell", + "command": "cd scripts; ./build-relwithdeb.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "detail": "Build Release with debug info" + }, + { + "label": "Clean: Debug", + "type": "shell", + "command": "cd build/debug; ninja clean", + "group": { + "isDefault": false + }, + "detail": "Clean debug files" + }, + { + "label": "Build: All", + "type": "shell", + "command": "cd scripts; ./build.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "detail": "Build all types" + }, + { + "label": "Clean: All", + "type": "shell", + "command": "cd scripts; ./clean.sh", + "group": { + "isDefault": false + }, + "problemMatcher": [], + "detail": "Clean All files" + } + ] +} diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..770b258 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.28) +project(dppbots) +set(CMAKE_CXX_STANDARD 23) + +set(CMAKE_POLICY_VERSION_MINIMUM 3.5) + +file(GLOB REQUIRED_CMAKE_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake.required" +) +foreach(cmake_file ${REQUIRED_CMAKE_FILES}) + include(${cmake_file}) +endforeach() + +file(GLOB CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake") +foreach(cmake_file ${CMAKE_FILES}) + include(${cmake_file}) +endforeach() + +add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/00_project") diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e78548c --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2026 firewire + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cmake/CPM.cmake.required b/cmake/CPM.cmake.required new file mode 100644 index 0000000..9a66dd8 --- /dev/null +++ b/cmake/CPM.cmake.required @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: MIT +# +# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors + +set(CPM_DOWNLOAD_VERSION 0.42.1) +set(CPM_HASH_SUM "f3a6dcc6a04ce9e7f51a127307fa4f699fb2bade357a8eb4c5b45df76e1dc6a5") + +if(CPM_SOURCE_CACHE) + set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +elseif(DEFINED ENV{CPM_SOURCE_CACHE}) + set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +else() + set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +endif() + +# Expand relative path. This is important if the provided path contains a tilde (~) +get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE) + +file(DOWNLOAD + https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake + ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} +) + +include(${CPM_DOWNLOAD_LOCATION}) diff --git a/cmake/compileCommands.cmake b/cmake/compileCommands.cmake new file mode 100644 index 0000000..38fa25b --- /dev/null +++ b/cmake/compileCommands.cmake @@ -0,0 +1,14 @@ +##### SETUP COMPILE COMMANDS ##### + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_EXPORT_COMPILE_COMMANDS on) +endif() + +if(EXISTS "${CMAKE_BINARY_DIR}/compile_commands.json") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + file( + COPY "${CMAKE_BINARY_DIR}/compile_commands.json" + DESTINATION "${CMAKE_BINARY_DIR}/../" + ) + endif() +endif() diff --git a/cmake/copy_files.cmake b/cmake/copy_files.cmake new file mode 100644 index 0000000..8a29a49 --- /dev/null +++ b/cmake/copy_files.cmake @@ -0,0 +1,11 @@ + +function(create_copy_folder_target target_name src dst) + add_custom_target(${target_name} + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + ${src} + ${dst} + COMMENT "Copying ${src} to ${dst}" +) +endfunction() diff --git a/cmake/dpp.cmake b/cmake/dpp.cmake new file mode 100644 index 0000000..6112ea0 --- /dev/null +++ b/cmake/dpp.cmake @@ -0,0 +1,11 @@ +CPMAddPackage( + URI "gh:brainboxdotcc/DPP@10.1.5" + OPTIONS "BUILD_VOICE_SUPPORT ON" + OPTIONS "RUN_LDCONFIG OFF" + OPTIONS "DPP_INSTALL OFF" + OPTIONS "DPP_BUILD_TEST OFF" + OPTIONS "DPP_NO_VCPKG ON" + OPTIONS "DPP_NO_CONAN ON" + OPTIONS "DPP_FORMATTERS ON" + OPTIONS "DPP_USE_PCH ON" +) diff --git a/cmake/macros.cmake b/cmake/macros.cmake new file mode 100644 index 0000000..31bb29e --- /dev/null +++ b/cmake/macros.cmake @@ -0,0 +1,14 @@ + +macro(SET_OUTPUT_NAMES projname) + if (UNIX) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set_target_properties(${projname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/Debug") + endif() + if(CMAKE_BUILD_TYPE STREQUAL "Release") + set_target_properties(${projname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/Release") + endif() + if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") + set_target_properties(${projname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/Relwithdeb") + endif() + endif() +endmacro() diff --git a/cmake/platform.cmake b/cmake/platform.cmake new file mode 100644 index 0000000..0791c94 --- /dev/null +++ b/cmake/platform.cmake @@ -0,0 +1,10 @@ +message("System name: ${CMAKE_HOST_SYSTEM_NAME}") +if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") + add_compile_definitions(PLATFORM_WINDOWS) +elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux") + add_compile_definitions(PLATFORM_LINUX) +elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin") + add_compile_definitions(PLATFORM_MACOS) +else() + add_compile_definitions(PLATFORM_UNKNOWN) +endif() diff --git a/scripts/build-debug.sh b/scripts/build-debug.sh new file mode 100755 index 0000000..497b992 --- /dev/null +++ b/scripts/build-debug.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p debug +cd debug +ninja diff --git a/scripts/build-release.sh b/scripts/build-release.sh new file mode 100755 index 0000000..01fa218 --- /dev/null +++ b/scripts/build-release.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p release +cd release +ninja diff --git a/scripts/build-relwithdeb.sh b/scripts/build-relwithdeb.sh new file mode 100755 index 0000000..396dca8 --- /dev/null +++ b/scripts/build-relwithdeb.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p relwithdeb +cd relwithdeb +ninja diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..fa2fa6a --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +cd ../ +mkdir -p build +cd build || exit +mkdir -p debug +mkdir -p release +mkdir -p relwithdeb + +cd debug || exit +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=Debug & +cd ../ +cd release || exit +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=Release & +cd ../ +cd relwithdeb || exit +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo & +cd ../ + +wait + +cd debug || exit +ninja & +cd ../ +cd release || exit +ninja & +cd ../ +cd relwithdeb || exit +ninja & +cd ../.. + +wait diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100755 index 0000000..3595225 --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cd .. +cd build/debug || exit +ninja clean + +cd .. +cd release || exit +ninja clean + +cd .. +cd relwithdeb || exit +ninja clean diff --git a/scripts/configure-debug.sh b/scripts/configure-debug.sh new file mode 100755 index 0000000..e269ff2 --- /dev/null +++ b/scripts/configure-debug.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p debug +cd debug +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=Debug diff --git a/scripts/configure-release.sh b/scripts/configure-release.sh new file mode 100755 index 0000000..e6a1d81 --- /dev/null +++ b/scripts/configure-release.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p release +cd release +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=Release diff --git a/scripts/configure-relwithdeb.sh b/scripts/configure-relwithdeb.sh new file mode 100755 index 0000000..fa79d5b --- /dev/null +++ b/scripts/configure-relwithdeb.sh @@ -0,0 +1,8 @@ +#/bin/bash + +cd .. +mkdir -p build +cd build +mkdir -p relwithdeb +cd relwithdeb +cmake ../../ -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo diff --git a/src/00_project/CMakeLists.txt b/src/00_project/CMakeLists.txt new file mode 100644 index 0000000..dae7a67 --- /dev/null +++ b/src/00_project/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.28) +project(dppbots) +message("Setting up 00_project") +add_executable(00_project "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp") +target_include_directories(00_project PUBLIC + "${dpp_SOURCE_DIR}/include" +) +target_link_libraries(00_project + dpp +) +SET_OUTPUT_NAMES(00_project) diff --git a/src/00_project/src/main.cpp b/src/00_project/src/main.cpp new file mode 100644 index 0000000..db0690c --- /dev/null +++ b/src/00_project/src/main.cpp @@ -0,0 +1,10 @@ +#include +#include +#include + +#include + +int main() { + std::cout << "Using dpp version: " << dpp::utility::version() << std::endl; + return 0; +} diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..02fd790 --- /dev/null +++ b/todo.md @@ -0,0 +1,53 @@ +├── 01_basics +│   ├── 01_first_bot +│   ├── 02_embeds +│   ├── 03_private_messages +│   ├── 04_adding_files +│   ├── 05_webhooks +│   ├── 06_callback_functions +│   ├── 07_cache +│   └── 08_listening_to_messages +├── 02_interactions_and_components +│   ├── 01_slash_commands +│   │   ├── 01_using_slash_cmds +│   │   ├── 02_clearing_registered_cmds +│   │   ├── 03_sub_commands +│   │   ├── 04_autocompletion +│   │   ├── 05_file_parameters +│   │   └── 06_cmd_handler +│   ├── 02_ephemeral_replies +│   ├── 03_user_apps +│   ├── 04_resolved_objects +│   ├── 05_message_components +│   │   ├── 01_btn +│   │   ├── 02_advanced_btn +│   │   ├── 03_select_menu +│   │   ├── 04_select_menu_defaults +│   │   ├── 05_editing_msg_from_btn +│   │   └── 06_components_v2 +│   ├── 06_modals +│   ├── 07_context_menus +│   └── 08_thinking +├── 03_music_and_audio +│   ├── 01_sound_board +│   ├── 02_opus_file +│   ├── 03_mp3_file +│   ├── 04_recording_vc +│   └── 05_join_or_switch_channel +├── 04_coroutines +│   ├── 01_intro +│   ├── 02_simple_cmds +│   ├── 03_waiting_for_events +│   └── 04_expiring_btn +└── 05_misc + ├── 01_arbitrary_requests + ├── 02_spdlog + ├── 03_editing_channels_msgs + ├── 04_threads + ├── 05_caching_messages + ├── 06_collecting_reactions + ├── 07_eval_cmd + ├── 08_checking_permissions + ├── 09_bot_status + ├── 10_emojis + └── 11_timers