From 8d37f3fa0f931bb7ec1b8a3df1ef424c854c57d1 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Tue, 27 Nov 2018 03:48:46 +0000 Subject: [PATCH] BuildUtil: use new variables --- src/BuildUtil/Win32BuildUtil.cs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/BuildUtil/Win32BuildUtil.cs b/src/BuildUtil/Win32BuildUtil.cs index 1edc9d9c..1cb7661c 100644 --- a/src/BuildUtil/Win32BuildUtil.cs +++ b/src/BuildUtil/Win32BuildUtil.cs @@ -199,24 +199,19 @@ namespace BuildUtil string exeFileName = Path.GetFileName(targetExeName); string internalName = Path.GetFileNameWithoutExtension(exeFileName); - if (Str.IsEmptyStr(product_name) == false) - { - body = Str.ReplaceStr(body, "$PRODUCTNAME$", product_name); - } - else - { #if !BU_SOFTETHER - body = Str.ReplaceStr(body, "$PRODUCTNAME$", "PacketiX VPN"); + body = Str.ReplaceStr(body, "${PROJECT_NAME}", "PacketiX VPN"); #else - body = Str.ReplaceStr(body, "$PRODUCTNAME$", "SoftEther VPN"); + body = Str.ReplaceStr(body, "${PROJECT_NAME}", "SoftEther VPN"); #endif - } - 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$", versionMajor.ToString()); - body = Str.ReplaceStr(body, "$VER_MINOR$", versionMinor.ToString()); - body = Str.ReplaceStr(body, "$VER_BUILD$", versionBuild.ToString()); + + body = Str.ReplaceStr(body, "${COMPONENT_NAME}", product_name); + body = Str.ReplaceStr(body, "${COMPONENT_INTERNAL_NAME}", internalName); + body = Str.ReplaceStr(body, "${DATE_YEAR}", date.Year.ToString()); + body = Str.ReplaceStr(body, "${COMPONENT_FILE_NAME}", exeFileName); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_MAJOR}", versionMajor.ToString()); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_MINOR}", versionMinor.ToString()); + body = Str.ReplaceStr(body, "${PROJECT_VERSION_PATCH}", versionBuild.ToString()); IO f = IO.CreateTempFileByExt(".rc"); string filename = f.Name;