Skip to content

Commit 70f2236

Browse files
committed
Fixed code that broke the .NET Framework build.
1 parent abc8700 commit 70f2236

5 files changed

Lines changed: 21 additions & 15 deletions

File tree

CodeGenEngine/CodeGenerator.dbl

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ namespace CodeGen.Engine
110110
;;Is CODEGEN_TPLDIR set in the environment?
111111
data templateFolder = Environment.GetEnvironmentVariable("CODEGEN_TPLDIR")
112112

113-
if (OperatingSystem.IsWindows() && String.IsNullOrWhiteSpace(templateFolder))
113+
.ifdef OS_WINDOWNSET
114+
115+
if (String.IsNullOrWhiteSpace(templateFolder))
114116
begin
115117
;;No, look in the registry for the value set by InstallShield
116118
templateFolder = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","TemplatePath","")
@@ -130,17 +132,19 @@ namespace CodeGen.Engine
130132
end
131133
end
132134
end
133-
135+
.endc
134136
;;Is CODEGEN_AUTHOR already set in the environment?
135137
data authorName = Environment.GetEnvironmentVariable("CODEGEN_AUTHOR")
136138

137-
if (!String.IsNullOrWhiteSpace(authorName)) then
139+
if (!String.IsNullOrWhiteSpace(authorName))
138140
begin
139141
context.Author = authorName
140142
end
141-
else if (OperatingSystem.IsWindows())
143+
144+
.ifdef OS_WINDOWNSET
145+
if (String.IsNullOrWhiteSpace(context.Author))
142146
begin
143-
;;No, look in the registry for the value set by InstallShield
147+
;;Look in the registry for the value set by InstallShield
144148
authorName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","DefaultAuthor","")
145149
if (!String.IsNullOrWhiteSpace(authorName)) then
146150
begin
@@ -156,14 +160,16 @@ namespace CodeGen.Engine
156160
end
157161
end
158162
end
159-
163+
.endc
160164
;;Is CODEGEN_COMPANY already set in the environment?
161165
data companyName = Environment.GetEnvironmentVariable("CODEGEN_COMPANY")
162-
if (!String.IsNullOrWhiteSpace(companyName)) then
166+
if (!String.IsNullOrWhiteSpace(companyName))
163167
begin
164168
context.Company = companyName
165169
end
166-
else if (OperatingSystem.IsWindows())
170+
171+
.ifdef OS_WINDOWNSET
172+
if (String.IsNullOrWhiteSpace(context.Company))
167173
begin
168174
;;No, look in the registry for the value set by InstallShield
169175
companyName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","DefaultCompany","")
@@ -181,7 +187,7 @@ namespace CodeGen.Engine
181187
end
182188
end
183189
end
184-
190+
.endc
185191
endmethod
186192

187193
public static method LoadHarmonyCoreExtensions, void

DotNetCore/MakeLinuxDistro.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set PATH=C:\Program Files\7-Zip;%PATH%
66
pushd %~dp0
77

88
if not exist distribution\linux\. mkdir distribution\linux
9+
if del /s /q distribution\windows\*
910

1011
pushd CodeGen
1112
echo Building Linux distribution
@@ -21,4 +22,3 @@ popd
2122

2223
popd
2324
endlocal
24-
pause

DotNetCore/MakeWindowsDistro.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ set PATH=C:\Program Files\7-Zip;%PATH%
66
pushd %~dp0
77

88
if not exist distribution\windows\. mkdir distribution\windows
9+
del /s /q distribution\windows\*
910

1011
pushd CodeGen
1112
echo Building Windows distribution
12-
dotnet publish -c Release -r win7-x64 -o ..\distribution\windows
13+
dotnet publish --nologo -c Release -r win-x64 --self-contained -p:PublishTrimmed=false --verbosity minimal -o ..\distribution\windows
1314
popd
1415

1516
pushd distribution
@@ -21,4 +22,3 @@ popd
2122

2223
popd
2324
endlocal
24-
pause

HarmonyCoreCodeGen.Core/HarmonyCoreCodeGen.Core.synproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
<HintPath>..\packages\Microsoft.Build.Utilities.Core.17.2.0\lib\net472\Microsoft.Build.Utilities.Core.dll</HintPath>
8484
<Private>true</Private>
8585
</Reference>
86-
<Reference Include="Microsoft.IO.Redist, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
87-
<HintPath>..\packages\Microsoft.IO.Redist.6.0.0\lib\net472\Microsoft.IO.Redist.dll</HintPath>
86+
<Reference Include="Microsoft.IO.Redist, Version=6.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
87+
<HintPath>..\packages\Microsoft.IO.Redist.6.0.1\lib\net472\Microsoft.IO.Redist.dll</HintPath>
8888
<Private>true</Private>
8989
</Reference>
9090
<Reference Include="Microsoft.NET.StringTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

HarmonyCoreCodeGen.Core/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Build.Framework" version="17.2.0" targetFramework="net472" />
66
<package id="Microsoft.Build.Locator" version="1.4.1" targetFramework="net472" />
77
<package id="Microsoft.Build.Utilities.Core" version="17.2.0" targetFramework="net472" />
8-
<package id="Microsoft.IO.Redist" version="6.0.0" targetFramework="net472" />
8+
<package id="Microsoft.IO.Redist" version="6.0.1" targetFramework="net472" />
99
<package id="Microsoft.NET.StringTools" version="1.0.0" targetFramework="net472" />
1010
<package id="Microsoft.VisualStudio.Setup.Configuration.Interop" version="3.2.2146" targetFramework="net472" developmentDependency="true" />
1111
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net472" />

0 commit comments

Comments
 (0)