Skip to content

Commit 0d6a3b8

Browse files
committed
Merge remote-tracking branch 'source/development' into development
# Conflicts: # System/Constants.h
2 parents 9b49da7 + 70c4512 commit 0d6a3b8

File tree

3,805 files changed

+450835
-11731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,805 files changed

+450835
-11731
lines changed

.github/parameters/macports.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "2.8.1"
2+
prefix: "/opt/local"
3+
ports:
4+
- name: gcc13
5+
- name: pkgconfig
6+
- name: meson
7+
- name: libsdl2
8+
- name: onetbb
9+
- name: lz4
10+
- name: libpng
11+
- name: minizip
12+
- name: luajit
13+
- name: flac
14+
- name: dylibbundler

.github/workflows/meson.yml

Lines changed: 75 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ on:
3838
type: string
3939
required: false
4040
default: "release"
41-
debug_level: # "full" | "minimal" | "release"
41+
debug_level: # "full" | "minimal" | "release"
4242
type: string
4343
required: false
4444
default: "release"
4545

46-
env:
47-
MESON_VERSION: "0.60.3"
48-
4946
jobs:
5047
build-linux:
51-
5248
runs-on: ubuntu-latest
5349
name: Linux Build
5450

@@ -60,30 +56,30 @@ jobs:
6056
- name: Install Dependencies
6157
run: |
6258
sudo apt-get update -yq
63-
sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libopengl-dev libfuse2 ninja-build
64-
sudo pip install meson==${{env.MESON_VERSION}}
59+
sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libsdl2-image-dev libopengl-dev libfuse2 ninja-build
60+
sudo pip install meson
6561
6662
- name: Setup Meson
6763
env:
6864
CC: "gcc"
6965
CXX: "g++"
7066
run: |
71-
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} build
67+
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=true build
7268
7369
- name: Configure for AppImage
7470
if: ${{inputs.upload_artefacts}}
7571
env:
7672
CC: "gcc"
7773
CXX: "g++"
7874
run: meson configure -Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build
79-
75+
8076
- name: Build
8177
env:
8278
CC: "gcc"
8379
CXX: "g++"
8480
run: |
8581
meson compile -C build
86-
82+
8783
- name: Create AppDir
8884
if: ${{inputs.upload_artefacts}}
8985
run: |
@@ -116,32 +112,91 @@ jobs:
116112
if-no-files-found: error
117113

118114
build-macos:
119-
runs-on: macos-latest
115+
runs-on: macos-11
120116
name: MacOS Build
121-
117+
118+
env:
119+
GCC_VERSION: "13"
120+
MACOSX_DEPLOYMENT_TARGET: 10.15
122121
steps:
123122
- uses: actions/checkout@v3
124123
- uses: actions/setup-python@v3
125124

126-
- name: Install Dependencies
125+
- name: "Install Dependencies"
126+
uses: melusina-org/setup-macports@v1
127+
with:
128+
parameters: ".github/parameters/macports.yml"
129+
130+
- name: Setup Meson
131+
env:
132+
CC: "gcc-${{env.GCC_VERSION}}"
133+
CXX: "g++-${{env.GCC_VERSION}}"
134+
LDFLAGS: "-static-libgcc -static-libstdc++"
135+
run: |
136+
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
137+
138+
- name: Configure for App Bundle
139+
if: ${{inputs.upload_artefacts}}
140+
env:
141+
CC: "gcc-${{env.GCC_VERSION}}"
142+
CXX: "g++-${{env.GCC_VERSION}}"
143+
LDFLAGS: "-static-libgcc -static-libstdc++"
127144
run: |
128-
brew install pkg-config tbb sdl2 minizip lz4 flac luajit [email protected] libpng gcc@12 ninja meson
129-
145+
meson configure \
146+
-Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=Contents/Frameworks \
147+
--bindir=Contents/MacOS \
148+
--prefix="/" \
149+
build
150+
130151
- name: Build
131152
env:
132-
CC: "gcc-12"
133-
CXX: "g++-12"
153+
CC: "gcc-${{env.GCC_VERSION}}"
154+
CXX: "g++-${{env.GCC_VERSION}}"
134155
LDFLAGS: "-static-libgcc -static-libstdc++"
135156
run: |
136-
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} build
137157
meson compile -C build
138158
159+
- name: Create App Bundle
160+
if: ${{inputs.upload_artefacts}}
161+
run: |
162+
DESTDIR="/tmp/Cortex Command.app" meson install -C build
163+
164+
- name: Tar files
165+
if: ${{inputs.upload_artefacts}}
166+
run: |
167+
tree /tmp/
168+
cd /tmp/
169+
tar -cvf CortexCommand.tar "Cortex Command.app"
170+
171+
- name: Move artefact
172+
if: ${{inputs.upload_artefacts}}
173+
run: cp /tmp/CortexCommand.tar .
174+
139175
- name: Artifact Deploy
140176
if: ${{inputs.upload_artefacts}}
141177
uses: actions/upload-artifact@v3
142178
with:
143179
name: CortexCommand (macOS)
144180
path: |
145-
build/CortexCommand
146-
build/CortexCommand_debug
181+
CortexCommand.tar
147182
if-no-files-found: error
183+
184+
build-windows:
185+
runs-on: windows-latest
186+
name: Windows Build
187+
188+
steps:
189+
- uses: actions/checkout@v3
190+
- uses: actions/setup-python@v3
191+
192+
- name: Install Dependencies
193+
run: |
194+
pip install meson
195+
196+
- name: Setup
197+
run: |
198+
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} --vsenv build
199+
200+
- name: Build
201+
run: |
202+
meson compile -Cbuild

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
*.APS
99
*.user
1010

11+
/.idea
12+
1113
compile_commands.json
1214
/.ccls-cache
1315

1416
/build*
1517

1618
/enc_temp_folder
1719

20+
/.idea
1821
/_Bin
1922
/NATPunchServer/Server/NATCompleteServer/Debug
2023
/NATPunchServer/Server/NATCompleteServer/Release

.vscode/launch.json

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "meson Launch",
9+
"type": "cppdbg",
10+
"osx": {
11+
"MIMode": "lldb"
12+
},
13+
"request": "launch",
14+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand",
15+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
16+
"preLaunchTask": "meson Build Release",
17+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
18+
"presentation": {
19+
"group": "unix"
20+
}
21+
},
22+
{
23+
"name": "meson Debug (Release)",
24+
"type": "cppdbg",
25+
"osx": {
26+
"MIMode": "lldb"
27+
},
28+
"request": "launch",
29+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
30+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
31+
"preLaunchTask": "meson Build Debug (Release)",
32+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
33+
"presentation": {
34+
"group": "unix"
35+
}
36+
},
37+
{
38+
"name": "meson Debug (Minimal)",
39+
"type": "cppdbg",
40+
"osx": {
41+
"MIMode": "lldb"
42+
},
43+
"request": "launch",
44+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
45+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
46+
"preLaunchTask": "meson Build Debug (Minimal)",
47+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
48+
"presentation": {
49+
"group": "unix"
50+
}
51+
},
52+
{
53+
"name": "meson Debug (Full)",
54+
"type": "cppdbg",
55+
"osx": {
56+
"MIMode": "lldb"
57+
},
58+
"request": "launch",
59+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
60+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
61+
"preLaunchTask": "meson Build Debug (Full)",
62+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
63+
"presentation": {
64+
"group": "unix"
65+
}
66+
},
67+
68+
{
69+
"name": "msbuild Launch",
70+
"type": "cppvsdbg",
71+
"request": "launch",
72+
"program": "${workspaceFolder}/../Cortex-Command-Community-Project-Data/Cortex Command.exe",
73+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
74+
"preLaunchTask": "msbuild (Final)",
75+
"presentation": {
76+
"group": "windows"
77+
}
78+
},
79+
{
80+
"name": "msbuild Debug (Release)",
81+
"type": "cppvsdbg",
82+
"request": "launch",
83+
"program": "${workspaceFolder}/../Cortex-Command-Community-Project-Data/Cortex Command.debug.release.exe",
84+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
85+
"preLaunchTask": "msbuild (Debug Release)",
86+
"presentation": {
87+
"group": "windows"
88+
}
89+
},
90+
{
91+
"name": "msbuild Debug (Minimal)",
92+
"type": "cppvsdbg",
93+
"request": "launch",
94+
"program": "${workspaceFolder}/../Cortex-Command-Community-Project-Data/Cortex Command.debug.minimal.exe",
95+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
96+
"preLaunchTask": "msbuild (Debug Minimal)",
97+
"presentation": {
98+
"group": "windows"
99+
}
100+
},
101+
{
102+
"name": "msbuild Debug (Full)",
103+
"type": "cppvsdbg",
104+
"request": "launch",
105+
"program": "${workspaceFolder}/../Cortex-Command-Community-Project-Data/Cortex Command.debug.full.exe",
106+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
107+
"preLaunchTask": "msbuild (Debug Full)",
108+
"presentation": {
109+
"group": "windows"
110+
}
111+
},
112+
113+
{
114+
"name": "meson Launch [Windows]",
115+
"type": "cppvsdbg",
116+
"request": "launch",
117+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.exe",
118+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
119+
"preLaunchTask": "meson Build Release",
120+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
121+
"presentation": {
122+
"group": "windows"
123+
}
124+
},
125+
{
126+
"name": "meson Debug (Release) [Windows]",
127+
"type": "cppvsdbg",
128+
"request": "launch",
129+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.debug.release.exe",
130+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
131+
"preLaunchTask": "meson Build Debug (Release)",
132+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
133+
"presentation": {
134+
"group": "windows"
135+
}
136+
},
137+
{
138+
"name": "meson Debug (Minimal) [Windows]",
139+
"type": "cppvsdbg",
140+
"request": "launch",
141+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.debug.minimal.exe",
142+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
143+
"preLaunchTask": "meson Build Debug (Minimal)",
144+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
145+
"presentation": {
146+
"group": "windows"
147+
}
148+
},
149+
{
150+
"name": "meson Debug (Full) [Windows]",
151+
"type": "cppvsdbg",
152+
"request": "launch",
153+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.debug.full.exe",
154+
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
155+
"preLaunchTask": "meson Build Debug (Full)",
156+
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
157+
"presentation": {
158+
"group": "windows"
159+
}
160+
}
161+
]
162+
}

0 commit comments

Comments
 (0)