diff options
author | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-11-18 15:56:13 +0000 |
---|---|---|
committer | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-11-18 15:56:13 +0000 |
commit | b5ebdd6405c8af13378e466419d11a45ebc92bbf (patch) | |
tree | 4abc3bc2dd618d50033f18275c3c95eedfd8920d | |
parent | 58c147ecbf8ef31bb76b6efa85f356c49ecee1fe (diff) | |
download | fpc-b5ebdd6405c8af13378e466419d11a45ebc92bbf.tar.gz |
pastojs: added experimental target os electron
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47445 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | packages/pastojs/src/fppas2js.pp | 6 | ||||
-rw-r--r-- | packages/pastojs/src/pas2jscompiler.pp | 2 | ||||
-rw-r--r-- | packages/pastojs/src/pas2jsfiler.pp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/packages/pastojs/src/fppas2js.pp b/packages/pastojs/src/fppas2js.pp index 06e3006613..955886864f 100644 --- a/packages/pastojs/src/fppas2js.pp +++ b/packages/pastojs/src/fppas2js.pp @@ -1053,13 +1053,15 @@ type type TPasToJsPlatform = ( PlatformBrowser, - PlatformNodeJS + PlatformNodeJS, + PlatformElectron ); TPasToJsPlatforms = set of TPasToJsPlatform; const PasToJsPlatformNames: array[TPasToJsPlatform] of string = ( 'Browser', - 'NodeJS' + 'NodeJS', + 'Electron' ); type TPasToJsProcessor = ( diff --git a/packages/pastojs/src/pas2jscompiler.pp b/packages/pastojs/src/pas2jscompiler.pp index 30173e5bae..8559dc71aa 100644 --- a/packages/pastojs/src/pas2jscompiler.pp +++ b/packages/pastojs/src/pas2jscompiler.pp @@ -4762,6 +4762,7 @@ begin w(' -T<x> : Set target platform'); w(' -Tbrowser: default'); w(' -Tnodejs : add pas.run(), includes -Jc'); + w(' -Telectron: experimental'); w(' -u<x> : Undefines the symbol <x>'); w(' -v<x> : Be verbose. <x> is a combination of the following letters:'); w(' e : Show errors (default)'); @@ -4941,6 +4942,7 @@ begin Log.LogPlain('Supported targets (targets marked with ''{*}'' are under development):'); Log.LogPlain([' ',PasToJsPlatformNames[PlatformBrowser],': webbrowser']); Log.LogPlain([' ',PasToJsPlatformNames[PlatformNodeJS],': Node.js']); + Log.LogPlain([' ',PasToJsPlatformNames[PlatformElectron],': Electron app']); Log.LogLn; Log.LogPlain('Supported CPU instruction sets:'); Log.LogPlain(' ECMAScript5, ECMAScript6'); diff --git a/packages/pastojs/src/pas2jsfiler.pp b/packages/pastojs/src/pas2jsfiler.pp index a0253e8457..d2a43ec6b0 100644 --- a/packages/pastojs/src/pas2jsfiler.pp +++ b/packages/pastojs/src/pas2jsfiler.pp @@ -262,7 +262,8 @@ const PCUDefaultTargetPlatform = PlatformBrowser; PCUTargetPlatformNames: array[TPasToJsPlatform] of string = ( 'Browser', - 'NodeJS' + 'NodeJS', + 'Electron' ); PCUDefaultTargetProcessor = ProcessorECMAScript5; @@ -3970,6 +3971,7 @@ var Templ: TPasGenericTemplateType; TemplObj: TJSONObject; begin + if Parent=nil then ; if (GenericTemplateTypes=nil) or (GenericTemplateTypes.Count=0) then exit; Arr:=TJSONArray.Create; Obj.Add('GenericTemplateTypes',Arr); |