mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-11-06 04:58:22 +02:00
Compare commits
2 Commits
7a0faa42e8
...
neo-refact
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bbf33c30e | ||
|
|
1cedbff4ef |
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@@ -18,7 +18,7 @@
|
|||||||
# @FileCreated by TheTank20 on 06/13/2023
|
# @FileCreated by TheTank20 on 06/13/2023
|
||||||
# @Maintainer Neo
|
# @Maintainer Neo
|
||||||
|
|
||||||
name: C/C++ CI (Windows)
|
name: Windows x86
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -87,4 +87,4 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4.3.1
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: UMSKT-${{ matrix.values.displayName }}
|
name: UMSKT-${{ matrix.values.displayName }}
|
||||||
path: build/Release
|
path: build/Release
|
||||||
|
|||||||
@@ -244,13 +244,19 @@ BOOL CLI::processOptions()
|
|||||||
flavour = product;
|
flavour = product;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto pidtype = product["meta"]["type"];
|
||||||
|
if (flavour["meta"].contains("type"))
|
||||||
|
{
|
||||||
|
pidtype = flavour["meta"]["type"];
|
||||||
|
}
|
||||||
|
|
||||||
if (options.state != Options::STATE_PIDGEN_GENERATE && options.state != Options::STATE_PIDGEN_VALIDATE)
|
if (options.state != Options::STATE_PIDGEN_GENERATE && options.state != Options::STATE_PIDGEN_VALIDATE)
|
||||||
{
|
{
|
||||||
// exit early if we're not doing PIDGEN
|
// exit early if we're not doing PIDGEN
|
||||||
goto processOptionsExitEarly;
|
goto processOptionsExitEarly;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flavour["meta"]["type"] == "PIDGEN3")
|
if (pidtype == "PIDGEN3")
|
||||||
{
|
{
|
||||||
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_3;
|
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_3;
|
||||||
if (options.verbose)
|
if (options.verbose)
|
||||||
@@ -272,7 +278,7 @@ BOOL CLI::processOptions()
|
|||||||
fmt::print("Selected BINK: {}\n", options.binkID);
|
fmt::print("Selected BINK: {}\n", options.binkID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (flavour["meta"]["type"] == "PIDGEN2")
|
else if (pidtype == "PIDGEN2")
|
||||||
{
|
{
|
||||||
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_2;
|
options.pidgenversion = Options::PIDGEN_VERSION::PIDGEN_2;
|
||||||
if (options.verbose)
|
if (options.verbose)
|
||||||
@@ -544,7 +550,7 @@ BOOL CLI::SetChannelIDOption(const std::string &channum)
|
|||||||
Integer channelID = UMSKT::IntegerS(channum);
|
Integer channelID = UMSKT::IntegerS(channum);
|
||||||
|
|
||||||
// channel ids must be between 000 and 999
|
// channel ids must be between 000 and 999
|
||||||
if (channelID > PIDGEN::MaxChannelID)
|
if (channelID >= PIDGEN::MaxChannelID)
|
||||||
{
|
{
|
||||||
fmt::print("ERROR: refusing to create a key with a Channel ID greater than 999\n");
|
fmt::print("ERROR: refusing to create a key with a Channel ID greater than 999\n");
|
||||||
return false;
|
return false;
|
||||||
@@ -588,7 +594,7 @@ BOOL CLI::SetSerialOption(const std::string &arg)
|
|||||||
Integer Serial = UMSKT::IntegerS(arg);
|
Integer Serial = UMSKT::IntegerS(arg);
|
||||||
|
|
||||||
// serials must be between 000000 and 999999
|
// serials must be between 000000 and 999999
|
||||||
if (Serial > PIDGEN::MaxSerial)
|
if (Serial >= PIDGEN::MaxSerial)
|
||||||
{
|
{
|
||||||
fmt::print("ERROR: refusing to create a key with a Serial not between 000000 and 999999\n");
|
fmt::print("ERROR: refusing to create a key with a Serial not between 000000 and 999999\n");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ BOOL CLI::InitPIDGEN3(PIDGEN3 *p3)
|
|||||||
options.channelID.Randomize(UMSKT::rng, sizeof(DWORD32) * 8);
|
options.channelID.Randomize(UMSKT::rng, sizeof(DWORD32) * 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
options.channelID %= 999;
|
options.channelID %= 1000;
|
||||||
p3->info.ChannelID = options.channelID;
|
p3->info.ChannelID = options.channelID;
|
||||||
if (options.verbose)
|
if (options.verbose)
|
||||||
{
|
{
|
||||||
@@ -162,7 +162,7 @@ BOOL CLI::PIDGEN3Generate(PIDGEN3 *p3)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make sure it's less than 999999
|
// make sure it's less than 999999
|
||||||
serialRnd %= 999999;
|
serialRnd %= 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
p3->info.isOEM = options.oem;
|
p3->info.isOEM = options.oem;
|
||||||
@@ -316,4 +316,4 @@ BOOL CLI::PIDValidate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user