@@ -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
0 commit comments