Skip to content

Commit 479a191

Browse files
committed
Last minute fixes to handlers codes
1 parent 8069d86 commit 479a191

File tree

11 files changed

+106
-44
lines changed

11 files changed

+106
-44
lines changed

Master/Nucleus.Coop.App/Forms/HandlerManagerForm.Designer.cs

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Master/Nucleus.Coop.App/Forms/HandlerManagerForm.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,5 +381,19 @@ private void btn_uninstall_Click(object sender, EventArgs e)
381381
// refresh
382382
UpdateTabs();
383383
}
384+
385+
private void btn_installPkg_Click(object sender, EventArgs e)
386+
{
387+
using (OpenFileDialog open = new OpenFileDialog())
388+
{
389+
open.Filter = "Nucleus Package Files|*.nc";
390+
if (open.ShowDialog() == DialogResult.OK)
391+
{
392+
string path = open.FileName;
393+
GameManager.Instance.RepoManager.InstallPackage(path);
394+
UpdateTabs();
395+
}
396+
}
397+
}
384398
}
385399
}

Master/Nucleus.Coop.App/Nucleus.Coop.App.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,6 @@
500500
<Content Include="Resources\icon.ico" />
501501
</ItemGroup>
502502
<ItemGroup>
503-
<None Include="..\Nucleus.Coop.StartGame\bin\Debug\StartGame.exe" Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
504-
<Link>bin\StartGame.exe</Link>
505-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
506-
</None>
507503
<None Include="..\Nucleus.Coop.StartGame\bin\Release\StartGame.exe" Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
508504
<Link>bin\StartGame.exe</Link>
509505
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

Master/Nucleus.Coop.AppPostBuild/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ static void Main(string[] args)
1717

1818
List<FileInfo> toDelete = dirInfo.GetFiles("*.pdb").ToList();
1919
toDelete.AddRange(dirInfo.GetFiles("*.xml"));
20+
toDelete.AddRange(dirInfo.GetFiles("*.config").Where(c => !c.Name.ToLower().StartsWith("nucleus.coop.app")));
2021

2122
List<FileInfo> files = dirInfo.GetFiles("*.dll").ToList();
23+
List<FileInfo> exes = dirInfo.GetFiles("*.exe").ToList();
24+
files.AddRange(exes.Where((c) => {
25+
var cname = c.Name.ToLower();
26+
return !cname.StartsWith("nucleus.coop.app") && !cname.StartsWith("tempbuilder");
27+
}));
2228

2329
Console.WriteLine($"NucleusCoop Builder Helper");
2430

Master/Nucleus.Coop.PkgManager/MainRepo/handlers/sources/17520-distro/handler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Game.OnPlay.Callback(function () {
5151
var saveSrc = Context.CombinePath(Context.InstallFolder, "synergy\\cfg\\video.txt");
5252
var savePath = Context.CombinePath(Context.InstanceFolder, "synergy\\cfg\\video.txt");
5353
Context.ModifySaveFile(saveSrc, savePath, SaveType.CFG, [
54-
Context.NewCfgSaveInfo("VideoConfig", "setting.fullscreen", "0"),
55-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
56-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
57-
Context.NewCfgSaveInfo("VideoConfig", "setting.nowindowborder", "0"),
54+
Context.NewSaveInfo("VideoConfig", "setting.fullscreen", "0"),
55+
Context.NewSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
56+
Context.NewSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
57+
Context.NewSaveInfo("VideoConfig", "setting.nowindowborder", "0"),
5858
]);
5959

6060
//copy config.cfg

Master/Nucleus.Coop.PkgManager/MainRepo/handlers/sources/261640-distro/handler.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Game.ExecutableName = "borderlandspresequel.exe";
1818
Game.SteamID = "261640";
1919
Game.MaxPlayers = 4;
2020
Game.MaxPlayersOneMonitor = 4;
21-
Game.BinariesFolder = "binaries\\win32";
21+
Game.ExecutablePath = "binaries\\win32";
2222
Game.NeedsSteamEmulation = false;
2323
Game.LauncherTitle = "splashscreen";
2424
Game.SaveType = SaveType.INI;
@@ -28,21 +28,21 @@ Game.Hook.ForceFocus = true;
2828
Game.Hook.ForceFocusWindowName = "Borderlands: The Pre-Sequel (32-bit, DX9)";
2929
Game.Hook.DInputEnabled = false;
3030
Game.Hook.XInputEnabled = true;
31-
Game.Hook.XInputReroute = false;// true; // this is beta
31+
Game.Hook.XInputReroute = false;// true; // this is beta/not working at all probably
3232
Game.Hook.XInputNames = ["xinput1_3.dll"];
3333

3434
Game.OnPlay.Callback(function () {
3535
var savePath = Context.GetFolder(Folder.Documents) + "\\My Games\\Borderlands The Pre-Sequel\\WillowGame\\Config\\WillowEngine.ini";
3636
Context.ModifySaveFile(savePath, savePath, SaveType.INI, [
37-
Context.NewIniSaveInfo("SystemSettings", "WindowedFullscreen", Context.IsFullscreen),
38-
Context.NewIniSaveInfo("SystemSettings", "ResX", Context.Width),
39-
Context.NewIniSaveInfo("SystemSettings", "ResY", Context.Height),
40-
Context.NewIniSaveInfo("SystemSettings", "Fullscreen", false),
41-
Context.NewIniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
42-
Context.NewIniSaveInfo("WillowGame.WillowGameEngine", "bPauseLostFocusWindowed", false),
43-
Context.NewIniSaveInfo("Engine.Engine", "bMuteAudioWhenNotInFocus", false),
44-
Context.NewIniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
45-
Context.NewIniSaveInfo("WillowGame.WillowGameEngine", "bMuteAudioWhenNotInFocus", false),
37+
Context.NewSaveInfo("SystemSettings", "WindowedFullscreen", Context.IsFullscreen),
38+
Context.NewSaveInfo("SystemSettings", "ResX", Context.Width),
39+
Context.NewSaveInfo("SystemSettings", "ResY", Context.Height),
40+
Context.NewSaveInfo("SystemSettings", "Fullscreen", false),
41+
Context.NewSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
42+
Context.NewSaveInfo("WillowGame.WillowGameEngine", "bPauseLostFocusWindowed", false),
43+
Context.NewSaveInfo("Engine.Engine", "bMuteAudioWhenNotInFocus", false),
44+
Context.NewSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
45+
Context.NewSaveInfo("WillowGame.WillowGameEngine", "bMuteAudioWhenNotInFocus", false),
4646
]);
4747

4848
var playerStr = "saveid" + Context.PlayerID;

Master/Nucleus.Coop.PkgManager/MainRepo/handlers/sources/49520-distro/handler.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Game.SupportsKeyboard = true;
2121
Game.ExecutableName = "borderlands2.exe";
2222
Game.MaxPlayers = 4;
2323
Game.MaxPlayersOneMonitor = 4;
24-
Game.BinariesFolder = "binaries\\win32";
24+
Game.ExecutablePath = "binaries\\win32";
2525
Game.NeedsSteamEmulation = false;
2626
Game.LauncherTitle = "splashscreen";
2727
Game.SaveType = SaveType.INI;
@@ -36,15 +36,15 @@ Game.Hook.XInputNames = [ "xinput1_3.dll" ];
3636
Game.OnPlay.Callback(function () {
3737
var savePath = Context.GetFolder(Folder.Documents) + "\\My Games\\Borderlands 2\\WillowGame\\Config\\WillowEngine.ini";
3838
Context.ModifySaveFile(savePath, savePath, SaveType.INI, [
39-
Context.NewIniSaveInfo("SystemSettings", "WindowedFullscreen", Context.IsFullscreen),
40-
Context.NewIniSaveInfo("SystemSettings", "ResX", Context.Width),
41-
Context.NewIniSaveInfo("SystemSettings", "ResY", Context.Height),
42-
Context.NewIniSaveInfo("SystemSettings", "Fullscreen", false),
43-
Context.NewIniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
44-
Context.NewIniSaveInfo("WillowGame.WillowGameEngine", "bPauseLostFocusWindowed", false),
45-
Context.NewIniSaveInfo("Engine.Engine", "bMuteAudioWhenNotInFocus", false),
46-
Context.NewIniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
47-
Context.NewIniSaveInfo("WillowGame.WillowGameEngine", "bMuteAudioWhenNotInFocus", false),
39+
Context.NewSaveInfo("SystemSettings", "WindowedFullscreen", Context.IsFullscreen),
40+
Context.NewSaveInfo("SystemSettings", "ResX", Context.Width),
41+
Context.NewSaveInfo("SystemSettings", "ResY", Context.Height),
42+
Context.NewSaveInfo("SystemSettings", "Fullscreen", false),
43+
Context.NewSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
44+
Context.NewSaveInfo("WillowGame.WillowGameEngine", "bPauseLostFocusWindowed", false),
45+
Context.NewSaveInfo("Engine.Engine", "bMuteAudioWhenNotInFocus", false),
46+
Context.NewSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
47+
Context.NewSaveInfo("WillowGame.WillowGameEngine", "bMuteAudioWhenNotInFocus", false),
4848
]);
4949

5050
var playerStr = "saveid" + Context.PlayerID;

Master/Nucleus.Coop.PkgManager/MainRepo/handlers/sources/550-distro/handler.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ Game.OnPlay.Callback(function () {
134134
var saveSrc = Context.CombinePath(Context.InstallFolder, "left4dead2\\cfg\\video.txt");
135135
var savePath = Context.CombinePath(Context.InstanceFolder, "left4dead2\\cfg\\video.txt");
136136
Context.ModifySaveFile(saveSrc, savePath, SaveType.CFG, [
137-
Context.NewCfgSaveInfo("config", "setting.fullscreen", "0"),
138-
Context.NewCfgSaveInfo("config", "setting.defaultres", Math.max(640, Context.Width)),
139-
Context.NewCfgSaveInfo("config", "setting.defaultresheight", Math.max(360, Context.Height)),
140-
Context.NewCfgSaveInfo("config", "setting.nowindowborder", "0"),
141-
Context.NewCfgSaveInfo("VideoConfig", "setting.fullscreen", "0"),
142-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
143-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
144-
Context.NewCfgSaveInfo("VideoConfig ", "setting.nowindowborder", "0"),
137+
Context.NewSaveInfo("config", "setting.fullscreen", "0"),
138+
Context.NewSaveInfo("config", "setting.defaultres", Math.max(640, Context.Width)),
139+
Context.NewSaveInfo("config", "setting.defaultresheight", Math.max(360, Context.Height)),
140+
Context.NewSaveInfo("config", "setting.nowindowborder", "0"),
141+
Context.NewSaveInfo("VideoConfig", "setting.fullscreen", "0"),
142+
Context.NewSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
143+
Context.NewSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
144+
Context.NewSaveInfo("VideoConfig ", "setting.nowindowborder", "0"),
145145
]);
146146

147147
//copy config.cfg

Master/Nucleus.Coop.PkgManager/MainRepo/handlers/sources/563560-distro/handler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ Game.OnPlay.Callback(function () {
142142
var saveSrc = Context.CombinePath(Context.RootInstallFolder, "reactivedrop\\cfg\\video.txt");
143143
var savePath = Context.CombinePath(Context.RootFolder, "reactivedrop\\cfg\\video.txt");
144144
Context.ModifySaveFile(saveSrc, savePath, SaveType.CFG, [
145-
Context.NewCfgSaveInfo("VideoConfig", "setting.fullscreen", "0"),
146-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
147-
Context.NewCfgSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
148-
Context.NewCfgSaveInfo("VideoConfig", "setting.nowindowborder", "0"),
145+
Context.NewSaveInfo("VideoConfig", "setting.fullscreen", "0"),
146+
Context.NewSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
147+
Context.NewSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
148+
Context.NewSaveInfo("VideoConfig", "setting.nowindowborder", "0"),
149149
]);
150150

151151
//copy config.cfg

Master/Nucleus.Coop.PkgManager/Program.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,19 @@ static void Main()
3030
{
3131
string rootDir = AssemblyUtil.GetStartFolder();
3232
string output = Path.Combine(rootDir, "output");
33+
string toBuild = "..\\..\\MainRepo\\handlers\\sources";
34+
BuildDir(output, toBuild);
35+
36+
output = Path.Combine(rootDir, "altoutput");
37+
toBuild = "..\\..\\..\\..\\..\\altrepo\\packages\\source\\";
38+
BuildDir(output, toBuild);
39+
}
40+
41+
private static void BuildDir(string output, string toBuild)
42+
{
3343
string infosFolder = Path.Combine(output, "infos");
3444
string pkgsFolder = Path.Combine(output, "handlers");
3545

36-
string toBuild = "..\\..\\MainRepo\\handlers\\sources";
37-
3846
string indexPagePath = Path.Combine(output, "index.html");
3947
string indexData = "<html><head><link rel='stylesheet' href='bootstrap.css'><link rel='stylesheet' href='style.css'></head><body>";
4048

@@ -64,6 +72,11 @@ static void Main()
6472
{
6573
DirectoryInfo dir = dirs[i];
6674

75+
if (dir.Name.Contains("239140")) // ignore dying light, unfinished
76+
{
77+
continue;
78+
}
79+
6780
// read handler data
6881
string handlerPath = Path.Combine(dir.FullName, "info.json");
6982
string handlerData = File.ReadAllText(handlerPath);
@@ -136,7 +149,7 @@ static void Main()
136149

137150
indexData += string.Format("<a href='packages/{0}.nc'>", pkgName);
138151
indexData += string.Format("<img src='infos/{0}/header.jpg' /></a> ", metadata.HandlerID);
139-
indexData += string.Format("<h3>{0}</h3><h4>{1}</h4><h5><a href='packages/{2}.nc'>[DOWNLOAD HANDLER v{3}]</a></h5>",
152+
indexData += string.Format("<h3>{0}</h3><h4>{1}</h4><h5><a href='handlers/{2}.nc'>[DOWNLOAD HANDLER v{3}]</a></h5>",
140153
metadata.GameTitle, metadata.Title, pkgName, metadata.V);
141154
indexData += "<br /> </div>";
142155
}

0 commit comments

Comments
 (0)