Skip to content

Commit

Permalink
Merge branch 'R2Northstar:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf109909 authored Jan 4, 2024
2 parents 6f823ce + dcf6e1b commit c6319c9
Show file tree
Hide file tree
Showing 323 changed files with 1,823 additions and 1,520 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseCRLF: false
AccessModifierOffset: -4
AlignTrailingComments: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
Expand Down Expand Up @@ -34,3 +35,5 @@ IndentExternBlock: Indent
PointerAlignment: Left
SortIncludes: false
NamespaceIndentation: All
PackConstructorInitializers: NextLine
BreakConstructorInitializersBeforeComma: true
26 changes: 26 additions & 0 deletions .cmake-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"format": {
"line_width": 120,
"tab_size": 4,
"use_tabchars": false,
"fractional_tab_policy": "use-space",
"max_subgroups_hwrap": 2,
"max_pargs_hwrap": 2,
"max_rows_cmdline": 2,
"separate_ctrl_name_with_space": false,
"separate_fn_name_with_space": false,
"dangle_parens": true,
"dangle_align": "child",
"min_prefix_chars": 4,
"max_prefix_chars": 10,
"max_lines_hwrap": 2,
"line_ending": "unix",
"command_case": "canonical",
"keyword_case": "unchanged",
"always_wrap": [],
"enable_sort": true,
"autosort": false,
"require_valid_layout": false,
"layout_passes": {}
}
}
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Setup resource file version
shell: bash
run: |
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarLauncher/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarDLL/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' primedev/primelauncher/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' primedev/resources.rc
FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | sed -E 's/-rc[0-9]+//' | tr -d '[:alpha:]')
sed -i "s/0,0,0,1/${FILEVERSION}/g" NorthstarDLL/ns_version.h
sed -i "s/0,0,0,1/${FILEVERSION}/g" primedev/ns_version.h
- name: Build
run: cmake --build .
- name: Extract Short Commit Hash
Expand All @@ -41,10 +41,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.13
- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: 'NorthstarDLL NorthstarLauncher'
exclude: 'NorthstarDLL/include loader_launcher_proxy loader_wsock32_proxy'
source: 'primedev'
exclude: 'primedev/include primedev/thirdparty primedev/wsockproxy'
extensions: 'h,cpp'
clangFormatVersion: 13
clangFormatVersion: 16
style: file

format-check-cmake-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: puneetmatharu/[email protected]
with:
args: "--in-place"
- run: |
git diff --exit-code
18 changes: 18 additions & 0 deletions .github/workflows/merge-conflict-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Merge Conflict Auto Label
on:
push:
branches:
- main
schedule:
- cron: "10 21 * * *"

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "merge conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Setup resource file version
shell: bash
run: |
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarLauncher/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarDLL/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' primedev/primelauncher/resources.rc
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' primedev/resources.rc
FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | sed -E 's/-rc[0-9]+//' | tr -d '[:alpha:]')
sed -i "s/0,0,0,1/${FILEVERSION}/g" NorthstarDLL/ns_version.h
sed -i "s/0,0,0,1/${FILEVERSION}/g" primedev/ns_version.h
- name: Build
run: cmake --build .
- name: Upload launcher build as artifact
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "thirdparty/libcurl"]
path = thirdparty/libcurl
path = primedev/thirdparty/libcurl
url = https://github.com/curl/curl
ignore = untracked
[submodule "thirdparty/minhook"]
path = thirdparty/minhook
path = primedev/thirdparty/minhook
url = https://github.com/TsudaKageyu/minhook
ignore = untracked
[submodule "thirdparty/minizip"]
path = thirdparty/minizip
path = primedev/thirdparty/minizip
url = https://github.com/zlib-ng/minizip-ng.git
37 changes: 24 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
cmake_minimum_required(VERSION 3.15)

project(Northstar CXX ASM_MASM)
project(
Northstar
CXX
ASM_MASM
)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
set(CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
endif()

# Language specs
Expand All @@ -15,19 +23,22 @@ set(CMAKE_VS_PLATFORM_TOOLSET v143)

# This determines the real binary root directory
set(NS_BINARY_DIR ${CMAKE_BINARY_DIR}/game)
# NOTE [Fifty]: Visual studio deems Build root with the value "${projectDir}"
# in CMakeSettings.json as invalid and defaults to using a temporary dir
# somewhere in %USER%/CMakeBuilds. To combat this we set it to "${projectDir}/build"
# and then link binaries in ${CMAKE_BINARY_DIR}/game. This means you can copy your
# game into ${CMAKE_BINARY_DIR}/game without it being cluttered up by cmake files.
# NOTE [Fifty]: Visual studio deems Build root with the value "${projectDir}" in CMakeSettings.json as invalid and
# defaults to using a temporary dir somewhere in %USER%/CMakeBuilds. To combat this we set it to "${projectDir}/build"
# and then link binaries in ${CMAKE_BINARY_DIR}/game. This means you can copy your game into ${CMAKE_BINARY_DIR}/game
# without it being cluttered up by cmake files.

message(STATUS "NS: Building to ${NS_BINARY_DIR}")


list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(
APPEND
CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/primedev/cmake"
)
include(utils)

include_directories(primedev)
include_directories(primedev/thirdparty)

# Targets
add_subdirectory(loader_wsock32_proxy)
add_subdirectory(NorthstarDLL)
add_subdirectory(NorthstarLauncher)
add_subdirectory(primedev)
188 changes: 0 additions & 188 deletions NorthstarDLL/CMakeLists.txt

This file was deleted.

8 changes: 0 additions & 8 deletions NorthstarDLL/audio_asm.asm

This file was deleted.

11 changes: 0 additions & 11 deletions NorthstarDLL/client/r2client.h

This file was deleted.

Loading

0 comments on commit c6319c9

Please sign in to comment.