From fe415459696cd26e85234d25cbae757abddd108d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 27 Mar 2008 17:01:26 +0000 Subject: [PATCH] General en cliente: escribir ficheros ini y log dentro de las carpetas de usuarios (C:\Documents and Settings) git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@361 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/ApplicationBase/uFactuGES_App.pas | 19 +- Source/Base/Base.dpk | 3 +- Source/Base/Base.dproj | 183 +++++++++++++----- .../uDataModuleConfiguracion.pas | 15 +- Source/Base/Utiles/uAppInfoUtils.pas | 52 +++++ Source/Base/Utiles/uSistemaFunc.pas | 19 +- Source/Base/uDMBase.pas | 15 +- Source/Cliente/FactuGES.dproj | 11 +- Source/Cliente/FactuGES.rc | 8 +- Source/Cliente/FactuGES.res | Bin 172156 -> 172184 bytes Source/Cliente/uBootStrap.pas | 1 + Source/Servicios/RODLFILE.res | Bin 25261 -> 26132 bytes Source/Servidor/FactuGES_Server.RES | Bin 23480 -> 23200 bytes Source/Servidor/FactuGES_Server.rc | 10 +- 14 files changed, 256 insertions(+), 80 deletions(-) create mode 100644 Source/Base/Utiles/uAppInfoUtils.pas diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas index f56290e2..7580cae7 100644 --- a/Source/ApplicationBase/uFactuGES_App.pas +++ b/Source/ApplicationBase/uFactuGES_App.pas @@ -4,7 +4,7 @@ interface uses SysUtils, Classes, Forms, uBizUsuarios, uBizEmpresas, uControllerBase, - uEmpresasController, JclFileUtils, uUsuariosController, uHostManager; + uEmpresasController, uUsuariosController, uHostManager; type TDoLoadModulesEvent = procedure; @@ -57,20 +57,19 @@ type property EmpresaActiva : IBizEmpresa read GetEmpresaActiva; property UsuarioActivo : IBizUsuario read GetUsuarioActivo; property EmpresasController : IEmpresasController read GetEmpresasController; - property UsuariosController : IUsuariosController read GetUsuariosController; + property UsuariosController : IUsuariosController read GetUsuariosController; property AppSplashForm : IAppSplashForm read GetAppSplashForm write SetAppSplashForm; property ModuleManager : THostManager read GetModuleManager; property DoMainFormEvent : TDoMainFormEvent read GetDoMainFormEvent write SetDoMainFormEvent; property DoLoadModulesEvent : TDoLoadModulesEvent read GetLoadModulesEvent write SetLoadModulesEvent; property Terminated : Boolean read GetTerminated; - + procedure ShowCapado; end; TAppFactuGES = class(TInterfacedObject, IAppFactuGES) private - FAppInfo : TJclFileVersionInfo; FEmpresasController : IEmpresasController; FUsuariosController: IUsuariosController; FEmpresaActiva: IBizEmpresa; @@ -143,7 +142,7 @@ implementation uses Dialogs, uDialogUtils, cxControls, uUsuariosViewRegister, - uEmpresasViewRegister; + uEmpresasViewRegister, uAppInfoUtils; procedure TAppFactuGES.CambiarEmpresa(const AIDEmpresa: Integer); var @@ -177,13 +176,12 @@ begin FEmpresasController := NIL; // Se crea la primera vez que se usa - FAppInfo := TJclFileVersionInfo.Create(Application.ExeName); FHostManager := THostManager.Create(NIL); with FHostManager do begin OnAfterLoad := AfterLoadModule; // Ruta por defecto de los módulos - BPLPath := ExtractFilePath(Application.ExeName) + '\'; + BPLPath := ExtractFilePath(Application.ExeName) + PathDelim; end; end; @@ -198,7 +196,6 @@ begin FUsuariosController := NIL; FEmpresasController := NIL; - FreeAndNIL(FAppInfo); inherited; end; @@ -222,12 +219,12 @@ end; function TAppFactuGES.GetAppFullName: String; begin - Result := GetAppName + ' ' + GetAppVersion; + Result := uAppInfoUtils.GetAppFullName; end; function TAppFactuGES.GetAppName: String; begin - Result := FAppInfo.ProductName; + Result := uAppInfoUtils.GetAppName; end; function TAppFactuGES.GetAppSplashForm: IAppSplashForm; @@ -237,7 +234,7 @@ end; function TAppFactuGES.GetAppVersion: String; begin - Result := FAppInfo.ProductVersion; + Result := uAppInfoUtils.GetAppVersion; end; function TAppFactuGES.GetEmpresaActiva: IBizEmpresa; diff --git a/Source/Base/Base.dpk b/Source/Base/Base.dpk index 5b05879f..d377d839 100644 --- a/Source/Base/Base.dpk +++ b/Source/Base/Base.dpk @@ -105,6 +105,7 @@ contains uControllerDetallesBase in 'Controladores\uControllerDetallesBase.pas', schBase_Intf in 'schBase_Intf.pas', uDataModuleBase in 'uDataModuleBase.pas' {DataModuleBase: TDataModule}, - uStringsUtils in 'Utiles\uStringsUtils.pas'; + uStringsUtils in 'Utiles\uStringsUtils.pas', + uAppInfoUtils in 'Utiles\uAppInfoUtils.pas'; end. diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index eb4d0e9e..78cf166f 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -44,6 +44,86 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft Office 2000 Sample Automation Server Wrapper Components Microsoft Office XP Sample Automation Server Wrapper Components Base.dpk @@ -53,57 +133,6 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
@@ -128,10 +157,55 @@
dmBase
TDataModule
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -145,6 +219,13 @@ + + + + + + +