From 962cf41e0855e38bf46e094da75f226596c04026 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 16 Jan 2012 18:05:57 +0000 Subject: [PATCH] Tarea #756 resuelta -> Poder lanzar el servidor como servicio git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@28 93f398dd-4eb6-7a46-baf6-13f46f578da2 --- Source/Servidor/FactuGES_Server.dpr | 20 +++++++++++++++--- Source/Servidor/FactuGES_Server.dproj | 2 +- Source/Servidor/FactuGES_Server.res | Bin 23352 -> 23344 bytes Source/Servidor/uDataModuleServer.pas | 5 +++-- Source/Servidor/uServerMainForm.pas | 29 +++++++++++++------------- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index ec8a8d1..123b18b 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -1,9 +1,9 @@ program FactuGES_Server; - {#ROGEN:..\Servicios\FactuGES.rodl} // RemObjects: Careful, do not remove! uses uROComInit, + uROComboService, Forms, uServerMainForm in 'uServerMainForm.pas' {fServerForm}, uAcercaDe in 'uAcercaDe.pas' {fAcercaDe}, @@ -141,13 +141,27 @@ uses {$R *.res} {$R ..\Servicios\RODLFile.res} +const + FACTUGES_NAME = 'FactuGES Servidor'; + begin + if ROStartService(FACTUGES_NAME, FACTUGES_NAME) then + begin + // Aqui hay que comprobar antes si el servicio ya est  en ejecucion + + ROService.CreateForm(TdmServer, dmServer); + ROService.Run; + Exit; + end; + Application.Initialize; - //ReportMemoryLeaksOnShutdown := True; // - Application.Title := 'FactuGES (Servidor)'; +// ReportMemoryLeaksOnShutdown := True; + Application.Title := FACTUGES_NAME; Application.ShowMainForm := False; + Application.CreateForm(TdmServer, dmServer); Application.CreateForm(TfServerForm, fServerForm); Application.Run; Application.Terminate; end. + diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 8cf76ea..4f9691c 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse2470FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.4.7.0FactuGES (Servidor)2.4.7.0martes, 27 de diciembre de 2011 15:54 + FalseTrueFalseTrueFalse2480FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.4.8.0FactuGES (Servidor)2.4.8.0lunes, 16 de enero de 2012 10:45 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES_Server.dpr diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index 42cdf7bcfbc9593774c4b1399293140a46e6f2a0..36bebf3a8c5a8a8c694cfe22102046129e54194f 100644 GIT binary patch delta 139 zcmdn7jd24I-HBi{nS3`w9!UO;Fy-W6U}0clU|`^wY#k}fIB9ZZq%vdP;!4$}2nEWxy9RSgl9-aUI delta 147 zcmdn6jd8~|#tnBO7;PrsjgSYDe3us*e6>@$}-NG92u$1STVUavYpX< zGHX;dw>g6zg8@)Jhe2&}ca*GW7DFjRDnl6%7c=NEC@>f?SOUouARk0#G9&|WDnl+q e5 Max) then - Position := Min - else - Position := Position + Interval; - Refresh; - dmServer.HTTPServer.Active := False; + InitValues(0, 100, 10, 0, 'Cerrar FactuGES Server', 'Espere mientras FactuGES Server se cierra...'); + Show; + while dmServer.HTTPServer.Active do + begin + if (Position + Interval > Max) then + Position := Min + else + Position := Position + Interval; + Refresh; + dmServer.HTTPServer.Active := False; + end; + Hide; end; - Hide; - end; CanClose := True; end;