Skip to content

Commit 7d7ca1a

Browse files
authored
Hou Plus Installer Preparation (#220)
Add Hou Plus (initial trial) to Installer * Add Rei Plus installer button * Update Installer for Hou Plus [unfinished URLs left as TODOs] * Add UI file URLs and remove og-dll-asset-update for now * Remove unix movie (.webm) as hou can play mp4 on mac/linux * Update cachedDownloadSizes # Conflicts: # cachedDownloadSizes.json * Load Install page description from github - Add retrieval of a JSON file containing any generic, data we wish to display/use in the installer. - For now only Hou Plus uses this data, to display information about the status of the mod on its installation page - This JSON file is generated in the new repo python-patcher-updates. - Having a generated JSON file avoids manually editing JSON files where we can't put comments, and allows storing data in separate files etc. * Use updated mod updates URL * Update script version
1 parent ef4844e commit 7d7ca1a

11 files changed

+106
-7
lines changed

cachedDownloadSizes.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@
5858
"https://07th-mod.com/rikachama/audio/Higurashi-OG-BGM-SE.7z": 141845264,
5959
"https://07th-mod.com/rikachama/audio/Higurashi-Remake-BGM.7z": 58551253,
6060
"https://07th-mod.com/rikachama/audio/HigurashiKai-OG-BGM-SE.7z": 99901166,
61+
"https://07th-mod.com/rikachama/audio/Hou-Plus-BGM-SE.7z": 331353506,
6162
"https://07th-mod.com/rikachama/audio/MangaGamer-Answer-BGM-SE-Restore.7z": 191763378,
6263
"https://07th-mod.com/rikachama/audio/MangaGamer-Question-BGM-SE-Restore.7z": 96916638,
6364
"https://07th-mod.com/rikachama/audio/Rei-BGM-SE.7z": 98043879,
6465
"https://07th-mod.com/rikachama/graphics/ConsoleArcs-Graphics.7z": 2582826726,
6566
"https://07th-mod.com/rikachama/graphics/Himatsubushi-Graphics.7z": 629705673,
67+
"https://07th-mod.com/rikachama/graphics/Hou-Plus-Graphics.7z": 681819126,
6668
"https://07th-mod.com/rikachama/graphics/Matsuribayashi-Graphics.7z": 1184019461,
6769
"https://07th-mod.com/rikachama/graphics/Meakashi-Graphics.7z": 905125642,
6870
"https://07th-mod.com/rikachama/graphics/Minagoroshi-Graphics.7z": 1044205595,
@@ -98,11 +100,14 @@
98100
"https://07th-mod.com/rikachama/og-hou-sprites/hou-ogsprites-ep09.7z": 98108774,
99101
"https://07th-mod.com/rikachama/tsumi-system/Tsumihoroboshi-System.7z": 22511057,
100102
"https://07th-mod.com/rikachama/tsumi-system/this-file-intentionally-left-blank.7z": 32,
103+
"https://07th-mod.com/rikachama/ui/Hou-Plus-UI_2019.4.4_unix.7z": 8213798,
104+
"https://07th-mod.com/rikachama/ui/Hou-Plus-UI_2019.4.4_win.7z": 8208025,
101105
"https://07th-mod.com/rikachama/ui/Matsuribayashi-UI_2017.2.5_unix_gog_mg.7z": 16788726,
102106
"https://07th-mod.com/rikachama/video/ConsoleArcs-Movie.7z": 187522730,
103107
"https://07th-mod.com/rikachama/video/ConsoleArcs-Movie_UNIX.7z": 287760347,
104108
"https://07th-mod.com/rikachama/video/Himatsubushi-Movie.7z": 35305006,
105109
"https://07th-mod.com/rikachama/video/Himatsubushi-Movie_UNIX.7z": 39109862,
110+
"https://07th-mod.com/rikachama/video/Hou-Plus-Movie.7z": 181045870,
106111
"https://07th-mod.com/rikachama/video/Matsuribayashi-Movie.7z": 89598773,
107112
"https://07th-mod.com/rikachama/video/Matsuribayashi-Movie_UNIX.7z": 190479863,
108113
"https://07th-mod.com/rikachama/video/Meakashi-Movie.7z": 37285873,
@@ -121,6 +126,7 @@
121126
"https://07th-mod.com/rikachama/video/Watanagashi-Movie_UNIX.7z": 54868919,
122127
"https://07th-mod.com/rikachama/voice/ConsoleArcs-Voices.7z": 2066713772,
123128
"https://07th-mod.com/rikachama/voice/Himatsubushi-Voices.7z": 128808310,
129+
"https://07th-mod.com/rikachama/voice/Hou-Plus-Voices.7z": 190697532,
124130
"https://07th-mod.com/rikachama/voice/Matsuribayashi-Voices.7z": 473869798,
125131
"https://07th-mod.com/rikachama/voice/Meakashi-Voices.7z": 227279402,
126132
"https://07th-mod.com/rikachama/voice/Minagoroshi-Voices.7z": 530726655,
@@ -160,6 +166,7 @@
160166
"https://github.com/07th-mod/higurashi-rei/releases/latest/download/Rei.Voice.and.Graphics.Patch.zip": 2384978,
161167
"https://github.com/07th-mod/himatsubushi/releases/download/v0.5.1/Himatsubushi.Voice.Patch.v0.5.1.7z": 414749,
162168
"https://github.com/07th-mod/himatsubushi/releases/latest/download/Himatsubushi.Voice.and.Graphics.Patch.zip": 7754808,
169+
"https://github.com/07th-mod/hou-plus/releases/latest/download/Hou.Voice.and.Graphics.Patch.zip": 2145340,
163170
"https://github.com/07th-mod/matsuribayashi/releases/download/v0.0.1/Matsuribayashi.Voice.Patch.v0.0.1.zip": 1472655,
164171
"https://github.com/07th-mod/matsuribayashi/releases/latest/download/Matsuribayashi.Voice.and.Graphics.Patch.zip": 4942860,
165172
"https://github.com/07th-mod/meakashi/releases/download/v0.5.0/Meakashi.Voice.Patch.v0.5.0.7z": 4709083,

common.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,15 @@ def handle_starttag(self, tag, attrs):
706706

707707
return parser.months_remaining, parser.funding_goal_percentage
708708

709+
def preloadModUpdatesHTML():
710+
html, errorInfo = getJSON("https://github.com/07th-mod/python-patcher-updates/releases/latest/download/updates.json", isURL=True)
711+
712+
if errorInfo is not None:
713+
print('WARNING: Failed to get mod updates from server')
714+
print(errorInfo)
715+
716+
return html
717+
709718
def getJSON(jsonURI, isURL):
710719
#type: (str, bool) -> (Dict, Exception)
711720
"""

httpGUI.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,13 +733,32 @@ def __init__(self):
733733

734734
# This caches the self.try_start_install(...) function, only used for install previews
735735
self.cachedFullInstallConfigs = {} # type: Dict[str, Tuple[bool, installConfiguration.FullInstallConfiguration]]
736+
self.updates = None
736737

737738
def shutdown(self):
738739
self.installRunningLock.release()
739740

740741
def loadDonationStatus(self):
741742
self.donationMonthsRemaining, self.donationProgressPercent = common.getDonationStatus()
742743

744+
def preloadModUpdatesHTML(self):
745+
self.updates = common.preloadModUpdatesHTML()
746+
747+
def getUpdate(self, modName):
748+
try:
749+
if self.updates is None:
750+
return '<strong>ERROR: Failed to get Mod Updates - self.updates is None'
751+
752+
if modName not in self.updates:
753+
return '<strong>ERROR: Failed to get Mod Updates HTML for {} - modName missing from self.updates</strong>'.format(modName)
754+
755+
if 'status' not in self.updates[modName]:
756+
return '<strong>ERROR: Failed to get Mod Updates HTML for {} - status is missing! </strong>'.format(modName)
757+
758+
return self.updates[modName]['status']
759+
except Exception as e:
760+
return 'ERROR: Failed to get Mod Updates - {}'.format(e)
761+
743762
def setSubModconfigs(self, allSubModConfigs):
744763
"""
745764
Set the submodconfigs to be used for the install.
@@ -884,6 +903,7 @@ def getSubModHandlesRequestHandler(requestData):
884903
'modOptionGroups': modOptionsToWebFormat(subModConfig.modOptions),
885904
'family': subModConfig.family,
886905
'identifiers': subModConfig.identifiers,
906+
'modUpdatesHTML': self.getUpdate(subModConfig.modName),
887907
}
888908
)
889909

httpGUI/img/games/header10.png

225 KB
Loading

httpGUI/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ <h3>Error while checking if installer is latest</h3>
6363
<div class="container">
6464
<div class="row">
6565
<div class="col-md-6">
66-
<h2 class="uppercase mb8">Higurashi Rei</h2>
67-
<p class="lead mb0">New chapter: Higurashi Rei<br></p>
68-
<a class="btn btn-lg" onclick="setModNameAndNavigate('Rei')">INSTALL</a>
66+
<h2 class="uppercase mb8">Higurashi Hou Plus</h2>
67+
<p class="lead mb0">New chapter: Higurashi Hou Plus<br></p>
68+
<a class="btn btn-lg" onclick="setModNameAndNavigate('Hou Plus')">INSTALL</a>
6969
</div>
7070
</div>
7171

httpGUI/installer.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ <h4>🔧 Adding Console Arcs to Steam Library</h4>
358358
<li>Opening videos</li>
359359
</ul>
360360
</div>
361+
<!-- In the future should remotely get installer page description, but for now just test it on Hou Plus only -->
362+
<div v-else-if="selectedSubMod.modName === 'Hou Plus'">
363+
<span class="rendered-markdown" v-html="renderHTML(selectedSubMod.modUpdatesHTML)"></span>
364+
</div>
361365
<div v-else>
362366
For details and screenshots on what the mod contains, <a href="https://07th-mod.com/wiki/Higurashi/Higurashi-Getting-started/" target="_blank">see the Intro page on our Wiki</a><br>
363367
This mod contains:

httpGUI/python-patcher-index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ window.onload = function onWindowLoaded() {
8585
img: 'img/games/header9.png',
8686
dataFilter: 'Bonus Content',
8787
},
88+
'Hou Plus': {
89+
img: 'img/games/header10.png',
90+
dataFilter: 'Bonus Content',
91+
}
8892
},
8993
// Data filters are defined manually so you can set the order
9094
dataFilters: ['Question Arcs', 'Answer Arcs', 'Console Arcs', 'Bonus Content'],

httpGUI/python-patcher-lib.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ Continue install anyway?`)) {
243243
renderMarkdown(markdownText) {
244244
return DOMPurify.sanitize(marked(markdownText));
245245
},
246+
renderHTML(htmlText) {
247+
return DOMPurify.sanitize(htmlText);
248+
},
246249
validateInstallPath(deleteVersionInformation, allowCache, noProgressUpdate) {
247250
// Just validate the install - don't actually start the installation
248251
const args = {
@@ -478,7 +481,8 @@ Continue install anyway?`)) {
478481
'Tsumihoroboshi Ch.6': 'https://github.com/07th-mod/tsumihoroboshi/releases',
479482
'Minagoroshi Ch.7': 'https://github.com/07th-mod/minagoroshi/releases',
480483
'Matsuribayashi Ch.8': 'https://github.com/07th-mod/matsuribayashi/releases',
481-
'Rei': 'https://github.com/07th-mod/higurashi-rei/releases'
484+
'Rei': 'https://github.com/07th-mod/higurashi-rei/releases',
485+
'Hou Plus': 'https://github.com/07th-mod/hou-plus/releases'
482486
}, app.selectedMod, null);
483487

484488
app.metaInfo = responseData.metaInfo;

installData.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,33 @@
725725
}
726726
]
727727
},
728+
{
729+
"family": "higurashi",
730+
"name": "Hou Plus",
731+
"target": "Hou Plus",
732+
"CFBundleName": "Higurashi When They Cry Hou+",
733+
"dataname": "HigurashiEp10_Data",
734+
"identifiers" : ["Higurashi When They Cry Hou Plus_Data", "HigurashiEp10_Data", "HigurashiEp10.x86_64", "HigurashiEp10.exe"],
735+
"submods": [
736+
{
737+
"name": "full",
738+
"descriptionID": "higurashiFull",
739+
"files": [
740+
{"name": "graphics", "url": "https://07th-mod.com/rikachama/graphics/Hou-Plus-Graphics.7z", "priority": 0},
741+
{"name": "movie", "url": "https://07th-mod.com/rikachama/video/Hou-Plus-Movie.7z", "priority": 0},
742+
{"name": "voices", "url": "https://07th-mod.com/rikachama/voice/Hou-Plus-Voices.7z", "priority": 0},
743+
{"name": "bgm-se", "url": "https://07th-mod.com/rikachama/audio/Hou-Plus-BGM-SE.7z", "priority": 0},
744+
{"name": "ui", "url": null, "priority": 0, "installOnRepair": true},
745+
{"name": "script", "url": "https://github.com/07th-mod/hou-plus/releases/latest/download/Hou.Voice.and.Graphics.Patch.zip", "priority": 5, "installOnRepair": true}
746+
],
747+
"fileOverrides": [
748+
{"name": "ui", "id": "ui-windows-mg","os": ["windows"], "unity": "2019.4.4", "url":"https://07th-mod.com/rikachama/ui/Hou-Plus-UI_2019.4.4_win.7z"},
749+
{"name": "ui", "id": "ui-unix-mg", "os": ["mac", "linux"], "unity": "2019.4.4", "url":"https://07th-mod.com/rikachama/ui/Hou-Plus-UI_2019.4.4_unix.7z"}
750+
]
751+
}
752+
],
753+
"modOptionGroups": []
754+
},
728755
{
729756
"family": "higurashi",
730757
"name": "Console Arcs",

main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ def thread_getSubModConfigList():
241241
def thread_unimportantTasks():
242242
t_loadDonations = common.makeThread(installerGUI.loadDonationStatus)
243243
t_loadLatestInstallerStatus = common.makeThread(common.Globals.loadInstallerLatestStatus)
244+
t_preloadModUpdatesHTML = common.makeThread(installerGUI.preloadModUpdatesHTML)
244245
t_loadDonations.start()
245246
t_loadLatestInstallerStatus.start()
247+
t_preloadModUpdatesHTML.start()
246248

247249
try:
248250
t_loadDonations.join(timeout=6)
@@ -254,6 +256,12 @@ def thread_unimportantTasks():
254256
except Exception as e:
255257
print(e)
256258

259+
try:
260+
t_preloadModUpdatesHTML.join(timeout=6)
261+
except Exception as e:
262+
print(e)
263+
264+
257265
def doInstallerInit():
258266
try:
259267
if common.Globals.IS_MAC:

versionData.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@
189189
{"id": "og-bgm-se", "version": "1.0.6"}
190190
]
191191
},
192+
{
193+
"id": "Matsuribayashi Ch.8/voice-only",
194+
"files": [
195+
{"id": "voices", "version": "0.0.1"},
196+
{"id": "script", "version": "0.0.1"}
197+
]
198+
},
192199
{
193200
"id": "Rei/full",
194201
"files": [
@@ -206,10 +213,19 @@
206213
]
207214
},
208215
{
209-
"id": "Matsuribayashi Ch.8/voice-only",
216+
"id": "Hou Plus/full",
210217
"files": [
211-
{"id": "voices", "version": "0.0.1"},
212-
{"id": "script", "version": "0.0.1"}
218+
{"id": "graphics", "version": "1.0.0"},
219+
{"id": "movie", "version": "1.0.0"},
220+
{"id": "voices", "version": "1.0.0"},
221+
{"id": "bgm-se", "version": "1.0.0"},
222+
{"id": "script", "version": "0.1.1"},
223+
{"id": "movie-unix", "version": "1.0.0"},
224+
{"id": "ui-windows", "version": "1.0.0"},
225+
{"id": "ui-windows-mg", "version": "1.0.0"},
226+
{"id": "ui-unix", "version": "1.0.0"},
227+
{"id": "ui-unix-mg", "version": "1.0.0"},
228+
{"id": "og-dll-asset-update", "version": "1.0.0"}
213229
]
214230
},
215231
{

0 commit comments

Comments
 (0)