mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 21:50:18 +02:00
* Correctly register THTTPServer/THTTPClient
git-svn-id: trunk@58553 -
This commit is contained in:
parent
8ebeed522c
commit
80ac8f85b8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1759,6 +1759,8 @@ components/fpweb/images/tag_td.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tag_tr.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tag_u.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tag_ul.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tfphttpclient.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tfphttpserver.png -text svneol=unset#image/png
|
||||
components/fpweb/images/tfphttpwebclient.png -text svneol=unset#image/png
|
||||
components/fpweb/languages/fpwebstrconsts.cs.po svneol=native#text/plain
|
||||
components/fpweb/languages/fpwebstrconsts.de.po svneol=native#text/plain
|
||||
|
@ -561,3 +561,48 @@ LazarusResources.Add('tag_pre','PNG',[
|
||||
+'*tEXtSignature'#0'9a4fb3cc6adc9cf33d8d0c97102663e7'#16'p'#200'Y'#0#0#0#0'IE'
|
||||
+'ND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tfphttpwebclient','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#3#0#0#0#215#169#205
|
||||
+#202#0#0#0#12'PLTE'#255#255#255'UUU'#191#191#191#148#148#148#136'-U'#0#0#0#0
|
||||
+'5IDAT('#145'c`'#160#1'`'#4#131#193'$'#193#196#136#4#152'q'#200'0'#227#208
|
||||
+#131'&'#14#151#193#16#135#202'`'#17#7#203'`'#21#7#202#224#16''''#9'0'#162#0
|
||||
+'b$h'#11#0#171'%'#0#142#184#215'{M'#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tfphttpclient','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#1'"IDATx^'#237#147'?'#14#1'A'#24#197#199'P8'#130#3'8'#130'C('#20#10#199'P'
|
||||
+'('#29'@!!q'#156#29'!'#161#163'#Q'#184#192'N'#148#138'-'#20#10#222#179'l'#252
|
||||
+#217#217#249#16#162#176#201'dm'#230'{'#239#247#253#163#212#255#249#249#14#232
|
||||
+#161'-'#235#192#14#180#177#171#188#177'{'#156#29#127#227#244'x'#247'V'#1'0i'
|
||||
+#159'M'#15'x'#167#157'=c^'#130'@'#216'w'#152'>'#128#24#251#20'$gl]j~'#137#131
|
||||
+#166#145#13#153'l'#11#200#164#9#193#140'}~'#22#0#237#218#9#208'AX'#130'!'#135
|
||||
+#232#234#245#225'^'#156#22#139'**'#143#144'`S'#4'}'#225#203'X'#2#128#199#22
|
||||
+'^#'#156'j'#18#143#143#150#207#156#247'B@'#210#1'm'#194#206'I'#3#241#252#19#0
|
||||
+'z'#230'LX# r'#1'P'#221#192#183'~'#208':;'#0#253'4'#19'@p'#22'$'#203#252#156
|
||||
+'t$jQ'#26'D`'#206'yDJ:'#228'k'#136#208#156#213#143#149#138#215't)'#25'4!R'
|
||||
+#243#211#144#3#12#153#15#255'hR'#136'$'#145'xva'#247'vA'#226'J'#184#17'\['
|
||||
+#231'fy'#0#17#219#146'd'#238'['#193#255#253'W:p'#4#10#243#181#204#187'V2'#249
|
||||
+#0#0#0']tEXtCopyright'#0'Created with Iconfu.com - Derivative work of Materi'
|
||||
+'al icons (Copyright Google Inc.)'#241#180#147#190#0#0#0'WtEXtLicense'#0'Lic'
|
||||
+'ensed under Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0'
|
||||
+')'#227#215't'#27#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tfphttpserver','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#1'%IDATx^c`'#24#5#131'>'#4#152'v>Ua'#218#254#180#159'i'#199#211#203#204';'
|
||||
+#158#254#6#226#239' 6'#16'w'#131#228'('#242#0#208#144#10#168#161#255#129'46'
|
||||
+#252#27#164#134',K'#128#26'{p'#24#138'a'#17'H-I'#150'0'#238'x'#26'@'#172#225
|
||||
+'0u@=!'#248'-'#217#255#158#5#232#146#28#160#134#227#160'p'#198'f'#1'0.&'#0
|
||||
+#197#11#176#202#237'xz'#29#167#5'L'#219#159'H'#0'5'#129'"'#17'WX'#255#7#25#14
|
||||
+'3'#0#151'%@_'#152'`Z'#178#253'9'#7#208#229#231#137'5'#156#128'%'#239#129'f'
|
||||
+#237#6'b'#15#184'E@'#14'V/'#195',Dv9'#186#235'p'#249#4#164#151'i'#199#147#22
|
||||
+#176'z '#231#4'.'#215#227'3'#156'Pp'#129#204'd'#220#241#196#7'd'#193'gbR'#12
|
||||
+#22#215#227#140'/'#184#239'w<=@S'#11'@'#142#199#27'D'#200'>#'#199#7'`'#11#8
|
||||
+'E2'#204#18'r,'#0#154#189#135#129#1#146'L/'#16#19#15#164#170'a'#220#14#140'd'
|
||||
+#16#0'e4j['#2'L'#166#29#168#190#134#248#4#148'''@'#201#150#168#148#133#197'G'
|
||||
+#159'A'#193#2'w9I%'#224#168'bZ'#133#0#0#138#139#181#204#178'*'#227#200#0#0#0
|
||||
+']tEXtCopyright'#0'Created with Iconfu.com - Derivative work of Material ico'
|
||||
+'ns (Copyright Google Inc.)'#241#180#147#190#0#0#0'WtEXtLicense'#0'Licensed '
|
||||
+'under Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)'#227
|
||||
+#215't'#27#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
|
@ -3,4 +3,4 @@
|
||||
if [ -f fpweb_images.inc ]; then
|
||||
rm fpweb_images.inc
|
||||
fi
|
||||
../../../tools/lazres fpweb_images.inc HTMLList.png quick_table.png tag_dd.png tag_dl.png tag_dt.png tag_li.png tag_ol.png tag_ul.png tag_table_body.png tag_table_row.png tag_tbody.png tag_td.png tag_tr.png tag_table_data.png tag_h1.png tag_h2.png tag_h3.png tag_h4.png tag_h5.png HTMLForm.png lineedit.png reset.png submit.png tag_image.png tag_br.png tag_comm.png tag_hr.png color-picker.png div_center.png div_justify.png div_left.png div_right.png tag_bold.png tag_i.png tag_u.png tag_nbsp.png button.png check.png radio.png select.png tag_a.png tag_attribute.png tag_element.png tag_sub.png tag_sup.png tag_font.png tag_pre.png tfphttpwebclient.png
|
||||
../../../tools/lazres fpweb_images.inc HTMLList.png quick_table.png tag_dd.png tag_dl.png tag_dt.png tag_li.png tag_ol.png tag_ul.png tag_table_body.png tag_table_row.png tag_tbody.png tag_td.png tag_tr.png tag_table_data.png tag_h1.png tag_h2.png tag_h3.png tag_h4.png tag_h5.png HTMLForm.png lineedit.png reset.png submit.png tag_image.png tag_br.png tag_comm.png tag_hr.png color-picker.png div_center.png div_justify.png div_left.png div_right.png tag_bold.png tag_i.png tag_u.png tag_nbsp.png button.png check.png radio.png select.png tag_a.png tag_attribute.png tag_element.png tag_sub.png tag_sup.png tag_font.png tag_pre.png tfphttpwebclient.png tfphttpclient.png tfphttpserver.png
|
||||
|
BIN
components/fpweb/images/tfphttpclient.png
Normal file
BIN
components/fpweb/images/tfphttpclient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 551 B |
BIN
components/fpweb/images/tfphttpserver.png
Normal file
BIN
components/fpweb/images/tfphttpserver.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 554 B |
@ -22,15 +22,15 @@ unit WebLazIDEIntf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpWeb, fpHTML, fpdatasetform,
|
||||
IDEExternToolIntf,
|
||||
Classes, SysUtils, fpWeb, fpHTML, fpdatasetform, IDEExternToolIntf,
|
||||
Controls, Dialogs, forms, LazIDEIntf, ProjectIntf, SrcEditorIntf, IDEMsgIntf,
|
||||
fpextjs,
|
||||
extjsjson, extjsxml,
|
||||
fpjsonrpc,
|
||||
jstree,jsparser,
|
||||
fpextjs, extjsjson, extjsxml, fpjsonrpc, jstree,jsparser,
|
||||
fpextdirect,fpwebdata,
|
||||
{$IFDEF VER3_1}
|
||||
{$IF FPC_FULLVERSION>=30004}
|
||||
fphttpclient,
|
||||
fphttpserver,
|
||||
{$ENDIF}
|
||||
{$IF FPC_FULLVERSION>=30100}
|
||||
fphttpwebclient,
|
||||
fpoauth2,
|
||||
fpoauth2ini,
|
||||
@ -246,7 +246,7 @@ resourcestring
|
||||
|
||||
implementation
|
||||
|
||||
uses LazarusPackageIntf,FormEditingIntf, PropEdits, DBPropEdits, sqldbwebdata,
|
||||
uses LazarusPackageIntf,FormEditingIntf, PropEdits, DBPropEdits, sqldbwebdata, LResources,
|
||||
frmrpcmoduleoptions,frmnewhttpapp, registersqldb, sqlstringspropertyeditordlg;
|
||||
|
||||
Const
|
||||
@ -278,11 +278,9 @@ begin
|
||||
]);
|
||||
end;
|
||||
|
||||
|
||||
{$IFDEF VER3_1}
|
||||
{$IF FPC_FULLVERSION>=30100}
|
||||
procedure RegisterTFPHTTPWebClient;
|
||||
begin
|
||||
RegisterComponents(fpWebTab,[TFPHTTPWebClient]);
|
||||
end;
|
||||
procedure RegisterTOAuth2Handler;
|
||||
begin
|
||||
@ -294,12 +292,15 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
Procedure RegisterComponents;
|
||||
Procedure RegisterWebComponents;
|
||||
|
||||
begin
|
||||
{$IF FPC_FULLVERSION>=30004}
|
||||
RegisterComponents(fpWebTab,[TFPHTTPClient,TFPHTTPServer]);
|
||||
{$ENDIF}
|
||||
RegisterUnit('fphtml',@RegisterHTMLComponents);
|
||||
RegisterUnit('fpdatasetform',@RegisterdatasetComponents);
|
||||
{$IFDEF VER3_1}
|
||||
{$IF FPC_FULLVERSION>=30100}
|
||||
RegisterUnit('fphttpwebclient',@RegisterTFPHTTPWebClient);
|
||||
RegisterUnit('fpoauth2',@RegisterTOAuth2Handler);
|
||||
RegisterUnit('fpoauth2ini',@RegisterTFPOAuth2IniStore);
|
||||
@ -309,7 +310,7 @@ end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents;
|
||||
RegisterWebComponents;
|
||||
FileDescriptorWebProviderDataModule:=TFileDescWebProviderDataModule.Create;
|
||||
FileDescriptorJSONRPCModule:=TFileDescWebJSONRPCModule.Create;
|
||||
FileDescriptorExtDirectModule:=TFileDescExtDirectModule.Create;
|
||||
@ -1000,20 +1001,17 @@ function TFileDescWebJSONRPCModule.GetImplementationSource(const Filename,
|
||||
|
||||
Var
|
||||
RH,RM : Boolean;
|
||||
CN,HP : String;
|
||||
HP : String;
|
||||
|
||||
begin
|
||||
RH:=False;
|
||||
RM:=False;
|
||||
CN:=ResourceName;
|
||||
HP:=ResourceName;
|
||||
With TJSONRPCModuleOptionsForm.Create(Application) do
|
||||
try
|
||||
If (ShowModal=mrOK) then
|
||||
begin
|
||||
RH:=RegisterHandlers;
|
||||
If RH Then
|
||||
CN:=JSONRPCClass;
|
||||
RM:=RegisterModule;
|
||||
If RM then
|
||||
HP:=HTTPPath;
|
||||
@ -1062,20 +1060,17 @@ function TFileDescExtDirectModule.GetImplementationSource(const Filename,
|
||||
|
||||
Var
|
||||
RH,RM : Boolean;
|
||||
CN,HP : String;
|
||||
HP : String;
|
||||
|
||||
begin
|
||||
RH:=False;
|
||||
RM:=False;
|
||||
CN:=ResourceName;
|
||||
HP:=ResourceName;
|
||||
With TJSONRPCModuleOptionsForm.Create(Application) do
|
||||
try
|
||||
If (ShowModal=mrOK) then
|
||||
begin
|
||||
RH:=RegisterHandlers;
|
||||
If RH Then
|
||||
CN:=JSONRPCClass;
|
||||
RM:=RegisterModule;
|
||||
If RM then
|
||||
HP:=HTTPPath;
|
||||
@ -1120,6 +1115,7 @@ Var
|
||||
P : TJSParser;
|
||||
E : TJSElement;
|
||||
begin
|
||||
Result:=mrOK;
|
||||
P:=TJSParser.Create(S);
|
||||
try
|
||||
try
|
||||
@ -1128,7 +1124,10 @@ begin
|
||||
ShowMessage('Javascript syntax OK');
|
||||
except
|
||||
On E : Exception do
|
||||
begin
|
||||
ShowException('Javascript syntax error',E);
|
||||
Result:=mrAbort;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
P.free;
|
||||
@ -1209,6 +1208,9 @@ begin
|
||||
inherited UpdateDefaultPascalFileExtension(DefPasExt);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$i fpweb_images.inc}
|
||||
|
||||
finalization
|
||||
FreeAndNil(AChecker);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user