Skip to content

Commit 71ac19c

Browse files
committed
merge from master
2 parents 6369cd9 + c8b3008 commit 71ac19c

245 files changed

Lines changed: 41008 additions & 24300 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CodeConverter/CodeConverter/Properties/AssemblyInfo.dbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ import System.Runtime.InteropServices
3030
; Revision
3131
;
3232
{assembly: AssemblyVersion("1.0.0.0")}
33-
{assembly: AssemblyFileVersion("5.9.10.0")}
33+
{assembly: AssemblyFileVersion("6.0.6.0")}

CodeConverter/CodeConverterInterface/Properties/AssemblyInfo.dbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ import System.Runtime.InteropServices
3030
; Revision
3131
;
3232
{assembly: AssemblyVersion("1.0.0.0")}
33-
{assembly: AssemblyFileVersion("5.9.10.0")}
33+
{assembly: AssemblyFileVersion("6.0.6.0")}

CodeGen.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleTemplates", "SampleTe
4242
SampleTemplates\DatabaseTableConnection.tpl = SampleTemplates\DatabaseTableConnection.tpl
4343
SampleTemplates\DatabaseTableMapped.tpl = SampleTemplates\DatabaseTableMapped.tpl
4444
SampleTemplates\DatabaseTableTest.tpl = SampleTemplates\DatabaseTableTest.tpl
45+
SampleTemplates\DblNetConverter.dbl = SampleTemplates\DblNetConverter.dbl
4546
SampleTemplates\DecimalToMDYString.dbl = SampleTemplates\DecimalToMDYString.dbl
4647
SampleTemplates\DecimalToTimeString.dbl = SampleTemplates\DecimalToTimeString.dbl
4748
SampleTemplates\IsDate.dbl = SampleTemplates\IsDate.dbl
@@ -141,6 +142,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
141142
Documentation\Release Procedure.txt = Documentation\Release Procedure.txt
142143
SendMsiToDownloads.bat = SendMsiToDownloads.bat
143144
SignFile.bat = SignFile.bat
145+
signfile.ps1 = signfile.ps1
144146
EndProjectSection
145147
EndProject
146148
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleRepository", "SampleRepository", "{240CAFC0-11EF-4040-82ED-17B3B7870810}"

CodeGen/CodeGen.synproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
<SignAssembly>true</SignAssembly>
3232
<DelaySign>False</DelaySign>
3333
<AssemblyOriginatorKeyFile>$(SOLUTIONDIR)CodeGen.snk</AssemblyOriginatorKeyFile>
34-
<SccProjectName>SAK</SccProjectName>
35-
<SccProvider>SAK</SccProvider>
36-
<SccAuxPath>SAK</SccAuxPath>
37-
<SccLocalPath>SAK</SccLocalPath>
3834
<RunPostBuildEvent>On successful build</RunPostBuildEvent>
3935
<DBL_qAltif>False</DBL_qAltif>
4036
<DBL_device>False</DBL_device>

CodeGen/Documentation.dbl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,27 @@ proc
5454
begin
5555
try
5656
begin
57-
Process.Start(helpFile)
57+
Process.Start(new ProcessStartInfo()
58+
& {
59+
& FileName = "hh.exe",
60+
& Arguments = helpFile,
61+
& UseShellExecute = true,
62+
& CreateNoWindow = true
63+
& })
5864
end
59-
catch (e, @Exception)
65+
catch (ex, @Exception)
6066
begin
61-
nop
67+
Console.WriteLine("Failed to launch help file: " + ex.Message)
6268
end
6369
endtry
6470
end
6571
else
6672
begin
73+
.ifdef OS_WINDOWSNET
6774
Process.Start("https://codegen.synergex.com")
75+
.else
76+
Console.WriteLine("Documentation can't be launched directly. Go to https://codegen.synergex.com")
77+
.endc
6878
end
6979

7080
xreturn

CodeGen/Properties/AssemblyInfo.dbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ import System.Runtime.InteropServices
3030
; Revision
3131
;
3232
{assembly: AssemblyVersion("1.0.0.0")}
33-
{assembly: AssemblyFileVersion("5.9.10.0")}
33+
{assembly: AssemblyFileVersion("6.0.6.0")}
3434

CodeGenEngine/CodeGenContext.dbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ namespace CodeGen.Engine
130130
public method ResetTaskContext, void
131131
proc
132132
;;Main repository context
133-
Structures = new RpsStructureCollection(RpsLoadMode.NoLoad)
133+
Structures = new RpsStructureCollection(Repository,RpsLoadMode.NoLoad)
134134
Repository = ^null
135135

136136
;;Other context

CodeGenEngine/CodeGenEngine.synproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
<DBLCmdOptions> -W3 -qstack</DBLCmdOptions>
2020
<Language>Synergy</Language>
2121
<DBL_unQulRecStm>Stack</DBL_unQulRecStm>
22-
<SccProjectName>SAK</SccProjectName>
23-
<SccProvider>SAK</SccProvider>
24-
<SccAuxPath>SAK</SccAuxPath>
25-
<SccLocalPath>SAK</SccLocalPath>
2622
<StartupObject>(Not set)</StartupObject>
2723
<ApplicationIcon />
2824
<ResourceType>Icon</ResourceType>

CodeGenEngine/CodeGenerator.dbl

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -101,34 +101,25 @@ namespace CodeGen.Engine
101101
.include "CODEGEN_SRC:codegen.def"
102102
proc
103103
;;Explicitly set CODEGEN_EXE to the path containing this code (CodeGenEngine.dll).
104-
.ifdef D_NETSTANDARD
105-
;TODO: BUG: 4/12/2018 Using SetEnvironmentVariable seems to cause some issues in .NET Core
106104
data sts, i4
107105
xcall setlog("CODEGEN_EXE",Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(^typeof(CodeGenerator)).Location),sts)
108-
.else
109-
Environment.SetEnvironmentVariable("CODEGEN_EXE",Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(^typeof(CodeGenerator)).Location))
110-
.endc
111106

112107
;;Make the current version number available in the expander
113108
context.Version = CODEGEN_VERSION
114109

115-
.ifndef D_NETSTANDARD
116-
;;Is CODEGEN_TPLDIR already set in the environment?
110+
;;Is CODEGEN_TPLDIR set in the environment?
117111
data templateFolder = Environment.GetEnvironmentVariable("CODEGEN_TPLDIR")
112+
113+
.ifdef OS_WINDOWNSET
114+
118115
if (String.IsNullOrWhiteSpace(templateFolder))
119116
begin
120117
;;No, look in the registry for the value set by InstallShield
121118
templateFolder = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","TemplatePath","")
122119
if (!String.IsNullOrWhiteSpace(templateFolder)) then
123120
begin
124121
;;Found it
125-
.ifdef D_NETSTANDARD
126-
;TODO: BUG: 4/12/2018 Using SetEnvironmentVariable seems to cause some issues in .NET Core
127-
data sts, i4
128122
xcall setlog("CODEGEN_TPLDIR",templateFolder.Trim(),sts)
129-
.else
130-
Environment.SetEnvironmentVariable("CODEGEN_TPLDIR",templateFolder.Trim())
131-
.endc
132123
end
133124
else if (Environment.Is64BitProcess)
134125
begin
@@ -137,59 +128,66 @@ namespace CodeGen.Engine
137128
if (!String.IsNullOrWhiteSpace(templateFolder))
138129
begin
139130
;;Found it
140-
.ifdef D_NETSTANDARD
141-
;TODO: BUG: 4/12/2018 Using SetEnvironmentVariable seems to cause some issues in .NET Core
142-
data sts, i4
143131
xcall setlog("CODEGEN_TPLDIR",templateFolder.Trim(),sts)
144-
.else
145-
Environment.SetEnvironmentVariable("CODEGEN_TPLDIR",templateFolder.Trim())
146-
.endc
147132
end
148133
end
149134
end
150135
.endc
151136
;;Is CODEGEN_AUTHOR already set in the environment?
152137
data authorName = Environment.GetEnvironmentVariable("CODEGEN_AUTHOR")
153-
if (!String.IsNullOrWhiteSpace(authorName)) then
138+
139+
if (!String.IsNullOrWhiteSpace(authorName))
140+
begin
154141
context.Author = authorName
155-
else
142+
end
143+
144+
.ifdef OS_WINDOWNSET
145+
if (String.IsNullOrWhiteSpace(context.Author))
156146
begin
157-
.ifndef D_NETSTANDARD
158-
;;No, look in the registry for the value set by InstallShield
147+
;;Look in the registry for the value set by InstallShield
159148
authorName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","DefaultAuthor","")
160149
if (!String.IsNullOrWhiteSpace(authorName)) then
150+
begin
161151
context.Author = authorName
152+
end
162153
else if (Environment.Is64BitProcess)
163154
begin
164155
;;Not found. If we're a 64-bit process then try looking in the 32-bit registry
165156
authorName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Synergex\CodeGen","DefaultAuthor","")
166157
if (!String.IsNullOrWhiteSpace(authorName))
158+
begin
167159
context.Author = authorName
160+
end
168161
end
169-
.endc
170162
end
171-
163+
.endc
172164
;;Is CODEGEN_COMPANY already set in the environment?
173165
data companyName = Environment.GetEnvironmentVariable("CODEGEN_COMPANY")
174-
if (!String.IsNullOrWhiteSpace(companyName)) then
166+
if (!String.IsNullOrWhiteSpace(companyName))
167+
begin
175168
context.Company = companyName
176-
else
169+
end
170+
171+
.ifdef OS_WINDOWNSET
172+
if (String.IsNullOrWhiteSpace(context.Company))
177173
begin
178-
.ifndef D_NETSTANDARD
179174
;;No, look in the registry for the value set by InstallShield
180175
companyName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Synergex\CodeGen","DefaultCompany","")
181176
if (!String.IsNullOrWhiteSpace(companyName)) then
177+
begin
182178
context.Company = companyName
179+
end
183180
else if (Environment.Is64BitProcess)
184181
begin
185182
;;Not found. If we're a 64-bit process then try looking in the 32-bit registry
186183
companyName = (String)Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Synergex\CodeGen","DefaultCompany","")
187184
if (!String.IsNullOrWhiteSpace(companyName))
185+
begin
188186
context.Company = companyName
187+
end
189188
end
190-
.endc
191189
end
192-
190+
.endc
193191
endmethod
194192

195193
public static method LoadHarmonyCoreExtensions, void
@@ -1293,7 +1291,7 @@ namespace CodeGen.Engine
12931291
context.CurrentTask.RepositoryFile = context.CurrentTask.RepositoryFile.ToUpper()
12941292
try
12951293
begin
1296-
context.FileDefinition = new RpsFile(context.CurrentTask.RepositoryFile,context.CurrentTask.UseAlternateFieldNames)
1294+
context.FileDefinition = new RpsFile(context.Repository,context.CurrentTask.RepositoryFile,context.CurrentTask.UseAlternateFieldNames)
12971295
end
12981296
catch (e, @RpsFileException)
12991297
begin
@@ -1398,7 +1396,7 @@ namespace CodeGen.Engine
13981396
structureWildcard = true
13991397
try
14001398
begin
1401-
context.Structures = new RpsStructureCollection(RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
1399+
context.Structures = new RpsStructureCollection(context.Repository,RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
14021400
if (context.Structures.Count == 0)
14031401
errStatus = context.CurrentTask.Errorlog("Your repository contains no structures!")
14041402
end
@@ -1416,7 +1414,7 @@ namespace CodeGen.Engine
14161414
begin
14171415
try
14181416
begin
1419-
data newStructure, @RpsStructure, new RpsStructure(context.CurrentTask.Structures[ix],context.CurrentTask.UseAlternateFieldNames)
1417+
data newStructure, @RpsStructure, new RpsStructure(context.Repository,context.CurrentTask.Structures[ix],context.CurrentTask.UseAlternateFieldNames)
14201418
if (!String.IsNullOrWhiteSpace(context.SelectionWindowScript))
14211419
begin
14221420
if (!ProcessSelectionWindows(context,newStructure))
@@ -1444,7 +1442,7 @@ namespace CodeGen.Engine
14441442
structureWildcard = true
14451443
try
14461444
begin
1447-
context.Structures = new RpsStructureCollection(RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
1445+
context.Structures = new RpsStructureCollection(context.Repository,RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
14481446
if (context.Structures.Count == 0)
14491447
errStatus = context.CurrentTask.Errorlog("Your repository contains no structures!")
14501448
end
@@ -1462,7 +1460,7 @@ namespace CodeGen.Engine
14621460
begin
14631461
try
14641462
begin
1465-
data newStructure, @RpsStructure, new RpsStructure(context.Taskset.Structures[ix],context.CurrentTask.UseAlternateFieldNames)
1463+
data newStructure, @RpsStructure, new RpsStructure(context.Repository,context.Taskset.Structures[ix],context.CurrentTask.UseAlternateFieldNames)
14661464
if (!String.IsNullOrWhiteSpace(context.SelectionWindowScript))
14671465
begin
14681466
if (!ProcessSelectionWindows(context,newStructure))
@@ -1561,7 +1559,7 @@ namespace CodeGen.Engine
15611559
begin
15621560
data pfStructure, @RpsStructure
15631561

1564-
context.CurrentTask.ProFormaStructures = new RpsStructureCollection(RpsLoadMode.NoLoad)
1562+
context.CurrentTask.ProFormaStructures = new RpsStructureCollection(context.Repository,RpsLoadMode.NoLoad)
15651563

15661564
try
15671565
begin

CodeGenEngine/ExpressionEvaluators/ExpressionEvaluatorGeneric.dbl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,15 @@ namespace CodeGen.Engine
8080

8181
;;Structure expressions
8282

83+
genericExpressionEvaluators.Add("STRUCTURE_ALPHA_FIELDS", evaluateStructureAlphaFields)
8384
genericExpressionEvaluators.Add("STRUCTURE_ASCII", evaluateStructureAscii)
85+
genericExpressionEvaluators.Add("STRUCTURE_DATE_FIELDS", evaluateStructureDateFields)
86+
genericExpressionEvaluators.Add("STRUCTURE_DECIMAL_FIELDS", evaluateStructureDecimalFields)
8487
genericExpressionEvaluators.Add("STRUCTURE_FILES", evaluateStructureFiles)
8588
genericExpressionEvaluators.Add("STRUCTURE_HAS_UNIQUE_KEY", evaluateStructureHasUniqueKey)
8689
genericExpressionEvaluators.Add("STRUCTURE_HAS_UNIQUE_PK", evaluateStructureHasUniquePk)
90+
genericExpressionEvaluators.Add("STRUCTURE_IMPLIED_FIELDS", evaluateStructureImpliedFields)
91+
genericExpressionEvaluators.Add("STRUCTURE_INTEGER_FIELDS", evaluateStructureIntegerFields)
8792
genericExpressionEvaluators.Add("STRUCTURE_ISAM", evaluateStructureIsam)
8893
genericExpressionEvaluators.Add("STRUCTURE_KEYS", evaluateStructureKeys)
8994
genericExpressionEvaluators.Add("STRUCTURE_LDESC", evaluateStructureLongDesc)
@@ -93,8 +98,10 @@ namespace CodeGen.Engine
9398
genericExpressionEvaluators.Add("STRUCTURE_RELATIONS", evaluateStructureRelations)
9499
genericExpressionEvaluators.Add("STRUCTURE_RELATIVE", evaluateStructureRelative)
95100
genericExpressionEvaluators.Add("STRUCTURE_TAGS", evaluateStructureTags)
101+
genericExpressionEvaluators.Add("STRUCTURE_TIME_FIELDS", evaluateStructureTimeFields)
96102
genericExpressionEvaluators.Add("STRUCTURE_SINGLE_TAG", evaluateStructureSingleTag)
97103
genericExpressionEvaluators.Add("STRUCTURE_USER_DEFINED", evaluateStructureUserDefined)
104+
genericExpressionEvaluators.Add("STRUCTURE_USER_FIELDS", evaluateStructureUserFields)
98105
genericExpressionEvaluators.Add("STRUCTURE_UTEXT", evaluateStructureUserText)
99106

100107
endmethod

0 commit comments

Comments
 (0)