• R/O
  • SSH
  • HTTPS

vth: Commit


Commit MetaInfo

Revision2 (tree)
Zeit2019-05-08 04:33:11
Autorderekwildstar

Log Message

- Código-fonte inicial

Ändern Zusammenfassung

Diff

--- trunk/prj/vth.dpr (nonexistent)
+++ trunk/prj/vth.dpr (revision 2)
@@ -0,0 +1,87 @@
1+program vth;
2+
3+{$APPTYPE CONSOLE}
4+
5+{$R *.res}
6+
7+uses
8+ System.SysUtils,
9+ KRK.Lib.Rtl.Sys.Console,
10+ UMaven in '..\src\UMaven.pas',
11+ UFuncoes in '..\src\UFuncoes.pas',
12+ UWebLogic in '..\src\UWebLogic.pas',
13+ UConfiguracoes in '..\src\UConfiguracoes.pas';
14+
15+var
16+ Comando: String;
17+ Argumentos: String;
18+ i: Byte;
19+begin
20+ try
21+ try
22+ TextColor(LightGreen);
23+ WriteLn('VS Code Task Highlighter. Copyright 2019 Carlos Barreto Feitoza Filho');
24+
25+ Comando := ParamStr(1);
26+ Argumentos := '';
27+
28+ if ParamCount > 1 then
29+ for i := 2 to ParamCount do
30+ Argumentos := Trim(Argumentos + ' ' + ParamStr(i));
31+
32+ if Comando = '' then
33+ begin
34+ NormVideo;
35+ Write('Erro: ');
36+ TextColor(LightRed);
37+ WriteLn('Nenhum parâmetro de linha de comando foi especificado');
38+ NormVideo;
39+ Write('Uso : ');
40+ TextColor(White);
41+ Write('vth ');
42+ TextColor(Yellow);
43+ Write('<comando> ');
44+ NormVideo;
45+ Write('[');
46+ TextColor(Yellow);
47+ Write('<argumentos do comando>');
48+ NormVideo;
49+ WriteLn(']');
50+ Write('Obs.: ');
51+ TextColor(Yellow);
52+ Write('<comando> ');
53+ NormVideo;
54+ WriteLn('deve ser um dos comandos suportados abaixo:');
55+ TextColor(Yellow);
56+ WriteLn(' mvn');
57+ WriteLn(' weblogic');
58+ end
59+ else
60+ begin
61+ NormVideo;
62+
63+ if Comando = 'mvn' then
64+ ParseMavenOutput(Argumentos)
65+ else if Comando = 'weblogic' then
66+ ParseWebLogicOutput(Argumentos)
67+ else
68+ begin
69+ Write('Erro: ');
70+ TextColor(LightRed);
71+ WriteLn('Comando não reconhecido. Atualmente existem highlighters para os seguintes comandos:');
72+ TextColor(Yellow);
73+ WriteLn(' mvn');
74+ WriteLn(' weblogic');
75+ end;
76+ end;
77+
78+ if DebugHook <> 0 then
79+ ReadLn;
80+ finally
81+ NormVideo;
82+ end;
83+ except
84+ on E: Exception do
85+ Writeln(E.ClassName, ': ', E.Message);
86+ end;
87+end.
--- trunk/prj/vth.dproj (nonexistent)
+++ trunk/prj/vth.dproj (revision 2)
@@ -0,0 +1,587 @@
1+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+ <PropertyGroup>
3+ <ProjectGuid>{485EAEA8-8997-4975-83C5-E11925B99B1A}</ProjectGuid>
4+ <ProjectVersion>18.4</ProjectVersion>
5+ <FrameworkType>None</FrameworkType>
6+ <MainSource>vth.dpr</MainSource>
7+ <Base>True</Base>
8+ <Config Condition="'$(Config)'==''">Debug</Config>
9+ <Platform Condition="'$(Platform)'==''">Win32</Platform>
10+ <TargetedPlatforms>1</TargetedPlatforms>
11+ <AppType>Console</AppType>
12+ </PropertyGroup>
13+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
14+ <Base>true</Base>
15+ </PropertyGroup>
16+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
17+ <Base_Win32>true</Base_Win32>
18+ <CfgParent>Base</CfgParent>
19+ <Base>true</Base>
20+ </PropertyGroup>
21+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
22+ <Base_Win64>true</Base_Win64>
23+ <CfgParent>Base</CfgParent>
24+ <Base>true</Base>
25+ </PropertyGroup>
26+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
27+ <Cfg_1>true</Cfg_1>
28+ <CfgParent>Base</CfgParent>
29+ <Base>true</Base>
30+ </PropertyGroup>
31+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
32+ <Cfg_1_Win32>true</Cfg_1_Win32>
33+ <CfgParent>Cfg_1</CfgParent>
34+ <Cfg_1>true</Cfg_1>
35+ <Base>true</Base>
36+ </PropertyGroup>
37+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
38+ <Cfg_2>true</Cfg_2>
39+ <CfgParent>Base</CfgParent>
40+ <Base>true</Base>
41+ </PropertyGroup>
42+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
43+ <Cfg_2_Win32>true</Cfg_2_Win32>
44+ <CfgParent>Cfg_2</CfgParent>
45+ <Cfg_2>true</Cfg_2>
46+ <Base>true</Base>
47+ </PropertyGroup>
48+ <PropertyGroup Condition="'$(Base)'!=''">
49+ <DCC_DcuOutput>..\bin\dcu</DCC_DcuOutput>
50+ <DCC_ExeOutput>..\bin</DCC_ExeOutput>
51+ <DCC_E>false</DCC_E>
52+ <DCC_N>false</DCC_N>
53+ <DCC_S>false</DCC_S>
54+ <DCC_F>false</DCC_F>
55+ <DCC_K>false</DCC_K>
56+ <DCC_UsePackage>RESTComponents;FireDACIBDriver;FireDACCommon;RESTBackendComponents;soapserver;CloudService;FireDACCommonDriver;inet;FireDAC;FireDACSqliteDriver;soaprtl;soapmidas;$(DCC_UsePackage)</DCC_UsePackage>
57+ <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
58+ <SanitizedProjectName>vth</SanitizedProjectName>
59+ <VerInfo_Locale>1046</VerInfo_Locale>
60+ <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
61+ </PropertyGroup>
62+ <PropertyGroup Condition="'$(Base_Win32)'!=''">
63+ <DCC_UsePackage>DBXSqliteDriver;adsprovider250;DBXInterBaseDriver;vclactnband;vclFireDAC;QuickReportR;RtmRxCtl;tethering;svnui;JvGlobus;dclRBDBE1925;FireDACADSDriver;rbRIDE1925;myprovider250;JvMM;vcltouch;JvBands;vcldb;bindcompfmx;svn;JvJans;unidac250;JvNet;inetdb;oraprovider250;JvAppFrm;KRKOTANotifiersR;KRKStandardControlsR;rbTC1925;KRKCustomizedActionsR;FmxTeeUI;JvDotNetCtrls;dbfprovider250;fmx;fmxdae;rbIDE1925;KRKNetworkControlsR;JvWizards;dbexpress;IndyCore;vclx;JvPageComps;dsnap;nexusprovider250;JvDB;PackageClassesUteis;VCLRESTComponents;rbTCUI1925;rbFireDAC1925;KRKShellControlsR;PNGComponentsR;JclDeveloperTools;rbDB1925;rbRTL1925;vclie;KRKWin32ControlsR;bindengine;DBXMySQLDriver;vquery250;FireDACMySQLDriver;JvCmp;JvHMI;dclRBFireDAC1925;FireDACCommonODBC;tdsprovider250;dclRBE1925;rbRCL1925;ibprovider250;UIRibbonPackageDR;IndyIPCommon;bindcompdbx;JvCustom;vcl;IndyIPServer;JvXPCtrls;dac250;IndySystem;dsnapcon;KRKDataControlsR;rbDBE1925;FireDACMSAccDriver;fmxFireDAC;vclimg;MyConnectionBrokerR;TeeDB;Jcl;aseprovider250;JvCore;JvCrypt;FireDACPgDriver;pgprovider250;FMXTee;liteprovider250;DbxCommonDriver;JvDlgs;JvRuntimeDesign;JvManagedThreads;Tee;rbUSER1925;rbDIDE1925;xmlrtl;JvTimeFramework;fmxobj;vclwinx;unidacfmx250;rtl;rbUSERDesign1925;DbxClientDriver;dacvcl250;rbADO1925;rbRest1925;CustomIPTransport;vcldsnap;odbcprovider250;JvSystem;JvStdCtrls;db2provider250;rbRAP1925;bindcomp;appanalytics;crcontrols250;rbDAD1925;IndyIPClient;rbBDE1925;bindcompvcl;TeeUI;rbCIDE1925;JvDocking;dbxcds;VclSmp;unidacvcl250;adortl;JvPascalInterpreter;RtmRxDB;JclVcl;UserControlR;dacfmx250;dsnapxml;dclRBADO1925;dbrtl;IndyProtocols;inetdbxpress;JvControls;KRKAdditionalControlsR;JvPrintPreview;accessprovider250;mongoprovider250;JclContainers;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
64+ <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
65+ <BT_BuildType>Debug</BT_BuildType>
66+ <VerInfo_Locale>1033</VerInfo_Locale>
67+ <DCC_ConsoleTarget>true</DCC_ConsoleTarget>
68+ <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
69+ <Manifest_File>(None)</Manifest_File>
70+ <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
71+ <Debugger_RunParams>mvn install -P copy-ear</Debugger_RunParams>
72+ </PropertyGroup>
73+ <PropertyGroup Condition="'$(Base_Win64)'!=''">
74+ <DCC_UsePackage>DBXSqliteDriver;DBXInterBaseDriver;vclactnband;vclFireDAC;QuickReportR;tethering;FireDACADSDriver;vcltouch;vcldb;bindcompfmx;inetdb;FmxTeeUI;fmx;fmxdae;dbexpress;IndyCore;vclx;dsnap;VCLRESTComponents;JclDeveloperTools;vclie;bindengine;DBXMySQLDriver;FireDACMySQLDriver;FireDACCommonODBC;UIRibbonPackageDR;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;IndySystem;dsnapcon;FireDACMSAccDriver;fmxFireDAC;vclimg;TeeDB;Jcl;FireDACPgDriver;FMXTee;DbxCommonDriver;Tee;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;JclVcl;dsnapxml;dbrtl;IndyProtocols;inetdbxpress;JclContainers;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
75+ <DCC_ConsoleTarget>true</DCC_ConsoleTarget>
76+ <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
77+ <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
78+ </PropertyGroup>
79+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
80+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
81+ <DCC_DebugDCUs>true</DCC_DebugDCUs>
82+ <DCC_Optimize>false</DCC_Optimize>
83+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
84+ <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
85+ <DCC_RemoteDebug>true</DCC_RemoteDebug>
86+ </PropertyGroup>
87+ <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
88+ <DCC_RemoteDebug>false</DCC_RemoteDebug>
89+ <VerInfo_Locale>1033</VerInfo_Locale>
90+ <Debugger_RunParams>weblogic</Debugger_RunParams>
91+ </PropertyGroup>
92+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
93+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
94+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
95+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
96+ <DCC_DebugInformation>0</DCC_DebugInformation>
97+ </PropertyGroup>
98+ <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
99+ <VerInfo_Locale>1033</VerInfo_Locale>
100+ </PropertyGroup>
101+ <ItemGroup>
102+ <DelphiCompile Include="$(MainSource)">
103+ <MainSource>MainSource</MainSource>
104+ </DelphiCompile>
105+ <DCCReference Include="..\src\UMaven.pas"/>
106+ <DCCReference Include="..\src\UFuncoes.pas"/>
107+ <DCCReference Include="..\src\UWebLogic.pas"/>
108+ <DCCReference Include="..\src\UConfiguracoes.pas"/>
109+ <BuildConfiguration Include="Release">
110+ <Key>Cfg_2</Key>
111+ <CfgParent>Base</CfgParent>
112+ </BuildConfiguration>
113+ <BuildConfiguration Include="Base">
114+ <Key>Base</Key>
115+ </BuildConfiguration>
116+ <BuildConfiguration Include="Debug">
117+ <Key>Cfg_1</Key>
118+ <CfgParent>Base</CfgParent>
119+ </BuildConfiguration>
120+ </ItemGroup>
121+ <ProjectExtensions>
122+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
123+ <Borland.ProjectType>Application</Borland.ProjectType>
124+ <BorlandProject>
125+ <Delphi.Personality>
126+ <Source>
127+ <Source Name="MainSource">vth.dpr</Source>
128+ </Source>
129+ <Excluded_Packages>
130+ <Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
131+ <Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
132+ </Excluded_Packages>
133+ </Delphi.Personality>
134+ <Deployment Version="3">
135+ <DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
136+ <Platform Name="OSX32">
137+ <Overwrite>true</Overwrite>
138+ </Platform>
139+ </DeployFile>
140+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
141+ <Platform Name="iOSSimulator">
142+ <Overwrite>true</Overwrite>
143+ </Platform>
144+ </DeployFile>
145+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
146+ <Platform Name="iOSSimulator">
147+ <Overwrite>true</Overwrite>
148+ </Platform>
149+ </DeployFile>
150+ <DeployFile LocalName="$(BDS)\Redist\osx32\libcgsqlite3.dylib" Class="DependencyModule">
151+ <Platform Name="OSX32">
152+ <Overwrite>true</Overwrite>
153+ </Platform>
154+ </DeployFile>
155+ <DeployFile LocalName="..\bin\vth.exe" Configuration="Debug" Class="ProjectOutput">
156+ <Platform Name="Win32">
157+ <RemoteName>vth.exe</RemoteName>
158+ <Overwrite>true</Overwrite>
159+ </Platform>
160+ </DeployFile>
161+ <DeployClass Name="AdditionalDebugSymbols">
162+ <Platform Name="iOSSimulator">
163+ <Operation>1</Operation>
164+ </Platform>
165+ <Platform Name="OSX32">
166+ <RemoteDir>Contents\MacOS</RemoteDir>
167+ <Operation>1</Operation>
168+ </Platform>
169+ <Platform Name="Win32">
170+ <RemoteDir>Contents\MacOS</RemoteDir>
171+ <Operation>0</Operation>
172+ </Platform>
173+ </DeployClass>
174+ <DeployClass Name="AndroidClassesDexFile">
175+ <Platform Name="Android">
176+ <RemoteDir>classes</RemoteDir>
177+ <Operation>1</Operation>
178+ </Platform>
179+ </DeployClass>
180+ <DeployClass Name="AndroidGDBServer">
181+ <Platform Name="Android">
182+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
183+ <Operation>1</Operation>
184+ </Platform>
185+ </DeployClass>
186+ <DeployClass Name="AndroidLibnativeArmeabiFile">
187+ <Platform Name="Android">
188+ <RemoteDir>library\lib\armeabi</RemoteDir>
189+ <Operation>1</Operation>
190+ </Platform>
191+ </DeployClass>
192+ <DeployClass Name="AndroidLibnativeMipsFile">
193+ <Platform Name="Android">
194+ <RemoteDir>library\lib\mips</RemoteDir>
195+ <Operation>1</Operation>
196+ </Platform>
197+ </DeployClass>
198+ <DeployClass Name="AndroidServiceOutput">
199+ <Platform Name="Android">
200+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
201+ <Operation>1</Operation>
202+ </Platform>
203+ </DeployClass>
204+ <DeployClass Name="AndroidSplashImageDef">
205+ <Platform Name="Android">
206+ <RemoteDir>res\drawable</RemoteDir>
207+ <Operation>1</Operation>
208+ </Platform>
209+ </DeployClass>
210+ <DeployClass Name="AndroidSplashStyles">
211+ <Platform Name="Android">
212+ <RemoteDir>res\values</RemoteDir>
213+ <Operation>1</Operation>
214+ </Platform>
215+ </DeployClass>
216+ <DeployClass Name="Android_DefaultAppIcon">
217+ <Platform Name="Android">
218+ <RemoteDir>res\drawable</RemoteDir>
219+ <Operation>1</Operation>
220+ </Platform>
221+ </DeployClass>
222+ <DeployClass Name="Android_LauncherIcon144">
223+ <Platform Name="Android">
224+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
225+ <Operation>1</Operation>
226+ </Platform>
227+ </DeployClass>
228+ <DeployClass Name="Android_LauncherIcon36">
229+ <Platform Name="Android">
230+ <RemoteDir>res\drawable-ldpi</RemoteDir>
231+ <Operation>1</Operation>
232+ </Platform>
233+ </DeployClass>
234+ <DeployClass Name="Android_LauncherIcon48">
235+ <Platform Name="Android">
236+ <RemoteDir>res\drawable-mdpi</RemoteDir>
237+ <Operation>1</Operation>
238+ </Platform>
239+ </DeployClass>
240+ <DeployClass Name="Android_LauncherIcon72">
241+ <Platform Name="Android">
242+ <RemoteDir>res\drawable-hdpi</RemoteDir>
243+ <Operation>1</Operation>
244+ </Platform>
245+ </DeployClass>
246+ <DeployClass Name="Android_LauncherIcon96">
247+ <Platform Name="Android">
248+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
249+ <Operation>1</Operation>
250+ </Platform>
251+ </DeployClass>
252+ <DeployClass Name="Android_SplashImage426">
253+ <Platform Name="Android">
254+ <RemoteDir>res\drawable-small</RemoteDir>
255+ <Operation>1</Operation>
256+ </Platform>
257+ </DeployClass>
258+ <DeployClass Name="Android_SplashImage470">
259+ <Platform Name="Android">
260+ <RemoteDir>res\drawable-normal</RemoteDir>
261+ <Operation>1</Operation>
262+ </Platform>
263+ </DeployClass>
264+ <DeployClass Name="Android_SplashImage640">
265+ <Platform Name="Android">
266+ <RemoteDir>res\drawable-large</RemoteDir>
267+ <Operation>1</Operation>
268+ </Platform>
269+ </DeployClass>
270+ <DeployClass Name="Android_SplashImage960">
271+ <Platform Name="Android">
272+ <RemoteDir>res\drawable-xlarge</RemoteDir>
273+ <Operation>1</Operation>
274+ </Platform>
275+ </DeployClass>
276+ <DeployClass Name="DebugSymbols">
277+ <Platform Name="iOSSimulator">
278+ <Operation>1</Operation>
279+ </Platform>
280+ <Platform Name="OSX32">
281+ <RemoteDir>Contents\MacOS</RemoteDir>
282+ <Operation>1</Operation>
283+ </Platform>
284+ <Platform Name="Win32">
285+ <Operation>0</Operation>
286+ </Platform>
287+ </DeployClass>
288+ <DeployClass Name="DependencyFramework">
289+ <Platform Name="OSX32">
290+ <RemoteDir>Contents\MacOS</RemoteDir>
291+ <Operation>1</Operation>
292+ <Extensions>.framework</Extensions>
293+ </Platform>
294+ <Platform Name="Win32">
295+ <Operation>0</Operation>
296+ </Platform>
297+ </DeployClass>
298+ <DeployClass Name="DependencyModule">
299+ <Platform Name="iOSDevice32">
300+ <Operation>1</Operation>
301+ <Extensions>.dylib</Extensions>
302+ </Platform>
303+ <Platform Name="iOSDevice64">
304+ <Operation>1</Operation>
305+ <Extensions>.dylib</Extensions>
306+ </Platform>
307+ <Platform Name="iOSSimulator">
308+ <Operation>1</Operation>
309+ <Extensions>.dylib</Extensions>
310+ </Platform>
311+ <Platform Name="OSX32">
312+ <RemoteDir>Contents\MacOS</RemoteDir>
313+ <Operation>1</Operation>
314+ <Extensions>.dylib</Extensions>
315+ </Platform>
316+ <Platform Name="Win32">
317+ <Operation>0</Operation>
318+ <Extensions>.dll;.bpl</Extensions>
319+ </Platform>
320+ </DeployClass>
321+ <DeployClass Required="true" Name="DependencyPackage">
322+ <Platform Name="iOSDevice32">
323+ <Operation>1</Operation>
324+ <Extensions>.dylib</Extensions>
325+ </Platform>
326+ <Platform Name="iOSDevice64">
327+ <Operation>1</Operation>
328+ <Extensions>.dylib</Extensions>
329+ </Platform>
330+ <Platform Name="iOSSimulator">
331+ <Operation>1</Operation>
332+ <Extensions>.dylib</Extensions>
333+ </Platform>
334+ <Platform Name="OSX32">
335+ <RemoteDir>Contents\MacOS</RemoteDir>
336+ <Operation>1</Operation>
337+ <Extensions>.dylib</Extensions>
338+ </Platform>
339+ <Platform Name="Win32">
340+ <Operation>0</Operation>
341+ <Extensions>.bpl</Extensions>
342+ </Platform>
343+ </DeployClass>
344+ <DeployClass Name="File">
345+ <Platform Name="Android">
346+ <Operation>0</Operation>
347+ </Platform>
348+ <Platform Name="iOSDevice32">
349+ <Operation>0</Operation>
350+ </Platform>
351+ <Platform Name="iOSDevice64">
352+ <Operation>0</Operation>
353+ </Platform>
354+ <Platform Name="iOSSimulator">
355+ <Operation>0</Operation>
356+ </Platform>
357+ <Platform Name="OSX32">
358+ <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
359+ <Operation>0</Operation>
360+ </Platform>
361+ <Platform Name="Win32">
362+ <Operation>0</Operation>
363+ </Platform>
364+ </DeployClass>
365+ <DeployClass Name="iPad_Launch1024">
366+ <Platform Name="iOSDevice32">
367+ <Operation>1</Operation>
368+ </Platform>
369+ <Platform Name="iOSDevice64">
370+ <Operation>1</Operation>
371+ </Platform>
372+ <Platform Name="iOSSimulator">
373+ <Operation>1</Operation>
374+ </Platform>
375+ </DeployClass>
376+ <DeployClass Name="iPad_Launch1536">
377+ <Platform Name="iOSDevice32">
378+ <Operation>1</Operation>
379+ </Platform>
380+ <Platform Name="iOSDevice64">
381+ <Operation>1</Operation>
382+ </Platform>
383+ <Platform Name="iOSSimulator">
384+ <Operation>1</Operation>
385+ </Platform>
386+ </DeployClass>
387+ <DeployClass Name="iPad_Launch2048">
388+ <Platform Name="iOSDevice32">
389+ <Operation>1</Operation>
390+ </Platform>
391+ <Platform Name="iOSDevice64">
392+ <Operation>1</Operation>
393+ </Platform>
394+ <Platform Name="iOSSimulator">
395+ <Operation>1</Operation>
396+ </Platform>
397+ </DeployClass>
398+ <DeployClass Name="iPad_Launch768">
399+ <Platform Name="iOSDevice32">
400+ <Operation>1</Operation>
401+ </Platform>
402+ <Platform Name="iOSDevice64">
403+ <Operation>1</Operation>
404+ </Platform>
405+ <Platform Name="iOSSimulator">
406+ <Operation>1</Operation>
407+ </Platform>
408+ </DeployClass>
409+ <DeployClass Name="iPhone_Launch320">
410+ <Platform Name="iOSDevice32">
411+ <Operation>1</Operation>
412+ </Platform>
413+ <Platform Name="iOSDevice64">
414+ <Operation>1</Operation>
415+ </Platform>
416+ <Platform Name="iOSSimulator">
417+ <Operation>1</Operation>
418+ </Platform>
419+ </DeployClass>
420+ <DeployClass Name="iPhone_Launch640">
421+ <Platform Name="iOSDevice32">
422+ <Operation>1</Operation>
423+ </Platform>
424+ <Platform Name="iOSDevice64">
425+ <Operation>1</Operation>
426+ </Platform>
427+ <Platform Name="iOSSimulator">
428+ <Operation>1</Operation>
429+ </Platform>
430+ </DeployClass>
431+ <DeployClass Name="iPhone_Launch640x1136">
432+ <Platform Name="iOSDevice32">
433+ <Operation>1</Operation>
434+ </Platform>
435+ <Platform Name="iOSDevice64">
436+ <Operation>1</Operation>
437+ </Platform>
438+ <Platform Name="iOSSimulator">
439+ <Operation>1</Operation>
440+ </Platform>
441+ </DeployClass>
442+ <DeployClass Name="ProjectAndroidManifest">
443+ <Platform Name="Android">
444+ <Operation>1</Operation>
445+ </Platform>
446+ </DeployClass>
447+ <DeployClass Name="ProjectiOSDeviceDebug">
448+ <Platform Name="iOSDevice32">
449+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
450+ <Operation>1</Operation>
451+ </Platform>
452+ <Platform Name="iOSDevice64">
453+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
454+ <Operation>1</Operation>
455+ </Platform>
456+ </DeployClass>
457+ <DeployClass Name="ProjectiOSDeviceResourceRules">
458+ <Platform Name="iOSDevice32">
459+ <Operation>1</Operation>
460+ </Platform>
461+ <Platform Name="iOSDevice64">
462+ <Operation>1</Operation>
463+ </Platform>
464+ </DeployClass>
465+ <DeployClass Name="ProjectiOSEntitlements">
466+ <Platform Name="iOSDevice32">
467+ <RemoteDir>..\</RemoteDir>
468+ <Operation>1</Operation>
469+ </Platform>
470+ <Platform Name="iOSDevice64">
471+ <RemoteDir>..\</RemoteDir>
472+ <Operation>1</Operation>
473+ </Platform>
474+ </DeployClass>
475+ <DeployClass Name="ProjectiOSInfoPList">
476+ <Platform Name="iOSDevice32">
477+ <Operation>1</Operation>
478+ </Platform>
479+ <Platform Name="iOSDevice64">
480+ <Operation>1</Operation>
481+ </Platform>
482+ <Platform Name="iOSSimulator">
483+ <Operation>1</Operation>
484+ </Platform>
485+ </DeployClass>
486+ <DeployClass Name="ProjectiOSResource">
487+ <Platform Name="iOSDevice32">
488+ <Operation>1</Operation>
489+ </Platform>
490+ <Platform Name="iOSDevice64">
491+ <Operation>1</Operation>
492+ </Platform>
493+ <Platform Name="iOSSimulator">
494+ <Operation>1</Operation>
495+ </Platform>
496+ </DeployClass>
497+ <DeployClass Name="ProjectOSXEntitlements">
498+ <Platform Name="OSX32">
499+ <RemoteDir>..\</RemoteDir>
500+ <Operation>1</Operation>
501+ </Platform>
502+ </DeployClass>
503+ <DeployClass Name="ProjectOSXInfoPList">
504+ <Platform Name="OSX32">
505+ <RemoteDir>Contents</RemoteDir>
506+ <Operation>1</Operation>
507+ </Platform>
508+ </DeployClass>
509+ <DeployClass Name="ProjectOSXResource">
510+ <Platform Name="OSX32">
511+ <RemoteDir>Contents\Resources</RemoteDir>
512+ <Operation>1</Operation>
513+ </Platform>
514+ </DeployClass>
515+ <DeployClass Required="true" Name="ProjectOutput">
516+ <Platform Name="Android">
517+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
518+ <Operation>1</Operation>
519+ </Platform>
520+ <Platform Name="iOSDevice32">
521+ <Operation>1</Operation>
522+ </Platform>
523+ <Platform Name="iOSDevice64">
524+ <Operation>1</Operation>
525+ </Platform>
526+ <Platform Name="iOSSimulator">
527+ <Operation>1</Operation>
528+ </Platform>
529+ <Platform Name="Linux64">
530+ <Operation>1</Operation>
531+ </Platform>
532+ <Platform Name="OSX32">
533+ <RemoteDir>Contents\MacOS</RemoteDir>
534+ <Operation>1</Operation>
535+ </Platform>
536+ <Platform Name="Win32">
537+ <Operation>0</Operation>
538+ </Platform>
539+ </DeployClass>
540+ <DeployClass Name="ProjectUWPManifest">
541+ <Platform Name="Win32">
542+ <Operation>1</Operation>
543+ </Platform>
544+ <Platform Name="Win64">
545+ <Operation>1</Operation>
546+ </Platform>
547+ </DeployClass>
548+ <DeployClass Name="UWP_DelphiLogo150">
549+ <Platform Name="Win32">
550+ <RemoteDir>Assets</RemoteDir>
551+ <Operation>1</Operation>
552+ </Platform>
553+ <Platform Name="Win64">
554+ <RemoteDir>Assets</RemoteDir>
555+ <Operation>1</Operation>
556+ </Platform>
557+ </DeployClass>
558+ <DeployClass Name="UWP_DelphiLogo44">
559+ <Platform Name="Win32">
560+ <RemoteDir>Assets</RemoteDir>
561+ <Operation>1</Operation>
562+ </Platform>
563+ <Platform Name="Win64">
564+ <RemoteDir>Assets</RemoteDir>
565+ <Operation>1</Operation>
566+ </Platform>
567+ </DeployClass>
568+ <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
569+ <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
570+ <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
571+ <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
572+ <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
573+ <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
574+ <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
575+ <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
576+ </Deployment>
577+ <Platforms>
578+ <Platform value="Win32">True</Platform>
579+ <Platform value="Win64">False</Platform>
580+ </Platforms>
581+ </BorlandProject>
582+ <ProjectFileVersion>12</ProjectFileVersion>
583+ </ProjectExtensions>
584+ <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
585+ <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
586+ <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
587+</Project>
--- trunk/src/UConfiguracoes.pas (nonexistent)
+++ trunk/src/UConfiguracoes.pas (revision 2)
@@ -0,0 +1,42 @@
1+unit UConfiguracoes;
2+
3+interface
4+
5+uses
6+ KRK.Lib.Rtl.Common.Classes;
7+
8+type
9+ TConfiguracoes = class (TObjectFile)
10+ private
11+ FMaven: String;
12+ FWebLogic: String;
13+ public
14+ constructor Create; reintroduce;
15+ published
16+ property Maven: String read FMaven write FMaven;
17+ property WebLogic: String read FWebLogic write FWebLogic;
18+ end;
19+
20+var
21+ Configuracoes: TConfiguracoes;
22+
23+implementation
24+
25+uses
26+ System.SysUtils;
27+
28+constructor TConfiguracoes.Create;
29+begin
30+ inherited Create(nil,asmText);
31+ FMaven := 'caminho do maven';
32+ FWebLogic := 'caminho do weblogic';
33+ LoadFromTextFile(ChangeFileExt(ParamStr(0),'.config'));
34+end;
35+
36+initialization
37+ Configuracoes := TConfiguracoes.Create;
38+
39+finalization
40+ Configuracoes.SaveText;
41+
42+end.
--- trunk/src/UFuncoes.pas (nonexistent)
+++ trunk/src/UFuncoes.pas (revision 2)
@@ -0,0 +1,190 @@
1+unit UFuncoes;
2+
3+interface
4+
5+type
6+ TOnNewConsoleLine = procedure (AConsoleLine: String; ARequiresEnter: Boolean);
7+
8+//procedure GetConsoleOutput(ACommandLine: String; AOnNewConsoleLine: TOnNewConsoleLine; AWorkDirectory: String = 'C:\');
9+
10+implementation
11+
12+uses
13+ Windows, Classes;
14+
15+//procedure GetConsoleOutput(ACommandLine: String; AOnNewConsoleLine: TOnNewConsoleLine; AWorkDirectory: String = 'C:\');
16+//const
17+// BUFFERSIZE = 4096;
18+//var
19+// PipeAttributes: TSecurityAttributes;
20+// StartupInfo: TStartupInfo;
21+// PI: TProcessInformation;
22+// PipeReadHandle, PipeWriteHandle: THandle;
23+//// WasOK: Boolean;
24+// RawBuffer, Buffer: array[0..Pred(BUFFERSIZE)] of AnsiChar;
25+// BytesRead: Cardinal;
26+//// Handle: Boolean;
27+// Line, StringBuffer: String;
28+// i: Cardinal;
29+//begin
30+// // Define os atribuitos para o pipe
31+// PipeAttributes.nLength := SizeOf(TSecurityAttributes);
32+// PipeAttributes.bInheritHandle := True;
33+// PipeAttributes.lpSecurityDescriptor := nil;
34+//
35+// // Cria o pipe retornando seus dois handles (leitura e escrita). Pensando no
36+// // pipe literalmente como um cano, o handle de escrita seria a entrada do cano
37+// // e o handle de leitura seria a saída do cano. Mais adiante será feito o
38+// // redirecionamento de StandardOutput e, grosso modo, ficará desse jeito
39+// // StandardOutput -> PipeWriteHandle -> [cano] -> PipeReadHandle -> ReadFile
40+// CreatePipe(PipeReadHandle, PipeWriteHandle, @PipeAttributes, 0);
41+// try
42+// ZeroMemory(@StartupInfo,SizeOf(TStartupInfo));
43+// StartupInfo.cb := SizeOf(TStartupInfo);
44+// StartupInfo.dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES;
45+// StartupInfo.wShowWindow := SW_HIDE;
46+// // Não é necessário redirecionar a entrada do processo, porque ele não será
47+// // interativo, ele só vai ser chamado e apenas sua saída será capturada
48+// StartupInfo.hStdInput := GetStdHandle(STD_INPUT_HANDLE);
49+// // Redireciona tanto a saída do processo, como a saída específica de erros
50+// // do mesmo para o handle de escrita do pipe. Posteriormente será lido o
51+// // handle de leitura, a fim de capturar aquilo que o processo retornaria em
52+// // tela em uma janela de console, por exemplo
53+// StartupInfo.hStdOutput := PipeWriteHandle;
54+// StartupInfo.hStdError := PipeWriteHandle;
55+//
56+// // Cria o processo que terá sua saída redirecionada para o pipe
57+// // CreateProcess(nil, PChar('cmd.exe /C ' + ACommandLine), nil, nil, True, 0, nil, PChar(AWorkDirectory), StartupInfo, PI);
58+// if CreateProcess(nil, PChar(ACommandLine), nil, nil, True, 0, nil, PChar(AWorkDirectory), StartupInfo, PI) then
59+// with TStringList.Create do
60+// try
61+// ZeroMemory(@RawBuffer,BUFFERSIZE);
62+//
63+// while ReadFile(PipeReadHandle, RawBuffer, BUFFERSIZE, BytesRead, nil) and (BytesRead > 0) do
64+// begin
65+// //OemToCharA(RawBuffer,Buffer); // Converte caracteres escrotos (não sei onde usar)
66+//
67+// Text := RawBuffer;
68+//
69+// for i := 0 to Pred(Count) do
70+// AOnNewConsoleLine(Strings[i],i < Pred(Count))
71+//
72+// ZeroMemory(@RawBuffer,BUFFERSIZE);
73+// end;
74+// // repeat
75+// // WasOK := ReadFile(PipeReadHandle, BufferCru, 255, BytesRead, nil);
76+//
77+// // OemToCharA(BufferCru,Buffer); // Converte caracteres escrotos
78+//
79+// // if BytesRead > 0 then
80+// // begin
81+// // Buffer[BytesRead] := #0;
82+//
83+// // StringBuffer := String(Buffer);
84+//
85+// // while Pos(#13#10,StringBuffer) > 0 do
86+// // begin
87+// // Line := Line + Copy(StringBuffer,1,Pos(#13#10,StringBuffer) - 1);
88+// // AOnNewConsoleLine(Line);
89+// // Line := '';
90+// // Delete(StringBuffer,1,Pos(#13#10,StringBuffer) + 1);
91+// // end;
92+//
93+// // Line := StringBuffer;
94+// // end;
95+// // until not WasOK or (BytesRead = 0);
96+// //
97+// // WaitForSingleObject(PI.hProcess, INFINITE);
98+// finally
99+// Free;
100+// CloseHandle(PI.hProcess);
101+// CloseHandle(PI.hThread);
102+// end;
103+// finally
104+// CloseHandle(PipeWriteHandle);
105+// CloseHandle(PipeReadHandle);
106+// end;
107+//end;
108+
109+(*
110+function GetConsoleOutput(ACommandLine: String; AInteractiveOutput: TStrings = nil; AWorkDirectory: String = 'C:\'): String;
111+var
112+ SA: TSecurityAttributes;
113+ SI: TStartupInfo;
114+ PI: TProcessInformation;
115+ StdOutPipeRead, StdOutPipeWrite: THandle;
116+ WasOK: Boolean;
117+ BufferCru, Buffer: array[0..255] of AnsiChar;
118+ BytesRead: Cardinal;
119+ Handle: Boolean;
120+ Line, StringBuffer: String;
121+begin
122+ Result := '';
123+
124+ with SA do
125+ begin
126+ nLength := SizeOf(TSecurityAttributes);
127+ bInheritHandle := True;
128+ lpSecurityDescriptor := nil;
129+ end;
130+
131+ CreatePipe(StdOutPipeRead, StdOutPipeWrite, @SA, 0);
132+ try
133+ ZeroMemory(@SI,SizeOf(TStartupInfo));
134+ with SI do
135+ begin
136+ cb := SizeOf(TStartupInfo);
137+ dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES;
138+ wShowWindow := SW_HIDE;
139+ hStdInput := GetStdHandle(STD_INPUT_HANDLE); // don't redirect stdin
140+ hStdOutput := StdOutPipeWrite;
141+ hStdError := StdOutPipeWrite;
142+ end;
143+
144+ Handle := CreateProcess(nil, PChar('cmd.exe /C ' + ACommandLine), nil, nil, True, 0, nil, PChar(AWorkDirectory), SI, PI);
145+
146+ CloseHandle(StdOutPipeWrite);
147+
148+ if Handle then
149+ try
150+ repeat
151+ WasOK := ReadFile(StdOutPipeRead, BufferCru, 255, BytesRead, nil);
152+
153+ OemToCharA(BufferCru,Buffer); // Converte caracteres escrotos
154+
155+ if BytesRead > 0 then
156+ begin
157+ Buffer[BytesRead] := #0;
158+ Result := Result + String(Buffer);
159+
160+ if Assigned(AInteractiveOutput) then
161+ begin
162+ StringBuffer := String(Buffer);
163+
164+ while Pos(#13#10,StringBuffer) > 0 do
165+ begin
166+ Line := Line + Copy(StringBuffer,1,Pos(#13#10,StringBuffer) - 1);
167+ AInteractiveOutput.Add(Line);
168+ Line := '';
169+ Delete(StringBuffer,1,Pos(#13#10,StringBuffer) + 1);
170+ end;
171+
172+ Line := StringBuffer;
173+ end;
174+ end;
175+ until not WasOK or (BytesRead = 0);
176+
177+ WaitForSingleObject(PI.hProcess, INFINITE);
178+
179+ finally
180+ CloseHandle(PI.hThread);
181+ CloseHandle(PI.hProcess);
182+ end;
183+ finally
184+ CloseHandle(StdOutPipeRead);
185+ end;
186+end;
187+
188+
189+*)
190+end.
--- trunk/src/UMaven.pas (nonexistent)
+++ trunk/src/UMaven.pas (revision 2)
@@ -0,0 +1,102 @@
1+unit UMaven;
2+
3+interface
4+
5+uses
6+ KRK.Lib.Rtl.Sys.Console;
7+
8+procedure ParseMavenOutput(ACommandLine: String);
9+
10+implementation
11+
12+uses
13+ UFuncoes, KRK.Lib.RegExp.Utils, System.SysUtils, RegularExpressionsCore,
14+ UConfiguracoes, KRK.Lib.Rtl.Sys.Utilities;
15+
16+type
17+ TEvents = class
18+ private
19+ procedure HandleOnNewLine(AProcessHandle: THandle; AThreadHandle: THandle; const ALine: String);
20+ end;
21+
22+procedure TEvents.HandleOnNewLine(AProcessHandle: THandle; AThreadHandle: THandle; const ALine: String);
23+var
24+ Tag: String;
25+ Texto: String;
26+ PO: TPerlRegExOptions;
27+ MA: String;
28+begin
29+ NormVideo;
30+
31+ Tag := '';
32+ Texto := '';
33+
34+ if RegExMatch(ALine,'\[([^\[\]]*)\] (.*)',1,0,False,PO,MA) then
35+ begin
36+ Tag := UpperCase(MA);
37+
38+ if RegExMatch(ALine,'\[([^\[\]]*)\] (.*)',2,0,False,PO,MA) then
39+ Texto := MA;
40+ end;
41+
42+ // [WARNING] BLA BLA BLA
43+ if Tag = 'WARNING' then
44+ begin
45+ TextColor(Yellow);
46+ Write('[',Tag,'] ');
47+ TextColor(DarkGray);
48+ WriteLn(Texto);
49+ end
50+ // [DEBUG] BLA BLA BLA
51+ else if Tag = 'DEBUG' then
52+ begin
53+ TextColor(Magenta);
54+ Write('[',Tag,'] ');
55+ TextColor(DarkGray);
56+ WriteLn(Texto);
57+ end
58+ // [ERROR] BLA BLA BLA
59+ // [ERROR] [HELP 1] BLA BLA BLA
60+ else if Tag = 'ERROR' then
61+ begin
62+ TextColor(LightRed);
63+ Write('[',Tag,'] ');
64+
65+ if RegExMatch(Texto,'\[([^\[\]]*)\] (.*)',1,0,False,PO,MA) then
66+ begin
67+ TextColor(White);
68+ Write('[',MA,'] ');
69+
70+ if RegExMatch(Texto,'\[([^\[\]]*)\] (.*)',2,0,False,PO,MA) then
71+ WriteLn(MA);
72+ end
73+ else
74+ begin
75+ TextColor(DarkGray);
76+ WriteLn(Texto);
77+ end;
78+ end
79+ else
80+ WriteLn(ALine);
81+end;
82+
83+procedure ParseMavenOutput(ACommandLine: String);
84+var
85+ CommandLine: String;
86+begin
87+ CommandLine := Configuracoes.Maven + ' ' + ACommandLine;
88+ NormVideo;
89+ Write('Executando o comando ');
90+ TextColor(LightCyan);
91+ WriteLn(CommandLine);
92+ TextColor(Yellow);
93+ WriteLn('---------------------------------------------------------------------');
94+ with TEvents.Create do
95+ try
96+ ExecConsoleApp(Configuracoes.Maven,ACommandLine,HandleOnNewLine, GetCurrentDir);
97+ finally
98+ Free;
99+ end;
100+end;
101+
102+end.
--- trunk/src/UWebLogic.pas (nonexistent)
+++ trunk/src/UWebLogic.pas (revision 2)
@@ -0,0 +1,143 @@
1+unit UWebLogic;
2+
3+interface
4+
5+uses
6+ KRK.Lib.Rtl.Sys.Console;
7+
8+procedure ParseWebLogicOutput(ACommandLine: String);
9+
10+implementation
11+
12+uses
13+ UFuncoes, KRK.Lib.RegExp.Utils, System.SysUtils, RegularExpressionsCore,
14+ UConfiguracoes, KRK.Lib.Rtl.Sys.Utilities;
15+
16+
17+type
18+ TEvents = class
19+ private
20+ FTipo: String;
21+ procedure HandleOnNewLine(AProcessHandle: THandle; AThreadHandle: THandle; const ALine: String);
22+ end;
23+
24+procedure TEvents.HandleOnNewLine(AProcessHandle: THandle; AThreadHandle: THandle; const ALine: String);
25+var
26+ PO: TPerlRegExOptions;
27+ Data: String;
28+ Hora: String;
29+ Tipo: String;
30+ Origem: String;
31+ Codigo: String;
32+ Mensagem: String;
33+ Dummy: String;
34+ LinhaComplementar: Boolean;
35+begin
36+ // <15/04/2019 17h03min04s GMT-03:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
37+ PO := [preSingleLine];
38+
39+ // Tenta obter cada uma das partes das mensagens formatadas
40+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',1,0,False,PO,Data);
41+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',2,0,False,PO,Hora);
42+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',3,0,False,PO,Tipo);
43+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',4,0,False,PO,Origem);
44+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',5,0,False,PO,Codigo);
45+ RegExMatch(Trim(ALine),'<(\d{2}\/\d{2}\/\d{4}) (\d{2}h\d{2}min\d{2}s) GMT[+-]\d{2}:\d{2}> <([^<>]*)> <([^<>]*)> <([^<>]*)> <([^<>]*)',6,0,False,PO,Mensagem);
46+
47+ // LinhaComplementar = true apenas quando "Mensagem" vem em várias linhas e a
48+ // linha atual trata-se de uma linha diferente da primeira. Isso é detectado
49+ // abaixo. Se Tipo <> '' significa que os RegExMatch acima detectaram uma
50+ // linha formatada que poderá ter uma mensagem de uma linha ou de várias
51+ // linhas. FTipo é então configurado como o tipo da linha a ser escrita
52+ LinhaComplementar := False;
53+ if Tipo <> '' then
54+ begin
55+ FTipo := Tipo;
56+
57+ // Caso a linha atual contenha o terminador de mensagem, significa que
58+ // trata-se de uma mensagem de uma linha só, neste caso, coloca o indicador
59+ // de fim na mensagem, porque a mensagem retornada pelo RegExMatch não
60+ // contém tal terminador
61+ if RegExMatch(Trim(ALine),'([^<>]*)>$',1,0,False,PO,Dummy) then
62+ Mensagem := Mensagem + '>';
63+ end
64+ // Caso FTipo contenha algo, significa que uma chamada anterior a este evento
65+ // não resetou seu valor, porque trata-se de uma mensagem em várias linhas que
66+ // ainda estão sendo escritas. Neste caso configura LinhaComplementar como
67+ // true para que a forma de escrita correta seja usada mais adiante
68+ else if FTipo <> '' then
69+ LinhaComplementar := True;
70+
71+ if UpperCase(FTipo) = 'NOTICE' then
72+ begin
73+ TextColor(Green);
74+ // Caso não seja uma linha complementar, ou seja, caso seja uma linha com
75+ // uma mensagem única ou a primeira linha de uma mensagem de múltipla, usa este algorítmo
76+ if not LinhaComplementar then
77+ Writeln('<',FTipo,'> ','<',Origem,'> ','<',Mensagem)
78+ // Caso seja uma linha complementar, simplesmente escreve a linha
79+ else
80+ WriteLn(ALine);
81+ end
82+ else if UpperCase(FTipo) = 'WARNING' then
83+ begin
84+ TextColor(Yellow);
85+ if not LinhaComplementar then
86+ Writeln('<',FTipo,'> ','<',Origem,'> ','<',Mensagem)
87+ else
88+ WriteLn(ALine);
89+ end
90+ else if UpperCase(FTipo) = 'INFO' then
91+ begin
92+ TextColor(DarkGray);
93+ if not LinhaComplementar then
94+ Writeln('<',FTipo,'> ','<',Origem,'> ','<',Mensagem)
95+ else
96+ WriteLn(ALine);
97+ end
98+ else if UpperCase(FTipo) = 'ERROR' then
99+ begin
100+ TextColor(LightRed);
101+ if not LinhaComplementar then
102+ Writeln('<',FTipo,'> ','<',Origem,'> ','<',Mensagem)
103+ else
104+ WriteLn(ALine);
105+ end
106+ else if Pos('DEBUG',Trim(ALine)) = 1 then
107+ begin
108+ TextColor(Magenta);
109+ WriteLn(Trim(ALine));
110+ end
111+ else
112+ begin
113+ NormVideo;
114+ Writeln(Trim(ALine));
115+ end;
116+
117+ // Ao chegar neste ponto, reseta FTipo, caso a linha contenha o terminador de
118+ // mensagem, o que significa que trata-se de uma mensagem única, ou a última
119+ // linha de uma mensagem de múltiplas linhas
120+ if RegExMatch(Trim(ALine),'([^<>]*)>$',1,0,False,PO,Mensagem) then
121+ FTipo := '';
122+end;
123+
124+procedure ParseWebLogicOutput(ACommandLine: String);
125+var
126+ CommandLine: String;
127+begin
128+ CommandLine := Configuracoes.WebLogic + ' ' + ACommandLine;
129+ NormVideo;
130+ Write('Executando o comando ');
131+ TextColor(LightCyan);
132+ WriteLn(CommandLine);
133+ TextColor(Yellow);
134+ WriteLn('---------------------------------------------------------------------');
135+ with TEvents.Create do
136+ try
137+ ExecConsoleApp(Configuracoes.WebLogic,ACommandLine,HandleOnNewLine,ExtractFilePath(Configuracoes.WebLogic));
138+ finally
139+ Free;
140+ end;
141+end;
142+
143+end.
Show on old repository browser