diff --git a/ba/ba1100.cpp b/ba/ba1100.cpp index 4e74a99d8..465b14a09 100755 --- a/ba/ba1100.cpp +++ b/ba/ba1100.cpp @@ -319,10 +319,7 @@ bool TManutenzione_app::create() // initvar e arrmask if (_superprassi) { const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type"); - if (type == 1 || type == 2) - _superprassi = true; - else - _superprassi = ini_get_bool(CONFIG_INSTALL, "Main", "TestDatabase"); + _superprassi = (type == 1) || (type == 2) } if (argc() > 2 && sw == "-C") diff --git a/ba/ba3100.cpp b/ba/ba3100.cpp index b4aed9b23..28db606b9 100755 --- a/ba/ba3100.cpp +++ b/ba/ba3100.cpp @@ -505,22 +505,8 @@ bool TGeneric_table_app::valute_decimals_handler(TMask_field& f, KEY k) exc.set_decimals(dec); exc.set(exc.get()); } - if (!m.is_running() && exc.empty()) - exc.set(m.get(VAL_CHANGE_OLD)); } - if (k == K_ENTER) - { - TMask& m = f.mask(); - real cambio(m.get(VAL_CHANGE)); - if (cambio > ZERO && m.get_bool(VAL_INEURO)) - { - // Se il cambio e' espresso in EURO metto in R10 il valore in lire - cambio = 1936.27 / cambio; - cambio.round(5); - } - m.set(VAL_CHANGE_OLD, cambio); - } - return TRUE; + return true; } bool TGeneric_table_app::change_decimals_handler(TMask_field& f, KEY k) diff --git a/ba/batbval.h b/ba/batbval.h index 1d3623508..ad84c59a1 100755 --- a/ba/batbval.h +++ b/ba/batbval.h @@ -4,6 +4,5 @@ #define VAL_DECIMALS_PRICES 111 #define VAL_DECIMALS_CHANGE 112 #define VAL_CHANGE 121 -#define VAL_CHANGE_OLD 122 #define VAL_LASTDATE 130 #define VAL_EURO 131 diff --git a/ba/batbval.uml b/ba/batbval.uml index 1047b0ae0..a304b87c6 100755 --- a/ba/batbval.uml +++ b/ba/batbval.uml @@ -108,13 +108,6 @@ BEGIN WARINING "E' necessario specificare un cambio di riferimento" END -NUMBER VAL_CHANGE_OLD 15 5 -BEGIN - PROMPT 2 80 "Cambio " - FIELD R10 - FLAGS "D" -END - DATE VAL_LASTDATE BEGIN PROMPT 40 12 "Data " diff --git a/include/about.cpp b/include/about.cpp index a49d80f2f..da4a7b4da 100755 --- a/include/about.cpp +++ b/include/about.cpp @@ -97,13 +97,11 @@ void TAdvanced_property_sheet::edit() TFilename n = value.as_string(); if (n.exist()) { -#ifdef WIN32 if (n.ends_with(".msk", true) || n.ends_with(".ini", true)) { n.insert("notepad "); xvt_sys_execute(n, FALSE, FALSE); } else -#endif xvt_sys_goto_url(n, "open"); } } @@ -255,7 +253,8 @@ KEY TProperty_sheet::run() TProperty_sheet::TProperty_sheet(const char* title, int width, int height) { - _power = is_power_reseller(); + const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR); + _power = nAssYear >= 2121; if (_power) _ps = new TAdvanced_property_sheet(title, width, height); else diff --git a/include/isam.cpp b/include/isam.cpp index 9425e2167..fcdf45b67 100755 --- a/include/isam.cpp +++ b/include/isam.cpp @@ -979,15 +979,8 @@ int TBaseisamfile::_write(const TRectype& rec) if (key.blank()) return _iskeyerr; - if (dongle().demo()) - { - const int logicnum = num(); - if ((logicnum > LF_COMUNI && logicnum < LF_ANALISI) || logicnum > LF_RELANA) - { - if (items() > 979L) - return _isfilefull; - } - } + if (dongle().demo() && items() > 979L) + return _isfilefull; // Forza l'uso della chiave principale (per chiavi duplicate?) const int fhnd = handle(_curr_key > 0 ? 1 : 0); diff --git a/include/keys.h b/include/keys.h index c4cd49d8b..2528df61d 100755 --- a/include/keys.h +++ b/include/keys.h @@ -2,7 +2,7 @@ #define __KEYS_H #ifndef XVT_INCL_DEFS -#include +#include "../xvaga/xvt_defs.h" #endif /* @M */ diff --git a/include/prefix.cpp b/include/prefix.cpp index b39d87b4c..c1f70a780 100755 --- a/include/prefix.cpp +++ b/include/prefix.cpp @@ -949,13 +949,6 @@ TPrefix::TPrefix() : _filelevel(0), _stdlevel(0), _items(0), _firm(NULL) if (!fexist(__ptprf) || strchr(__ptprf, ' ') != NULL) fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf); - if (dongle().demo()) - { - const bool dati_demo = ini_get_bool(CONFIG_STUDIO, "Main", "Demo"); - if (!dati_demo) - fatal_box(FR("Area dati '%s' non utilizzabile in DEMO!"), __ptprf); - } - const TFilename dir(prfx); long primaditta = atol(dir.name()); if (primaditta > 0L && !exist(primaditta)) diff --git a/setup/wizard.h b/setup/wizard.h index fd8f37859..06ad3471a 100755 --- a/setup/wizard.h +++ b/setup/wizard.h @@ -1,7 +1,9 @@ #ifndef __WIZARD_H #define __WIZARD_H +#ifndef __UTILS_H #include "utils.h" +#endif /////////////////////////////////////////////////////////// // CampoWizardPage diff --git a/setup/wxinc.h b/setup/wxinc.h index d9edd6c84..b55fd72f7 100755 --- a/setup/wxinc.h +++ b/setup/wxinc.h @@ -46,4 +46,4 @@ wxString Theme(); #define PRODUCT Product() #define RESELLER Reseller() #define APPNAME Appname() -#define APPVERSION wxT("10.0") \ No newline at end of file +#define APPVERSION wxT("11.0") \ No newline at end of file diff --git a/ssa/h/ssadll.h b/ssa/h/ssadll.h new file mode 100644 index 000000000..aec0bde98 --- /dev/null +++ b/ssa/h/ssadll.h @@ -0,0 +1,26 @@ +#ifndef SSADLL_H +#define SSADLL_H + +#ifndef SSA_EXPORT +#define DECLSPEC __declspec(dllimport) +#else +#define DECLSPEC __declspec(dllexport) +#endif + +extern "C" +{ + DECLSPEC const char* SSA_DecodificaUltimoErrore(); + DECLSPEC int SSA_VerificaModulo(const char* prodotto, const char* modulo); + DECLSPEC int SSA_Login(const char* idClient, const char* prodotto); + DECLSPEC int SSA_ApriModulo(const char* idClient, const char* modulo); + DECLSPEC int SSA_ChiudiModulo(const char* idClient, const char* modulo); + DECLSPEC int SSA_Logout(const char* idClient, const char* prodotto); + DECLSPEC int SSA_Ping(const char* idClient); + + DECLSPEC int SSA_XMLProdottiConfigurati(char* buf, int bufSize); + DECLSPEC int SSA_XMLUtentiCorrenti(char* buf, int bufSize); + DECLSPEC int SSA_Id(char* buf, int bufSize); + DECLSPEC int SSA_NumeroSerie(const char* prodotto); +} + +#endif diff --git a/ssa/h/ssaerr.h b/ssa/h/ssaerr.h new file mode 100644 index 000000000..e32e9ab10 --- /dev/null +++ b/ssa/h/ssaerr.h @@ -0,0 +1,13 @@ + +#define SSA_OK 0 //ok +#define SSA_IDCLIENT_ERRATO -1 //idclient errato +#define SSA_NOTLOADED -100 //file di permessi non caricato (requisiti hw non verificati) +#define SSA_PROD_NOTFOUND -101 //prodotto non trovato +#define SSA_PROD_MAXUSERS -102 //raggiunto numero massimo di connessioni al prodotto +#define SSA_PROD_EXPDATE -103 //superata exp date prodotto + +#define SSA_MOD_NOTFOUND -201 //modulo non trovato +#define SSA_MOD_MAXUSERS -202 //raggiunto numero massimo di connessioni al modulo +#define SSA_MOD_EXPDATE -203 //superata exp date modulo + +#define SSA_UTENTE_NON_LOGGATO -301 //utente non loggato diff --git a/ssa/moduli.txt b/ssa/moduli.txt new file mode 100644 index 000000000..94c806afc --- /dev/null +++ b/ssa/moduli.txt @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ssa/release/SSAAgent.exe b/ssa/release/SSAAgent.exe new file mode 100644 index 000000000..107fe65e4 Binary files /dev/null and b/ssa/release/SSAAgent.exe differ diff --git a/ssa/release/SSACreaLicenza.exe b/ssa/release/SSACreaLicenza.exe new file mode 100644 index 000000000..3d38de744 Binary files /dev/null and b/ssa/release/SSACreaLicenza.exe differ diff --git a/ssa/release/SSADll.dll b/ssa/release/SSADll.dll new file mode 100644 index 000000000..ccd7a965b Binary files /dev/null and b/ssa/release/SSADll.dll differ diff --git a/ssa/release/SSADll.lib b/ssa/release/SSADll.lib new file mode 100644 index 000000000..b68f471f6 Binary files /dev/null and b/ssa/release/SSADll.lib differ diff --git a/ssa/release/SSAGetInfo.exe b/ssa/release/SSAGetInfo.exe new file mode 100644 index 000000000..76f590a4f Binary files /dev/null and b/ssa/release/SSAGetInfo.exe differ diff --git a/ssa/release/TestDll.exe b/ssa/release/TestDll.exe new file mode 100644 index 000000000..3280d3e33 Binary files /dev/null and b/ssa/release/TestDll.exe differ diff --git a/ssa/sicurezza.V1.5.doc b/ssa/sicurezza.V1.5.doc new file mode 100644 index 000000000..b25a25e65 Binary files /dev/null and b/ssa/sicurezza.V1.5.doc differ diff --git a/ssa/ssa.ini b/ssa/ssa.ini new file mode 100644 index 000000000..136d79ebf --- /dev/null +++ b/ssa/ssa.ini @@ -0,0 +1,15 @@ +# LIVELLO DI DEBUG +# 0 = No debug +# 1 = Livello ERRORE +# 2 = Livello ERRORE + INFO +# 3 = Livello ERRORE + INFO + DEBUG +SSA-DEBUG=2 + +# ATTIVAZIONE MODALITA' CLIENT-SERVER +# IP_SERVER:PORTA +SSA-PORT=127.0.0.1:1234 + +#Tempo in secondi dopo il quale un utente puo' essere dichiarato scaduto +PING-MAXTIME=300 +#Tempo in secondi ogni quanto pingare +PING-DELAY=60 diff --git a/ssa/test.bat b/ssa/test.bat new file mode 100644 index 000000000..259dec8f2 --- /dev/null +++ b/ssa/test.bat @@ -0,0 +1,23 @@ +copy release\SsaDll.dll test\client +copy release\TestDll.exe test\client +copy release\SSAGetInfo.exe test\client +copy release\SSACreaLicenza.exe test\client + +copy ssa.ini test\client + +cd test\client + +del ssa.log + +rem -pause per farlo fermare +rem -dump per dumpare lo stato +rem -generalicenza per generare il file di licenze da zero +rem -loop n ripete il test n volte. +rem -sleep n dorme n secondi tra un loop e l'altro + +rem TestDll.exe -pause -dump -generalicenza -loop 5 +TestDll.exe -generalicenza -loop 10 -pause + +pause +more ssa.log +cd..\.. diff --git a/ssa/testServer.bat b/ssa/testServer.bat new file mode 100644 index 000000000..4f0e64ef7 --- /dev/null +++ b/ssa/testServer.bat @@ -0,0 +1,24 @@ +copy release\SsaDll.dll test\server +copy release\TestDll.exe test\server +copy release\SSAGetInfo.exe test\server +copy release\SSACreaLicenza.exe test\server +copy release\SSAAgent.exe test\server + +copy ssa.ini test\server + +cd test\server + +del ssa.log + +rem -pause per farlo fermare +rem -dump per dumpare lo stato +rem -generalicenza per generare il file di licenze da zero +rem -loop n ripete il test n volte. +rem -sleep n dorme n secondi tra un loop e l'altro + +TestDll.exe -generalicenza -loop -1 +SSAAgent.exe + +pause +more ssa.log +cd..\.. diff --git a/xvaga/agasys.cpp b/xvaga/agasys.cpp index fe62db611..abc610eda 100755 --- a/xvaga/agasys.cpp +++ b/xvaga/agasys.cpp @@ -80,7 +80,10 @@ bool aga_unzip(const char* zipfile, const char* destdir) } else { - wxZipInputStream fin(zipfile, strFileName); + wxFileInputStream file(zipfile); + wxZipInputStream fin(file); + wxZipEntry entry(strFileName); + fin.OpenEntry(entry); wxString strOutFile = destdir; if (!wxEndsWithPathSeparator(strOutFile) && !wxIsPathSeparator(strFileName[0])) diff --git a/xvaga/wxinc.h b/xvaga/wxinc.h index 686a7d701..4f575f950 100755 --- a/xvaga/wxinc.h +++ b/xvaga/wxinc.h @@ -10,15 +10,8 @@ #define WINVER 0x0500 #define STRICT #define WXUSINGDLL 1 +#endif + #include -#else -#define _FILE_OFFSET_BITS 64 -#define _LARGE_FILES -#define __WXGTK__ -#define GTK_NO_CHECK_CASTS -#define _IODBC -#include -#endif - -#endif +#endif \ No newline at end of file diff --git a/xvaga/xvt_ssa.cpp b/xvaga/xvt_ssa.cpp index 9fdd9cf72..d879d8ac2 100644 --- a/xvaga/xvt_ssa.cpp +++ b/xvaga/xvt_ssa.cpp @@ -1,8 +1,8 @@ #include "wxinc.h" #include "xvt.h" -#include "../../ssa/h/ssadll.h" -#include "../../ssa/h/ssaerr.h" +#include "../ssa/h/ssadll.h" +#include "../ssa/h/ssaerr.h" #include diff --git a/xvaga/xvtdm.cpp b/xvaga/xvtdm.cpp index b12fc2677..8ee2bfda9 100755 --- a/xvaga/xvtdm.cpp +++ b/xvaga/xvtdm.cpp @@ -251,18 +251,19 @@ TMessageBox::TMessageBox(wxWindow* pParent, const wxString& msg, int nStyle, int if (!bTerminalino) { const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR); - if (nAssYear > 2091) + if (nAssYear >= 2121) { const wxBitmap bmpCopy = wxArtProvider::GetBitmap(wxART_COPY, wxART_BUTTON); wxBitmapButton* btnCopy = new wxBitmapButton(this, wxID_COPY, bmpCopy); pSmallSizer->Add(btnCopy, 0, wxALIGN_TOP); - + /* if (xvt_mail_installed()) { const wxBitmap bmpMail = wxArtProvider::GetBitmap("139", wxART_BUTTON, wxSize(bmpCopy.GetWidth(), bmpCopy.GetHeight())); wxBitmapButton* btnMail = new wxBitmapButton(this, wxID_SAVEAS, bmpMail); pSmallSizer->Add(btnMail, 0, wxALIGN_TOP); } + */ } } diff --git a/xvaga/xvtwin.cpp b/xvaga/xvtwin.cpp index db058408c..40ac8923b 100755 --- a/xvaga/xvtwin.cpp +++ b/xvaga/xvtwin.cpp @@ -594,14 +594,14 @@ void TwxWindow::OnChar(wxKeyEvent& evt) } break; case WXK_NUMPAD_ADD: k = '+';break; - case WXK_DOWN : k = K_DOWN; break; - case WXK_END : k = K_LEND; break; - case WXK_HOME : k = K_LHOME; break; - case WXK_LEFT : k = K_LEFT; break; - case WXK_NEXT : k = K_NEXT; break; - case WXK_PRIOR: k = K_PREV; break; - case WXK_RIGHT: k = K_RIGHT; break; - case WXK_UP : k = K_UP; break; + case WXK_DOWN : k = K_DOWN; break; + case WXK_END : k = K_LEND; break; + case WXK_HOME : k = K_LHOME; break; + case WXK_LEFT : k = K_LEFT; break; + case WXK_PAGEDOWN : k = K_NEXT; break; + case WXK_PAGEUP : k = K_PREV; break; + case WXK_RIGHT : k = K_RIGHT; break; + case WXK_UP : k = K_UP; break; case WXK_TAB: if (evt.ShiftDown()) k = K_BTAB;