mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:00:07 +02:00
pastojs: added experimental target os electron
git-svn-id: trunk@47445 -
This commit is contained in:
parent
f5acaf10ee
commit
bd3093e176
@ -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 = (
|
||||
|
@ -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');
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user