Skip to content

Commit

Permalink
Merge 8f503ce into fbaba57
Browse files Browse the repository at this point in the history
  • Loading branch information
th3-z committed Sep 25, 2019
2 parents fbaba57 + 8f503ce commit 9f19ab3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3

COPY magicked_admin /magicked_admin

RUN pip install colorama termcolor lxml requests
RUN pip install -r requirements.txt

WORKDIR /magicked_admin

Expand Down
3 changes: 2 additions & 1 deletion admin_patches/admin_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run(target=None):
.format(server_path), pause=True)

info("Validating files...")
target_path = path.join(server_path, "KFGame/Web/ServerAdmin/")
target_path = path.join(server_path, "KFGame/Web/ServerAdmin")
if not validate_files(target_path):
die("Server file validation failed, possible reasons:"
"\n\t - Game update"
Expand All @@ -56,6 +56,7 @@ def run(target=None):

info("Patching files...")
patches_path = find_data_file(PATCHES_PATH)

if not patch_files(target_path, patches_path):
die("Patching failed")
else:
Expand Down
10 changes: 5 additions & 5 deletions admin_patches/patches/header_base.inc.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/ServerAdmin/header_base.inc b/ServerAdmin/header_base.inc
index 217a460..9b085bd 100755
--- a/ServerAdmin/header_base.inc
+++ b/ServerAdmin/header_base.inc
diff --git a/header_base.inc b/header_base.inc
index 217a460..9e2fe92 100755
--- a/header_base.inc
+++ b/header_base.inc
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
+ <!-- KF2-MA-INSTALLED-FLAG -->
+ <!-- KF2-MA-INSTALLED-FLAG -->
<title>Killing Floor 2 WebAdmin - <%page.title%></title>
<link rel="stylesheet" type="text/css" href="/images/kf2.css?gzip" />
<link rel="stylesheet" type="text/css" href="/images/kf2modern.css?gzip" />
2 changes: 1 addition & 1 deletion admin_patches/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
build_exe_options = {
"packages": ["os", "queue", "idna", "encodings", "tkinter"],
"excludes": [],
"includes": [],
"includes": ["tkinter"],
"include_files": includefiles,
"include_msvcr": True,
"optimize": 2,
Expand Down
6 changes: 4 additions & 2 deletions admin_patches/utils/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from hashlib import md5

from checksums import ORIG_MD5
from utils import find_data_file, info
from utils import find_data_file, info, warning
from utils.patch import fromfile


Expand Down Expand Up @@ -37,5 +37,7 @@ def patch_files(target_path, patches_path):
info("Applying {}".format(filename + ".patch"))

patch = fromfile(patch_path)
patch.apply(0, target_path)
success = patch.apply(0, target_path)
if not success:
warning("Patch failed to apply successfully")
return True

0 comments on commit 9f19ab3

Please sign in to comment.