mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-09-20 02:09:25 +03:00
Divide version in multiple macros and set default values
This commit is contained in:
@ -255,14 +255,14 @@ namespace BuildUtil
|
||||
};
|
||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
||||
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
string baseName = string.Format("v{0}-{1}-{2}-{3:D4}.{4:D2}.{5:D2}",
|
||||
BuildHelper.VersionIntToString(version),
|
||||
build,
|
||||
BuildHelper.VersionIntToString(versionMajor, versionMinor),
|
||||
versionBuild,
|
||||
name,
|
||||
date.Year, date.Month, date.Day);
|
||||
|
||||
@ -389,9 +389,9 @@ namespace BuildUtil
|
||||
txt_cpu += " (x86 and x64)";
|
||||
}
|
||||
|
||||
string txt_version = BuildHelper.VersionIntToString(version);
|
||||
string txt_version = BuildHelper.VersionIntToString(versionMajor, versionMinor);
|
||||
|
||||
string txt_build = build.ToString();
|
||||
string txt_build = versionBuild.ToString();
|
||||
|
||||
string txt_verstr = name;
|
||||
|
||||
@ -435,7 +435,7 @@ namespace BuildUtil
|
||||
* */
|
||||
|
||||
string zipFileName = string.Format("VPN-CD-v{0}.{1:D2}-{2}-{3}-{4:D4}.{5:D2}.{6:D2}.zip",
|
||||
version / 100, version % 100, build, name,
|
||||
versionMajor, versionMinor, versionBuild, name,
|
||||
date.Year, date.Month, date.Day);
|
||||
w.WriteLine("del {0}", zipFileName);
|
||||
w.WriteLine("CD {0}", cddir);
|
||||
@ -502,8 +502,8 @@ namespace BuildUtil
|
||||
txt.WriteLine("OS\t" + "Any");
|
||||
txt.WriteLine("OSLIST\t" + "Any");
|
||||
txt.WriteLine("CPU\t" + "CD-ROM");
|
||||
txt.WriteLine("VERSION\t" + BuildHelper.VersionIntToString(version));
|
||||
txt.WriteLine("BUILD\t" + build.ToString());
|
||||
txt.WriteLine("VERSION\t" + BuildHelper.VersionIntToString(versionMajor, versionMinor));
|
||||
txt.WriteLine("BUILD\t" + versionBuild.ToString());
|
||||
txt.WriteLine("VERSTR\t" + name);
|
||||
txt.WriteLine("DATE\t" + Str.DateTimeToStrShortWithMilliSecs(date));
|
||||
txt.WriteLine("LANGUAGE\t" + "English, Japanese, Simplified Chinese");
|
||||
@ -517,7 +517,7 @@ namespace BuildUtil
|
||||
"softether-" +
|
||||
#endif // BU_SOFTETHER
|
||||
string.Format("vpn_admin_tools-v{0}.{1:D2}-{2}-{3}-{4:D4}.{5:D2}.{6:D2}-win32.zip",
|
||||
version / 100, version % 100, build, name,
|
||||
versionMajor, versionMinor, versionBuild, name,
|
||||
date.Year, date.Month, date.Day);
|
||||
|
||||
string vpnsmgr_zip_filename_full = Path.Combine(Path.Combine(publicDir, cddir), vpnsmgr_zip_filename_relative);
|
||||
@ -556,8 +556,8 @@ namespace BuildUtil
|
||||
txt.WriteLine("OS\t" + "Windows (.zip package without installers)");
|
||||
txt.WriteLine("OSLIST\t" + OSList.Windows.OSSimpleList);
|
||||
txt.WriteLine("CPU\t" + "Intel (x86 and x64)");
|
||||
txt.WriteLine("VERSION\t" + BuildHelper.VersionIntToString(version));
|
||||
txt.WriteLine("BUILD\t" + build.ToString());
|
||||
txt.WriteLine("VERSION\t" + BuildHelper.VersionIntToString(versionMajor, versionMinor));
|
||||
txt.WriteLine("BUILD\t" + versionBuild.ToString());
|
||||
txt.WriteLine("VERSTR\t" + name);
|
||||
txt.WriteLine("DATE\t" + Str.DateTimeToStrShortWithMilliSecs(date));
|
||||
txt.WriteLine("LANGUAGE\t" + "English, Japanese, Simplified Chinese");
|
||||
@ -616,10 +616,10 @@ namespace BuildUtil
|
||||
};
|
||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
||||
|
||||
int version, build;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
BuildSoftware[] softs = BuildSoftwareList.List;
|
||||
bool serial = vl["SERIAL"].BoolValue;
|
||||
|
||||
@ -630,7 +630,7 @@ namespace BuildUtil
|
||||
{
|
||||
if (soft.Os.IsWindows == false)
|
||||
{
|
||||
soft.SetBuildNumberVersionName(build, version, name, date);
|
||||
soft.SetBuildNumberVersionName(versionMajor, versionMinor, versionBuild, name, date);
|
||||
Con.WriteLine(" {0}", soft.IDString);
|
||||
Con.WriteLine(" - \"{0}\"", soft.OutputFileName);
|
||||
}
|
||||
@ -658,7 +658,7 @@ namespace BuildUtil
|
||||
|
||||
foreach (BuildSoftware soft in softs)
|
||||
{
|
||||
soft.SetBuildNumberVersionName(build, version, name, date);
|
||||
soft.SetBuildNumberVersionName(versionMajor, versionMinor, versionBuild, name, date);
|
||||
|
||||
if (soft.Os.IsWindows == false)
|
||||
{
|
||||
@ -772,10 +772,10 @@ namespace BuildUtil
|
||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
||||
|
||||
bool serial = vl["SERIAL"].BoolValue;
|
||||
int version, build;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
BuildSoftware[] softs = BuildSoftwareList.List;
|
||||
|
||||
if (Str.IsEmptyStr(vl.DefaultParam.StrValue))
|
||||
@ -785,7 +785,7 @@ namespace BuildUtil
|
||||
{
|
||||
if (soft.Os.IsWindows)
|
||||
{
|
||||
soft.SetBuildNumberVersionName(build, version, name, date);
|
||||
soft.SetBuildNumberVersionName(versionMajor, versionMinor, versionBuild, name, date);
|
||||
Con.WriteLine(" {0}", soft.IDString);
|
||||
Con.WriteLine(" - \"{0}\"", soft.OutputFileName);
|
||||
}
|
||||
@ -813,7 +813,7 @@ namespace BuildUtil
|
||||
|
||||
foreach (BuildSoftware soft in softs)
|
||||
{
|
||||
soft.SetBuildNumberVersionName(build, version, name, date);
|
||||
soft.SetBuildNumberVersionName(versionMajor, versionMinor, versionBuild, name, date);
|
||||
|
||||
if (soft.Os.IsWindows)
|
||||
{
|
||||
|
@ -159,9 +159,9 @@ namespace BuildUtil
|
||||
public readonly string CrossCompilerOption;
|
||||
public readonly string SrcKitDefaultDir;
|
||||
|
||||
public BuildSoftwareUnix(Software software, int buildNumber, int version, string buildName, Cpu cpu, OS os,
|
||||
public BuildSoftwareUnix(Software software, int versionMajor, int versionMinor, int versionBuild, string buildName, Cpu cpu, OS os,
|
||||
string crossLibName, bool useGccBitsOption, string crossCompilerName, bool noPthreadOption, string crossCompilerOption)
|
||||
: base(software, buildNumber, version, buildName, cpu, os)
|
||||
: base(software, versionMajor, versionMinor, versionBuild, buildName, cpu, os)
|
||||
{
|
||||
this.CrossLibName = crossLibName;
|
||||
this.UseGccBitsOption = useGccBitsOption;
|
||||
@ -431,13 +431,13 @@ namespace BuildUtil
|
||||
{
|
||||
get
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
return string.Format("{0}-{3}-{1}.tar.gz", "srckit", this.CrossLibName,
|
||||
Str.DateTimeToStrShort(BuildSoftwareList.ListCreatedDateTime),
|
||||
build);
|
||||
versionBuild);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ namespace BuildUtil
|
||||
// Build
|
||||
public static void BuildMain(BuildSoftware soft, bool debugModeIfUnix)
|
||||
{
|
||||
int version, build;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
|
||||
@ -203,9 +203,9 @@ namespace BuildUtil
|
||||
|
||||
try
|
||||
{
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
Win32BuildUtil.ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
soft.SetBuildNumberVersionName(build, version, name, date);
|
||||
soft.SetBuildNumberVersionName(versionMajor, versionMinor, versionBuild, name, date);
|
||||
|
||||
Con.WriteLine("Building '{0}' - {1}...", soft.IDString, soft.TitleString);
|
||||
|
||||
@ -227,9 +227,9 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
// Convert the number to a version number
|
||||
public static string VersionIntToString(int version)
|
||||
public static string VersionIntToString(int versionMajor, int versionMinor)
|
||||
{
|
||||
return string.Format("{0}.{1:D2}", version / 100, version % 100);
|
||||
return string.Format("{0}.{1:D2}", versionMajor, versionMinor);
|
||||
}
|
||||
|
||||
// Get a product list that is included in the software
|
||||
|
@ -150,100 +150,100 @@ namespace BuildUtil
|
||||
// ========== Windows ==========
|
||||
// Server and Bridge
|
||||
public static readonly BuildSoftware vpnserver_win32_x86x64_ja =
|
||||
new BuildSoftwareWin32(Software.vpnserver_vpnbridge, 0, 0, "", CpuList.intel, OSList.Windows);
|
||||
new BuildSoftwareWin32(Software.vpnserver_vpnbridge, 0, 0, 0, "", CpuList.intel, OSList.Windows);
|
||||
|
||||
// Client
|
||||
public static readonly BuildSoftware vpnclient_win32_x86x64_ja =
|
||||
new BuildSoftwareWin32(Software.vpnclient, 0, 0, "", CpuList.intel, OSList.Windows);
|
||||
new BuildSoftwareWin32(Software.vpnclient, 0, 0, 0, "", CpuList.intel, OSList.Windows);
|
||||
|
||||
// ========== Linux ==========
|
||||
// Server
|
||||
public static readonly BuildSoftware vpnserver_linux_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
"linux-x86-32bit", true, "linux-x86-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
"linux-x86-64bit", true, "linux-x86-64bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_arm_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
"linux-arm-32bit", false, "linux-arm-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_armeabi_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
"linux-armeabi-32bit", false, "linux-armeabi-32bit-4.3.2", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_mipsel_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
"linux-mipsel-32bit", false, "linux-mipsel-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_ppc_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
"linux-ppc-32bit", false, "linux-ppc-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_linux_sh4_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
"linux-sh4-32bit", false, "linux-sh4-32bit-3.4.6", false,
|
||||
null);
|
||||
|
||||
// Client
|
||||
public static readonly BuildSoftware vpnclient_linux_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
"linux-x86-32bit", true, "linux-x86-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
"linux-x86-64bit", true, "linux-x86-64bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_arm_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
"linux-arm-32bit", false, "linux-arm-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_armeabi_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
"linux-armeabi-32bit", false, "linux-armeabi-32bit-4.3.2", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_mipsel_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
"linux-mipsel-32bit", false, "linux-mipsel-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_ppc_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
"linux-ppc-32bit", false, "linux-ppc-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_linux_sh4_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
"linux-sh4-32bit", false, "linux-sh4-32bit-3.4.6", false,
|
||||
null);
|
||||
|
||||
// Bridge
|
||||
public static readonly BuildSoftware vpnbridge_linux_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x86, OSList.Linux,
|
||||
"linux-x86-32bit", true, "linux-x86-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x64, OSList.Linux,
|
||||
"linux-x86-64bit", true, "linux-x86-64bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_arm_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.arm, OSList.Linux,
|
||||
"linux-arm-32bit", false, "linux-arm-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_armeabi_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.armeabi, OSList.Linux,
|
||||
"linux-armeabi-32bit", false, "linux-armeabi-32bit-4.3.2", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_mipsel_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.mipsel, OSList.Linux,
|
||||
"linux-mipsel-32bit", false, "linux-mipsel-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_ppc_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.ppc32, OSList.Linux,
|
||||
"linux-ppc-32bit", false, "linux-ppc-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_linux_sh4_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.sh4, OSList.Linux,
|
||||
"linux-sh4-32bit", false, "linux-sh4-32bit-3.4.6", false,
|
||||
null);
|
||||
|
||||
@ -251,21 +251,21 @@ namespace BuildUtil
|
||||
// ========== FreeBSD ==========
|
||||
// Server
|
||||
public static readonly BuildSoftware vpnserver_bsd_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x86, OSList.FreeBSD,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x86, OSList.FreeBSD,
|
||||
"freebsd-x86-32bit", true, "freebsd-x86-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_bsd_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x64, OSList.FreeBSD,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x64, OSList.FreeBSD,
|
||||
"freebsd-x86-64bit", true, "freebsd-x86-64bit-3.4.6", false,
|
||||
null);
|
||||
|
||||
// Bridge
|
||||
public static readonly BuildSoftware vpnbridge_bsd_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x86, OSList.FreeBSD,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x86, OSList.FreeBSD,
|
||||
"freebsd-x86-32bit", true, "freebsd-x86-32bit-3.4.6", false,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_bsd_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x64, OSList.FreeBSD,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x64, OSList.FreeBSD,
|
||||
"freebsd-x86-64bit", true, "freebsd-x86-64bit-3.4.6", false,
|
||||
null);
|
||||
|
||||
@ -273,92 +273,92 @@ namespace BuildUtil
|
||||
// ========== Mac OS X ==========
|
||||
// Server
|
||||
public static readonly BuildSoftware vpnserver_macos_ppc32_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
"macos-ppc-32bit", true, "macos-ppc-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnserver_macos_ppc64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
"macos-ppc-64bit", true, "macos-ppc-64bit-4.0.4", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_macos_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
"macos-x86-32bit", true, "macos-x86-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnserver_macos_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
"macos-x86-64bit", true, "macos-x86-64bit-4.0.4", true,
|
||||
null);
|
||||
|
||||
// Client
|
||||
public static readonly BuildSoftware vpnclient_macos_ppc32_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
"macos-ppc-32bit", true, "macos-ppc-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnclient_macos_ppc64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
"macos-ppc-64bit", true, "macos-ppc-64bit-4.0.4", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnclient_macos_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
"macos-x86-32bit", true, "macos-x86-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnclient_macos_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnclient, 0, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
"macos-x86-64bit", true, "macos-x86-64bit-4.0.4", true,
|
||||
null);
|
||||
|
||||
// Bridge
|
||||
public static readonly BuildSoftware vpnbridge_macos_ppc32_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.ppc32, OSList.MacOS,
|
||||
"macos-ppc-32bit", true, "macos-ppc-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnbridge_macos_ppc64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.ppc64, OSList.MacOS,
|
||||
"macos-ppc-64bit", true, "macos-ppc-64bit-4.0.4", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_macos_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x86, OSList.MacOS,
|
||||
"macos-x86-32bit", true, "macos-x86-32bit-4.0.4", true,
|
||||
"-isysroot /cygdrive/s/CommomDev/xc/common/apple_xcode/xcode_2.4/Developer/SDKs/MacOSX10.4u.sdk");
|
||||
public static readonly BuildSoftware vpnbridge_macos_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x64, OSList.MacOS,
|
||||
"macos-x86-64bit", true, "macos-x86-64bit-4.0.4", true,
|
||||
null);
|
||||
|
||||
// ========== Solaris ==========
|
||||
// Server
|
||||
public static readonly BuildSoftware vpnserver_solaris_sparc32_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.sparc32, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.sparc32, OSList.Solaris,
|
||||
"solaris-sparc-32bit", true, "solaris-sparc-32bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_solaris_sparc64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.sparc64, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.sparc64, OSList.Solaris,
|
||||
"solaris-sparc-64bit", true, "solaris-sparc-64bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_solaris_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x86, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x86, OSList.Solaris,
|
||||
"solaris-x86-32bit", true, "solaris-x86-32bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnserver_solaris_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, "", CpuList.x64, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnserver, 0, 0, 0, "", CpuList.x64, OSList.Solaris,
|
||||
"solaris-x86-64bit", true, "solaris-x86-64bit-3.4.6", true,
|
||||
null);
|
||||
|
||||
// Bridge
|
||||
public static readonly BuildSoftware vpnbridge_solaris_sparc32_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.sparc32, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.sparc32, OSList.Solaris,
|
||||
"solaris-sparc-32bit", true, "solaris-sparc-32bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_solaris_sparc64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.sparc64, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.sparc64, OSList.Solaris,
|
||||
"solaris-sparc-64bit", true, "solaris-sparc-64bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_solaris_x86_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x86, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x86, OSList.Solaris,
|
||||
"solaris-x86-32bit", true, "solaris-x86-32bit-3.4.6", true,
|
||||
null);
|
||||
public static readonly BuildSoftware vpnbridge_solaris_x64_ja =
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, "", CpuList.x64, OSList.Solaris,
|
||||
new BuildSoftwareUnix(Software.vpnbridge, 0, 0, 0, "", CpuList.x64, OSList.Solaris,
|
||||
"solaris-x86-64bit", true, "solaris-x86-64bit-3.4.6", true,
|
||||
null);
|
||||
|
||||
|
@ -187,27 +187,30 @@ namespace BuildUtil
|
||||
public class BuildSoftware
|
||||
{
|
||||
public Software Software; // Software
|
||||
public int Version; // Version number
|
||||
public int BuildNumber; // Build Number
|
||||
public int VersionMajor; // Version number (major)
|
||||
public int VersionMinor; // Version number (minor)
|
||||
public int VersionBuild; // Version number (build)
|
||||
public string BuildName; // Build name
|
||||
public Cpu Cpu; // CPU
|
||||
public OS Os; // OS
|
||||
public DateTime BuildDate; // Build date
|
||||
|
||||
public BuildSoftware(Software software, int buildNumber, int version, string buildName, Cpu cpu, OS os)
|
||||
public BuildSoftware(Software software, int versionMajor, int versionMinor, int versionBuild, string buildName, Cpu cpu, OS os)
|
||||
{
|
||||
this.Software = software;
|
||||
this.BuildNumber = buildNumber;
|
||||
this.Version = version;
|
||||
this.VersionMajor = versionMajor;
|
||||
this.VersionMinor = versionMinor;
|
||||
this.VersionBuild = versionBuild;
|
||||
this.BuildName = buildName;
|
||||
this.Cpu = cpu;
|
||||
this.Os = os;
|
||||
}
|
||||
|
||||
public void SetBuildNumberVersionName(int buildNumber, int version, string buildName, DateTime date)
|
||||
public void SetBuildNumberVersionName(int versionMajor, int versionMinor, int versionBuild, string buildName, DateTime date)
|
||||
{
|
||||
this.BuildNumber = buildNumber;
|
||||
this.Version = version;
|
||||
this.VersionMajor = versionMajor;
|
||||
this.VersionMinor = versionMinor;
|
||||
this.VersionBuild = versionBuild;
|
||||
this.BuildName = buildName;
|
||||
this.BuildDate = date;
|
||||
}
|
||||
@ -243,8 +246,11 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
this.Software = (Software)Enum.Parse(typeof(Software), tokens[0], true);
|
||||
this.Version = (int)(double.Parse(tokens[1].Substring(1)) * 100);
|
||||
this.BuildNumber = int.Parse(tokens[2]);
|
||||
|
||||
string[] vs = tokens[1].Substring(1).Split('.');
|
||||
this.VersionMajor = int.Parse(vs[0]);
|
||||
this.VersionMinor = int.Parse(vs[1]);
|
||||
this.VersionBuild = int.Parse(tokens[2]);
|
||||
this.BuildName = tokens[3];
|
||||
|
||||
string[] ds = tokens[4].Split('.');
|
||||
@ -260,12 +266,12 @@ namespace BuildUtil
|
||||
{
|
||||
return string.Format("{0}-v{6}-{1}-{2}-{8:D4}.{9:D2}.{10:D2}-{4}-{3}-{7}",
|
||||
Paths.Prefix + this.Software.ToString(),
|
||||
this.BuildNumber,
|
||||
this.VersionBuild,
|
||||
this.BuildName,
|
||||
this.Cpu.Name,
|
||||
this.Os.Name,
|
||||
0,
|
||||
BuildHelper.VersionIntToString(this.Version),
|
||||
BuildHelper.VersionIntToString(this.VersionMajor, this.VersionMinor),
|
||||
CPUBitsUtil.CPUBitsToString(this.Cpu.Bits),
|
||||
BuildDate.Year, BuildDate.Month, BuildDate.Day).ToLower();
|
||||
}
|
||||
@ -291,7 +297,7 @@ namespace BuildUtil
|
||||
get
|
||||
{
|
||||
return string.Format("{0} (Ver {2}, Build {1}, {3}) for {5}", BuildHelper.GetSoftwareTitle(this.Software),
|
||||
this.BuildNumber, BuildHelper.VersionIntToString(this.Version), this.Cpu.Title, 0, this.Os.Title);
|
||||
this.VersionBuild, BuildHelper.VersionIntToString(this.VersionMajor, this.VersionMinor), this.Cpu.Title, 0, this.Os.Title);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,8 +138,8 @@ namespace BuildUtil
|
||||
// Build Win32 software
|
||||
public class BuildSoftwareWin32 : BuildSoftware
|
||||
{
|
||||
public BuildSoftwareWin32(Software software, int buildNumber, int version, string buildName, Cpu cpu, OS os)
|
||||
: base(software, buildNumber, version, buildName, cpu, os)
|
||||
public BuildSoftwareWin32(Software software, int versionMajor, int versionMinor, int versionBuild, string buildName, Cpu cpu, OS os)
|
||||
: base(software, versionMajor, versionMinor, versionBuild, buildName, cpu, os)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -140,12 +140,12 @@ namespace BuildUtil
|
||||
// Generate vpnweb.ocx
|
||||
public static void GenerateVpnWebOcxCab(string dstFileName, string ocxFileName)
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
string cabVer = string.Format("{0},{1},0,{2}", version / 100, version % 100, build);
|
||||
string cabVer = string.Format("{0},{1},0,{2}", versionMajor, versionMinor, versionBuild);
|
||||
string cabFileName = IO.CreateTempFileNameByExt(".cab");
|
||||
Mutex m = new Mutex(false, "cabtmp_mutex");
|
||||
|
||||
@ -183,10 +183,10 @@ namespace BuildUtil
|
||||
// Generate a version information resource
|
||||
public static void GenerateVersionInfoResource(string targetExeName, string outName, string rc_name, string product_name)
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
if (Str.IsEmptyStr(rc_name))
|
||||
{
|
||||
@ -214,9 +214,9 @@ namespace BuildUtil
|
||||
body = Str.ReplaceStr(body, "$INTERNALNAME$", internalName);
|
||||
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString());
|
||||
body = Str.ReplaceStr(body, "$FILENAME$", exeFileName);
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", (version / 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", (version % 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", build.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", versionMajor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString());
|
||||
|
||||
IO f = IO.CreateTempFileByExt(".rc");
|
||||
string filename = f.Name;
|
||||
@ -258,47 +258,48 @@ namespace BuildUtil
|
||||
// Increment the build number
|
||||
public static void IncrementBuildNumber()
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
build++;
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
versionBuild++;
|
||||
|
||||
WriteBuildInfoToTextFile(build, version, name, date);
|
||||
WriteBuildInfoToTextFile(versionMajor, versionMinor, versionBuild, name, date);
|
||||
|
||||
SetNowDate();
|
||||
|
||||
Con.WriteLine("New build number: {0}", build);
|
||||
Con.WriteLine("New build number: {0}", versionBuild);
|
||||
}
|
||||
|
||||
// Set the date and time
|
||||
public static void SetNowDate()
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
date = DateTime.Now;
|
||||
|
||||
WriteBuildInfoToTextFile(build, version, name, date);
|
||||
WriteBuildInfoToTextFile(versionMajor, versionMinor, versionBuild, name, date);
|
||||
}
|
||||
|
||||
// Write the build number and the version number in the text file
|
||||
public static void WriteBuildInfoToTextFile(int build, int version, string name, DateTime date)
|
||||
public static void WriteBuildInfoToTextFile(int versionMajor, int versionMinor, int versionBuild, string name, DateTime date)
|
||||
{
|
||||
string filename = Path.Combine(Paths.BaseDirName, "CurrentBuild.txt");
|
||||
|
||||
WriteBuildInfoToTextFile(build, version, name, date, filename);
|
||||
WriteBuildInfoToTextFile(versionMajor, versionMinor, versionBuild, name, date, filename);
|
||||
}
|
||||
public static void WriteBuildInfoToTextFile(int build, int version, string name, DateTime date, string filename)
|
||||
public static void WriteBuildInfoToTextFile(int versionMajor, int versionMinor, int versionBuild, string name, DateTime date, string filename)
|
||||
{
|
||||
using (StreamWriter w = new StreamWriter(filename))
|
||||
{
|
||||
w.WriteLine("BUILD_NUMBER {0}", build);
|
||||
w.WriteLine("VERSION {0}", version);
|
||||
w.WriteLine("VERSION_MAJOR {0}", versionMajor);
|
||||
w.WriteLine("VERSION_MINOR {0}", versionMinor);
|
||||
w.WriteLine("VERSION_BUILD {0}", versionBuild);
|
||||
w.WriteLine("BUILD_NAME {0}", name);
|
||||
w.WriteLine("BUILD_DATE {0}", Str.DateTimeToStrShort(date));
|
||||
|
||||
@ -308,13 +309,13 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
// Read the build number and the version number from a text file
|
||||
public static void ReadBuildInfoFromTextFile(out int build, out int version, out string name, out DateTime date)
|
||||
public static void ReadBuildInfoFromTextFile(out int versionMajor, out int versionMinor, out int versionBuild, out string name, out DateTime date)
|
||||
{
|
||||
string filename = Path.Combine(Paths.BaseDirName, "CurrentBuild.txt");
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date, filename);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date, filename);
|
||||
}
|
||||
public static void ReadBuildInfoFromTextFile(out int build, out int version, out string name, out DateTime date, string filename)
|
||||
public static void ReadBuildInfoFromTextFile(out int versionMajor, out int versionMinor, out int versionBuild, out string name, out DateTime date, string filename)
|
||||
{
|
||||
char[] seps = { '\t', ' ', };
|
||||
name = "";
|
||||
@ -322,7 +323,7 @@ namespace BuildUtil
|
||||
|
||||
using (StreamReader r = new StreamReader(filename))
|
||||
{
|
||||
build = version = 0;
|
||||
versionBuild = versionMinor = versionMajor = 0;
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -335,14 +336,19 @@ namespace BuildUtil
|
||||
string[] tokens = line.Split(seps, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (tokens.Length == 2)
|
||||
{
|
||||
if (tokens[0].Equals("BUILD_NUMBER", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (tokens[0].Equals("VERSION_MAJOR", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
build = int.Parse(tokens[1]);
|
||||
versionMajor = int.Parse(tokens[1]);
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("VERSION", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (tokens[0].Equals("VERSION_MINOR", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
version = int.Parse(tokens[1]);
|
||||
versionMinor = int.Parse(tokens[1]);
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("VERSION_BUILD", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
versionBuild = int.Parse(tokens[1]);
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("BUILD_NAME", StringComparison.InvariantCultureIgnoreCase))
|
||||
@ -361,7 +367,7 @@ namespace BuildUtil
|
||||
|
||||
r.Close();
|
||||
|
||||
if (build == 0 || version == 0 || Str.IsEmptyStr(name) || date.Ticks == 0)
|
||||
if (versionBuild == 0 || versionMinor == 0 || versionMajor == 0 || Str.IsEmptyStr(name) || date.Ticks == 0)
|
||||
{
|
||||
throw new ApplicationException(string.Format("Wrong file data: '{0}'", filename));
|
||||
}
|
||||
@ -373,18 +379,18 @@ namespace BuildUtil
|
||||
{
|
||||
SetNowDate();
|
||||
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
string username = Env.UserName;
|
||||
string pcname = Env.MachineName;
|
||||
|
||||
NormalizeSourceCode(build, version, username, pcname, date);
|
||||
NormalizeSourceCode(versionMajor, versionMinor, versionBuild, username, pcname, date);
|
||||
}
|
||||
|
||||
// Apply build number, version number, user name, and PC name to the source code
|
||||
public static void NormalizeSourceCode(int buildNumber, int version, string userName, string pcName, DateTime date)
|
||||
public static void NormalizeSourceCode(int versionMajor, int versionMinor, int versionBuild, string userName, string pcName, DateTime date)
|
||||
{
|
||||
DateTime now = date;
|
||||
char[] seps = { '\t', ' ', };
|
||||
@ -439,7 +445,7 @@ namespace BuildUtil
|
||||
// Build number portion of the source code
|
||||
if (tokens[0].Equals("//") && tokens[1].Equals("Build") && Str.IsNumber(tokens[2]))
|
||||
{
|
||||
newLine = line.Replace(tokens[2], buildNumber.ToString());
|
||||
newLine = line.Replace(tokens[2], versionBuild.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -449,14 +455,19 @@ namespace BuildUtil
|
||||
if (tokens.Length == 3)
|
||||
{
|
||||
// String part of the version information of Cedar.h
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("CEDAR_BUILD"))
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("CEDAR_VERSION_MAJOR"))
|
||||
{
|
||||
newLine = line.Replace(tokens[2], buildNumber.ToString());
|
||||
newLine = line.Replace(tokens[2], versionMajor.ToString());
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("CEDAR_VER"))
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("CEDAR_VERSION_MINOR"))
|
||||
{
|
||||
newLine = line.Replace(tokens[2], version.ToString());
|
||||
newLine = line.Replace(tokens[2], versionMinor.ToString());
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("CEDAR_VERSION_BUILD"))
|
||||
{
|
||||
newLine = line.Replace(tokens[2], versionBuild.ToString());
|
||||
}
|
||||
|
||||
if (tokens[0].Equals("#define") && tokens[1].Equals("BUILDER_NAME"))
|
||||
@ -848,11 +859,11 @@ namespace BuildUtil
|
||||
// Create and sign the Inf file and the catalog file for SeLow
|
||||
public static void SignSeLowInfFiles(string cpu)
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
string hamcore = Path.Combine(Paths.BinDirName, "hamcore");
|
||||
string sys_src = Path.Combine(hamcore, "SeLow_" + cpu + ".sys");
|
||||
@ -868,7 +879,7 @@ namespace BuildUtil
|
||||
throw new ApplicationException(sys_src + " is not signed.");
|
||||
}
|
||||
|
||||
generateINFFilesForPlatform(inf_src, sys_src, null, dst_dir, version, build, date, true);
|
||||
generateINFFilesForPlatform(inf_src, sys_src, null, dst_dir, versionMajor, versionMinor, versionBuild, date, true);
|
||||
|
||||
Con.WriteLine("Generating INF Files for SeLow Ok.");
|
||||
}
|
||||
@ -876,10 +887,10 @@ namespace BuildUtil
|
||||
// Create Inf file for Windows 8
|
||||
public static void GenerateINFFilesForWindows8(string cpu)
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string name;
|
||||
DateTime date;
|
||||
ReadBuildInfoFromTextFile(out build, out version, out name, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out name, out date);
|
||||
|
||||
string hamcore = Path.Combine(Paths.BinDirName, "hamcore");
|
||||
string inf_src_x86 = Path.Combine(hamcore, "vpn_driver.inf");
|
||||
@ -901,7 +912,7 @@ namespace BuildUtil
|
||||
throw new ApplicationException(sys_src_x64 + " is not signed.");
|
||||
}
|
||||
|
||||
generateINFFilesForPlatform(inf_src_x64, sys_src_x64, sys6_src_x64, dst_x64, version, build, date, false);
|
||||
generateINFFilesForPlatform(inf_src_x64, sys_src_x64, sys6_src_x64, dst_x64, versionMajor, versionMinor, versionBuild, date, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -910,12 +921,12 @@ namespace BuildUtil
|
||||
throw new ApplicationException(sys_src_x86 + " is not signed.");
|
||||
}
|
||||
|
||||
generateINFFilesForPlatform(inf_src_x86, sys_src_x86, sys6_src_x86, dst_x86, version, build, date, false);
|
||||
generateINFFilesForPlatform(inf_src_x86, sys_src_x86, sys6_src_x86, dst_x86, versionMajor, versionMinor, versionBuild, date, false);
|
||||
}
|
||||
|
||||
Con.WriteLine("Generating INF Files for Windows 8 Ok.");
|
||||
}
|
||||
static void generateINFFilesForPlatform(string inf, string sys, string sys6, string dstDir, int ver, int build, DateTime date, bool selow)
|
||||
static void generateINFFilesForPlatform(string inf, string sys, string sys6, string dstDir, int versionMajor, int versionMinor, int versionBuild, DateTime date, bool selow)
|
||||
{
|
||||
|
||||
string cdfFileName = Path.Combine(dstDir, "inf.cdf");
|
||||
@ -1000,9 +1011,9 @@ namespace BuildUtil
|
||||
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString("D4"));
|
||||
body = Str.ReplaceStr(body, "$MONTH$", date.Month.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$DAY$", date.Day.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", (ver / 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", (ver % 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", build.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", versionMajor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString());
|
||||
body = Str.ReplaceStr(body, "[Manufacturer]", "CatalogFile.NT\t\t\t\t= inf_" + name + ".cat\r\n\r\n[Manufacturer]");
|
||||
|
||||
string dst_inf_name = Path.Combine(dstDir, "INF_" + name + ".inf");
|
||||
@ -1060,7 +1071,7 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
|
||||
static string process_inf_file(string src_inf_txt, int build, int ver, DateTime date, string sys_name, string name, string catfile, bool replace_mac_address)
|
||||
static string process_inf_file(string src_inf_txt, int versionMajor, int versionMinor, int versionBuild, DateTime date, string sys_name, string name, string catfile, bool replace_mac_address)
|
||||
{
|
||||
string body = src_inf_txt;
|
||||
|
||||
@ -1079,9 +1090,9 @@ namespace BuildUtil
|
||||
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString("D4"));
|
||||
body = Str.ReplaceStr(body, "$MONTH$", date.Month.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$DAY$", date.Day.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", (ver / 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", (ver % 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", build.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", versionMajor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString());
|
||||
|
||||
if (Str.IsEmptyStr(catfile) == false)
|
||||
{
|
||||
@ -1150,12 +1161,12 @@ namespace BuildUtil
|
||||
|
||||
public static void MakeDriverPackage()
|
||||
{
|
||||
int build, version;
|
||||
int versionMajor, versionMinor, versionBuild;
|
||||
string buildname;
|
||||
DateTime date;
|
||||
int i;
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out buildname, out date);
|
||||
ReadBuildInfoFromTextFile(out versionMajor, out versionMinor, out versionBuild, out buildname, out date);
|
||||
|
||||
date = date.AddDays(-1);
|
||||
|
||||
@ -1167,31 +1178,31 @@ namespace BuildUtil
|
||||
// Neo9x x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo9x\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo9x\x86\Neo9x_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo9x\x86\Neo9x_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo9x\x86\Neo9x_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo9x\x86\Neo9x_x86.sys"), Path.Combine(dst_dir, @"Neo9x\x86\Neo9x_x86.sys"));
|
||||
|
||||
// Neo x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo\x86\Neo_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x86\Neo_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x86\Neo_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo\x86\Neo_x86.sys"), Path.Combine(dst_dir, @"Neo\x86\Neo_x86.sys"));
|
||||
|
||||
// Neo x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo\x64"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo\x64\Neo_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x64\Neo_x64.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x64\Neo_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo\x64\Neo_x64.sys"), Path.Combine(dst_dir, @"Neo\x64\Neo_x64.sys"));
|
||||
|
||||
// Neo6 x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6\x86\Neo6_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6\x86\Neo6_x86.sys"));
|
||||
|
||||
// Neo6 x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6\x64"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6\x64\Neo6_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6\x64\Neo6_x64.sys"));
|
||||
|
||||
// Neo6 for Windows 8 x86
|
||||
@ -1207,7 +1218,7 @@ namespace BuildUtil
|
||||
}
|
||||
string sys_name = "Neo_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win8\x86\Neo6_x86_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), versionMajor, versionMinor, versionBuild, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".inf");
|
||||
}
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6_Win8\x86\Neo6_x86.sys"));
|
||||
@ -1227,7 +1238,7 @@ namespace BuildUtil
|
||||
}
|
||||
string sys_name = "Neo_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win8\x64\Neo6_x64_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), versionMajor, versionMinor, versionBuild, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".inf");
|
||||
}
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6_Win8\x64\Neo6_x64.sys"));
|
||||
@ -1247,7 +1258,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".sys");
|
||||
string sys_name = "Neo6_x86_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("Neo6_x86_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), versionMajor, versionMinor, versionBuild, date, sys_name, name, string.Format("Neo6_x86_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".inf");
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x86"), cat_src_filename.ToArray(), "Neo6_x86_" + name + ".cat", true, true);
|
||||
@ -1266,7 +1277,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".sys");
|
||||
string sys_name = "Neo6_x64_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("Neo6_x64_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), versionMajor, versionMinor, versionBuild, date, sys_name, name, string.Format("Neo6_x64_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".inf");
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x64"), cat_src_filename.ToArray(), "Neo6_x64_" + name + ".cat", true, true);
|
||||
@ -1280,7 +1291,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("SeLow_x86.sys");
|
||||
cat_src_filename.Add("SeLow_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win8\x86\SeLow_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win8_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "SeLow_Win8_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.sys"), Path.Combine(dst_dir, @"SeLow_Win8\x86\SeLow_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x86"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x86"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
@ -1291,7 +1302,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("SeLow_x64.sys");
|
||||
cat_src_filename.Add("SeLow_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win8\x64\SeLow_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win8_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "SeLow_Win8_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.sys"), Path.Combine(dst_dir, @"SeLow_Win8\x64\SeLow_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x64"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x64"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
@ -1302,7 +1313,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("SeLow_x86.sys");
|
||||
cat_src_filename.Add("SeLow_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "SeLow_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x86"), cat_src_filename.ToArray(), "SeLow_Win10_x86.cat", true, false);
|
||||
|
||||
@ -1312,7 +1323,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("SeLow_x64.sys");
|
||||
cat_src_filename.Add("SeLow_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "SeLow_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x64"), cat_src_filename.ToArray(), "SeLow_Win10_x64.cat", true, false);
|
||||
|
||||
@ -1322,7 +1333,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("pxwfp_x86.sys");
|
||||
cat_src_filename.Add("pxwfp_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp\x86\pxwfp_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "pxwfp_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.sys"), Path.Combine(dst_dir, @"Wfp\x86\pxwfp_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x86"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x86"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
@ -1333,7 +1344,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("pxwfp_x64.sys");
|
||||
cat_src_filename.Add("pxwfp_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp\x64\pxwfp_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "pxwfp_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.sys"), Path.Combine(dst_dir, @"Wfp\x64\pxwfp_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x64"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x64"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
@ -1344,7 +1355,7 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("pxwfp_x86.sys");
|
||||
cat_src_filename.Add("pxwfp_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "pxwfp_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x86"), cat_src_filename.ToArray(), "pxwfp_Win10_x86.cat", true, false);
|
||||
|
||||
@ -1354,19 +1365,19 @@ namespace BuildUtil
|
||||
cat_src_filename.Add("pxwfp_x64.sys");
|
||||
cat_src_filename.Add("pxwfp_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), versionMajor, versionMinor, versionBuild, date, null, null, "pxwfp_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x64"), cat_src_filename.ToArray(), "pxwfp_Win10_x64.cat", true, false);
|
||||
|
||||
string tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "make_whql_submission.cm_"));
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "test_tag", Str.DateTimeToStrShort(DateTime.Now) + "_Build_" + build.ToString());
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "test_tag", Str.DateTimeToStrShort(DateTime.Now) + "_Build_" + versionBuild.ToString());
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, "make_whql_submission.cmd"), tmp_body, Str.ShiftJisEncoding);
|
||||
|
||||
IO.FileCopy(Path.Combine(src_dir, "2_merge_whql_sign.cm_"), Path.Combine(dst_dir, "2_merge_whql_sign.cm_"));
|
||||
|
||||
tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "Memo.txt"));
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_ver", (version / 100).ToString() + "." + (version % 100).ToString());
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_build", build.ToString());
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_ver", versionMajor.ToString() + "." + versionMinor.ToString());
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_build", versionBuild.ToString());
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, "Memo.txt"), tmp_body, Str.ShiftJisEncoding);
|
||||
|
||||
Kernel.Run(Path.Combine(Env.WindowsDir, "explorer.exe"), "\"" + dst_dir + "\"");
|
||||
|
Reference in New Issue
Block a user