ODBC upgrade, CA renew, setup fonts fix

This commit is contained in:
Juan Ferrer 2020-11-06 20:14:04 +01:00
parent 20808940d0
commit fcb483919e
8 changed files with 82 additions and 28 deletions

BIN
deps/VC_redist.x86.exe vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
deps/psqlodbc.msi vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
#define MyAppName "Verdnatura"
#define MyAppVersion "1.1"
#define MyAppVersion "1.2"
#define MyAppPublisher "Verdnatura"
#define MyAppURL "http://www.verdnatura.es/"
@ -40,30 +40,32 @@ Name: "{sd}\fotos"; \
Permissions: users-modify
[Files]
Source: "deps\*"; \
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallExe;
Source: "odbc\*"; \
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallMsi;
Source: "src\*"; \
DestDir: "{app}"; Flags: ignoreversion
Source: "icons\*"; \
DestDir: "{app}\icons"; Flags: ignoreversion
Source: "ocx\*"; \
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
Source: "deps\*"; \
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallDep;
Source: "fonts\Roboto - *"; \
DestDir: "{fonts}"; FontInstall: "Roboto"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "Roboto"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\Lucida Sans - *"; \
DestDir: "{fonts}"; FontInstall: "Lucida Sans"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "Lucida Sans"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\Code128B.ttf"; \
DestDir: "{fonts}"; FontInstall: "Code128B"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "Code128B"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\CCode39.ttf"; \
DestDir: "{fonts}"; FontInstall: "CCode39"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "CCode39"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\Free 3 of 9.ttf"; \
DestDir: "{fonts}"; FontInstall: "Free 3 of 9"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "Free 3 of 9"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\Free 3 of 9 Extended.ttf"; \
DestDir: "{fonts}"; FontInstall: "Free 3 of 9 Extended"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "Free 3 of 9 Extended"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\IDAutomationHC39M.ttf"; \
DestDir: "{fonts}"; FontInstall: "IDAutomationHC39M"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "IDAutomationHC39M"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "fonts\MRV Code39extMA.ttf"; \
DestDir: "{fonts}"; FontInstall: "MRV Code39extMA"; Flags: uninsneveruninstall
DestDir: "{fonts}"; FontInstall: "MRV Code39extMA"; Flags: onlyifdoesntexist uninsneveruninstall
[Tasks]
Name: "desktopicon"; \
@ -207,7 +209,31 @@ Name: "{commondesktop}\Library"; \
[Code]
procedure InstallDep;
procedure InstallExe;
var
StatusText: String;
ResultCode: Integer;
ExeFile: String;
begin
ExeFile := ExpandConstant(CurrentFilename);
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := CurrentFilename +'...';
WizardForm.ProgressGauge.Style := npbstMarquee;
Log(WizardSelectedComponents(False));
try
if not Exec(ExeFile, '/Q', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
MsgBox(CurrentFilename +' installation failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
WizardForm.Close;
end;
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
end;
end;
procedure InstallMsi;
var
StatusText: String;
ResultCode: Integer;

View File

@ -1,4 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIDvzCCAqegAwIBA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mBXLaiKlGFG04407klCRomzU+5y
SEte8AsCGmz7MOkDQ2IjghF5iM+Cagktlya3u2uefXN4CF81VOJlm5nICrc1ltPM
RsqTl8uxrgNxvqlODxC5kMePMulcJF3ybmhZwNqjraV4HupuwphedpaUypUQTSxp
mcUbG0MFkFnVF812ZN8QvNdmnguJ8o5Fzb6PvtEDgnJpU9CPQaqqec5ILMjBETFz
U438
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIJAJimL+J4jUaQMA0GCSqGSIb3DQEBBQUAMIG2MQswCQYD
VQQGEwJFUzEdMBsGA1UECAwUQ29tdW5pZGFkIFZhbGVuY2lhbmExETAPBgNVBAcM
CFZhbGVuY2lhMR4wHAYDVQQKDBVWZXJkbmF0dXJhIExldmFudGUgU0wxFDASBgNV

View File

@ -90,21 +90,24 @@ var App = {
// Creates the MySQL ODBC connection
var driverPath = this.getEnv('ProgramFiles')
+'\\MySQL\\Connector ODBC 5.1\\myodbc5.dll';
+'\\MySQL\\Connector ODBC 8.0\\myodbc8a.dll';
var params = {
'Driver' : driverPath,
'DESCRIPTION' : Conf.appName,
'SERVER' : Conf.dbHost,
'DATABASE' : Conf.dbName,
'SSLCA' : this.certFile,
'SSLVERIFY' : 1,
'AUTO_RECONNECT' : 1
Driver : driverPath,
DESCRIPTION : Conf.appName,
SERVER : Conf.dbHost,
DATABASE : Conf.dbName,
SSLCA : this.certFile,
SSLMODE : 'VERIFY_IDENTITY',
SSLCIPHER : 'AES256-SHA',
AUTO_RECONNECT : 1,
NO_PROMPT : 1,
ENABLE_CLEARTEXT_PLUGIN : 1
};
this.createOdbc(
Conf.dsName,
'Mysql ODBC 5.1 Driver',
'MySQL ODBC 8.0 ANSI Driver',
params
);
@ -260,13 +263,15 @@ var App = {
try {
mysqlConn.open(this.getOdbcString({
'Driver': '{MySQL ODBC 5.1 Driver}',
'Server': Conf.dbHost,
'Database': Conf.dbName,
'Uid': this.$('user').value,
'Pwd': this.$('password').value,
'Sslverify': 1,
'Sslca': this.certFile
Driver : '{MySQL ODBC 8.0 ANSI Driver}',
Server : Conf.dbHost,
Database : Conf.dbName,
Uid : this.$('user').value,
Pwd : this.$('password').value,
Sslca : this.certFile,
SslMode : 'VERIFY_IDENTITY',
SslCipher : 'AES256-SHA',
ENABLE_CLEARTEXT_PLUGIN : 1
}));
} catch (err) {
var dbErrors = mysqlConn && mysqlConn.errors;