Skip to content

Commit

Permalink
cleanup remains from old patcher
Browse files Browse the repository at this point in the history
  • Loading branch information
moonshadow565 committed May 12, 2024
1 parent 28f3c2e commit 85e7b84
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 787 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/buildit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ jobs:
curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.13-x86_64-msvc-static.7z"
sha256sum C:/qt5.7z
7z x -oC:/ C:/qt5.7z
- name: "Download patcher"
shell: bash
run: |
curl --output cslol-patcher.zip -L "https://github.com/LeagueToolkit/cslol-patcher/releases/latest/download/cslol-patcher.zip"
7z x -o./cslol-tools/ cslol-patcher.zip
- name: "Build"
run: |
mkdir build
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ jobs:
curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.13-x86_64-msvc-static.7z"
sha256sum C:/qt5.7z
7z x -oC:/ C:/qt5.7z
- name: "Download patcher"
shell: bash
run: |
curl --output cslol-patcher.zip -L "https://github.com/LeagueToolkit/cslol-patcher/releases/latest/download/cslol-patcher.zip"
7z x -o./cslol-tools/ cslol-patcher.zip
- name: "Build"
run: |
mkdir build
Expand Down
40 changes: 21 additions & 19 deletions cslol-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ project(cslol-tools LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(CSLOL_TRASH_PC_SUPPORT "Support trash PCs running windows 7" OFF)

add_subdirectory(dep)

add_library(cslol-lib STATIC
Expand Down Expand Up @@ -41,11 +39,8 @@ add_library(cslol-lib STATIC
lib/lol/patcher/patcher_win32.cpp
lib/lol/patcher/utility/delay.hpp
lib/lol/patcher/utility/macho.hpp
lib/lol/patcher/utility/peex.hpp
lib/lol/patcher/utility/ppp.hpp
lib/lol/patcher/utility/process.hpp
lib/lol/patcher/utility/process_macos.cpp
lib/lol/patcher/utility/process_win32.cpp

lib/lol/utility/cli.hpp
lib/lol/utility/cli.cpp
Expand All @@ -72,10 +67,6 @@ if (WIN32)
)
endif()

if (CSLOL_TRASH_PC_SUPPORT)
target_compile_definitions(cslol-lib PRIVATE -DCSLOL_TRASH_PC_SUPPORT)
endif()

target_compile_definitions(cslol-lib PUBLIC -D_CRT_SECURE_NO_WARNINGS) # lmao, fuck off
target_link_libraries(cslol-lib PUBLIC fmt fmtlog)
target_link_libraries(cslol-lib PRIVATE libdeflate zstd xxhash miniz)
Expand All @@ -97,18 +88,29 @@ add_executable(wad-make
target_link_libraries(wad-make PRIVATE cslol-lib)

if (WIN32)
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/cslol-patcher")
FetchContent_Declare(
cslol-patcher
URL https://github.com/LeagueToolkit/cslol-patcher/releases/download/2/cslol-patcher.zip
URL_HASH SHA256=3807e3e7ebce0dacbde71e22be2b086bcfdc93f34a3eb0aeb806ed979150782e
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP True
)
FetchContent_GetProperties(cslol-patcher)
if(NOT cslol-patcher_POPULATED)
FetchContent_Populate(cslol-patcher)

add_library(cslol-patcher SHARED IMPORTED)
set_target_properties(cslol-patcher PROPERTIES
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/cslol-patcher/cslol-dll.lib
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/cslol-patcher/cslol-dll.dll
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/cslol-patcher/
)
target_link_libraries(cslol-lib PUBLIC cslol-patcher)
add_custom_command(TARGET mod-tools POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:mod-tools> $<TARGET_RUNTIME_DLLS:mod-tools>
COMMAND_EXPAND_LISTS
IMPORTED_IMPLIB "${cslol-patcher_SOURCE_DIR}/cslol-dll.lib"
IMPORTED_LOCATION "${cslol-patcher_SOURCE_DIR}/cslol-dll.dll"
INTERFACE_INCLUDE_DIRECTORIES "${cslol-patcher_SOURCE_DIR}"
)
endif()
endif()

target_link_libraries(cslol-lib PUBLIC cslol-patcher)
add_custom_command(TARGET mod-tools POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:mod-tools> $<TARGET_RUNTIME_DLLS:mod-tools>
COMMAND_EXPAND_LISTS
)
endif()
7 changes: 0 additions & 7 deletions cslol-tools/lib/lol/patcher/patcher_win32.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifdef _WIN32
# include <lol/error.hpp>
# include <lol/patcher/patcher.hpp>
# include <lol/patcher/utility/peex.hpp>

// do not reorder
# include "cslol-api.h"
Expand All @@ -11,12 +10,6 @@ using namespace lol;
using namespace lol::patcher;
using namespace std::chrono_literals;

[[noreturn]] static void newpatch_detected() {
lol_trace_func("Skipping first game on a new patch for config...");
lol_trace_func("Patching should work normally next game!");
lol_throw_msg("NEW PATCH DETECTED, THIS IS NOT AN ERROR!\n");
}

auto patcher::run(std::function<void(Message, char const*)> update,
fs::path const& profile_path,
fs::path const& config_path,
Expand Down
234 changes: 0 additions & 234 deletions cslol-tools/lib/lol/patcher/utility/peex.hpp

This file was deleted.

Loading

0 comments on commit 85e7b84

Please sign in to comment.