Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Globals:
GITHUB_MASTER_BASE_URL = "https://raw.githubusercontent.com/07th-mod/python-patcher/master/"
# The installer info version this installer is compatibile with
# Increment it when you make breaking changes to the json files
JSON_VERSION = 11
JSON_VERSION = 12

# Define constants used throughout the script. Use function calls to enforce variables as const
IS_WINDOWS = platform.system() == "Windows"
Expand Down
10 changes: 9 additions & 1 deletion installConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import hashlib
import zlib
import common
from datetime import datetime

Expand All @@ -19,6 +20,13 @@ def getSHA256(path):
m.update(file.read())
return m.hexdigest()

def getCRC32(path):
"""Gets the SHA256 Hex digest of a file at path as a string,
e.g. '51100D6D'
The file must fit in memory"""
with open(path, "rb") as file:
return hex(zlib.crc32(file.read()) & 0xffffffff)

def getUnityVersion(datadir, verbosePrinting=True):
# type: (str, bool) -> str
"""
Expand Down Expand Up @@ -49,7 +57,7 @@ def checkChecksumListMatches(installPath, checksumList):
print("checkChecksumListMatches(): File at {} does not exist, skipping this file".format(path))
continue

actualChecksum = getSHA256(path)
actualChecksum = getCRC32(path)

if actualChecksum.lower() == checksum.lower():
print("checkChecksumListMatches(): File at {} has matching checksum {}".format(path, actualChecksum))
Expand Down
14 changes: 7 additions & 7 deletions installData.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 10,
"version": 12,
"mods": [
{
"family": "higurashi",
Expand Down Expand Up @@ -486,20 +486,20 @@
{"name": "ui", "id": "ui-windows", "os": ["windows"], "unity": "2017.2.5", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=win&unity=2017.2.5"},
{"name": "ui", "id": "ui-macos", "os": ["mac"], "unity": "2017.2.5", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=unix&unity=2017.2.5"},
{"name": "ui", "id": "ui-linux-steam", "os": ["linux"], "unity": "2017.2.5", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=unix&unity=2017.2.5", "targetChecksums": [
["sharedassets0.assets.backup", "24e34f48f675d8577fdf1e01baa9a40a1c1505d39283def309f4245536c73220"],
["sharedassets0.assets", "24e34f48f675d8577fdf1e01baa9a40a1c1505d39283def309f4245536c73220"]
["sharedassets0.assets.backup", "4C846650"],
["sharedassets0.assets", "4C846650"]
]},
{"name": "ui", "id": "ui-linux-gog-mg", "os": ["linux"], "unity": "2017.2.5", "url":"https://07th-mod.com/rikachama/ui/Matsuribayashi-UI_2017.2.5_unix_gog_mg.7z", "targetChecksums": [
["sharedassets0.assets.backup", "A200EC2A85349BC03B59C8E2F106B99ED0CBAAA25FC50928BB8BA2E2AA90FCE9"],
["sharedassets0.assets", "A200EC2A85349BC03B59C8E2F106B99ED0CBAAA25FC50928BB8BA2E2AA90FCE9"]
["sharedassets0.assets.backup", "51100D6D"],
["sharedassets0.assets", "51100D6D"]
]},
{"name": "ui", "id": "ui-windows-old", "os": ["windows"], "unity": "5.6.7f1", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=win&unity=2017.2.5"},
{"name": "ui", "id": "ui-windows-gog-upgraded", "os": ["windows"], "unity": "2017.2.5", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=win&unity=2017.2.5", "targetChecksums": [
["sharedassets0.assets.backup", "22890F97997B7B7BD21F5E64F69E1A6FB2E0FF82B3DF6C59860D8D1A56B23BBB"]
["sharedassets0.assets.backup", "BE4892CF"]
]},
{"name": "ui", "id": "ui-linux-old", "os": ["linux"], "unity": "5.6.7f1", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=unix&unity=2017.2.5"},
{"name": "ui", "id": "ui-linux-gog-upgraded", "os": ["linux"], "unity": "2017.2.5", "url":"https://07th-mod.com/ui.php?chapter=matsuribayashi&os=unix&unity=2017.2.5", "targetChecksums": [
["sharedassets0.assets.backup", "a1f7b39665d63d704bc14275dcdf71cf4cca9532ac61bee23b5b18b62a5cd3af"]
["sharedassets0.assets.backup", "1A9CD5FC"]
]},
{"name": "system", "id": "system-gog-linux", "os": ["linux"], "unity": "5.6.7f1", "url": "https://07th-mod.com/rikachama/matsuri-system/Matsuribayashi-System_unix.7z"},
{"name": "system", "id": "system-gog-windows", "os": ["windows"], "unity": "5.6.7f1", "url": "https://07th-mod.com/rikachama/matsuri-system/Matsuribayashi-System.7z"}
Expand Down