mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 20:36:09 +02:00
pas2js: removed old options for http server
This commit is contained in:
parent
5449fd27bc
commit
057c2581dd
@ -75,14 +75,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr "Options de ligne de commande supplémentaires du serveur HTTP (une par ligne)"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr "Ajouter des options de ligne de commande supplémentaires pour la commande qui démarre le serveur Web."
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -151,14 +143,6 @@ msgstr "Exécutable du navigateur sélectionné de Pas2JS"
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr "Exécutable du NodeJS sélectionné pour Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr "Exécutable Webserver Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr "Port Webserver Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr "Chemin de l'exécutable Node.js, macro $(Pas2JSNodeJS)"
|
||||
@ -169,12 +153,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr "Chemin de %s, macro $(pas2js)"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr "Chemin de %s, macro $(Pas2JSWebServer)"
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr "Numéro de port pour l'allocation, macro $(Pas2JSWebServerPort)"
|
||||
|
@ -75,14 +75,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr "Extra parancssori paraméterek a HTTP kiszolgáló számára (soronként egy)"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr "Extra parancssori paraméterek megadása a webkiszolgálót indító parancs számára."
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -153,14 +145,6 @@ msgstr "Pas2JS kiválasztott böngésző alkalmazás"
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr "Pas2JS kiválasztott NodeJS alkalmazás"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr "Pas2JS webkiszolgáló alkalmazás"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr "Pas2JS webkiszolgáló port"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr "A Node.js alkalmazás útvonala, makró $(Pas2JSNodeJS)"
|
||||
@ -171,12 +155,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr "%s útvonala, makró $(pas2js)"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr "%s útvonala, makró $(Pas2JSWebServer)"
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr "A portok lefoglalása e porttól kezdődik, makró $(Pas2JSWebServerPort)"
|
||||
|
@ -65,14 +65,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -141,14 +133,6 @@ msgstr ""
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr ""
|
||||
@ -159,12 +143,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr ""
|
||||
|
@ -75,14 +75,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr "Opções extra de linha de comando do servidor HTTP (uma por linha)"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr "Adicionar opções extra de linha de comando para o comando que inicia o servidor web."
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -153,14 +145,6 @@ msgstr "Executável selecionado do navegador Pas2JS"
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr "Executável NodeJS selecionado Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr "Executável do servidor web Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr "Porta do servidor web Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr "Caminho do executável Node.js, macro $(Pas2JSNodeJS)"
|
||||
@ -171,12 +155,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr "Caminho de %s, macro $(pas2js)"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr "Caminho de %s, macro $(Pas2JSWebServer)"
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr "Número de porta de onde iniciar alocação, macro $(Pas2JSWebServerPort)"
|
||||
|
@ -78,14 +78,6 @@ msgstr "Файлы HTML|*.html|Все файлы|*.*"
|
||||
msgid "HTML Source not found"
|
||||
msgstr "Не найден исходный текст HTML"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr "Дополнительные параметры команды запуска сервера HTTP (по одному на строку)"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr "Добавить дополнительные параметры в команду запуска веб-сервера."
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr "Разрешать RTL показывать необработанные исключения"
|
||||
@ -154,14 +146,6 @@ msgstr "Выбранный исполнимый файл браузера для
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr "Выбранный исполнимый файл NodeJS для Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr "Исполнимый файл веб-сервера Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr "Порт веб-сервера Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr "Путь к исполнимому файлу Node.js, макрос $(Pas2JSNodeJS)"
|
||||
@ -172,12 +156,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr "Путь к %s, макрос $(pas2js)"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr "Путь к %s, макрос $(Pas2JSWebServer)"
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr "Начало диапазона запрашиваемых портов, макрос $(Pas2JSWebServerPort)"
|
||||
|
@ -75,14 +75,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -153,14 +145,6 @@ msgstr ""
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr ""
|
||||
@ -171,12 +155,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr ""
|
||||
|
@ -77,14 +77,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr "Додаткові параметри командного рядка HTTP-сервера (по одній в рядку)"
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr "Додайте параметри командного рядка для команди запуску вебсервера."
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -153,14 +145,6 @@ msgstr "Виконуваний файл вибраного оглядача Pas2
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr "Виконуваний файл вибраного NodeJS Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr "Виконуваний файл вебсервера Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr "Порт вебсервера Pas2JS"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr "Шлях до виконуваного файлу Node.js, макрос $(Pas2JSNodeJS)"
|
||||
@ -171,12 +155,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr "Шлях %s, макрос $(pas2js)"
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr "Шлях %s, макрос $(Pas2JSWebServer)"
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr "Номери порту для початку розміщення, макрос $(Pas2JSWebServerPort)"
|
||||
|
@ -76,14 +76,6 @@ msgstr ""
|
||||
msgid "HTML Source not found"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelcaption
|
||||
msgid "HTTP Server extra command-line options (one per line)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdhttpserveroptslabelhint
|
||||
msgid "Add extra command-line options for the command which starts the webserver."
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdletrtlshowuncaughtexceptions
|
||||
msgid "Let RTL show uncaught exceptions"
|
||||
msgstr ""
|
||||
@ -154,14 +146,6 @@ msgstr ""
|
||||
msgid "Pas2JS selected NodeJS excutable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverexe
|
||||
msgid "Pas2JS webserver executable"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpas2jswebserverport
|
||||
msgid "Pas2JS webserver port"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofnodejsexecutable
|
||||
msgid "Path of Node.js executable, macro $(Pas2JSNodeJS)"
|
||||
msgstr ""
|
||||
@ -172,12 +156,6 @@ msgctxt "strpas2jsdesign.pjsdpathofxmacropas2js"
|
||||
msgid "Path of %s, macro $(pas2js)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdpathofxmacropas2jswebserver
|
||||
#, object-pascal-format
|
||||
msgctxt "strpas2jsdesign.pjsdpathofxmacropas2jswebserver"
|
||||
msgid "Path of %s, macro $(Pas2JSWebServer)"
|
||||
msgstr ""
|
||||
|
||||
#: strpas2jsdesign.pjsdportnumbertostartallocatingfrom
|
||||
msgid "Port number to start allocating from, macro $(Pas2JSWebServerPort)"
|
||||
msgstr ""
|
||||
|
@ -24,8 +24,6 @@ Type
|
||||
Private
|
||||
FOnRefresh: TNotifyEvent;
|
||||
function GetPas2JSPath(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
function GetPas2JSWebServerPath(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
function GetPas2JSWebServerPort(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
function GetPas2JSBrowser(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
function GetPas2JSNodeJS(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
function GetPas2jsProjectURL(const s: string; const {%H-}Data: PtrInt; var Abort: boolean): string;
|
||||
@ -93,28 +91,6 @@ begin
|
||||
Result:='pas2js'; // always return something to get nicer error messages
|
||||
end;
|
||||
|
||||
function TPJSController.GetPas2JSWebServerPath(const s: string;
|
||||
const Data: PtrInt; var Abort: boolean): string;
|
||||
begin
|
||||
Abort:=False;
|
||||
if (s<>'') and (ConsoleVerbosity>=0) then
|
||||
debugln(['Hint: (lazarus) [TPJSController.GetPas2JSWebServerPath] ignoring macro Pas2JSWebServer parameter "',s,'"']);
|
||||
Result:=PJSOptions.GetParsedWebServerFilename;
|
||||
if Result='' then
|
||||
Result:=PJSDefaultWebServerName; // always return something to get nicer error messages
|
||||
end;
|
||||
|
||||
function TPJSController.GetPas2JSWebServerPort(const s: string;
|
||||
const Data: PtrInt; var Abort: boolean): string;
|
||||
begin
|
||||
Abort:=False;
|
||||
if (s<>'') and (ConsoleVerbosity>=0) then
|
||||
debugln(['Hint: (lazarus) [TPJSController.GetPas2JSWebServerPort] ignoring macro Pas2JSWebServerPort parameter "',s,'"']);
|
||||
Result:=PJSOptions.GetParsedWebServerFilename;
|
||||
if Result='' then
|
||||
Result:=PJSDefaultWebServerName; // always return something to get nicer error messages
|
||||
end;
|
||||
|
||||
function TPJSController.GetPas2JSBrowser(const s: string; const Data: PtrInt; var Abort: boolean): string;
|
||||
|
||||
begin
|
||||
@ -261,7 +237,10 @@ begin
|
||||
exit('');
|
||||
Result:=aProject.CustomData[PJSProjectURL];
|
||||
if Result<>'' then
|
||||
begin
|
||||
IDEMacros.SubstituteMacros(Result);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if Result='' then
|
||||
begin
|
||||
@ -309,10 +288,10 @@ begin
|
||||
if SimpleWebServerController.Options.ServerExe='compileserver'+GetExeExt then
|
||||
begin
|
||||
// simplewebservergui package has default value
|
||||
if CompareFilenames(ExtractFilename(PJSOptions.WebServerFileName),'compileserver'+GetExeExt)=0 then
|
||||
if CompareFilenames(ExtractFilename(PJSOptions.OldWebServerFileName),'compileserver'+GetExeExt)=0 then
|
||||
begin
|
||||
// this package has a compileserver -> for compatibility set our value
|
||||
SimpleWebServerController.Options.ServerExe:=PJSOptions.WebServerFileName;
|
||||
// user had used compileserver too -> migrate to simplewebservergui
|
||||
SimpleWebServerController.Options.ServerExe:=PJSOptions.OldWebServerFileName;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -427,10 +406,6 @@ procedure TPJSController.Hook;
|
||||
begin
|
||||
IDEMacros.Add(TTransferMacro.Create('Pas2JS', '', pjsdPas2JSExecutable, @
|
||||
GetPas2JSPath, []));
|
||||
IDEMacros.Add(TTransferMacro.Create('Pas2JSWebServer', '', pjsdPas2JSWebServerExe, @
|
||||
GetPas2JSWebServerPath, []));
|
||||
IDEMacros.Add(TTransferMacro.Create('Pas2JSWebServerPort', '', pjsdPas2JSWebServerPort, @
|
||||
GetPas2JSWebServerPort, []));
|
||||
IDEMacros.Add(TTransferMacro.Create('Pas2JSBrowser', '',
|
||||
pjsdPas2JSSelectedBrowserExecutable, @GetPas2JSBrowser, []));
|
||||
IDEMacros.Add(TTransferMacro.Create('Pas2JSNodeJS', '',
|
||||
|
@ -23,8 +23,6 @@ const
|
||||
PJSDefaultCompiler = '$MakeExe(IDE,pas2js)';
|
||||
PJSDefaultDTS2Pas = '$MakeExe(IDE,dts2pas)';
|
||||
PJSDefaultDTS2PasService = 'https://www.freepascal.org/~michael/service/dts2pas.cgi';
|
||||
PJSDefaultWebServerName = 'compileserver';
|
||||
PJSDefaultWebServer = '$MakeExe(IDE,'+PJSDefaultWebServerName+')';
|
||||
PJSDefaultStartAtPort = 3000; // compileserver default port
|
||||
PJSDefaultHTTPServerParams = '-s -p $()';
|
||||
PJSDefaultBrowser = '$MakeExe(IDE,firefox)';
|
||||
@ -34,8 +32,6 @@ Type
|
||||
TPas2jsCachedOption = (
|
||||
p2jcoCompilerFilename,
|
||||
p2jcoBrowserFilename,
|
||||
p2jcoHTTPServerFilename,
|
||||
p2jcoHTTPServerPort,
|
||||
p2jcoNodeJSFilename,
|
||||
p2jcoAtomTemplateDir,
|
||||
p2jcoVSCodeTemplateDir,
|
||||
@ -48,7 +44,6 @@ const
|
||||
p2jcoFilenames = [
|
||||
p2jcoCompilerFilename,
|
||||
p2jcoBrowserFilename,
|
||||
p2jcoHTTPServerFilename,
|
||||
p2jcoNodeJSFilename,
|
||||
p2jcoAtomTemplateDir,
|
||||
p2jcoVSCodeTemplateDir,
|
||||
@ -69,18 +64,15 @@ type
|
||||
private
|
||||
FCachedOptions: array[TPas2jsCachedOption] of TPas2jsCachedValue;
|
||||
FChangeStamp: int64;
|
||||
FHTTPServerOpts: TStrings;
|
||||
FOldWebServerFileName: string;
|
||||
FSavedStamp: int64;
|
||||
FStartAtPort: Word;
|
||||
procedure DoOptsChanged(Sender: TObject);
|
||||
function GetAtomTemplateDir: String;
|
||||
function GetBrowserFileName: String;
|
||||
function GetCompilerFilename: string;
|
||||
function GetDTS2Pas: String;
|
||||
function GetDTS2PasService: String;
|
||||
function GetStartAtPort: Word;
|
||||
function GetVSCodeTemplateDir: String;
|
||||
function GetWebServerFileName: string;
|
||||
function GetModified: boolean;
|
||||
function GetNodeJSFileName: string;
|
||||
function GetParsedOptionValue(Option: TPas2jsCachedOption): string;
|
||||
@ -89,8 +81,6 @@ type
|
||||
procedure SetDTS2Pas(AValue: String);
|
||||
procedure SetDTS2PasService(AValue: String);
|
||||
procedure SetVSCodeTemplateDir(AValue: String);
|
||||
procedure SetWebServerFileName(AValue: string);
|
||||
procedure SetHTTPServerOpts(AValue: TStrings);
|
||||
procedure SetModified(AValue: boolean);
|
||||
procedure SetCompilerFilename(AValue: string);
|
||||
procedure SetNodeJSFileName(AValue: string);
|
||||
@ -115,22 +105,18 @@ type
|
||||
Property VSCodeTemplateDir : String Read GetVSCodeTemplateDir Write SetVSCodeTemplateDir;
|
||||
Property DTS2Pas : String Read GetDTS2Pas Write SetDTS2Pas;
|
||||
Property DTS2PasServiceURL : String Read GetDTS2PasService Write SetDTS2PasService;
|
||||
Property StartAtPort : Word Read FStartAtPort Write SetStartAtPort;
|
||||
public
|
||||
// ToDo: remove when migrated to SimpleWebServerGUI
|
||||
property OldWebServerFileName: string read FOldWebServerFileName write FOldWebServerFileName;
|
||||
function GetParsedBrowserFilename: string;
|
||||
function GetParsedWebServerFilename: string;
|
||||
function GetParsedWebServerPort: string;
|
||||
Property WebServerFileName : string Read GetWebServerFileName Write SetWebServerFileName;
|
||||
Property HTTPServerOpts : TStrings Read FHTTPServerOpts Write SetHTTPServerOpts;
|
||||
Property BrowserFileName : String Read GetBrowserFileName Write SetBrowserFileName;
|
||||
Property StartAtPort : Word Read GetStartAtPort Write SetStartAtPort;
|
||||
end;
|
||||
|
||||
var
|
||||
PJSOptions: TPas2jsOptions = nil;
|
||||
|
||||
function GetStandardPas2jsExe: string;
|
||||
function GetStandardWebServerExe: string;
|
||||
function GetStandardBrowser: string;
|
||||
function GetStandardNodeJS: string;
|
||||
function GetPas2jsQuality(Filename: string; out Msg: string): boolean;
|
||||
@ -148,7 +134,6 @@ begin
|
||||
end;
|
||||
|
||||
function GetStandardNodeJS: string;
|
||||
|
||||
begin
|
||||
Result:=PJSDefaultNodeJS;
|
||||
if not IDEMacros.SubstituteMacros(Result) then
|
||||
@ -159,16 +144,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetStandardWebServerExe: string;
|
||||
|
||||
begin
|
||||
Result:=PJSDefaultWebServer;
|
||||
if not IDEMacros.SubstituteMacros(Result) then
|
||||
Result:='PJSDefaultHTTPServerCmd'+GetExeExt;
|
||||
end;
|
||||
|
||||
function GetStandardBrowser: string;
|
||||
|
||||
begin
|
||||
Result:='$MakeExe(IDE,firefox)';
|
||||
if not IDEMacros.SubstituteMacros(Result) then
|
||||
@ -188,7 +164,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function GetPas2jsQuality(Filename: string; out Msg: string): boolean;
|
||||
var
|
||||
ShortFile: String;
|
||||
@ -240,11 +215,6 @@ begin
|
||||
Result:=FCachedOptions[p2jcoBrowserFilename].RawValue;
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptions.DoOptsChanged(Sender: TObject);
|
||||
begin
|
||||
Self.Modified:=True;
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetAtomTemplateDir: String;
|
||||
begin
|
||||
Result:=FCachedOptions[p2jcoAtomTemplateDir].RawValue;
|
||||
@ -265,21 +235,11 @@ begin
|
||||
Result:=FCachedOptions[p2jcoDTSToPasServiceURL].RawValue
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetStartAtPort: Word;
|
||||
begin
|
||||
Result:=StrToIntDef(FCachedOptions[p2jcoHTTPServerPort].RawValue,PJSDefaultStartAtPort);
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetVSCodeTemplateDir: String;
|
||||
begin
|
||||
Result:=FCachedOptions[p2jcoVSCodeTemplateDir].RawValue;
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetWebServerFileName: string;
|
||||
begin
|
||||
Result:=FCachedOptions[p2jcoHTTPServerFilename].RawValue;
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetNodeJSFileName: string;
|
||||
begin
|
||||
Result:=FCachedOptions[p2jcoNodeJSFilename].RawValue;
|
||||
@ -303,7 +263,6 @@ var
|
||||
begin
|
||||
FChangeStamp:=LUInvalidChangeStamp64;
|
||||
FCachedOptions[p2jcoCompilerFilename].RawValue:=PJSDefaultCompiler;
|
||||
FCachedOptions[p2jcoHTTPServerFilename].RawValue:=PJSDefaultWebServer;
|
||||
FCachedOptions[p2jcoNodeJSFilename].RawValue:=PJSDefaultNodeJS;
|
||||
FCachedOptions[p2jcoBrowserFilename].RawValue:=PJSDefaultBrowser;
|
||||
FCachedOptions[p2jcoAtomTemplateDir].RawValue:='';
|
||||
@ -312,13 +271,10 @@ begin
|
||||
FCachedOptions[p2jcoDTSToPasServiceURL].RawValue:=PJSDefaultDTS2PasService;
|
||||
for o in TPas2jsCachedOption do
|
||||
FCachedOptions[o].Stamp:=LUInvalidChangeStamp64;
|
||||
FHTTPServerOpts:=TStringList.Create;
|
||||
TStringList(FHTTPServerOpts).OnChange:=@DoOptsChanged;
|
||||
end;
|
||||
|
||||
destructor TPas2jsOptions.Destroy;
|
||||
begin
|
||||
FreeAndNil(FHTTPServerOpts);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -354,7 +310,6 @@ end;
|
||||
Const
|
||||
KeyCompiler = 'compiler/value';
|
||||
KeyHTTPServer = 'webserver/value';
|
||||
KeyHTTPServerOptions = 'webserver/extraoptions/value';
|
||||
KeyBrowser = 'webbrowser/value';
|
||||
KeyNodeJS = 'nodejs/value';
|
||||
KeyAtomTemplate = 'atomtemplate/value';
|
||||
@ -367,7 +322,6 @@ procedure TPas2jsOptions.LoadFromConfig(Cfg: TConfigStorage);
|
||||
|
||||
begin
|
||||
CompilerFilename:=Cfg.GetValue(KeyCompiler,PJSDefaultCompiler);
|
||||
WebServerFileName:=Cfg.GetValue(KeyHTTPServer,PJSDefaultWebServer);
|
||||
BrowserFileName:=Cfg.GetValue(KeyBrowser,PJSDefaultBrowser);
|
||||
NodeJSFileName:=Cfg.GetValue(KeyNodeJS,PJSDefaultNodeJS);
|
||||
AtomTemplateDir:=Cfg.GetValue(KeyAtomTemplate,'');
|
||||
@ -375,7 +329,10 @@ begin
|
||||
DTS2Pas:=cfg.GetValue(KeyDTS2PasTool,PJSDefaultDTS2Pas);
|
||||
DTS2PasServiceURL:=cfg.GetValue(KeyDTS2PasServiceURL,PJSDefaultDTS2PasService);
|
||||
StartAtPort :=Cfg.GetValue(KeyStartPortAt,PJSDefaultStartAtPort);
|
||||
Cfg.GetValue(KeyHTTPServerOptions,FHTTPServerOpts);
|
||||
|
||||
// legacy
|
||||
FOldWebServerFileName:=Cfg.GetValue(KeyHTTPServer,'');
|
||||
|
||||
Modified:=false;
|
||||
end;
|
||||
|
||||
@ -383,7 +340,6 @@ procedure TPas2jsOptions.SaveToConfig(Cfg: TConfigStorage);
|
||||
|
||||
begin
|
||||
Cfg.SetDeleteValue(KeyCompiler,CompilerFilename,PJSDefaultCompiler);
|
||||
Cfg.SetDeleteValue(KeyHTTPServer,WebServerFileName,PJSDefaultWebServer);
|
||||
Cfg.SetDeleteValue(KeyStartPortAt,StartAtPort,PJSDefaultStartAtPort);
|
||||
Cfg.SetDeleteValue(KeyNodeJS,NodeJSFileName,PJSDefaultNodeJS);
|
||||
Cfg.SetDeleteValue(KeyBrowser,BrowserFileName,PJSDefaultBrowser);
|
||||
@ -391,7 +347,10 @@ begin
|
||||
Cfg.SetDeleteValue(KeyVSCodeTemplate,VSCodeTemplateDir,'');
|
||||
cfg.SetDeleteValue(KeyDTS2PasTool,DTS2Pas,PJSDefaultDTS2Pas);
|
||||
cfg.SetDeleteValue(KeyDTS2PasServiceURL,DTS2PasServiceURL,PJSDefaultDTS2PasService);
|
||||
Cfg.SetValue(KeyHTTPServerOptions,FHTTPServerOpts);
|
||||
|
||||
// legacy
|
||||
cfg.SetDeleteValue(KeyHTTPServer,OldWebServerFileName,'');
|
||||
|
||||
Modified:=false;
|
||||
end;
|
||||
|
||||
@ -400,16 +359,6 @@ begin
|
||||
Result:=GetParsedOptionValue(p2jcoCompilerFilename);
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetParsedWebServerFilename: string;
|
||||
begin
|
||||
Result:=GetParsedOptionValue(p2jcoHTTPServerFilename);
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetParsedWebServerPort: string;
|
||||
begin
|
||||
Result:=GetParsedOptionValue(p2jcoHTTPServerPort);
|
||||
end;
|
||||
|
||||
function TPas2jsOptions.GetParsedNodeJSFilename: string;
|
||||
begin
|
||||
Result:=GetParsedOptionValue(p2jcoNodeJSFilename);
|
||||
@ -445,8 +394,6 @@ begin
|
||||
case Option of
|
||||
p2jcoCompilerFilename: p^.ParsedValue:=GetStandardPas2jsExe;
|
||||
p2jcoBrowserFilename: p^.ParsedValue:=GetStandardBrowser;
|
||||
p2jcoHTTPServerFilename: p^.ParsedValue:=GetStandardWebServerExe;
|
||||
p2jcoHTTPServerPort: p^.ParsedValue:=IntToStr(PJSDefaultStartAtPort);
|
||||
p2jcoNodeJSFilename: p^.ParsedValue:=GetStandardNodeJS;
|
||||
end;
|
||||
if IsFilename and (p^.ParsedValue<>'')
|
||||
@ -496,18 +443,6 @@ begin
|
||||
SetCachedOption(p2jcoVSCodeTemplateDir,AValue);
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptions.SetWebServerFileName(AValue: string);
|
||||
begin
|
||||
AValue:=TrimFilename(AValue);
|
||||
SetCachedOption(p2jcoHTTPServerFilename,AValue);
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptions.SetHTTPServerOpts(AValue: TStrings);
|
||||
begin
|
||||
if FHTTPServerOpts=AValue then Exit;
|
||||
FHTTPServerOpts.Assign(AValue);
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptions.SetStartAtPort(AValue: Word);
|
||||
begin
|
||||
if FStartAtPort=AValue then Exit;
|
||||
|
@ -15,9 +15,9 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 16
|
||||
Height = 15
|
||||
Top = 6
|
||||
Width = 174
|
||||
Width = 156
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Pas2JS command executable'
|
||||
@ -31,9 +31,9 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Pas2jsPathBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 24
|
||||
Width = 472
|
||||
Height = 30
|
||||
Top = 23
|
||||
Width = 470
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
@ -45,10 +45,10 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Pas2jsPathComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 27
|
||||
Top = 24
|
||||
Width = 23
|
||||
Left = 476
|
||||
Height = 30
|
||||
Top = 23
|
||||
Width = 25
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
@ -58,73 +58,28 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object HTTPServerCmdLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Pas2jsPathComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 59
|
||||
Width = 179
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Simple HTTP Server command'
|
||||
ParentColor = False
|
||||
end
|
||||
object HTTPServerBrowseButton: TButton
|
||||
AnchorSideTop.Control = HTTPServerCmdLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = HTTPServerComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 29
|
||||
Top = 75
|
||||
Width = 23
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '...'
|
||||
OnClick = HTTPServerBrowseButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object HTTPServerComboBox: TComboBox
|
||||
AnchorSideLeft.Control = HTTPServerCmdLabel
|
||||
AnchorSideTop.Control = HTTPServerCmdLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = HTTPServerBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 77
|
||||
Width = 472
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
TabOrder = 3
|
||||
end
|
||||
object ServerPortSpinEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = ServerPortLabel
|
||||
AnchorSideTop.Control = ServerPortLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 130
|
||||
Height = 30
|
||||
Top = 78
|
||||
Width = 74
|
||||
BorderSpacing.Top = 2
|
||||
MaxValue = 65353
|
||||
MinValue = 1024
|
||||
TabOrder = 4
|
||||
TabOrder = 2
|
||||
Value = 3000
|
||||
end
|
||||
object ServerPortLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = HTTPServerComboBox
|
||||
AnchorSideTop.Control = Pas2jsPathComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 112
|
||||
Width = 124
|
||||
Height = 15
|
||||
Top = 61
|
||||
Width = 114
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Standard server port'
|
||||
@ -136,23 +91,23 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = BBrowserBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 278
|
||||
Width = 472
|
||||
Height = 30
|
||||
Top = 131
|
||||
Width = 470
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
TabOrder = 5
|
||||
TabOrder = 3
|
||||
Text = 'BrowserComboBox'
|
||||
end
|
||||
object BrowserLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = HTTPServerOptionsMemo
|
||||
AnchorSideTop.Control = ServerPortSpinEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 260
|
||||
Width = 283
|
||||
Height = 15
|
||||
Top = 114
|
||||
Width = 258
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Browser to launch when opening project HTML'
|
||||
@ -164,25 +119,25 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = BrowserComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 27
|
||||
Top = 278
|
||||
Width = 23
|
||||
Left = 476
|
||||
Height = 30
|
||||
Top = 131
|
||||
Width = 25
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '...'
|
||||
OnClick = BBrowserBrowseButtonClick
|
||||
TabOrder = 6
|
||||
TabOrder = 4
|
||||
end
|
||||
object NodeJSLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = BrowserComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 311
|
||||
Width = 114
|
||||
Height = 15
|
||||
Top = 167
|
||||
Width = 105
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Node.js executable'
|
||||
@ -194,13 +149,13 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = NodeJSBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 329
|
||||
Width = 472
|
||||
Height = 30
|
||||
Top = 184
|
||||
Width = 470
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
TabOrder = 7
|
||||
TabOrder = 5
|
||||
Text = 'NodeJSComboBox'
|
||||
end
|
||||
object NodeJSBrowseButton: TButton
|
||||
@ -209,54 +164,25 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = NodeJSComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 27
|
||||
Top = 329
|
||||
Width = 23
|
||||
Left = 476
|
||||
Height = 30
|
||||
Top = 184
|
||||
Width = 25
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '...'
|
||||
OnClick = NodeJSBrowseButtonClick
|
||||
TabOrder = 8
|
||||
end
|
||||
object HTTPServerOptionsMemo: TMemo
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = HTTPServerOptsLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 73
|
||||
Top = 181
|
||||
Width = 495
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 6
|
||||
TabOrder = 9
|
||||
end
|
||||
object HTTPServerOptsLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ServerPortSpinEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 163
|
||||
Width = 327
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'HTTP Server extra command-line options (one per line)'
|
||||
ParentColor = False
|
||||
TabOrder = 6
|
||||
end
|
||||
object lblAtomTemplateDir: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = NodeJSComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 362
|
||||
Width = 200
|
||||
Height = 15
|
||||
Top = 220
|
||||
Width = 185
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Atom package template directory'
|
||||
@ -268,13 +194,13 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = NodeJSBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 380
|
||||
Width = 472
|
||||
Height = 30
|
||||
Top = 237
|
||||
Width = 470
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
TabOrder = 10
|
||||
TabOrder = 7
|
||||
Text = 'AtomTemplateDirComboBox'
|
||||
end
|
||||
object AtomTemplateDirBrowseButton: TButton
|
||||
@ -283,25 +209,25 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = AtomTemplateDirComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 27
|
||||
Top = 380
|
||||
Width = 23
|
||||
Left = 476
|
||||
Height = 30
|
||||
Top = 237
|
||||
Width = 25
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '...'
|
||||
OnClick = AtomTemplateDirBrowseButtonClick
|
||||
TabOrder = 11
|
||||
TabOrder = 8
|
||||
end
|
||||
object lblVSCodeTemplateDir: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = AtomTemplateDirComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 413
|
||||
Width = 227
|
||||
Height = 15
|
||||
Top = 273
|
||||
Width = 209
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'VS Code Extension template directory'
|
||||
@ -313,13 +239,13 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = NodeJSBrowseButton
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 431
|
||||
Width = 472
|
||||
Height = 30
|
||||
Top = 290
|
||||
Width = 470
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 0
|
||||
TabOrder = 12
|
||||
TabOrder = 9
|
||||
Text = 'VSCodeTemplateDirComboBox'
|
||||
end
|
||||
object VSCodeTemplateDirBrowseButton: TButton
|
||||
@ -328,15 +254,15 @@ object Pas2jsOptionsFrame: TPas2jsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = VSCodeTemplateDirComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 478
|
||||
Height = 27
|
||||
Top = 431
|
||||
Width = 23
|
||||
Left = 476
|
||||
Height = 30
|
||||
Top = 290
|
||||
Width = 25
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
Caption = '...'
|
||||
OnClick = VSCodeTemplateDirBrowseButtonClick
|
||||
TabOrder = 13
|
||||
TabOrder = 10
|
||||
end
|
||||
end
|
||||
|
@ -29,9 +29,6 @@ Type
|
||||
BBrowserBrowseButton: TButton;
|
||||
BrowserComboBox: TComboBox;
|
||||
BrowserLabel: TLabel;
|
||||
HTTPServerBrowseButton: TButton;
|
||||
HTTPServerCmdLabel: TLabel;
|
||||
HTTPServerComboBox: TComboBox;
|
||||
lblVSCodeTemplateDir: TLabel;
|
||||
NodeJSBrowseButton: TButton;
|
||||
AtomTemplateDirBrowseButton: TButton;
|
||||
@ -44,10 +41,7 @@ Type
|
||||
Pas2jsPathLabel: TLabel;
|
||||
ServerPortLabel: TLabel;
|
||||
ServerPortSpinEdit: TSpinEdit;
|
||||
HTTPServerOptsLabel: TLabel;
|
||||
HTTPServerOptionsMemo: TMemo;
|
||||
procedure BBrowserBrowseButtonClick(Sender: TObject);
|
||||
procedure HTTPServerBrowseButtonClick(Sender: TObject);
|
||||
procedure AtomTemplateDirBrowseButtonClick(Sender: TObject);
|
||||
procedure NodeJSBrowseButtonClick(Sender: TObject);
|
||||
procedure Pas2jsPathBrowseButtonClick(Sender: TObject);
|
||||
@ -103,28 +97,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptionsFrame.HTTPServerBrowseButtonClick(Sender: TObject);
|
||||
|
||||
var
|
||||
OpenDialog: TOpenDialog;
|
||||
AFilename: String;
|
||||
|
||||
begin
|
||||
OpenDialog:=TOpenDialog.Create(nil);
|
||||
try
|
||||
//InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist];
|
||||
OpenDialog.Title:=SafeFormat(pjsdSelectXExecutable,[PJSDefaultWebServer]);
|
||||
if OpenDialog.Execute then begin
|
||||
AFilename:=CleanAndExpandFilename(OpenDialog.Filename);
|
||||
SetComboBoxText(HTTPServerComboBox,AFilename,cstFilename,30);
|
||||
PJSOptions.WebServerFileName:=AFileName;
|
||||
end;
|
||||
finally
|
||||
OpenDialog.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPas2jsOptionsFrame.AtomTemplateDirBrowseButtonClick(Sender: TObject);
|
||||
|
||||
var
|
||||
@ -228,12 +200,6 @@ begin
|
||||
pjsdYouCanUseIDEMacrosLikeMakeExeWithoutAFullPathIsSea, [DefPas2jsExe]);
|
||||
Pas2jsPathBrowseButton.Hint:=pjsdBrowse;
|
||||
|
||||
HTTPServerCmdLabel.Caption:=SafeFormat(pjsdPathOfXMacroPas2JSWebServer, [
|
||||
PJSDefaultWebServerName+GetExeExt]);
|
||||
HTTPServerCmdLabel.Hint:=SafeFormat(
|
||||
pjsdYouCanUseIDEMacrosLikeMakeExeWithoutAFullPathIsSea, [PJSDefaultWebServerName]);
|
||||
HTTPServerBrowseButton.Hint:=pjsdBrowse;
|
||||
|
||||
ServerPortLabel.Caption:=pjsdPortNumberToStartAllocatingFrom;
|
||||
ServerPortLabel.Hint:=pjsdServerInstancesWillBeStartedWithAPortStartingFromT;
|
||||
|
||||
@ -242,9 +208,6 @@ begin
|
||||
|
||||
NodeJSLabel.Caption:=pjsdPathOfNodeJsExecutable;
|
||||
|
||||
HTTPServerOptsLabel.Caption:=pjsdHTTPServerOptsLabelCaption;
|
||||
HTTPServerOptsLabel.Hint:=pjsdHTTPServerOptsLabelHint;
|
||||
|
||||
lblAtomTemplateDir.Caption := pjsdAtomPackageTemplateDirectory;
|
||||
lblVSCodeTemplateDir.Caption := pjsdVisualStudioCodeExtensionTemplateDirectory;
|
||||
end;
|
||||
@ -252,11 +215,9 @@ end;
|
||||
procedure TPas2jsOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
SetComboBoxText(Pas2jsPathComboBox,PJSOptions.CompilerFilename,cstFilename,30);
|
||||
SetComboBoxText(HTTPServerComboBox,PJSOptions.WebServerFileName,cstFilename,30);
|
||||
ServerPortSpinEdit.Value:=PJSOptions.StartAtPort;
|
||||
SetComboBoxText(BrowserComboBox,PJSOptions.BrowserFileName,cstFilename,30);
|
||||
SetComboBoxText(NodeJSComboBox,PJSOptions.NodejsFileName,cstFilename,30);
|
||||
HTTPServerOptionsMemo.Lines:=PJSOptions.HTTPServerOpts;
|
||||
SetComboBoxText(AtomTemplateDirComboBox,PJSOptions.AtomTemplateDir,cstFilename,30);
|
||||
SetComboBoxText(VSCodeTemplateDirComboBox,PJSOptions.VSCodeTemplateDir,cstFilename,30);
|
||||
end;
|
||||
@ -264,11 +225,9 @@ end;
|
||||
procedure TPas2jsOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
PJSOptions.CompilerFilename:=Pas2jsPathComboBox.Text;
|
||||
PJSOptions.WebServerFileName:=HTTPServerComboBox.Text;
|
||||
PJSOptions.StartAtPort:=ServerPortSpinEdit.Value;
|
||||
PJSOptions.BrowserFileName:=BrowserComboBox.Text;
|
||||
PJSOptions.NodeJSFileName:=NodeJSComboBox.Text;
|
||||
PJSOptions.HTTPServerOpts:=HTTPServerOptionsMemo.Lines;
|
||||
PJSOptions.AtomTemplateDir:=AtomTemplateDirComboBox.Text;
|
||||
PJSOptions.VSCodeTemplateDir:=VSCodeTemplateDirComboBox.Text;
|
||||
If PJSOptions.Modified then
|
||||
|
@ -9,7 +9,7 @@ uses
|
||||
// LCL
|
||||
Forms, Controls, Dialogs, LazHelpIntf,
|
||||
// LazUtils
|
||||
LazLoggerBase, LazFileUtils, FileUtil, Laz2_XMLCfg,
|
||||
LazLoggerBase, LazFileUtils, FileUtil,
|
||||
// codetools
|
||||
CodeToolManager, CodeCache,
|
||||
// IdeIntf
|
||||
|
@ -34,7 +34,6 @@ Resourcestring
|
||||
+'macros like $MakeExe(). Without a full path, %s is searched in PATH.';
|
||||
pjsdPathOfXMacroPas2js = 'Path of %s, macro $(pas2js)';
|
||||
pjsdBrowse = 'Browse';
|
||||
pjsdPathOfXMacroPas2JSWebServer = 'Path of %s, macro $(Pas2JSWebServer)';
|
||||
pjsdPortNumberToStartAllocatingFrom = 'Port number to start allocating '
|
||||
+'from, macro $(Pas2JSWebServerPort)';
|
||||
pjsdServerInstancesWillBeStartedWithAPortStartingFromT = 'Server instances '
|
||||
@ -44,8 +43,6 @@ Resourcestring
|
||||
pjsdUseThisBrowserWhenOpeningTheURLOrHTMLFileOfAWebBro = 'Use this browser '
|
||||
+'when opening the URL or HTML file of a web browser project';
|
||||
pjsdPathOfNodeJsExecutable = 'Path of Node.js executable, macro $(Pas2JSNodeJS)';
|
||||
pjsdHTTPServerOptsLabelCaption = 'HTTP Server extra command-line options (one per line)';
|
||||
pjsdHTTPServerOptsLabelHint = 'Add extra command-line options for the command which starts the webserver.';
|
||||
pjsdAtomPackageTemplateDirectory = 'Atom package template directory';
|
||||
pjsdVisualStudioCodeExtensionTemplateDirectory = 'Visual Studio Code '
|
||||
+'extension template directory';
|
||||
@ -93,8 +90,6 @@ Resourcestring
|
||||
|
||||
// Macros names
|
||||
pjsdPas2JSExecutable = 'Pas2JS executable';
|
||||
pjsdPas2JSWebServerExe = 'Pas2JS webserver executable';
|
||||
pjsdPas2JSWebServerPort = 'Pas2JS webserver port';
|
||||
pjsdPas2JSSelectedBrowserExecutable = 'Pas2JS selected browser executable';
|
||||
pjsdPas2JSSelectedNodeJSExcutable = 'Pas2JS selected NodeJS excutable';
|
||||
pjsdPas2JSCurrentProjectURL = 'Pas2JS current project URL';
|
||||
|
Loading…
Reference in New Issue
Block a user