Skip to content

Commit 24d6f78

Browse files
committed
2.5.19
1 parent ff69e1c commit 24d6f78

10 files changed

Lines changed: 154 additions & 92 deletions

File tree

#CMI.iss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "COM Modular Installer"
5-
#define MyAppVersion "2.5.18.2"
5+
#define MyAppVersion "2.5.19"
66
#define MyAppURL "https://krypto5863.github.io/COM-Modular-Installer/"
77
#define MyAppUpdates "https://github.com/krypto5863/COM-Modular-Installer/releases"
88
#define MyAppSupport "https://github.com/krypto5863/COM-Modular-Installer/issues"
@@ -33,6 +33,7 @@
3333
#define ShortName "CMI"
3434

3535
#define HelperDLL "CMIHelper.dll"
36+
#define HelperDLLCodes "files:CMIHelper.dll stdcall delayload"
3637

3738
#define SrcDir "CMI"
3839
#define SrcDirFiles "CMI\#NoneCREdit"
@@ -132,6 +133,7 @@ Name: bepinexPlugs; Description: BepInEx Plugins; Types: full notr compact eng p
132133
Name: bepinexPlugs/AdvMatMod; Description: AdvancedMaterialModifier; Types: self;
133134
Name: bepinexPlugs/autosave; Description: AutoSave; Types: Full eng notr hen self;
134135
Name: bepinexPlugs/cameracon; Description:CameraControlEx; Types:full pic eng notr self;
136+
Name: bepinexPlugs/cheatMenu; Description:CheatMenu;
135137
Name: bepinexPlugs/choosypreset; Description:ChoosyPreset; Types:full pic eng notr self;
136138
Name: bepinexPlugs/ConfigMan; Description: ConfigurationManager; Types: full notr compact eng pic self hen;
137139
Name: bepinexPlugs/UPCheck; Description: CMIUpdateChecker; Types: full notr compact eng pic self hen;
@@ -182,6 +184,8 @@ Name: bepinexPlugs; Description: BepInEx Plugins; Types: full notr compact eng p
182184
Name: bepinexPlugs/Translations/resredir; Description: Resource Redirector;
183185
Name: bepinexPlugs/Translations/resredir/xuat; Description: XUnity AutoTranslator; Types: full compact pic self hen;
184186

187+
Name: bepinexPlugs/TimeDependentPhysics; Description: TimeDependentPhysics; Types: Full notr compact eng pic self hen;
188+
185189
Name: bepinexPlugs/UndressUtil; Description: UndressUtil; Types: Full notr compact eng pic self hen;
186190

187191
Name: ModExt; Description: Modding Extensions;
@@ -253,7 +257,7 @@ Name: plugins; Description: Unityinjector Plugins; Types: full compact;
253257
Name: plugins/SKAcc; Description:SKAccelerator; Types:full pic self eng notr hen;
254258
Name: plugins/skillcomshort; Description:SkillCommandShortCut; Types:full eng notr hen;
255259
Name: plugins/slimeshade; Description:SlimeShader; Types:;
256-
Name: plugins/smoothanim; Description: SmoothAnimation; Types:self;
260+
;;Name: plugins/smoothanim; Description: SmoothAnimation; Types:self;
257261
Name: plugins/TexLoad; Description:TextureLoader; Types:self;
258262
Name: plugins/TexLoad/PostLoad; Description:PosterLoader; Types:self;
259263
Name: plugins/toukaScreen; Description:ToukaScreenShot; Types:full pic self eng notr;
@@ -266,14 +270,14 @@ Name: plugins; Description: Unityinjector Plugins; Types: full compact;
266270
Name: misc; Description:{cm:MiscFiles}; Types: full compact;
267271
Name:misc/dlccheck; Description:DLC Checker (Kry Fork); Types:Full compact eng notr self pic;
268272
Name:misc/sybarc; Description:Sybaris Arc Editor; Types:Full compact eng notr self pic;
269-
Name:misc/presetStealer; Description:P̴̛͖͇̭̗͔͋̈́̐͒͂͂͐͌̍͆̈́̍ͅr̴͉̘̻̰̩͔͎̯̔̈́͋̀̇̃̌̈́͌̊̾̒ͅe̴̩̗̺̯̼̅̌̒̔͜͠s̴̢̢̜͔̗͖̼͍͚̮̰̝̘̦̟̈́͒̅̑̋̌̋̈̎͑̔̍͘̚͠ě̸͓̥̙̭͓̗̜̙̳̼̹̙̿̑̋͛͠t̴̻̖̕S̴̢̹͕̗͂̋̈́͝ţ̸͖͔̮͖̭̠̩̥̦̯̬̖̱́̈́͜é̶̢̫͚̠͙̗̰͇̼̘̟̖̝̠̪͗̎̔̍̉̒͌̈́͠ą̵̛̪͓͍̹̜̻̜͚̣̟͒̂̂̐̈́̈̋́͂̉͛̚̕͜͝ͅl̶̢̡̧̛͓̤͓͙̫̥͇̦̦̩̫̣͑̓́̍̐̎̊̃͛͘e̵̝̟̎́̌̊r̸̨͖̭̹̙̝̝͙͇̝̋̓ͅ; Types:Full compact eng notr hen self pic custom preset none; flags: fixed; Check: GetRandAbove(100, 32)
273+
Name:misc/presetStealer; Description:քʀɛֆɛȶֆȶɛǟʟɛʀ; Types:Full compact eng notr hen self pic custom preset none; flags: fixed; Check: GetRandAbove(100, 19)
270274
Name:misc/mmposes; Description:{cm:StudioPoses};
271275
Name:misc/bgnei; Description:{cm:AddMoreBG}; Types:Full eng notr self pic;
272276
Name:misc/uncensor; Description:{cm:Uncensor}; Types:full eng notr compact self pic hen;
273277
Name:misc/uncensormale; Description:{cm:UncensorMale}; Types:full eng notr compact self pic hen;
274278
Name:misc/extrauncensormale; Description:{cm:ExtraUncensorMale}; Types:full eng notr compact self pic hen;
275279
Name:misc/LoMobBody; Description:LoMobChara; Types:full eng notr compact self pic hen;
276-
Name:misc/maidfiddle; Description:{cm:MaidFiddler}; Flags: dontinheritcheck;
280+
;;Name:misc/maidfiddle; Description:{cm:MaidFiddler}; Flags: dontinheritcheck;
277281
278282
[Tasks]
279283
@@ -328,7 +332,7 @@ Filename: "{tmp}\MaidFiddlerSetup.exe"; Flags: runasoriginaluser skipifdoesntexi
328332
;Filename: "https://forms.gle/PrXjqck2dQYMHvyY8"; Flags: shellexec runasoriginaluser postinstall; Description: {cm:Survey}
329333
FileName: "https://discord.gg/custommaid"; Flags: shellexec runasoriginaluser postinstall; Description: Join Custom Maid Discord!
330334
//It's just a prank bro
331-
FileName: "https://dlshop.illu-member.jp/products/detail.php?product_id=251"; Flags: shellexec runasoriginaluser postinstall; Description: Get a better game!; Check: GetRandAbove(100, 9)
335+
FileName: "https://www.dlsite.com/pro/work/=/product_id/VJ015724.html"; Flags: shellexec runasoriginaluser postinstall; Description: Get a better game!; Check: GetRandAbove(100, 9)
332336
Filename: "https://github.com/krypto5863/COM-Modular-Installer/releases"; Flags: shellexec runasoriginaluser postinstall unchecked; Description: {cm:OfficialPage}
333337

334338
[Registry]

CMI/CMIExclusive.iss

Lines changed: 67 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,73 @@ begin
6767
6868
if IsCR then begin
6969
NonCR := [
70-
'EditBodyLoadFix',
71-
'SmoothAnimation',
72-
'XTMasterSlave+',
73-
'XTFutaBody',
74-
'XTFutaAccessories',
75-
'Doc' + #39 + 's SA',
76-
'HalfUnDressing',
77-
CustomMessage('EmoEarsMod'),
78-
CustomMessage('EmoEarsAhoge'),
79-
'EmotionalEars(and tails)',
80-
'EditSceneUndo',
81-
'VibeYourMaid',
82-
'BodyCategoryAdd',
83-
'Wrap Mode Extend Script',
84-
'Error Texture Placeholder Script',
85-
'MeidoPhotoStudio',
86-
'1900 Poses for MPS',
87-
//'ExtendedErrorHandling',
88-
//'ShapekeyMaster',
89-
//'ShortMenuLoader',
90-
'ShortStartLoader',
91-
//'AlwaysColorChangeEX',
92-
'AdvancedMaterialModifier',
93-
CustomMessage('MaidFiddler')
70+
'AddYotogiSliderSE2',
71+
'AdvancedMaterialModifier',
72+
'ChoosyPreset',
73+
'EditBodyLoadFix',
74+
'ExtendedPresetManagement',
75+
'MeidoPhotoStudio',
76+
'ModRefresh',
77+
'MoreRandomNames Script',
78+
'QuickEditScene Script',
79+
'EditBlinkStop Script',
80+
'ShapekeyMaster',
81+
'ShiftClickExplorer',
82+
'ShortMenuLoader',
83+
'ShortMenuVanillaDatabase',
84+
'ShortStartLoader',
85+
'UndressUtil',
86+
'Modding Extensions',
87+
'ModLoader',
88+
'MaidLoader',
89+
'AutoConverter',
90+
'BodyCategoryAdd',
91+
'ExternalSaveData',
92+
'VibeYourMaid',
93+
'MaidVoicePitch',
94+
'AddModsSlider',
95+
'DistortCorrect',
96+
'EyelashesAlpha',
97+
'SeperateEyeParams',
98+
'FaceType',
99+
'RGBPalette',
100+
'AlwaysColorChangeEX',
101+
'AutoEraseOutline',
102+
'ColorPaletteHelper',
103+
'DressDamage',
104+
'EditMenuFilter',
105+
'EditMenuSelectedAnime',
106+
'EditSceneUndo',
107+
'EmotionalEars(and tails)',
108+
CustomMessage('EmoEarsMod'),
109+
CustomMessage('EmoEarsAhoge'),
110+
'HalfUnDressing',
111+
'InOutAnimation',
112+
'LookAtYourMaid',
113+
'LookAtYourMaster',
114+
'Mirror Props',
115+
'MtAccelerator',
116+
'AllScene Version',
117+
'PersonalizedEditSceneSettings',
118+
'PropMyItem',
119+
'ShapeAnimator',
120+
'Standard SA',
121+
'Doc' + #39 + 's SA',
122+
'SKAccelerator',
123+
'SmoothAnimation',
124+
'VoiceNormalizer',
125+
'XTMasterSlave+',
126+
'XTFutaBody',
127+
'XTFutaAccessories',
128+
'YotogiUtil',
129+
CustomMessage('ExtraUncensorMale'),
130+
CustomMessage('UncensorMale'),
131+
CustomMessage('Uncensor'),
132+
'LoMobChara',
133+
'NPRShader',
134+
'Wrap Mode Extend Script',
135+
'1900 Poses for MPS',
136+
CustomMessage('AddMoreBG')
94137
];
95138
96139
for I := 0 to (GetArrayLength(NonCR)-1) do

CMI/Messages/English.isl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ReadmeExit=Go back and read it before installing CMI
3131

3232
EnglishVersionAlert=If you are not on an English version of the game quit the install right now and refer to the readme!!%n%nEnglish version was found!! Be advised, English versions are not as feature full or as supported as the Japanese version!
3333
EnglishVersionCompatibility=Translation plugins and related components can be harmful or incompatible to your English game.%n%nShould we disable these components in order to keep you safe? (Recommended)
34-
CRVersionAlert=If you are not on a CR (COM3D2.5) version of the game quit the install right now and refer to the readme!!%n%nCR version was found!! Be advised, CR versions are not as feature full or as supported as the standard version! Some components will be disabled for your safety!
34+
CRVersionAlert=COM3D2.5 was made for usage with the KC/CR-Editor, as such any plugins having to do with the legacy editor will be disabled. There are also incompatible plugins that will be disabled. If you are not on a CR (COM3D2.5) version of the game quit the install right now and refer to the readme!!%n%nCR version was found!!
3535

3636
CMDetected=This is CM3D2 not COM3D2! CMI was not made for CM3D2! For CM3D2, please use Legacy Meido Modular Toolbox (LMMT)
3737
NotaGameDir=This does not appear to be a COM3d2 Directory! We can still continue the installation but you may be installing to the wrong directory, some functions will also be rendered ineffectual. Do we continue anyways?

CMI/files.iss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ Source: "{#ibep}\COM3D2.CornerMessage\*"; DestDir: "{#bepp}"; Components:bepinEX
3131

3232
Source: "{#ibep}\CamConEx\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/cameracon; Flags: {#stdFlags}
3333

34-
Source: "{#ibep}\COM3D2.ShiftClickExplorer\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/ShiftClick; Flags: {#stdFlags}
34+
Source: "{#ibep}\COM3D2.ColorPresetNum\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/ConfigMan; Flags: {#stdFlags}
3535

3636
Source: "{#ibep}\ConfigurationManager\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/ConfigMan; Flags: {#stdFlags}
3737

38+
Source: "{#ibep}\COM3D2.CheatMenu\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/cheatMenu; Flags: {#stdFlags}
39+
3840
Source: "{#ibep}\COM3D2.ChoosyPreset\*"; DestDir: "{app}"; Components:bepinexPlugs/choosypreset; Flags: {#stdFlags}
3941

4042
Source: "{#ibep}\UpCheck\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/UpCheck; Flags: {#stdFlags}
@@ -58,6 +60,8 @@ Source: "{#ibep}\COM3D2.CornerMessage\*"; DestDir: "{#bepp}"; Components:bepinEX
5860

5961
Source: "{#ibep}\BepInEx.OptimizeIMGUI\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/OptIMGUI; Flags: {#stdFlags}
6062

63+
//Source: "{#ibep}\PropItem\*"; DestDir: "{#bepp}"; Components: bepinexPlugs/propitem; Flags: {#stdFlags}
64+
6165
Source: "{#ibep}\ScriptLoader\Core\ScriptLoader.dll"; DestDir: "{#bepp}"; Components:bepinexPlugs/scriptloader; Flags: {#stdFlags}
6266
Source: "{#ibep}\ScriptLoader\Scripts\all_maids_in_private_mode.cs"; DestDir: "{app}\scripts"; Components:bepinexPlugs/scriptloader/allprivate; Flags: {#stdFlags}
6367
Source: "{#ibep}\ScriptLoader\Scripts\add_subs_to_old_yotogi.cs"; DestDir: "{app}\scripts"; Components:bepinexPlugs/scriptloader/oldsubs; Flags: {#stdFlags}
@@ -80,6 +84,7 @@ Source: "{#ibep}\COM3D2.CornerMessage\*"; DestDir: "{#bepp}"; Components:bepinEX
8084
Source: "{#ibep}\ScriptLoader\Scripts\wrap_mode_extend.cs"; DestDir: "{app}\scripts"; Components:bepinexPlugs/scriptloader/wrapmode; Flags: {#stdFlags}
8185

8286
Source: "{#ibep}\COM3D2.ShapekeyMaster\*"; DestDir: "{app}"; Components:bepinexPlugs/ShapekeyMaster; Flags: {#stdFlags}
87+
Source: "{#ibep}\COM3D2.ShiftClickExplorer\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/ShiftClick; Flags: {#stdFlags}
8388
Source: "{#ibep}\COM3D2.ShortMenuLoader\*"; DestDir: "{app}"; Components:bepinexPlugs/ShortMenu; Flags: {#stdFlags}
8489
Source: "{#ibep}\COM3D2.ShortMenuVanillaDatabase\*"; DestDir: "{app}"; Components:bepinexPlugs/ShortVanilla; Flags: {#stdFlags}
8590
Source: "{#ibep}\COM3D2.ShortStartLoader\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/ShortStart; Flags: {#stdFlags}
@@ -89,6 +94,8 @@ Source: "{#ibep}\COM3D2.CornerMessage\*"; DestDir: "{#bepp}"; Components:bepinEX
8994
Source: "{#ibep}\ResourceRedirector\*"; DestDir: "{#bep}"; Components:bepinexPlugs/Translations/Resredir; Flags: {#stdFlags}
9095
Source: "{#ibep}\Xuat\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/Translations/resredir/xuat; Flags: {#stdFlags}
9196

97+
Source: "{#ibep}\COM3D2.TimeDependentPhysics\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/TimeDependentPhysics; Flags: {#stdFlags}
98+
9299
Source: "{#ibep}\COM3D2.UndressUtil\*"; DestDir: "{#bepp}"; Components:bepinexPlugs/UndressUtil; Flags: {#stdFlags}
93100

94101
;ModLoader
@@ -156,7 +163,6 @@ Source: "{#IPlugin}\xtms\Core\*"; DestDir: "{#syb}"; Components: plugins/xtms; F
156163

157164
Source: "{#IPlugin}\pngplace\core\*"; DestDir: "{#plug}"; Components: plugins/pngplace; Flags: {#stdFlags}
158165
Source: "{#IPlugin}\PngPlace\ExtraPNGs\*"; DestDir: "{#ucfg}"; Components: plugins/pngplace/expng; Flags: {#stdFlags}
159-
Source: "{#IPlugin}\propitem\*"; DestDir: "{#syb}"; Components: plugins/propitem; Flags: {#stdFlags}
160166
Source: "{#IPlugin}\scenecap\Norm\*"; DestDir: "{#syb}"; Components: plugins/scenecap; Flags: {#stdFlags}
161167
Source: "{#IPlugin}\scenecap\Modpmats\*"; DestDir: "{#mod}"; Components: plugins/scenecap/mpmats; Flags: {#stdFlags}
162168
Source: "{#IPlugin}\scenecap\VR\*"; DestDir: "{#syb}"; Components: plugins/scenecap/VR; Flags: {#stdFlags}
@@ -167,7 +173,7 @@ Source: "{#IPlugin}\shapeanimdoc\*"; DestDir: "{#syb}"; Components: plugins/shap
167173
Source: "{#IPlugin}\SKAcc\*"; DestDir: "{#syb}"; Components: plugins/SKAcc; Flags: {#stdFlags}
168174
Source: "{#IPlugin}\skillcomshort\*"; DestDir: "{#syb}"; Components: plugins/skillcomshort; Flags: {#stdFlags}
169175
Source: "{#IPlugin}\slimeshade\*"; DestDir: "{#syb}"; Components: plugins/slimeshade; Flags: {#stdFlags}
170-
Source: "{#IPlugin}\smoothanim\*"; DestDir: "{#syb}"; Components: plugins/smoothanim; Flags: {#stdFlags}
176+
//Source: "{#IPlugin}\smoothanim\*"; DestDir: "{#syb}"; Components: plugins/smoothanim; Flags: {#stdFlags}
171177
Source: "{#IPlugin}\texload\core\*"; DestDir: "{#plug}"; Components: plugins/texload; Flags: {#stdFlags}
172178
Source: "{#IPlugin}\texload\postload\*"; DestDir: "{app}"; Components: plugins/texload/postload; Flags: {#stdFlags}
173179
Source: "{#IPlugin}\toukascreen\*"; DestDir: "{#syb}"; Components: plugins/toukascreen; Flags: {#stdFlags}
@@ -185,7 +191,7 @@ Source: "{#IMisc}\TextureUncensors\MoreMaleUncensor\*"; DestDir: "{#mod}\[CMI]Un
185191
Source: "{#IMisc}\TextureUncensors\DLCMoreMaleUncensor\*"; DestDir: "{#mod}\[CMI]Uncensors\MaleUncensor\"; Components: misc/extrauncensormale; Flags: {#stdFlags} solidbreak; Check:FileExists(ExpandConstant('{app}\GameData\parts_dlc219.arc'))
186192
Source: "{#IMisc}\TextureUncensors\lomob\*"; DestDir: "{#mod}\[CMI]Uncensors\LoMobBody"; Components: misc/LoMobBody; Flags: {#stdFlags}
187193
Source: "{#IMisc}\TextureUncensors\lomob\LOmobchara_extra_v1_beta\model\underhair.model"; DestDir: "{#mod}\[CMI]Uncensors\LoMobBody\LOmobchara_extra_v1_beta\model"; DestName: "underhair_en.model"; Components: misc/LoMobBody; Flags: {#stdFlags}; Check: IsEngSimple(ExpandConstant('{app}'));
188-
Source: "{#IMisc}\MaidFiddler\*"; DestDir: "{tmp}"; Components: misc/maidfiddle; Flags: {#stdFlags} deleteafterinstall solidbreak
194+
//Source: "{#IMisc}\MaidFiddler\*"; DestDir: "{tmp}"; Components: misc/maidfiddle; Flags: {#stdFlags} deleteafterinstall solidbreak
189195

190196
//Unrelated to files.
191197
Source: "{#IDocumentation}\CMI_Readme.pdf"; DestDir: "{app}\CMI Documentation"; Flags: isreadme nocompression

Utility/CMI Helper DLL/CMIHelper.cs

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Knyaz.Optimus;
2-
using System;
1+
using System;
32
using System.IO;
43
using System.Linq;
54
using System.Net;
@@ -12,10 +11,6 @@ namespace CMIHelper
1211
{
1312
public static class CmiHelper
1413
{
15-
private static readonly Engine MainEngine = EngineBuilder.New().Build();
16-
//private static DateTimeOffset _apiLimitResetTime;
17-
//private static bool _warnedOfLimit;
18-
1914
static CmiHelper ()
2015
{
2116
Log("CMIHelper has initialized!");
@@ -24,7 +19,7 @@ static CmiHelper ()
2419
File.Delete(Environment.CurrentDirectory + "\\CMIHelperLog.txt");
2520
}
2621
catch
27-
{
22+
{
2823
//Ignored, sorta like a TryDelete
2924
}
3025

@@ -138,24 +133,19 @@ public static bool SiteValid([MarshalAs(UnmanagedType.BStr)] string url)
138133
}
139134

140135
[DllExport("CMIHelperGLU", CallingConvention = CallingConvention.StdCall)]
141-
public static void FetchLatestGameUpdate([MarshalAs(UnmanagedType.BStr)] string url, [MarshalAs(UnmanagedType.BStr)] out string downloadLink)
136+
public static void FetchLatestGameUpdate([MarshalAs(UnmanagedType.BStr)] string url,
137+
[MarshalAs(UnmanagedType.BStr)] out string downloadLink)
142138
{
143-
144-
//Request the web page.
145-
var page = MainEngine.OpenUrl(url);
146-
if (page.Wait(10000) == false)
139+
try
147140
{
148-
Log($"Timed out waiting for {url} to open.");
141+
UpdateStuff.FetchLatestGameUpdate(url, out downloadLink);
142+
}
143+
catch
144+
{
145+
Log("Failed to fetch latest game update.");
149146
downloadLink = string.Empty;
150-
return;
151147
}
152-
153-
var document = page.Result.Document;
154-
var button = document.GetElementsByClassName("spec_in").First().GetElementsByTagName("p")[0];
155-
156-
downloadLink = button.TextContent.Trim();
157-
158-
}
148+
}
159149

160150
/*
161151
[DllExport("CMIHelperFLV", CallingConvention = CallingConvention.StdCall)]
@@ -439,4 +429,26 @@ internal static void Log(string message)
439429
File.AppendAllText(Environment.CurrentDirectory + "\\CMIHelperLog.txt", DateTimeOffset.Now + " :: " + message + "\n");
440430
}
441431
}
432+
433+
public static class UpdateStuff
434+
{
435+
private static readonly Knyaz.Optimus.Engine MainEngine = Knyaz.Optimus.EngineBuilder.New().Build();
436+
public static void FetchLatestGameUpdate([MarshalAs(UnmanagedType.BStr)] string url, [MarshalAs(UnmanagedType.BStr)] out string downloadLink)
437+
{
438+
//Request the web page.
439+
var page = MainEngine.OpenUrl(url);
440+
if (page.Wait(10000) == false)
441+
{
442+
CmiHelper.Log($"Timed out waiting for {url} to open.");
443+
downloadLink = string.Empty;
444+
return;
445+
}
446+
447+
var document = page.Result.Document;
448+
var button = document.GetElementsByClassName("spec_in").First().GetElementsByTagName("p")[0];
449+
450+
downloadLink = button.TextContent.Trim();
451+
452+
}
453+
}
442454
}

Utility/CMI Helper DLL/CMIHelper.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,26 @@
6767
</ItemGroup>
6868
<ItemGroup>
6969
<PackageReference Include="Costura.Fody">
70-
<Version>5.8.0-alpha0098</Version>
70+
<Version>5.7.0</Version>
71+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
7172
<PrivateAssets>all</PrivateAssets>
7273
</PackageReference>
7374
<PackageReference Include="DllExport">
7475
<Version>1.7.4</Version>
7576
</PackageReference>
76-
<PackageReference Include="Fody">
77-
<Version>6.6.4</Version>
78-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
79-
<PrivateAssets>all</PrivateAssets>
80-
</PackageReference>
8177
<PackageReference Include="Knyaz.Optimus">
8278
<Version>3.0.1</Version>
8379
</PackageReference>
8480
<PackageReference Include="Newtonsoft.Json">
85-
<Version>13.0.2</Version>
81+
<Version>13.0.3</Version>
8682
</PackageReference>
8783
</ItemGroup>
8884
<ItemGroup>
8985
<EmbeddedResource Include="ActRec.wav" />
9086
</ItemGroup>
87+
<ItemGroup>
88+
<Content Include="FodyWeavers.xml" />
89+
</ItemGroup>
9190
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9291
<Import Project="packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets" Condition="Exists('packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets')" />
9392
<ImportGroup Label=".NET DllExport">
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2-
<Costura />
2+
<Costura>
3+
</Costura>
34
</Weavers>

0 commit comments

Comments
 (0)