Skip to content

Commit af7f4ff

Browse files
authored
Merge pull request #117 from ASM-Studios/dev
Dev
2 parents 6a61818 + 917a2d0 commit af7f4ff

File tree

95 files changed

+17084
-783
lines changed

Some content is hidden

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

95 files changed

+17084
-783
lines changed

.clang-tidy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ Checks: "bugprone-*,cppcoreguidelines-*,clang-analyzer-*,readability-*,misc-*,mo
77
-readability-magic-numbers,
88
-unused-includes,
99
-bugprone-easily-swappable-parameters,
10-
-readability-braces-around-statements
10+
-readability-braces-around-statements,
11+
-readability-convert-member-functions-to-static
1112
"

.github/workflows/deploy.yml

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,12 @@ jobs:
5151
./vcpkg/bootstrap-vcpkg.sh
5252
fi
5353
./vcpkg/vcpkg install
54-
- name: Setup CMake
55-
uses: jwlawson/actions-setup-cmake@v2
56-
with:
57-
cmake-version: '3.27.4'
5854
- name: Compilation
5955
run: |
6056
./release.sh
6157
- name: Create archive
6258
run: |
63-
zip -r linux_executables.zip r-type_client r-type_server
59+
zip -r linux_executables.zip r-type_client r-type_server assets server/config.json client/config.json shared/Scenarios
6460
- name: Upload Release Asset
6561
id: upload-release-asset-linux
6662
uses: actions/upload-release-asset@v1
@@ -72,39 +68,48 @@ jobs:
7268
asset_name: linux_executables.zip
7369
asset_content_type: application/zip
7470

75-
# build_and_deploy_windows:
76-
# name: Build and deploy (Windows)
77-
# runs-on: windows-latest
78-
# needs: create_release
79-
# steps:
80-
# - name: Checkout repository
81-
# uses: actions/checkout@v4
82-
# - name: Cache vcpkg
83-
# uses: actions/cache@v4
84-
# with:
85-
# path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
86-
# key: ${{ hashFiles('vcpkg.json') }}
87-
# - name: Setup vcpkg
88-
# run: |
89-
# if (-not (Test-Path -Path "C:\vcpkg")) {
90-
# git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
91-
# .\vcpkg\bootstrap-vcpkg.bat
92-
# }
93-
# C:\vcpkg\vcpkg install
94-
# - name: Compilation # ne fonctionne pas encore
95-
# run: |
96-
# cmake -S . -B build -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release
97-
# cmake --build .
98-
# - name: Create archive
99-
# run: |
100-
# Compress-Archive -Path r-type_client.exe, r-type_server.exe -DestinationPath windows_executables.zip
101-
# - name: Upload Release Asset
102-
# id: upload-release-asset-windows
103-
# uses: actions/upload-release-asset@v1
104-
# env:
105-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106-
# with:
107-
# upload_url: ${{ needs.create_release.outputs.upload_url }}
108-
# asset_path: ./windows_executables.zip
109-
# asset_name: windows_executables.zip
110-
# asset_content_type: application/zip
71+
build_and_deploy_windows:
72+
name: Build and deploy (Windows)
73+
runs-on: windows-latest
74+
needs: create_release
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
- name: Cache vcpkg
79+
uses: actions/cache@v4
80+
with:
81+
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
82+
key: ${{ hashFiles('vcpkg.json') }}
83+
- name: Setup vcpkg
84+
run: |
85+
if (-not (Test-Path -Path "C:\vcpkg")) {
86+
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
87+
.\vcpkg\bootstrap-vcpkg.bat
88+
}
89+
C:\vcpkg\vcpkg install
90+
- name: Setup Ninja
91+
uses: seanmiddleditch/gha-setup-ninja@master
92+
- name: Setup MSVC
93+
uses: ilammy/[email protected]
94+
- name: Compilation
95+
run: |
96+
mkdir cmake-build-windows
97+
cd cmake-build-windows
98+
cmake .. --preset=windows-from-windows -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
99+
cmake --build .
100+
- name: Create archive
101+
run: |
102+
Get-ChildItem -Path .\server\* | Where-Object { $_.Name -ne 'config.json' } | Remove-Item -Recurse -Force
103+
Get-ChildItem -Path .\client\* | Where-Object { $_.Name -ne 'config.json' } | Remove-Item -Recurse -Force
104+
Get-ChildItem -Path .\shared\* | Where-Object { $_.Name -ne 'Scenarios' } | Remove-Item -Recurse -Force
105+
Compress-Archive -Path r-type_client.exe, r-type_server.exe, *.dll, assets, server, client, shared -DestinationPath windows_executables.zip
106+
- name: Upload Release Asset
107+
id: upload-release-asset-windows
108+
uses: actions/upload-release-asset@v1
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
with:
112+
upload_url: ${{ needs.create_release.outputs.upload_url }}
113+
asset_path: ./windows_executables.zip
114+
asset_name: windows_executables.zip
115+
asset_content_type: application/zip

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Executables
44
r-type_server
55
r-type_client
6+
runner_client
67

78
# Secrets
89
note
@@ -22,10 +23,12 @@ docs/docs/html/*
2223

2324
# CMake
2425

26+
tags
2527
.cache
2628
build
2729
cmake-build-debug
2830
cmake-build-release
31+
cmake-build-windows
2932

3033
### C ###
3134

@@ -119,6 +122,7 @@ dkms.conf
119122
*.app
120123

121124
### IDE ###
125+
.gdbinit
122126
.obsidian
123127
compile_flags.txt
124128
*.lock

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
cmake_minimum_required(VERSION 3.27.4)
22
project(rtype)
33

4+
if (WIN32 OR MSVC)
5+
add_definitions(-D_WIN32_WINNT=0x0601)
6+
endif()
7+
8+
include_directories(shared/Singleton/include)
9+
include_directories(shared/Clock/include)
410
include_directories(shared/network/include)
511
include_directories(shared/ECS/include)
612
include_directories(shared/ECS/src/Factories)

CMakePresets.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"generator": "Ninja",
77
"binaryDir": "${sourceDir}/cmake-build-debug",
88
"cacheVariables": {
9+
"VCPKG_MANIFEST_INSTALL": "ON",
910
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
1011
"CMAKE_BUILD_TYPE": "Debug",
1112
"CMAKE_CXX_COMPILER": "g++"
@@ -38,7 +39,8 @@
3839
"cacheVariables": {
3940
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
4041
"CMAKE_BUILD_TYPE": "Release",
41-
"CMAKE_CXX_COMPILER": "g++"
42+
"CMAKE_CXX_COMPILER": "cl.exe",
43+
"CMAKE_CXX_LINK_EXECUTABLE": "link.exe"
4244
}
4345
}
4446
]

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ For developers, refer to the [Developers.md](docs/Developers.md) file.
8181

8282
This project is under the GNU General Public License v3.0.
8383

84+
All assets used in this project are under the Creative Commons License.
85+
8486
## Assets
8587

8688
All assets used in this project are under the Creative Commons License.
@@ -90,3 +92,4 @@ Here are the authors of some of the assets:
9092
- [helianthus-games](https://helianthus-games.itch.io/)
9193
- [kayillustrations](https://kayillustrations.itch.io/)
9294
- [ansimuz](https://ansimuz.itch.io/)
95+
- [foozlecc](https://foozlecc.itch.io/)
85.2 KB
Loading
66.9 KB
Loading
34.6 KB
Loading
41.7 KB
Loading

0 commit comments

Comments
 (0)