Skip to content

Commit

Permalink
1.5.4 (#7)
Browse files Browse the repository at this point in the history
* toggle use_folders on

* Rename pipelines

* its a strcpy :(

* add miniz, add xorstream, add non-working ziploader

* start integrating libzip (WIP)

* use ExternalProject test (doesnt work maybe?!)

* further work in integrating libzippp [WIP]
can't build libzip yet (neither manually nor in the vs build), as it doesn't find zlib

* LibZip build script

* make libzip build too
todo: specify cmake find_library to check the paths we install to

* prepare everything in cmake

* fix rebuilding of libzip/zlib

* fix stupid double quotes

* libzippp works

* Setup libzippp archive loading

* Remove allocation of new data when adding file to TextureServer

* Enable CI on dev

* Create LICENSE (#5)

* add mbedtls

* fix cmake (forgot to substitute, woops)

* fix %lu warnings for printing addresses

* enable debug messages, some formatting

* remove mbedtls, fix libzip for /MD(d)

* some code changes

* fix cmake logic, str replace min cmake version in libzip-src/CMakeLists.txt to 3.15

* linker errors in release

* c++ify a little

* remove unnecessary duplicate c++23 definition

* Fixes to gMod_XorStream when calculating stream length

* Fix loading tpf contents with password

* Implemented complete parsing

* Cleanup file loading

* Change to NI

* Revert "Change to NI"

This reverts commit 19b511d.

* update XorStreamReader to read whole file, then xor

* delete a lot of unused code

* loading logic

* rename console window

* 1.5.4

* remove pointless mutex

* wtf is this code

---------

Co-authored-by: Alex Macocian <[email protected]>
  • Loading branch information
DubbleClick and AlexMacocian committed Nov 17, 2023
1 parent a7e36fc commit ab2d8cd
Show file tree
Hide file tree
Showing 31 changed files with 1,311 additions and 9,294 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
name: uMod CD Pipeline
name: gMod CD Pipeline

on:
push:
Expand Down Expand Up @@ -114,4 +112,3 @@ jobs:
body_mrkdwn: ${{ env.Changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
name: uMod CI Pipeline
name: gMod CI Pipeline

on:
pull_request:
branches:
- master
push:
branches:
- dev
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -89,4 +90,3 @@ jobs:
run: cmake --build build --config Release
env:
DXSDK_DIR: ${{ env.DXSDK_DIR }}

46 changes: 35 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.16)

set(CMAKE_GENERATOR_PLATFORM win32)

project(gMod)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

if(NOT(CMAKE_SIZEOF_VOID_P EQUAL 4))
message(FATAL_ERROR "You are configuring a non 32-bit build, this is not supported. Run cmake with `-A Win32`")
endif()

option(CLEAN "Cleans third party libraries and recompiles them" OFF)
if(${CLEAN} MATCHES "ON")
message("Removing directory: ${PROJECT_SOURCE_DIR}/bin/install")
file(REMOVE_RECURSE ${PROJECT_SOURCE_DIR}/bin/install)
endif()

set(VERSION_MAJOR 1)
set(VERSION_MINOR 5)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)
set(VERSION_TWEAK 0)

set(VERSION_RC "${CMAKE_CURRENT_BINARY_DIR}/version.rc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in" "${VERSION_RC}" @ONLY)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/bin/install)

add_compile_options(/MP /permissive-)

Expand All @@ -30,17 +36,20 @@ find_library(D3DX9_LIB NAMES d3dx9 PATHS $ENV{DXSDK_DIR}/lib/x86 NO_DEFAULT_PATH
find_library(DXGUID_LIB NAMES dxguid PATHS $ENV{DXSDK_DIR}/lib/x86 NO_DEFAULT_PATH)

if(NOT D3D9_LIB)
find_library(D3D9_LIB NAMES d3d9 PATHS ${CMAKE_SOURCE_DIR}/Lib)
find_library(D3D9_LIB NAMES d3d9 PATHS ${CMAKE_SOURCE_DIR}/Lib)
endif()

if(NOT D3DX9_LIB)
find_library(D3DX9_LIB NAMES d3dx9 PATHS ${CMAKE_SOURCE_DIR}/Lib)
find_library(D3DX9_LIB NAMES d3dx9 PATHS ${CMAKE_SOURCE_DIR}/Lib)
endif()

if(NOT DXGUID_LIB)
find_library(DXGUID_LIB NAMES dxguid PATHS ${CMAKE_SOURCE_DIR}/Lib)
find_library(DXGUID_LIB NAMES dxguid PATHS ${CMAKE_SOURCE_DIR}/Lib)
endif()

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(libzippp)

add_library(gMod SHARED)

file(GLOB SOURCES
Expand All @@ -49,9 +58,24 @@ file(GLOB SOURCES
${VERSION_RC}
)

target_link_libraries(gMod PRIVATE ${D3D9_LIB} ${D3DX9_LIB} ${DXGUID_LIB})
target_include_directories(gMod PRIVATE $ENV{DXSDK_DIR}/Include)
target_include_directories(gMod PUBLIC "header")
target_include_directories(gMod PUBLIC
"header"
${CMAKE_INSTALL_PREFIX}/include
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${SOURCES})
target_sources(gMod PRIVATE ${SOURCES})

target_link_libraries(gMod PRIVATE
${D3D9_LIB}
${D3DX9_LIB}
${DXGUID_LIB}
libzippp
psapi
)
target_link_options(gMod PRIVATE
"$<$<CONFIG:DEBUG>:/NODEFAULTLIB:LIBCMT>"
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${SOURCES})
target_sources(gMod PRIVATE ${SOURCES})
target_compile_definitions(gMod PRIVATE
Expand All @@ -61,4 +85,4 @@ target_compile_definitions(gMod PRIVATE
"VC_EXTRALEAN"
DIRECT_INJECTION
LOG_MESSAGE
)
)
Loading

0 comments on commit ab2d8cd

Please sign in to comment.