Skip to content

Commit 9237ad3

Browse files
committed
Initial commit
0 parents  commit 9237ad3

32 files changed

Lines changed: 3028 additions & 0 deletions

.clang-format

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
BasedOnStyle: Google
2+
3+
AccessModifierOffset: -4
4+
IndentWidth: 4
5+
ColumnLimit: 100
6+
MaxEmptyLinesToKeep: 1
7+
8+
Standard: Cpp11
9+
Cpp11BracedListStyle: true
10+
11+
BreakConstructorInitializersBeforeComma: true
12+
BreakBeforeInheritanceComma: true
13+
AlwaysBreakTemplateDeclarations: true
14+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
15+
16+
FixNamespaceComments: true
17+
NamespaceIndentation: None
18+
SpacesBeforeTrailingComments: 1
19+
20+
AllowAllParametersOfDeclarationOnNextLine: false
21+
AllowShortFunctionsOnASingleLine: InlineOnly
22+
AllowShortBlocksOnASingleLine: false
23+
BinPackParameters: false
24+
BinPackArguments: false
25+
BreakBeforeBraces: Custom
26+
BraceWrapping:
27+
AfterClass: true
28+
AfterControlStatement: true
29+
AfterEnum: true
30+
AfterFunction: true
31+
AfterNamespace: false
32+
AfterObjCDeclaration: true
33+
AfterStruct: true
34+
AfterUnion: true
35+
BeforeCatch: true
36+
BeforeElse: true
37+
IndentBraces: false
38+
AlignAfterOpenBracket: AlwaysBreak
39+
AlignTrailingComments: false
40+
41+
IncludeBlocks: Preserve
42+
IncludeCategories:
43+
- Regex: '^<.*'
44+
Priority: 1
45+
- Regex: '.*'
46+
Priority: 2
47+
48+
AlwaysBreakAfterReturnType: None
49+
PenaltyReturnTypeOnItsOwnLine: 1000
50+
PenaltyExcessCharacter: 6
51+
52+
DerivePointerAlignment: false
53+
PointerAlignment: Left
54+
55+
IndentCaseLabels: false

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
7+
jobs:
8+
Build-on-Ubuntu:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Install dependencies
13+
run: |
14+
sudo apt-get install libwxgtk3.0-gtk3-dev
15+
- name: Build
16+
run: |
17+
mkdir build && cd build
18+
cmake ..
19+
make
20+
21+
Build-on-Windows:
22+
runs-on: windows-latest
23+
steps:
24+
- uses: actions/checkout@v1
25+
- uses: microsoft/setup-msbuild@v1.1
26+
- name: Download tools
27+
run: |
28+
curl -L https://www.7-zip.org/a/7z2201-x64.exe -o 7z.exe
29+
- name: Download and prepare prebuilts
30+
run: |
31+
curl -LO https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxMSW-3.2.1_vc14x_x64_Dev.7z
32+
curl -LO https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxMSW-3.2.1_vc14x_x64_ReleaseDLL.7z
33+
curl -LO https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1-headers.7z
34+
7z x *.7z -o*
35+
mkdir prebuilt/wxwidgets/lib
36+
cmd /C mklink /D prebuilt\wxwidgets\lib\Debug %CD%\wxMSW-3.2.1_vc14x_x64_Dev\lib\vc14x_x64_dll
37+
cmd /C mklink /D prebuilt\wxwidgets\lib\Release %CD%\wxMSW-3.2.1_vc14x_x64_ReleaseDLL\lib\vc14x_x64_dll
38+
cmd /C mklink /D prebuilt\wxwidgets\include %CD%\wxWidgets-3.2.1-headers\include
39+
- name: Build
40+
run: |
41+
mkdir build && cd build
42+
cmake -G "Visual Studio 17 2025" ..
43+
cmake --build . --config Release

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# QtCreator #
2+
3+
# Files
4+
*.autosave
5+
*.cflags
6+
*.config
7+
*.creator
8+
*.cxxflags
9+
*.files
10+
*.includes
11+
*.log
12+
*.swp
13+
*.user
14+
15+
# Folders
16+
build/
17+
temp/
18+
19+
# AndroidStudio #
20+
21+
# Files
22+
*.iml
23+
local.properties
24+
25+
# Folders
26+
.cxx/
27+
.DS_Store/
28+
.externalNativeBuild/
29+
.gradle/
30+
.idea/
31+
build/
32+
captures/
33+
34+
# VisualStudioCode #
35+
36+
# Files
37+
.project
38+
39+
# Folders
40+
.settings/
41+
.vscode/
42+
43+
# General #
44+
45+
# Folders
46+
prebuilt/

CMakeLists.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# Copyright (C) 2025 https://github.com/diroverflow
3+
#
4+
# This is free software. You can redistribute it and/or
5+
# modify it under the terms of the GNU General Public License
6+
# version 3 as published by the Free Software Foundation.
7+
#
8+
# This software is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY.
10+
#
11+
12+
cmake_minimum_required(VERSION 3.10)
13+
14+
set(CMAKE_CXX_STANDARD 17)
15+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
16+
17+
project(ai-at-once)
18+
19+
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
20+
add_compile_options(-Wall -Werror -Wextra)
21+
22+
option(${PROJECT_NAME}_BUILD_PORTABLE "Build portable binaries" OFF)
23+
24+
if(${PROJECT_NAME}_BUILD_PORTABLE)
25+
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
26+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
27+
endif()
28+
29+
### wxWidgets ###
30+
# Defines
31+
add_definitions(-D__WXGTK__)
32+
# Suppress warnings
33+
add_compile_options(-Wno-deprecated-copy)
34+
add_compile_options(-Wno-ignored-qualifiers)
35+
#################
36+
37+
elseif(CMAKE_SYSTEM_NAME STREQUAL Windows)
38+
add_definitions(-D__PRETTY_FUNCTION__=__FUNCSIG__)
39+
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
40+
set(wxUSE_WEBVIEW_EDGE ON)
41+
### wxWidgets ###
42+
# Support find_package(wxWidgets REQUIRED) as prebuilt
43+
set(wxWidgets_ROOT_DIR D:/Research/wxwidgets-master)
44+
set(wxWidgets_LIB_DIR ${CMAKE_SOURCE_DIR}/prebuilt/wxwidgets/lib)
45+
set(wxWidgets_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/prebuilt/wxwidgets/include)
46+
# Defines
47+
add_definitions(-DWXUSINGDLL)
48+
# Link options
49+
add_link_options(/SUBSYSTEM:WINDOWS)
50+
#################
51+
endif()
52+
53+
find_package(wxWidgets REQUIRED COMPONENTS core base aui webview)
54+
55+
file(GLOB SRC_FILES "src/*.cpp")
56+
57+
add_executable(${PROJECT_NAME} ${SRC_FILES} ${PROJECT_NAME}.rc)
58+
59+
target_include_directories(${PROJECT_NAME}
60+
PRIVATE src
61+
PRIVATE ${wxWidgets_INCLUDE_DIRS}
62+
)
63+
64+
target_link_libraries(${PROJECT_NAME}
65+
PRIVATE ${wxWidgets_LIBRARIES}
66+
)
67+

0 commit comments

Comments
 (0)