Ahora se instalan los archivos de fuentes necesarios y se crea el ODBC de PosgreSQL

This commit is contained in:
Juan Ferrer Toribio 2016-03-18 14:12:24 +01:00
parent 07cafcc5cd
commit 765e03052f
39 changed files with 62 additions and 24 deletions

BIN
fonts/C128btt3.ttf Executable file

Binary file not shown.

BIN
fonts/ConnectCode39.ttf Executable file

Binary file not shown.

BIN
fonts/FRE3OF9X.TTF Executable file

Binary file not shown.

BIN
fonts/FREE3OF9.TTF Executable file

Binary file not shown.

BIN
fonts/IDAutomationHC39M.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Black.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-BlackItalic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Bold.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-BoldItalic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Italic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-LightItalic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Medium.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-MediumItalic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Regular.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-Thin.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto-ThinItalic.ttf Executable file

Binary file not shown.

BIN
fonts/Roboto_light.ttf Executable file

Binary file not shown.

BIN
fonts/lsans.ttf Executable file

Binary file not shown.

BIN
fonts/lsansd.ttf Executable file

Binary file not shown.

BIN
fonts/lsansdi.ttf Executable file

Binary file not shown.

BIN
fonts/lsansi.ttf Executable file

Binary file not shown.

BIN
fonts/mrvcode39extma.ttf Executable file

Binary file not shown.

BIN
icons/comp.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
icons/enc.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
icons/ent.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
icons/eti.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
icons/lab.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
icons/tpv.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
ocx/mscomct2.ocx Normal file

Binary file not shown.

20
setup.iss Executable file → Normal file
View File

@ -1,13 +1,12 @@
#define MyAppName "Verdnatura" #define MyAppName "Verdnatura"
#define MyAppVersion "1.0" #define MyAppVersion "1.1"
#define MyAppPublisher "Verdnatura" #define MyAppPublisher "Verdnatura"
#define MyAppURL "http://www.verdnatura.es/" #define MyAppURL "http://www.verdnatura.es/"
#define MyAppExeName "setup.exe"
[Setup] [Setup]
; NOTE: The value of AppId uniquely identifies this application. ; NOTE: The value of AppId uniquely identifies this application.
AppId={{7615F2D0-AB26-4EB0-948C-BBB2CE1151D7} AppId={{1BFBC7A1-64B3-41E0-8A8E-0D29043EA8A3}
AppName={#MyAppName} AppName={#MyAppName}
AppVersion={#MyAppVersion} AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion} AppVerName={#MyAppName} {#MyAppVersion}
@ -19,7 +18,8 @@ CreateAppDir=yes
DefaultDirName={pf}\{#MyAppName} DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName} DefaultGroupName={#MyAppName}
;LicenseFile=src\LICENSE.txt ;LicenseFile=src\LICENSE.txt
SetupIconFile=src\icon.ico SetupIconFile=src\logo.ico
UninstallDisplayIcon={app}\logo.ico
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
PrivilegesRequired=admin PrivilegesRequired=admin
@ -42,9 +42,11 @@ Name: "{sd}\fotos"; \
[Files] [Files]
Source: "src\*"; \ Source: "src\*"; \
DestDir: "{app}"; Flags: ignoreversion DestDir: "{app}"; Flags: ignoreversion
Source: "src\icons\*"; \ Source: "icons\*"; \
DestDir: "{app}\icons"; Flags: ignoreversion DestDir: "{app}\icons"; Flags: ignoreversion
Source: "src\barcodex.ocx"; \ Source: "fonts\*"; \
DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "ocx\*"; \
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
[Tasks] [Tasks]
@ -55,13 +57,13 @@ Name: "desktopicon"; \
[Components] [Components]
Name: "tpv"; \ Name: "tpv"; \
Description: "Terminal Punto Venta"; \ Description: "Terminal Punto Venta"; \
Types: full compact custom Types: full compact
Name: "ent"; \ Name: "ent"; \
Description: "Entradas"; \ Description: "Entradas"; \
Types: full compact custom Types: full compact
Name: "com"; \ Name: "com"; \
Description: "Comparativa"; \ Description: "Comparativa"; \
Types: full compact custom Types: full compact
Name: "enc"; \ Name: "enc"; \
Description: "Encajado"; \ Description: "Encajado"; \
Types: full Types: full

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

View File

@ -13,9 +13,10 @@ var App =
{ {
appName: 'Verdnatura', appName: 'Verdnatura',
dsName: 'verdnatura', dsName: 'verdnatura',
dsPath: 'HKCU\\Software\\ODBC\\ODBC.INI\\verdnatura',
regPath: 'HKCU\\Software\\Verdnatura', regPath: 'HKCU\\Software\\Verdnatura',
odbcPath: 'HKCU\\Software\\ODBC\\ODBC.INI\\verdnatura',
remoteUrl: 'https://www.verdnatura.es/download', remoteUrl: 'https://www.verdnatura.es/download',
dbHost: 'db.verdnatura.es',
shell: new ActiveXObject ('WScript.Shell'), shell: new ActiveXObject ('WScript.Shell'),
fso: new ActiveXObject ('scripting.filesystemobject'), fso: new ActiveXObject ('scripting.filesystemobject'),
@ -68,30 +69,56 @@ var App =
this.regWrite (path, 'Level', 1, 'REG_DWORD'); this.regWrite (path, 'Level', 1, 'REG_DWORD');
// Crea el ODBC de MySQL // Crea el ODBC de MySQL
var dsDriverPath = this.getEnv ('ProgramFiles') var driverPath = this.getEnv ('ProgramFiles')
+'\\MySQL\\Connector ODBC 5.1\\myodbc5.dll'; +'\\MySQL\\Connector ODBC 5.1\\myodbc5.dll';
this.regWrites (this.odbcPath, 'REG_SZ', { var params = {
'Driver' : dsDriverPath, 'Driver' : driverPath,
'DESCRIPTION' : this.appName, 'DESCRIPTION' : this.appName,
'SERVER' : 'db.verdnatura.es', 'SERVER' : this.dbHost,
'DATABASE' : 'vn2008', 'DATABASE' : 'vn2008',
'SSLCA' : this.appDir +'\\cacert.pem', 'SSLCA' : this.appDir +'\\cacert.pem',
'SSLVERIFY' : 1, 'SSLVERIFY' : 1,
'AUTO_RECONNECT' : 1 'AUTO_RECONNECT' : 1
}); };
this.createOdbc (
this.dsName,
'Mysql ODBC 5.1 Driver',
params
);
// Crea el ODBC de PosgreSQL
var driverPath = this.getEnv ('ProgramFiles')
+'\\psqlODBC\\0804\\bin\\psqlodbc35w.dll';
path = 'HKCU\\Software\\ODBC\\ODBC.INI\\ODBC Data Sources'; var params = {
this.regWrite (path, this.dsName, 'Mysql ODBC 5.1 Driver', 'REG_SZ'); 'Driver' : driverPath,
'DESCRIPTION' : this.appName,
'Servername' : this.dbHost,
'DATABASE' : 'vn',
'UID' : '',
'USERNAME' : '',
'PASSWORD' : ''
};
this.createOdbc (
'verdnaturapg',
'PostgreSQL Unicode',
params
);
// Marca la aplicación como configurada
this.regWrite (this.regPath, 'configured', 1, 'REG_DWORD'); this.regWrite (this.regPath, 'configured', 1, 'REG_DWORD');
} }
// Carga los datos del formulario // Carga los datos del formulario
var user = this.regRead (this.odbcPath, 'UID'); var user = this.regRead (this.dsPath, 'UID');
var password = this.regRead (this.odbcPath, 'PWD'); var password = this.regRead (this.dsPath, 'PWD');
var remember = this.regRead (this.regPath, 'remember'); var remember = this.regRead (this.regPath, 'remember');
if (user) if (user)
@ -106,6 +133,15 @@ var App =
else else
this.reset (); this.reset ();
}, },
createOdbc: function (dsName, driverName, params)
{
var odbcPath = 'HKCU\\Software\\ODBC\\ODBC.INI\\';
this.regWrites (odbcPath + dsName, 'REG_SZ', params);
this.regWrite (odbcPath + 'ODBC Data Sources',
dsName, driverName, 'REG_SZ');
},
reset: function () reset: function ()
{ {
@ -163,8 +199,8 @@ var App =
if (!password || password === '') if (!password || password === '')
throw new Error ('Introduce una contraseña'); throw new Error ('Introduce una contraseña');
this.regWrite (this.odbcPath, 'UID', user, 'REG_SZ'); this.regWrite (this.dsPath, 'UID', user, 'REG_SZ');
this.regWrite (this.odbcPath, 'PWD', password, 'REG_SZ'); this.regWrite (this.dsPath, 'PWD', password, 'REG_SZ');
// Obtiene la última versión usando la conexión ODBC de MySQL // Obtiene la última versión usando la conexión ODBC de MySQL
@ -216,7 +252,7 @@ var App =
} }
catch (e) catch (e)
{ {
//this.regWrite (this.odbcPath, 'PWD', '', 'REG_SZ'); //this.regWrite (this.dsPath, 'PWD', '', 'REG_SZ');
this._disableUi (false); this._disableUi (false);
this.reset (); this.reset ();
this.showMessage (e.message); this.showMessage (e.message);