Skip to content

Commit

Permalink
Folder restructuring from primedev (#624)
Browse files Browse the repository at this point in the history
Copies of over the primedev folder structure for easier cherry-picking of further changes

Co-authored-by: F1F7Y <[email protected]>
  • Loading branch information
ASpoonPlaysGames and F1F7Y authored Dec 27, 2023
1 parent bb8ed59 commit f5ab6fb
Show file tree
Hide file tree
Showing 304 changed files with 48 additions and 51 deletions.
10 changes: 5 additions & 5 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 @@ -43,8 +43,8 @@ jobs:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
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: 16
style: file
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
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ set(NS_BINARY_DIR ${CMAKE_BINARY_DIR}/game)
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)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Check [BUILD.md](BUILD.md) for instructions on how to compile, you can also down

## Format

This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html), make sure you run `clang-format -i --style=file NorthstarLauncher/*.cpp NorthstarLauncher/*.h NorthstarDLL/*.cpp NorthstarDLL/*.h` when opening a Pull Request. Check the tool's website for instructions on how to integrate it with your IDE.
This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html), make sure you run `clang-format -i --style=file --exclude=primedev/include primedev/*.cpp primedev/*.h` when opening a Pull Request. Check the tool's website for instructions on how to integrate it with your IDE.
8 changes: 0 additions & 8 deletions cmake/Findminhook.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions cmake/Findspdlog.cmake

This file was deleted.

3 changes: 3 additions & 0 deletions primedev/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(Northstar.cmake)
include(Launcher.cmake)
include(WSockProxy.cmake)
4 changes: 2 additions & 2 deletions NorthstarLauncher/CMakeLists.txt → primedev/Launcher.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# NorthstarLauncher

add_executable(NorthstarLauncher
"main.cpp"
"resources.rc"
"primelauncher/main.cpp"
"primelauncher/resources.rc"
)

target_compile_definitions(NorthstarLauncher PRIVATE
Expand Down
5 changes: 0 additions & 5 deletions NorthstarDLL/CMakeLists.txt → primedev/Northstar.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,6 @@ target_link_libraries(NorthstarDLL PRIVATE
version.lib
)

target_include_directories(NorthstarDLL PRIVATE
${CMAKE_SOURCE_DIR}/NorthstarDLL
${CMAKE_SOURCE_DIR}/thirdparty
)

target_precompile_headers(NorthstarDLL PRIVATE pch.h)

target_compile_definitions(NorthstarDLL PRIVATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
find_package(minhook REQUIRED)

add_library(loader_wsock32_proxy SHARED
"dllmain.cpp"
"loader.cpp"
"loader.h"
"wsock32.asm"
"wsock32.def"
"wsockproxy/dllmain.cpp"
"wsockproxy/loader.cpp"
"wsockproxy/loader.h"
"wsockproxy/wsock32.asm"
"wsockproxy/wsock32.def"
)

target_link_libraries(loader_wsock32_proxy PRIVATE
Expand All @@ -31,7 +31,7 @@ target_link_libraries(loader_wsock32_proxy PRIVATE
odbccp32.lib
)

target_precompile_headers(loader_wsock32_proxy PRIVATE pch.h)
target_precompile_headers(loader_wsock32_proxy PRIVATE wsockproxy/pch.h)

target_compile_definitions(loader_wsock32_proxy PRIVATE
UNICODE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmake/Findlibcurl.cmake → primedev/cmake/Findlibcurl.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


if (NOT libcurl_FOUND)
check_init_submodule(${PROJECT_SOURCE_DIR}/thirdparty/libcurl)
check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl)

set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
set(BUILD_CURL_EXE OFF CACHE BOOL "Build curl EXE")
Expand All @@ -13,6 +13,6 @@ if (NOT libcurl_FOUND)
set(CURL_CA_BUNDLE "none" CACHE STRING "Disable CA Bundle")
set(CURL_CA_PATH "none" CACHE STRING "Disable CA Path")

add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/libcurl libcurl)
add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl libcurl)
set(libcurl_FOUND 1 PARENT_SCOPE)
endif()
7 changes: 7 additions & 0 deletions primedev/cmake/Findminhook.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

if(NOT minhook_FOUND)
check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook)

add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook minhook)
set(minhook_FOUND 1)
endif()
4 changes: 2 additions & 2 deletions cmake/Findminizip.cmake → primedev/cmake/Findminizip.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

if(NOT minizip_FOUND)
check_init_submodule(${PROJECT_SOURCE_DIR}/thirdparty/minizip)
check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip)

set(MZ_ZLIB ON CACHE BOOL "Enable ZLIB compression, needed for DEFLATE")
set(MZ_BZIP2 OFF CACHE BOOL "Disable BZIP2 compression")
Expand All @@ -10,7 +10,7 @@ if(NOT minizip_FOUND)
set(MZ_ZSTD OFF CACHE BOOL "Disable ZSTD compression")
set(MZ_SIGNING OFF CACHE BOOL "Disable zip signing support")

add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/minizip minizip)
add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip minizip)
set(minizip_FOUND 1 PARENT_SCOPE)
endif()

7 changes: 7 additions & 0 deletions primedev/cmake/Findspdlog.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

if(NOT spdlog_FOUND)
check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog)

add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog spdlog)
set(spdlog_FOUND 1)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource1.h"
#include "../NorthstarDLL/ns_version.h"
#include "../ns_version.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion NorthstarDLL/resources.rc → primedev/resources.rc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource1.h"
#include "../NorthstarDLL/ns_version.h"
#include "../primedev/ns_version.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f5ab6fb

Please sign in to comment.