Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Riportata la verione 98.01.04 sul main trunk


git-svn-id: svn://10.65.10.50/trunk@6984 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1998-08-25 17:46:29 +00:00
parent 6ba68de641
commit 4b004eff90
26 changed files with 2340 additions and 1386 deletions

View File

@ -327,10 +327,10 @@ const char* TColor_mask::cid2name(short cid) const
COLOR TColor_mask::cid2color(short cid) const COLOR TColor_mask::cid2color(short cid) const
{ {
COLOR color[] = { COLOR_DKCYAN, COLOR_CYAN, COLOR_GRAY, COLOR color[] = { COLOR_LTGRAY, COLOR_WHITE, COLOR_GRAY,
COLOR_BLACK, COLOR_WHITE, COLOR_BLACK, COLOR_WHITE,
COLOR_BLACK, COLOR_CYAN, COLOR_BLACK, COLOR_YELLOW,
COLOR_GRAY, COLOR_DKCYAN, COLOR_DKGRAY, COLOR_LTGRAY,
COLOR_LTGRAY, COLOR_WHITE, COLOR_GRAY}; COLOR_LTGRAY, COLOR_WHITE, COLOR_GRAY};
const int i = cid - 101; const int i = cid - 101;
@ -1395,6 +1395,8 @@ bool TMenu_application::create()
#ifndef _DEMO_ #ifndef _DEMO_
if (!check_user()) if (!check_user())
return FALSE; return FALSE;
#else
enable_menu_item(M_FONT);
#endif #endif
set_perms(); set_perms();

View File

@ -54,7 +54,7 @@ protected:
virtual void print(); virtual void print();
virtual void do_print(TPrinter & p, TRec_sheet & r); virtual void do_print(TPrinter & p, TRec_sheet & r);
const char* dumpfilename(const FileDes& dep) const; const char* dumpfilename(const FileDes& dep) const;
void load_des(); void load_des(const int maxfidr = 0);
void open_history(); void open_history();
void put_history(const char* firm); void put_history(const char* firm);
void close_history(); void close_history();
@ -625,8 +625,9 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
} }
switch (tasto) switch (tasto)
{ {
case K_F5: case K_F5:
{ if (logicnum > 1)
{
TSystemisamfile f(logicnum); TSystemisamfile f(logicnum);
f.packfile(); f.packfile();
f.packindex(); f.packindex();
@ -645,57 +646,57 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
packapp.run(FALSE,FALSE); packapp.run(FALSE,FALSE);
} }
#endif #endif
}
break;
case K_F6:
{
_rec = new TRec_sheet(logicnum, _mask->get(F_TAB));
_rec->edit();
delete _rec;
_rec = NULL;
}
break;
case K_F7:
{
TMask m("ba1100b");
TFilename nout(dumpfilename(dep));
m.set(FLD_OUTFILE, nout);
if (m.run() == K_ENTER)
{
nout = m.get(FLD_OUTFILE);
if (nout.not_empty())
{
TSystemisamfile f(logicnum);
const char fs = *esc(m.get(FLD_FS));
const char fd = *esc(m.get(FLD_FD));
const char rs = *esc(m.get(FLD_RS));
const bool withdel = m.get_bool(FLD_WITHDEL);
const int keyno = m.get_int(FLD_KEYNO);
f.dump(nout, keyno, fs, fd, rs, withdel);
}
} }
} break;
break; case K_F6:
case K_F8: {
{ _rec = new TRec_sheet(logicnum, _mask->get(F_TAB));
TMask m("ba1100c"); _rec->edit();
TFilename ninp(dumpfilename(dep)); delete _rec;
m.set(FLD_INFILE, ninp); _rec = NULL;
if (m.run() == K_ENTER) }
{ break;
TSystemisamfile f(logicnum); case K_F7:
char fs = *esc(m.get(FLD_FS)); {
char fd = *esc(m.get(FLD_FD)); TMask m("ba1100b");
char rs = *esc(m.get(FLD_RS));
ninp = m.get(FLD_INFILE); TFilename nout(dumpfilename(dep));
f.load(ninp, fs, fd, rs); m.set(FLD_OUTFILE, nout);
}
} if (m.run() == K_ENTER)
break; {
default: nout = m.get(FLD_OUTFILE);
break; if (nout.not_empty())
{
TSystemisamfile f(logicnum);
const char fs = *esc(m.get(FLD_FS));
const char fd = *esc(m.get(FLD_FD));
const char rs = *esc(m.get(FLD_RS));
const bool withdel = m.get_bool(FLD_WITHDEL);
const int keyno = m.get_int(FLD_KEYNO);
f.dump(nout, keyno, fs, fd, rs, withdel);
}
}
}
break;
case K_F8:
{
TMask m("ba1100c");
TFilename ninp(dumpfilename(dep));
m.set(FLD_INFILE, ninp);
if (m.run() == K_ENTER)
{
TSystemisamfile f(logicnum);
char fs = *esc(m.get(FLD_FS));
char fd = *esc(m.get(FLD_FD));
char rs = *esc(m.get(FLD_RS));
ninp = m.get(FLD_INFILE);
f.load(ninp, fs, fd, rs);
}
}
break;
default:
break;
} }
} }
default: default:
@ -1027,7 +1028,7 @@ void TManutenzione_app::convert_dir()
TProgind p(update_items ? update_items : 1, s, FALSE, TRUE, 70); TProgind p(update_items ? update_items : 1, s, FALSE, TRUE, 70);
p.setstatus(1); p.setstatus(1);
for (int i = 2; i <= update_items; i++) for (int i = 2; i <= update_items; i++)
{ {
p.addstatus(1); p.addstatus(1);
// prefix().set(""); // prefix().set("");
@ -1131,7 +1132,7 @@ void TManutenzione_app::convert_dir()
put_history(pref); put_history(pref);
} }
void TManutenzione_app::load_des() void TManutenzione_app::load_des(const int maxfdir)
{ {
const TString pref(prefix().name()); const TString pref(prefix().name());
@ -1206,7 +1207,7 @@ void TManutenzione_app::load_des()
/* /*
// Aggiorna il numero di files presenti in totale nel direttorio // Aggiorna il numero di files presenti in totale nel direttorio
if (last_newln > items) // rialloca openf altrimenti la TPrefix::closeall() provoca un grazioso errore in applicazione if (last_newln > maxfdir) // rialloca openf altrimenti la TPrefix::closeall() provoca un grazioso errore in applicazione
{ {
isfdptr *newopenf = new isfdptr[last_newln]; isfdptr *newopenf = new isfdptr[last_newln];
for (int i = 0; i<last_newln; i++) for (int i = 0; i<last_newln; i++)
@ -1328,8 +1329,11 @@ void TManutenzione_app::update()
do_events(); do_events();
begin_wait(); begin_wait();
TDir d;
d.get(LF_DIR,_nolock, _nordir,_sysdirop);
const int maxfdir = d.items();
prefix().set(""); prefix().set("");
load_des(); load_des(maxfdir);
prefix().set_codditta(0L); prefix().set_codditta(0L);
/* if (prefix().filelevel() <= 199502L) /* if (prefix().filelevel() <= 199502L)
{ {

View File

@ -256,6 +256,7 @@ protected:
static bool change_assist_handler(TMask_field&, KEY key); static bool change_assist_handler(TMask_field&, KEY key);
static bool assist_handler(TMask_field& fld, KEY key); static bool assist_handler(TMask_field& fld, KEY key);
static bool print_handler(TMask_field& fld, KEY key); static bool print_handler(TMask_field& fld, KEY key);
static bool printlist_handler(TMask_field& fld, KEY key);
static bool aggiorna_listino_handler(TMask_field& fld, KEY key); static bool aggiorna_listino_handler(TMask_field& fld, KEY key);
static bool modifica_listino_handler(TMask_field& fld, KEY key); static bool modifica_listino_handler(TMask_field& fld, KEY key);
static bool aga_handler(TMask_field& fld, KEY key); static bool aga_handler(TMask_field& fld, KEY key);
@ -266,6 +267,7 @@ protected:
protected: protected:
void print_request(); void print_request();
void print_answer(); void print_answer();
void print_listino();
public: public:
virtual void print(); virtual void print();
@ -727,6 +729,14 @@ bool TAttivazione_moduli::print_handler(TMask_field& fld, KEY key)
return TRUE; return TRUE;
} }
bool TAttivazione_moduli::printlist_handler(TMask_field& fld, KEY key)
{
if (key == K_SPACE)
app().print_listino();
return TRUE;
}
bool TAttivazione_moduli::aga_handler(TMask_field& fld, KEY key) bool TAttivazione_moduli::aga_handler(TMask_field& fld, KEY key)
{ {
if (key == K_SPACE) if (key == K_SPACE)
@ -996,7 +1006,12 @@ bool TAttivazione_moduli::aggiorna_listino_handler(TMask_field& fld, KEY key)
} }
} }
if (ok) if (ok)
ok = ini.update_prices(name); {
if (ok = ini.update_prices(name))
message_box("Listino aggiornato");
else
message_box("Listino già aggiornato");
}
} }
return ok; return ok;
} }
@ -1135,7 +1150,6 @@ void TAttivazione_moduli::print_answer()
if (found == 0) if (found == 0)
{ {
printer().open(); printer().open();
form.update_serno(_msk->get(F_SN));
} }
str.format("%3d", ++found); str.format("%3d", ++found);
@ -1189,6 +1203,74 @@ void TAttivazione_moduli::print_answer()
} }
void TAttivazione_moduli::print_listino()
{
TRequest_form form("ba1500a");
TForm_item& num = form.find_field('B', odd_page, 101);
TForm_item& descr = form.find_field('B', odd_page, 102);
TForm_item& codice = form.find_field('B', odd_page, 103);
TForm_item& price = form.find_field('B', odd_page, 104);
TForm_item& manut = form.find_field('B', odd_page, 105);
TInstall_ini ini;
ini.write_protect();
const bool special = _wanted_assist > ::dongle().year_assist() || _wanted_users != 0;
const word users = max(_wanted_users, ::dongle().max_users());
TWait_cursor hourglass;
TSheet_field& sheet = _msk->sfield(F_MODULI);
{
int found = 0;
TString str;
real full, assist;
FOR_EACH_SHEET_ROW(sheet, r, row)
{
const int module = row->get_int(2) ;
const bool active = ::dongle().active(module);
str = _im->get_name(module);
ini.prices(str, users, full, assist, FALSE);
if (!full.is_zero() || ! assist.is_zero())
{
if (found++ == 0)
{
printer().open();
form.find_field('H',odd_page,1).set("LISTINO");
num.set("");
str.format("Numero utenti: %u", users );
descr.set(str);
form.print(-1);
}
price.set(full.string());
manut.set(assist.string());
str.format("%3d", found);
num.set(str);
str = row->get(0);
descr.set(str);
str = "";
codice.set(str);
form.print(-1);
}
}
if (found)
{
form.print_footer();
printer().close();
}
}
}
void TAttivazione_moduli::print() void TAttivazione_moduli::print()
{ {
if (::dongle().type() == _user_dongle) if (::dongle().type() == _user_dongle)
@ -1214,6 +1296,7 @@ bool TAttivazione_moduli::create()
_msk->set_handler(F_CHANGEUSERS, change_users_handler); _msk->set_handler(F_CHANGEUSERS, change_users_handler);
_msk->set_handler(F_CHANGEASSIST, change_assist_handler); _msk->set_handler(F_CHANGEASSIST, change_assist_handler);
_msk->set_handler(F_PRINT, print_handler); _msk->set_handler(F_PRINT, print_handler);
_msk->set_handler(F_PRINTLIST, printlist_handler);
_msk->set_handler(F_AGGLISTINO, aggiorna_listino_handler); _msk->set_handler(F_AGGLISTINO, aggiorna_listino_handler);
if (::dongle().type() == _aga_dongle) if (::dongle().type() == _aga_dongle)
{ {

View File

@ -19,6 +19,7 @@
#define F_AGA 219 #define F_AGA 219
#define F_AGGLISTINO 220 #define F_AGGLISTINO 220
#define F_MODLISTINO 221 #define F_MODLISTINO 221
#define F_PRINTLIST 222
#define F_NOMEMOD 101 #define F_NOMEMOD 101
#define F_ENABLE 102 #define F_ENABLE 102

View File

@ -84,6 +84,11 @@ BEGID
PROMPT 1 3 "Aggiorna listino" PROMPT 1 3 "Aggiorna listino"
END END
BUTTON F_PRINTLIST 18 1
BEGIN
PROMPT 22 3 "Stampa Listino"
END
BUTTON F_MODLISTINO 18 BUTTON F_MODLISTINO 18
BEGID BEGID
PROMPT 1 4 "Modifica listino" PROMPT 1 4 "Modifica listino"

View File

@ -14,15 +14,50 @@
#include "ba1600.h" #include "ba1600.h"
#include "ba1600a.h" #include "ba1600a.h"
int find(const TString& name, TString_array & rows) ;
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Configurazione per installazione // Configurazione per installazione
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TCreazione_dischi : public TSkeleton_application
{
protected:
virtual bool use_files() const { return FALSE; }
virtual void main_loop();
public:
virtual bool modify_mode() { return FALSE;}
};
class TFascicolator : public TCreazione_dischi
{
protected:
virtual bool use_files() const { return FALSE; }
virtual void main_loop();
public:
virtual bool modify_mode() { return TRUE;}
};
class TFconv_ini : public TConfig
{
public:
void export_module(const char* module, const char* summary);
TFconv_ini(const char* path = "fconv.ini") : TConfig(path) { }
virtual ~TFconv_ini() { }
};
// costruisce la lista del modulo e dei suoi sottomoduli interni
int TInstall_ini::build_list(const TString& module, TString_array& a, int TInstall_ini::build_list(const TString& module, TString_array& a,
const char* sommario, bool agg) const char* sommario, bool agg)
{ {
CHECKS(module.len() >= 2 || module[0]=='_', "Bad module ", (const char*)module); CHECKS(module.len() >= 2 || module[0]=='_', "Bad module ", (const char*)module);
TConfig* sum = NULL; TConfig* sum = NULL;
if (sommario && *sommario) if (sommario && *sommario)
sum = new TConfig(sommario, module); sum = new TConfig(sommario, module);
@ -92,26 +127,106 @@ int TInstall_ini::build_complete_list(const TString& module, TString_array& a,
return a.items(); return a.items();
} }
void TInstall_ini::export_paragraph(const char* module, const char* summary) void TInstall_ini::export_paragraph(const char* module, const char* summary,const bool remove_old)
{ {
CHECK(module && *module > ' ', "Can't export NULL module"); CHECK(module && *module > ' ', "Can't export NULL module");
CHECK(summary && *summary > ' ', "Can't export to NULL .ini"); CHECK(summary && *summary > ' ', "Can't export to NULL .ini");
TConfig sum(summary, module); TInstall_ini sum(summary, module);
sum.remove_all(); TString_array old_list;
int last_file_num=0;
const bool is_submodule=(module[2]!='\0');
const int submodule=(module[2]-'0');
char main_module[3]={0,0,0};
strncpy(main_module, module,2);
if (remove_old || !is_submodule )
{
// substitute...
sum.remove_all();
} else {
// merge...
sum.build_list(main_module, old_list);
sum.set_paragraph(module);
last_file_num=old_list.items();
}
TAssoc_array& ass = list_variables(module); TAssoc_array& ass = list_variables(module);
TString newkey,tmps;
TToken_string item_value;
TString ;
FOR_EACH_ASSOC_STRING(ass, obj, key, str) FOR_EACH_ASSOC_STRING(ass, obj, key, str)
sum.set(key, str); {
if (!remove_old && is_submodule && strncmp(key, "File", 4)==0 )
{
// merging "File(X)" items...
item_value=str;
tmps=item_value.get(0);
int item_number=find(tmps, old_list);
if (item_number>=0)
{
// file sostituito
TString old_smodule(old_list.row(item_number).get(2));
TAssoc_array& oldvars = sum.list_variables(old_smodule);
THash_object* obj;
TToken_string oldvalue;
oldvars.restart();
do {
obj=oldvars.get_hashobj();
oldvalue=((TString &)obj->obj());
if (tmps == oldvalue.get(0))
break;
} while (obj);
newkey=obj->key();
if (old_smodule!=module)
{
// devo cancellare il file dal vecchio sottomodulo
sum.set_paragraph(old_smodule);
sum.remove(newkey);
sum.set_paragraph(module);
}
} else {
// nuovo file
newkey = "File";
newkey << '(' << last_file_num++ << ')';
}
sum.set(newkey, str);
} else {
sum.set(key, str);
}
}
} }
void TInstall_ini::export_module_paragraphs(const char* module, const char* summary) void TInstall_ini::export_module_paragraphs(const char* module, const char* summary, const bool remove_old)
{ {
// esporta le info di composizione del modulo
TString mod; TString mod;
for (int sub = -1; sub <= 9; sub++) for (int sub = -1; sub <= 9; sub++)
{ {
mod = module; mod = module;
if (sub >= 0) mod << sub; if (sub >= 0) mod << sub;
if (set_paragraph(mod)) if (set_paragraph(mod))
export_paragraph(mod, summary); export_paragraph(mod, summary,remove_old);
}
if (remove_old)
{
// esporta le info di conversione
TFilename path;
TInstall_ini inst(summary);
if (inst.name()==inst.default_name())
{
path = inst.name().path();
path.add(module); path << "fconv.ini";
TFconv_ini fconv(path);
fconv.export_module(module, "fconv.ini");
}
else
{
TFconv_ini fconv; //
path = inst.name().path();
path.add(module); path << "fconv.ini";
fconv.export_module(module, path);
}
} }
} }
@ -170,7 +285,6 @@ bool TInstall_ini::update_prices(const char* from)
const TDate from_date(from_ini.get("Listino","Main")); const TDate from_date(from_ini.get("Listino","Main"));
if (from_date < curr_date) if (from_date < curr_date)
return FALSE; return FALSE;
set("Listino", from_date); set("Listino", from_date);
TString_array modules; TString_array modules;
@ -190,7 +304,7 @@ bool TInstall_ini::update_prices(const char* from)
} }
void TInstall_ini::prices(const char* module, word users, void TInstall_ini::prices(const char* module, word users,
real& full, real& assist) real& full, real& assist, bool correct_ass)
{ {
real last_pac, last_ass; real last_pac, last_ass;
full = assist = 0.0; full = assist = 0.0;
@ -206,7 +320,7 @@ void TInstall_ini::prices(const char* module, word users,
if (last_ass < 50000.0) if (last_ass < 50000.0)
last_ass *= 1000.0; last_ass *= 1000.0;
const int mese = TDate(TODAY).month(); const int mese = TDate(TODAY).month();
last_ass = last_ass * (12-mese) / 12; last_ass = last_ass * (correct_ass ? (12-mese) / 12 : 1);
last_ass.round(-3); last_ass.round(-3);
} }
full += last_pac; full += last_pac;
@ -218,15 +332,6 @@ void TInstall_ini::prices(const char* module, word users,
// TFconv_ini // TFconv_ini
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TFconv_ini : public TConfig
{
public:
void export_module(const char* module, const char* summary);
TFconv_ini(const char* path = "fconv.ini") : TConfig(path) { }
virtual ~TFconv_ini() { }
};
void TFconv_ini::export_module(const char* module, const char* summary) void TFconv_ini::export_module(const char* module, const char* summary)
{ {
TScanner scanner("prassi.aut"); TScanner scanner("prassi.aut");
@ -301,29 +406,16 @@ protected:
static bool link_handler(TMask_field& f, KEY k); static bool link_handler(TMask_field& f, KEY k);
static bool deselect_handler(TMask_field& f, KEY k); static bool deselect_handler(TMask_field& f, KEY k);
bool find(const TString& name) const;
bool kill_missing(const char* name, bool update); bool kill_missing(const char* name, bool update);
public: public:
void load(const TString& module); void load(const TString& module);
void save(); void save();
TMod_composition_msk(); TMod_composition_msk(const bool modify_mode=FALSE);
virtual ~TMod_composition_msk() { } virtual ~TMod_composition_msk() { }
}; };
// Cerca un file nello sheet principale
bool TMod_composition_msk::find(const TString& name) const
{
TSheet_field& sf = sfield(F_SHEET);
FOR_EACH_SHEET_ROW_BACK(sf, r, row)
{
if (name.compare(row->get(0), -1, TRUE) == 0)
break;
}
return r >= 0;
}
// Toglie il file dallo sheet dei mancanti // Toglie il file dallo sheet dei mancanti
bool TMod_composition_msk::kill_missing(const char* name, bool update) bool TMod_composition_msk::kill_missing(const char* name, bool update)
{ {
@ -359,6 +451,7 @@ bool TMod_composition_msk::sheet_notify(TSheet_field& sf, int r, KEY key)
if (items > 0) if (items > 0)
{ {
TMod_composition_msk& msk = (TMod_composition_msk&)sf.mask(); TMod_composition_msk& msk = (TMod_composition_msk&)sf.mask();
TString_array & rows=msk.sfield(F_SHEET).rows_array();
TString16 module = sf.row(r).get(2); TString16 module = sf.row(r).get(2);
if (module.len() < 3) if (module.len() < 3)
@ -379,7 +472,7 @@ bool TMod_composition_msk::sheet_notify(TSheet_field& sf, int r, KEY key)
msk.kill_missing(file, FALSE); msk.kill_missing(file, FALSE);
if (!msk.find(file)) if (::find(file,rows)>=0)
{ {
TToken_string& row = sf.row(found ? -1 : r); TToken_string& row = sf.row(found ? -1 : r);
row = file; row = file;
@ -668,20 +761,27 @@ void TMod_composition_msk::save()
} }
TMod_composition_msk::TMod_composition_msk() TMod_composition_msk::TMod_composition_msk(const bool modify_mode)
: TMask("ba1600b") : TMask("ba1600b")
{ {
set_handler(F_DESELECT, deselect_handler);
TSheet_field& s = sfield(F_SHEET); TSheet_field& s = sfield(F_SHEET);
s.set_notify(sheet_notify);
s.sheet_mask().set_handler(S_FILE, file_handler);
s.sheet_mask().set_handler(DLG_EDIT, edit_handler);
TSheet_field& miss = sfield(F_MISSING); TSheet_field& miss = sfield(F_MISSING);
miss.set_notify(missing_notify); set_handler(F_DESELECT, deselect_handler);
miss.disable(); // Read-only sheet if (modify_mode)
miss.sheet_mask().set_handler(100, link_handler); {
s.set_notify(sheet_notify);
s.sheet_mask().set_handler(S_FILE, file_handler);
s.sheet_mask().set_handler(DLG_EDIT, edit_handler);
miss.disable(); // Read-only sheet
miss.set_notify(missing_notify);
miss.sheet_mask().set_handler(100, link_handler);
} else {
s.disable(); // Read-only sheet
//hide(DLG_OK);
// hide(F_DESELECT);
//hide(DLG_CANCEL);
miss.hide();
}
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -704,37 +804,60 @@ public:
// Maschera principale // Maschera principale
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TFascicolator_mask : public TMask class TCreadischi_mask : public TMask
{ {
protected: protected:
static bool confirm_handler(TMask_field& f, KEY k); static bool confirm_handler(TMask_field& f, KEY k);
static bool list_handler(TMask_field& f, KEY k); static bool list_handler(TMask_field& f, KEY k);
static bool save_handler(TMask_field& f, KEY k); static bool confirm_handler(TMask_field& f, KEY k);
static bool creazip_handler(TMask_field& f, KEY k);
static bool modules_notify(TSheet_field& f, int row, KEY k);
static bool import_export_handler(TMask_field& f, KEY k); static bool import_export_handler(TMask_field& f, KEY k);
static bool modules_notify(TSheet_field& f, int row, KEY k); virtual const TFilename& build_export_path(TFilename& path) const;
bool zip_file(const char* archive, const char* file) const;
int split_file(const TFilename& file, long size) const;
bool move_file(const TFilename& file, const char* dir) const;
bool zip_module(const TString& module, bool agg, int patch_level) const;
const TFilename& build_export_path(TFilename& path) const;
virtual bool zip_file(const char* archive, const char* file) const;
virtual int split_file(const TFilename& file, long size) const;
virtual bool move_file(const TFilename& file, const char* dir) const;
virtual bool zip_module(const TString& module, bool agg, int patch_level) const;
virtual bool set_version_info(const TFilename& filename,
TInstall_ini& ini, const char* module) const;
virtual bool show_all_modules() {return FALSE;}
public:
virtual void save();
virtual void load();
TCreadischi_mask();
virtual ~TCreadischi_mask() { }
};
class TFascicolator_mask : public TCreadischi_mask
{
long find_signature(const TFilename& filename, const char* signature) const; long find_signature(const TFilename& filename, const char* signature) const;
bool set_version_info(const TFilename& filename,
protected:
static bool list_handler(TMask_field& f, KEY k);
static bool confirm_handler(TMask_field& f, KEY k);
static bool patchl_handler(TMask_field& f, KEY k);
// fuinzioni per la "firma" del file con il numero di release
virtual bool set_version_info(const TFilename& filename,
TInstall_ini& ini, const char* module) const; TInstall_ini& ini, const char* module) const;
virtual bool show_all_modules() {return TRUE;}
public: public:
void load(); virtual void save();
void save();
TFascicolator_mask(); TFascicolator_mask();
virtual ~TFascicolator_mask() { } virtual ~TFascicolator_mask() { }
}; };
bool TFascicolator_mask::modules_notify(TSheet_field& f, int row, KEY k) bool TCreadischi_mask::modules_notify(TSheet_field& f, int row, KEY k)
{ {
bool ok = TRUE; bool ok = TRUE;
if (k == K_INS || k == K_DEL) if (k == K_INS || k == K_DEL)
@ -861,17 +984,35 @@ bool TFascicolator_mask::patchl_handler(TMask_field& f, KEY k)
} }
bool TCreadischi_mask::list_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
TModule_mask& m = (TModule_mask&)f.mask();
const TString& module = m.get(S_MODULE);
if (module.not_empty())
{
TMod_composition_msk mm;
mm.load(module);
if (mm.run() == K_ENTER)
mm.save();
}
}
return TRUE;
}
bool TFascicolator_mask::list_handler(TMask_field& f, KEY k) bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
{ {
if (k == K_SPACE) if (k == K_SPACE)
{ {
TModule_mask& m = (TModule_mask&)f.mask(); TModule_mask& m = (TModule_mask&)f.mask();
const TString& module = m.get(S_MODULE); const TString& module = m.get(S_MODULE);
const int patchlev = m.get_int(S_PATCHLEVEL);
if (module.not_empty()) if (module.not_empty())
{ {
TMod_composition_msk mm; TMod_composition_msk mm(TRUE);
mm.load(module); mm.load(module);
if (mm.run() == K_ENTER) if (mm.run() == K_ENTER)
mm.save(); mm.save();
@ -882,6 +1023,15 @@ bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
return TRUE; return TRUE;
} }
bool TCreadischi_mask::confirm_handler(TMask_field& f, KEY k)
{
return TRUE;
}
bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k) bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
{ {
if (k == K_SPACE) if (k == K_SPACE)
@ -914,7 +1064,7 @@ bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
if (patchlevel>0 && m.check_needed()) if (patchlevel>0 && m.check_needed())
{ {
// controlla le consistenze tra patch di moduli diversi intrinsecamente correlati // controlla le consistenze tra patch di moduli diversi intrinsecamente correlati
TMod_composition_msk mc; TMod_composition_msk mc;
mc.load(module); mc.load(module);
m.check_patchlevels(mc); m.check_patchlevels(mc);
} }
@ -923,22 +1073,30 @@ bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
} }
bool TFascicolator_mask::save_handler(TMask_field& f, KEY k) bool TCreadischi_mask::creazip_handler(TMask_field& f, KEY k)
{ {
if (k == K_SPACE) if (k == K_SPACE)
{ {
confirm_handler(f, K_SPACE); confirm_handler(f, K_SPACE);
TMask& m = f.mask(); TMask& m = f.mask();
const TString& module = m.get(S_MODULE); const TString& module = m.get(S_MODULE);
const bool agg = f.dlg() == S_SAVEAGG; const bool agg = f.dlg() == S_CREATEPATCH;
TFascicolator_mask& fm = (TFascicolator_mask&)m.get_sheet()->mask(); TCreadischi_mask& fm = (TCreadischi_mask&)m.get_sheet()->mask();
fm.zip_module(module, agg, m.get_int(S_PATCHLEVEL)); if (fm.zip_module(module, agg, m.get_int(S_PATCHLEVEL)))
{
// creazione XXfconv.ini (esporta le info di conversione )
TFilename fconv_path;
TFconv_ini fconv; //
fconv_path = fm.get(F_DISKPATH);
fconv_path.add(module); fconv_path << "fconv.ini";
fconv.export_module(module, fconv_path);
}
} }
return TRUE; return TRUE;
} }
bool TFascicolator_mask::import_export_handler(TMask_field& f, KEY k) bool TCreadischi_mask::import_export_handler(TMask_field& f, KEY k)
{ {
if (k == K_SPACE) if (k == K_SPACE)
{ {
@ -946,7 +1104,7 @@ bool TFascicolator_mask::import_export_handler(TMask_field& f, KEY k)
const TMask& m = f.mask(); const TMask& m = f.mask();
const TString& module = m.get(S_MODULE); const TString& module = m.get(S_MODULE);
const TFascicolator_mask& fm = (const TFascicolator_mask&)m.get_sheet()->mask(); const TCreadischi_mask& fm = (const TCreadischi_mask&)m.get_sheet()->mask();
TFilename path = module; TFilename path = module;
fm.build_export_path(path); fm.build_export_path(path);
@ -974,29 +1132,29 @@ bool TFascicolator_mask::import_export_handler(TMask_field& f, KEY k)
if (is_export) if (is_export)
{ {
TInstall_ini inst; TInstall_ini inst;
inst.export_module_paragraphs(module, path); inst.export_module_paragraphs(module, path,TRUE);
TFconv_ini fconv; /*TFconv_ini fconv;
path = path.path(); path = path.path();
path.add(module); path << "fconv.ini"; path.add(module); path << "fconv.ini";
fconv.export_module(module, path); fconv.export_module(module, path);*/
} }
else else
{ {
TInstall_ini ini(path); TInstall_ini ini(path);
ini.export_module_paragraphs(module, ini.default_name()); ini.export_module_paragraphs(module, ini.default_name(),TRUE);
path = path.path(); /*path = path.path();
path.add(module); path << "fconv.ini"; path.add(module); path << "fconv.ini";
TFconv_ini fconv(path); TFconv_ini fconv(path);
fconv.export_module(module, "fconv.ini"); fconv.export_module(module, "fconv.ini");*/
} }
} }
} }
return TRUE; return TRUE;
} }
const TFilename& TFascicolator_mask::build_export_path(TFilename& path) const const TFilename& TCreadischi_mask::build_export_path(TFilename& path) const
{ {
CHECK(path.not_empty(), "Please, specify the module"); CHECK(path.not_empty(), "Please, specify the module");
const TString module(path); const TString module(path);
@ -1019,7 +1177,7 @@ const TFilename& TFascicolator_mask::build_export_path(TFilename& path) const
return path; return path;
} }
void TFascicolator_mask::load() void TCreadischi_mask::load()
{ {
TWait_cursor hourglass; TWait_cursor hourglass;
TSheet_field& s = sfield(F_SHEET); TSheet_field& s = sfield(F_SHEET);
@ -1036,10 +1194,13 @@ void TFascicolator_mask::load()
FOR_EACH_ARRAY_ROW(modules, m, riga) FOR_EACH_ARRAY_ROW(modules, m, riga)
{ {
const TString& module = *riga; const TString& module = *riga;
if (module[0] == '_' || module.len() == 2) ini.set_paragraph(module);
tmp = ini.get("Versione");
if (module[0] == '_' || // linea di descrizione area
(module.len() == 2 && // linea di modulo principale
(!tmp.blank() || show_all_modules())))
{ {
TToken_string& row = s.row(-1); TToken_string& row = s.row(-1);
ini.set_paragraph(module);
row = ini.get("Descrizione"); row = ini.get("Descrizione");
if (module[0] == '_') if (module[0] == '_')
@ -1049,39 +1210,49 @@ void TFascicolator_mask::load()
else else
{ {
row.add(module); row.add(module);
tmp = ini.get("Versione"); tmp = ini.get("Versione");
row.add(tmp); row.add(tmp); // versione
tmp = ini.get("Patch"); tmp = ini.get("Patch");
row.add(tmp); row.add(tmp);
tmp = ini.get("Data"); tmp = ini.get("Data");
row.add(tmp); row.add(tmp);
tmp = ini.get("Moduli"); tmp = ini.get("Moduli");
row.add(tmp); row.add(tmp);
tmp = ini.get("PreProcess"); tmp = ini.get("PreProcess");
row.add(tmp); row.add(tmp);
tmp = ini.get("PostProcess"); tmp = ini.get("PostProcess");
row.add(tmp); row.add(tmp);
} }
} }
} }
} }
void TFascicolator_mask::save() void TCreadischi_mask::save()
{ {
TSheet_field& s = sfield(F_SHEET); TSheet_field& s = sfield(F_SHEET);
TProgind pi(s.items(), "Salvataggio in corso...", FALSE, TRUE);
TInstall_ini ini; TInstall_ini ini;
ini.set("DiskSize", get(F_DISKSIZE)); ini.set("DiskSize", get(F_DISKSIZE));
ini.set("DiskPath", get(F_DISKPATH)); ini.set("DiskPath", get(F_DISKPATH));
}
void TFascicolator_mask::save()
{
TSheet_field& s = sfield(F_SHEET);
TCreadischi_mask::save();
TProgind pi(s.items(), "Salvataggio in corso...", FALSE, TRUE);
TInstall_ini ini;
TString tmp; TString tmp;
FOR_EACH_SHEET_ROW_BACK(s, r, row) FOR_EACH_SHEET_ROW_BACK(s, r, row)
{ {
@ -1116,7 +1287,7 @@ void TFascicolator_mask::save()
} }
} }
bool TFascicolator_mask::zip_file(const char* archive, const char* listfile) const bool TCreadischi_mask::zip_file(const char* archive, const char* listfile) const
{ {
TString msg; TString msg;
msg << "Creazione del file " << archive << "..."; msg << "Creazione del file " << archive << "...";
@ -1131,7 +1302,7 @@ bool TFascicolator_mask::zip_file(const char* archive, const char* listfile) con
return err == 0; return err == 0;
} }
bool TFascicolator_mask::move_file(const TFilename& file, const char* dir) const bool TCreadischi_mask::move_file(const TFilename& file, const char* dir) const
{ {
TFilename dest(dir); TFilename dest(dir);
dest.add(file.name()); dest.add(file.name());
@ -1175,7 +1346,7 @@ bool TFascicolator_mask::move_file(const TFilename& file, const char* dir) const
return write_ok; return write_ok;
} }
int TFascicolator_mask::split_file(const TFilename& archive, long size) const int TCreadischi_mask::split_file(const TFilename& archive, long size) const
{ {
TWait_cursor hourglass; TWait_cursor hourglass;
@ -1267,6 +1438,12 @@ long TFascicolator_mask::find_signature(const TFilename& filename, const char* s
return found ? position : -1; return found ? position : -1;
} }
bool TCreadischi_mask::set_version_info(const TFilename& filename,
TInstall_ini& ini, const char* module) const
{
return TRUE;
}
bool TFascicolator_mask::set_version_info(const TFilename& filename, bool TFascicolator_mask::set_version_info(const TFilename& filename,
TInstall_ini& ini, const char* module) const TInstall_ini& ini, const char* module) const
{ {
@ -1300,7 +1477,7 @@ bool TFascicolator_mask::set_version_info(const TFilename& filename,
return ok; return ok;
} }
bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int patch_level) const bool TCreadischi_mask::zip_module(const TString& main_module, bool agg, int patch_level) const
{ {
TString_array arr; TString_array arr;
TInstall_ini ini; TInstall_ini ini;
@ -1323,6 +1500,8 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
return error_box("Nessun file da compattare"); return error_box("Nessun file da compattare");
} }
// *****************
// creazione ZIP
TFilename archivio(sommario); TFilename archivio(sommario);
archivio.ext("zip"); // Nome del file archivio completo archivio.ext("zip"); // Nome del file archivio completo
@ -1405,7 +1584,7 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
// Memorizza il numero dei dischetti nel sommario // Memorizza il numero dei dischetti nel sommario
ini.set("Dischi", disks, main_module); // Aggiorna install.ini ini.set("Dischi", disks, main_module); // Aggiorna install.ini
ini.export_paragraph(main_module, sommario); // Aggiorna sommario ini.export_paragraph(main_module, sommario,TRUE); // Aggiorna sommario
const bool floppy = ::os_is_removable_drive(path); const bool floppy = ::os_is_removable_drive(path);
@ -1444,33 +1623,53 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
return TRUE; return TRUE;
} }
TFascicolator_mask::TFascicolator_mask() TCreadischi_mask::TCreadischi_mask()
: TMask("ba1600a") : TMask("ba1600a")
{ {
TSheet_field& s = sfield(F_SHEET); TSheet_field& s = sfield(F_SHEET);
s.set_notify(modules_notify); s.set_notify(modules_notify);
TMask& m = s.sheet_mask(); TMask& m = s.sheet_mask();
m.set_handler(DLG_OK, confirm_handler); m.set_handler(DLG_OK, confirm_handler);
m.set_handler(S_LIST, list_handler); m.set_handler(S_LIST, list_handler);
m.set_handler(S_SAVE, save_handler); m.set_handler(S_CREATEZIP, creazip_handler);
m.set_handler(S_SAVEAGG, save_handler); m.set_handler(S_CREATEPATCH, creazip_handler);
m.set_handler(S_IMPORT, import_export_handler); m.hide(S_IMPORT);
m.set_handler(S_EXPORT, import_export_handler); m.set_handler(S_EXPORT, import_export_handler);
s.enable_column(S_MODULE,FALSE);
s.enable_column(S_VERSION,FALSE);
s.enable_column(S_PATCHLEVEL,FALSE);
s.enable_column(S_EXTERN,FALSE);
s.enable_column(S_PREPROCESS,FALSE);
s.enable_column(S_POSTPROCESS,FALSE);
} }
TFascicolator_mask::TFascicolator_mask()
: TCreadischi_mask()
{
TSheet_field& s = sfield(F_SHEET);
s.set_notify(TCreadischi_mask::modules_notify);
TMask& m = s.sheet_mask();
m.set_handler(DLG_OK, confirm_handler);
m.set_handler(S_LIST, list_handler);
m.set_handler(S_PATCHLEVEL, patchl_handler);
m.show(S_IMPORT);
m.set_handler(S_IMPORT, import_export_handler);
s.enable_column(S_MODULE,TRUE);
s.enable_column(S_VERSION,TRUE);
s.enable_column(S_PATCHLEVEL,TRUE);
s.enable_column(S_EXTERN,TRUE);
s.enable_column(S_PREPROCESS,TRUE);
s.enable_column(S_POSTPROCESS,TRUE);
}
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Programma principale // Programma principale
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TFascicolator : public TSkeleton_application
{
protected:
virtual bool use_files() const { return FALSE; }
virtual void main_loop();
};
void TFascicolator::main_loop() void TFascicolator::main_loop()
{ {
TFascicolator_mask m; TFascicolator_mask m;
@ -1485,9 +1684,49 @@ void TFascicolator::main_loop()
while (key != K_ENTER && key != K_QUIT); while (key != K_ENTER && key != K_QUIT);
} }
void TCreazione_dischi::main_loop()
{
TCreadischi_mask m;
m.load();
int key;
do
{
key=m.run();
if (key == K_ENTER)
m.save();
}
while (key != K_ENTER && key != K_QUIT);
}
// Cerca un file nell'array di colonne e ne restituisce il numero del sottomodulo
// -1 se
int find(const TString& name, TString_array & rows)
{
for(int r=rows.items()-1; r >=0 ; r-- )
{
if (name.compare(rows.row(r).get(0), -1, TRUE) == 0)
break;
}
return r;
}
int ba1600(int argc, char* argv[]) int ba1600(int argc, char* argv[])
{ {
TFascicolator app; if (user() == "PRASSI")
app.run(argc, argv, "Megascicolator"); {
if (argc>2 && strcmp(argv[1],"GODMODE"))
{
TFascicolator app;
app.run(argc, argv, "Megascicolator");
} else {
TCreazione_dischi app;
app.run(argc, argv, "Creazione dischetti");
}
} else
error_box("L'utente %s non e' abilitato all'esecuzione di questo programma", (const char*)user());
return 0; return 0;
} }

View File

@ -13,8 +13,8 @@ public:
int build_complete_list(const TString& m, TString_array& a, int build_complete_list(const TString& m, TString_array& a,
const char* s = NULL, bool agg = FALSE); const char* s = NULL, bool agg = FALSE);
void export_paragraph(const char* module, const char* summary); void export_paragraph(const char* module, const char* summary,const bool remove);
void export_module_paragraphs(const char* module, const char* summary); void export_module_paragraphs(const char* module, const char* summary,const bool remove);
bool demo() { return get_bool("Demo", "Main"); } bool demo() { return get_bool("Demo", "Main"); }
const TString& version(const char* module); const TString& version(const char* module);
@ -22,12 +22,13 @@ public:
void version_info(const char* module, void version_info(const char* module,
int& year, int& release, int& tag, int& patch); int& year, int& release, int& tag, int& patch);
bool update_prices(const char* src_ini); bool update_prices(const char* src_ini);
void prices(const char* module, word users, real& full, real& manut); void prices(const char* module, word users, real& full, real& manut, bool correct_ass=TRUE);
static const char* default_name() { return "install.ini"; } static const char* default_name() { return "install.ini"; }
TInstall_ini() : TConfig("install.ini", "Main") { } TInstall_ini() : TConfig("install.ini", "Main") { }
TInstall_ini(const char* path) : TConfig(path, "Main") { } TInstall_ini(const char* path) : TConfig(path, "Main") { }
TInstall_ini(const char* path, const char * paragraph) : TConfig(path, paragraph) { }
virtual ~TInstall_ini() { } virtual ~TInstall_ini() { }
}; };

View File

@ -18,8 +18,8 @@
#define S_POSTPROCESS 108 #define S_POSTPROCESS 108
#define S_LIST 100 #define S_LIST 100
#define S_SAVE 151 #define S_CREATEZIP 151
#define S_SAVEAGG 152 #define S_CREATEPATCH 152
#define S_IMPORT 153 #define S_IMPORT 153
#define S_EXPORT 154 #define S_EXPORT 154

View File

@ -65,31 +65,37 @@ END
STRING S_VERSION 8 STRING S_VERSION 8
BEGIN BEGIN
PROMPT 1 2 "Versione " PROMPT 1 2 "Versione "
FLAGS "D"
END END
STRING S_PATCHLEVEL 3 STRING S_PATCHLEVEL 3
BEGIN BEGIN
PROMPT 20 2 "Patch " PROMPT 20 2 "Patch "
FLAGS "D"
END END
DATE S_DATE DATE S_DATE
BEGIN BEGIN
PROMPT 31 2 "Rilascio " PROMPT 31 2 "Rilascio "
// FLAGS "D"
END END
STRING S_EXTERN 50 40 STRING S_EXTERN 50 40
BEGIN BEGIN
PROMPT 1 3 "Esterni " PROMPT 1 3 "Esterni "
FLAGS "D"
END END
STRING S_PREPROCESS 50 33 STRING S_PREPROCESS 50 33
BEGIN BEGIN
PROMPT 1 4 "Pre-processing " PROMPT 1 4 "Pre-processing "
FLAGS "D"
END END
STRING S_POSTPROCESS 50 33 STRING S_POSTPROCESS 50 33
BEGIN BEGIN
PROMPT 1 5 "Post-processing " PROMPT 1 5 "Post-processing "
FLAGS "D"
END END
BUTTON DLG_CANCEL 14 2 BUTTON DLG_CANCEL 14 2
@ -102,32 +108,33 @@ BEGIN
PROMPT -22 -1 "" PROMPT -22 -1 ""
END END
BUTTON S_LIST 14 2 BUTTON S_CREATEZIP 20 2
BEGIN BEGIN
PROMPT -13 -5 "Lista file" PROMPT -12 -5 "Crea &Versione"
END END
BUTTON S_SAVE 14 2 BUTTON S_CREATEPATCH 20 2
BEGIN BEGIN
PROMPT -23 -5 "&Versione" PROMPT -22 -5 "Crea &Aggiornamento"
END END
BUTTON S_SAVEAGG 14 2 BUTTON S_LIST 14 1
BEGIN BEGIN
PROMPT -23 -3 "&Aggiornamento" PROMPT -13 -4 "Lista file"
END END
BUTTON S_IMPORT 14 2 BUTTON S_IMPORT 14 1
BEGIN BEGIN
PROMPT -33 -5 "&Importa" PROMPT -23 -4 "&Importa lista"
END END
BUTTON S_EXPORT 14 2 BUTTON S_EXPORT 14 1
BEGIN BEGIN
PROMPT -33 -3 "&Esporta" PROMPT -33 -4 "&Esporta lista"
END END
ENDPAGE ENDPAGE
ENDMASK ENDMASK

View File

@ -9,7 +9,7 @@ END
BUTTON F_DESELECT 24 2 BUTTON F_DESELECT 24 2
BEGIN BEGIN
PROMPT -11 -11 "Annulla aggiornamento" PROMPT -23 -11 "Annulla aggiornamento"
END END
BUTTON DLG_CANCEL 10 2 BUTTON DLG_CANCEL 10 2

View File

@ -7,7 +7,7 @@
#include <progind.h> #include <progind.h>
#include <sheet.h> #include <sheet.h>
#include <utility.h> #include <utility.h>
#include <prefix.h>
#include "ba1.h" #include "ba1.h"
#include "ba1500.h" #include "ba1500.h"
@ -25,40 +25,59 @@
#define C_CURRDATAREL 8 #define C_CURRDATAREL 8
#define C_ISPATCH 9 #define C_ISPATCH 9
const char* const http_default_path = "/aga/campo/"; #ifdef _DEMO_
const char* const http_default_path = "/aga/eurodemo/zipdemo/";
#else
const char* const http_default_path = "/aga/euro/zip/";
#endif
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2) HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
{ {
TString16 ver1(v1), ver2(v2); TString16 ver1(v1), ver2(v2);
ver1.trim(); ver1.trim();
if (ver1.len() == 4) if (ver1.len() == 4)
ver1.insert((v1[0] == '9') ? "19" : "20", 0); ver1.insert((v1[0] == '9') ? "19" : "20", 0);
ver2.trim(); ver2.trim();
if (ver2.len() == 4) if (ver2.len() == 4)
ver2.insert((v2[0] == '9') ? "19" : "20", 0); ver2.insert((v2[0] == '9') ? "19" : "20", 0);
int res = ver1.compare(ver2, -1, TRUE); int res = ver1.compare(ver2, -1, TRUE);
if (res == 0) if (res == 0)
res = p1 - p2; res = p1 - p2;
return res; return res;
} }
HIDDEN word version2year(const char* v) HIDDEN word version2year(const char* v)
{ {
TString16 ver(v); TString16 ver(v);
if (ver.len() == 4) if (ver.len() == 4)
ver.insert((v[0] == '9') ? "19" : "20", 0); ver.insert((v[0] == '9') ? "19" : "20", 0);
ver.cut(4); ver.cut(4);
return atoi(ver); return atoi(ver);
} }
bool is_internet_path(const TString& addr)
{
if (addr.compare("www.", 4, TRUE) == 0)
return TRUE;
if (addr.compare("http:", 5, TRUE) == 0)
return TRUE;
int a1, a2, a3, a4;
if (sscanf(addr, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
return TRUE;
return FALSE;
}
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Maschera principale // Maschera principale
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TInstaller_mask : public TArray_sheet class TInstaller_mask : public TArray_sheet
{ {
static TInstaller_mask* _curr_mask; static TInstaller_mask* _curr_mask;
word _year_assist; word _year_assist;
bool _installed; // Flag per verificare se almeno un modulo e' stato installato bool _installed; // Flag per verificare se almeno un modulo e' stato installato
@ -72,6 +91,7 @@ protected:
static bool path_handler(TMask_field& fld, KEY key); static bool path_handler(TMask_field& fld, KEY key);
static bool sheet_notify(TSheet_field& s, int r, KEY k); static bool sheet_notify(TSheet_field& s, int r, KEY k);
static bool install_handler(TMask_field& fld, KEY key); static bool install_handler(TMask_field& fld, KEY key);
static bool update_handler(TMask_field& f, KEY k);
bool add_module(TConfig& ini, const TString& module, bool patch, int pos=-1); bool add_module(TConfig& ini, const TString& module, bool patch, int pos=-1);
bool add_header(TConfig& ini, const TString& module, bool patch); bool add_header(TConfig& ini, const TString& module, bool patch);
@ -84,6 +104,7 @@ protected:
bool can_install(const char* module, TInstall_ini& ini); bool can_install(const char* module, TInstall_ini& ini);
void install_selection(); void install_selection();
bool install_patches(const TString& module, const TString& lastrelease, int lastpatch); bool install_patches(const TString& module, const TString& lastrelease, int lastpatch);
KEY askdisk(TString & path, TFilename & cmdline, int d, int dischi, const char * modulo);
bool do_process(TToken_string& commands) const; bool do_process(TToken_string& commands) const;
bool pre_process(TInstall_ini& ini, const char* module) const; bool pre_process(TInstall_ini& ini, const char* module) const;
@ -106,7 +127,7 @@ bool TInstaller_mask::add_module(TConfig& ini, const TString& module, bool patch
ini.write_protect(); ini.write_protect();
bool ok = ini.set_paragraph(module); bool ok = ini.set_paragraph(module);
if (ok) if (ok)
{ {
TToken_string row; TToken_string row;
row = " "; // Not selected row = " "; // Not selected
row.add(ini.get("Descrizione")); row.add(ini.get("Descrizione"));
@ -129,7 +150,7 @@ bool TInstaller_mask::add_header(TConfig& ini, const TString& module, bool patch
ini.write_protect(); ini.write_protect();
bool ok = ini.set_paragraph(module); bool ok = ini.set_paragraph(module);
if (ok) if (ok)
{ {
TToken_string row; TToken_string row;
row = " "; // Not selected row = " "; // Not selected
row.add(ini.get("Descrizione")); row.add(ini.get("Descrizione"));
@ -143,9 +164,9 @@ static int compare_modules(const TObject** o1, const TObject** o2)
{ {
TToken_string& ts1 = *(TToken_string*)(*o1); TToken_string& ts1 = *(TToken_string*)(*o1);
TToken_string& ts2 = *(TToken_string*)(*o2); TToken_string& ts2 = *(TToken_string*)(*o2);
int res = 0; int res = 0;
for (int i = 2; i < 5 && res == 0; i++) for (int i = 2; i < 5 && res == 0; i++)
{ {
TString16 s1 = ts1.get(i); TString16 s1 = ts1.get(i);
const char* s2 = ts2.get(i); const char* s2 = ts2.get(i);
@ -163,11 +184,11 @@ int TInstaller_mask::sort_modules()
// vecchio codice per bubblare // vecchio codice per bubblare
for (int r = 0; r < tot; r++) for (int r = 0; r < tot; r++)
{ {
const bool patch = row(r).get_char(C_ISPATCH) > ' '; const bool patch = row(r).get_char(C_ISPATCH) > ' ';
const char* mod = row(r).get(C_CODE); const char* mod = row(r).get(C_CODE);
if (patch) if (patch)
{ {
TString16 dis=mod; TString16 dis=mod;
const int patchlevel = row(r).get_int(C_PATCH); const int patchlevel = row(r).get_int(C_PATCH);
// pop the patch line up to the module one // pop the patch line up to the module one
@ -190,15 +211,15 @@ int TInstaller_mask::sort_modules()
void TInstaller_mask::update_version() void TInstaller_mask::update_version()
{ {
TInstall_ini ini; TInstall_ini ini;
TString_array& array = rows_array(); TString_array& array = rows_array();
FOR_EACH_ARRAY_ROW_BACK(array, m, row) FOR_EACH_ARRAY_ROW_BACK(array, m, row)
{ {
if (*row->get(C_CODE) != ' ') if (*row->get(C_CODE) != ' ')
{ {
const TString16 module = row->get(C_CODE); const TString16 module = row->get(C_CODE);
ini.set_paragraph(module); ini.set_paragraph(module);
const TString16 newver = row->get(C_RELEASE); const TString16 newver = row->get(C_RELEASE);
const TString16 oldver = ini.get("Versione"); const TString16 oldver = ini.get("Versione");
row->add(oldver, C_CURRRELEASE); row->add(oldver, C_CURRRELEASE);
@ -227,7 +248,7 @@ bool is_internet_path(const TString& addr)
// Cerca nel percorso specificato sulla maschera tutti i possibili files .ini // Cerca nel percorso specificato sulla maschera tutti i possibili files .ini
// utilizzabili per un'installazione e li inserisce nello spreadsheet // utilizzabili per un'installazione e li inserisce nello spreadsheet
bool TInstaller_mask::autoload() bool TInstaller_mask::autoload()
{ {
TString_array& mask_rows = rows_array(); TString_array& mask_rows = rows_array();
TFilename path = get(F_PATH); TFilename path = get(F_PATH);
@ -292,10 +313,20 @@ bool TInstaller_mask::autoload()
return error_box("Specificare un percorso valido"); return error_box("Specificare un percorso valido");
TWait_cursor hourglass; TWait_cursor hourglass;
// !?!?!? modifica per correggere il bug di libreria su _parked dei TSheet:
// !?!?!? (uso della stringa _park e dell'indice _parked )
// !?!?!? rimuovere appena si è corretto l'errore
for (short pisellone =0; pisellone<100; pisellone++)
add("");
// !?!?! fine modifica
destroy(); destroy();
force_update();
TString_array modules; ininame=path;
ininame.add(TInstall_ini::default_name());
TString_array modules;
if (fexist(ininame)) if (fexist(ininame))
{ {
TInstall_ini ini(ininame); TInstall_ini ini(ininame);
@ -320,7 +351,7 @@ bool TInstaller_mask::autoload()
ininame.add("??inst.ini"); ininame.add("??inst.ini");
list_files(ininame, modules); list_files(ininame, modules);
FOR_EACH_ARRAY_ROW(modules, m, row) FOR_EACH_ARRAY_ROW(modules, m, row)
{ {
TString& ininame = *row; TString& ininame = *row;
ininame.lower(); ininame.lower();
const int pos = ininame.find("inst.ini"); const int pos = ininame.find("inst.ini");
@ -370,13 +401,14 @@ bool TInstaller_mask::autoload()
modules.sort(); // sort to have patches in patchlevel order modules.sort(); // sort to have patches in patchlevel order
FOR_EACH_ARRAY_ROW(modules, am, arow) FOR_EACH_ARRAY_ROW(modules, am, arow)
{ {
TString& ininame = *arow; TString& ininame = *arow;
ininame.lower(); ininame.lower();
const int pos = ininame.find("a.ini"); const int pos = ininame.find("a.ini");
CHECKS(pos >= 6, "Invalid installation configuration: ", (const char*)ininame); CHECKS(pos >= 6, "Invalid installation configuration: ", (const char*)ininame);
const TString16 module = ininame.mid(pos-6, 2); const TString16 module = ininame.mid(pos-6, 2);
TConfig ini(ininame, module); TConfig ini(ininame, module);
ini.write_protect();
const int patchlevel = ini.get_int("Patch"); const int patchlevel = ini.get_int("Patch");
const int maxrows=int(items()); const int maxrows=int(items());
bool found=FALSE; bool found=FALSE;
@ -395,7 +427,7 @@ bool TInstaller_mask::autoload()
else else
add_module(ini, module, TRUE); add_module(ini, module, TRUE);
} }
const bool ok = sort_modules() > 0; const bool ok = sort_modules() > 0;
if (ok) if (ok)
update_version(); update_version();
@ -407,7 +439,7 @@ bool TInstaller_mask::autoload()
} }
bool TInstaller_mask::do_process(TToken_string& commands) const bool TInstaller_mask::do_process(TToken_string& commands) const
{ {
bool ok = TRUE; bool ok = TRUE;
TFilename cmd; TFilename cmd;
for (const char* c = commands.get(0); c && ok; c = commands.get()) for (const char* c = commands.get(0); c && ok; c = commands.get())
@ -424,7 +456,7 @@ bool TInstaller_mask::do_process(TToken_string& commands) const
} }
bool TInstaller_mask::pre_process(TInstall_ini& ini, const char* module) const bool TInstaller_mask::pre_process(TInstall_ini& ini, const char* module) const
{ {
TAuto_token_string commands(ini.get("PreProcess", module)); TAuto_token_string commands(ini.get("PreProcess", module));
bool ok = do_process(commands); bool ok = do_process(commands);
return ok; return ok;
@ -453,18 +485,18 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
const word year = version2year(version); const word year = version2year(version);
if (year < 1997) if (year < 1997)
return error_box("Il modulo '%s' non ha una versione valida.", module); return error_box("Il modulo '%s' non ha una versione valida.", module);
#ifndef _DEMO_ #ifndef _DEMO_
if (year > _year_assist) if (year > _year_assist)
return error_box("Per installare la versione %s del modulo '%s'\n" return error_box("Per installare la versione %s del modulo '%s'\n"
"occorre il contratto di assistenza per l'anno %d.", "occorre il contratto di assistenza per l'anno %d.",
(const char*)version, module, year); (const char*)version, module, year);
#endif #endif
TAuto_token_string altri(ini.get("Moduli", module)); TAuto_token_string altri(ini.get("Moduli", module));
if (stricmp(module, "ba") != 0 && altri.get_pos("ba") < 0) if (stricmp(module, "ba") != 0 && altri.get_pos("ba") < 0)
altri.add("ba"); // La base e' obbligatoria per tutti altri.add("ba"); // La base e' obbligatoria per tutti
bool ok = TRUE; bool ok = TRUE;
TString submodule; TString submodule;
for (const char* mod = altri.get(0); mod && ok; mod = altri.get()) for (const char* mod = altri.get(0); mod && ok; mod = altri.get())
@ -473,19 +505,19 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
if (submodule.len() == 2) if (submodule.len() == 2)
{ {
if (curini.get("Versione", submodule).empty()) if (curini.get("Versione", submodule).empty())
{ {
TString msg; TString msg;
msg << "L'installazione del modulo '" << module msg << "L'installazione del modulo '" << module
<< "'\nrichiede la presenza del modulo '" << submodule << "'\nrichiede la presenza del modulo '" << submodule
<< "':\nSi desidera procedere alla sua installazione?"; << "':\nSi desidera procedere alla sua installazione?";
ok = yesno_box(msg); ok = yesno_box(msg);
if (ok) if (ok)
ok = install(submodule, 0); ok = install(submodule, 0);
} }
} }
} }
return ok; return ok;
} }
// sposta il file dal direttorio temporaneo a quello passato come destinazione // sposta il file dal direttorio temporaneo a quello passato come destinazione
@ -494,7 +526,7 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
// todir: direttorio destinazione (si assume che esista già) // todir: direttorio destinazione (si assume che esista già)
bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, const char* todir) const bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, const char* todir) const
{ {
TFilename dest(todir); TFilename dest(todir);
dest.add(file.mid(from.len()+1)); dest.add(file.mid(from.len()+1));
if (!fexist(dest.path())) if (!fexist(dest.path()))
@ -508,11 +540,11 @@ bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, co
if (!fexist(subdir) ) if (!fexist(subdir) )
// build destination directory // build destination directory
make_dir(subdir); make_dir(subdir);
} }
} }
const long filesize = fsize(file); const long filesize = fsize(file);
bool space_ok = FALSE; bool space_ok = FALSE;
while (!space_ok) while (!space_ok)
{ {
@ -548,20 +580,20 @@ bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, co
do do
{ {
write_ok = ::fcopy(file, dest); write_ok = ::fcopy(file, dest);
if (write_ok) if (write_ok)
::remove(file); ::remove(file);
else else
user_retry = yesno_box("Errore di copia del file %s.\nSi desidera ritentare?", user_retry = yesno_box("Errore di copia del file %s.\nSi desidera ritentare?",
(const char*)file); (const char*)file);
} while (!write_ok && user_retry); } while (!write_ok && user_retry);
return write_ok; return write_ok;
} }
bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool update) const bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool update) const
{ {
bool ok = TRUE; bool ok = TRUE;
TFilename src; src.tempdir(); TFilename src; src.tempdir();
const TFilename tempdir(src); const TFilename tempdir(src);
const TString& dst = get(F_CURPATH); const TString& dst = get(F_CURPATH);
@ -578,7 +610,7 @@ bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool
if (!move_ok) if (!move_ok)
ok = update = FALSE; ok = update = FALSE;
} }
if (!update) if (!update)
::remove(src); ::remove(src);
} }
@ -588,6 +620,39 @@ bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool
return ok; return ok;
} }
KEY TInstaller_mask::askdisk(TString & path, TFilename & cmdline, int d, int dischi, const char * modulo)
{
TMask retry_mask("Inserimento dischi",1,80,10);
retry_mask.add_static((F_PATH==101 ? 102:101),0,
format("Inserire il disco %d di %d del modulo'%s' nell' unità indicata", d, dischi, modulo)
,2,2);
retry_mask.add_static(F_PATH+3,0,"oppure indicare un percorso diverso",2,3);
retry_mask.add_string(F_PATH,0,"",2,5,48);
retry_mask.add_button(DLG_OK,0,"Riprova",-12,7,9,2);
retry_mask.add_button(DLG_QUIT,0,"",-22,7,9,2);
retry_mask.set(F_PATH,path);
KEY k;
do {
if ((k=retry_mask.run())==K_QUIT )
break;
if (!retry_mask.get(F_PATH).blank())
{
if (fexist(retry_mask.get(F_PATH)))
{
TString16 tmpname(cmdline.name() );
cmdline= path = retry_mask.get(F_PATH);
cmdline.add(tmpname);
break;
}
else
error_box("Il percorso indicato non e' valido");
}
} while (TRUE);
return k;
}
bool TInstaller_mask::install(const TString& module, int patchlevel) bool TInstaller_mask::install(const TString& module, int patchlevel)
{ {
TInstall_ini* ini = NULL; TInstall_ini* ini = NULL;
@ -621,12 +686,13 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
path.add("www"); path.add("www");
} }
const bool is_a_patch=(patchlevel > 0);
TFilename ininame = path; TFilename ininame = path;
ininame.add(module); ininame.add(module);
if (patchlevel > 0) if (is_a_patch)
{ {
TString16 name; TString16 name;
name.format("%04da.ini", patchlevel); name.format("%04da.ini", patchlevel);
ininame << name; ininame << name;
} }
@ -647,8 +713,10 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
lastpatch=ini->get_int("Patch",module); lastpatch=ini->get_int("Patch",module);
lastrelease=ini->get("Versione",module); lastrelease=ini->get("Versione",module);
if (!can_install(module, *ini)) if (!can_install(module, *ini))
{
delete ini;
return FALSE; return FALSE;
}
const int dischi = ini->get_int("Dischi", module); const int dischi = ini->get_int("Dischi", module);
ok = dischi > 0; ok = dischi > 0;
if (!ok) if (!ok)
@ -659,7 +727,11 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
{ {
if (patchlevel==0) if (patchlevel==0)
ok = pre_process(*ini, module); ok = pre_process(*ini, module);
if (!ok) return FALSE; if (!ok)
{
delete ini;
return FALSE;
}
} }
TString msg; TString msg;
@ -670,15 +742,15 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
TProgind pi(dischi, msg, FALSE, TRUE); TProgind pi(dischi, msg, FALSE, TRUE);
TFilename tempdir; tempdir.tempdir(); TFilename tempdir; tempdir.tempdir();
TFilename cmdline; TFilename cmdline;
for (int d = 1; d <= dischi && ok; d++) for (int d = 1; d <= dischi && ok; d++)
{ {
cmdline = path; cmdline = path;
cmdline.add(module); cmdline.add(module);
if (patchlevel > 0) if (patchlevel > 0)
{ {
TString16 name; TString16 name;
name.format("%04da", patchlevel); name.format("%04da", patchlevel);
cmdline << name; cmdline << name;
} }
@ -692,21 +764,17 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
remote.insert(http_path, 0); remote.insert(http_path, 0);
http_get(http_server, remote, cmdline); http_get(http_server, remote, cmdline);
} }
ok = cmdline.exist(); ok = cmdline.exist();
while (!ok) while (!ok)
{ {
message_box("Inserire il disco %d di %d del modulo\n'%s'", if (askdisk(path,cmdline,d,dischi,(const char*)ini->get("Descrizione"))==K_QUIT)
d, dischi, (const char*)ini->get("Descrizione")); break;
ok = cmdline.exist(); ok = fexist(cmdline);
if (!ok) if (!ok)
{ message_box("Impossibile trovare %s\n",(const char*)cmdline);
if (!yesno_box("Impossibile trovare %s\nSi desidera riprovare?",
(const char*)cmdline))
break;
}
} }
if (ok) if (ok)
{ {
const long required = fsize(cmdline) * (dischi-d+1) * 4; const long required = fsize(cmdline) * (dischi-d+1) * 4;
@ -717,116 +785,140 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
"Si desidera continuare ugualmente?"); "Si desidera continuare ugualmente?");
} }
} }
if (ok) if (ok)
{ {
TWait_cursor hourglass; TWait_cursor hourglass;
cmdline.insert("unzip.pif -o ", 0); cmdline.insert("unzip.pif -o ", 0);
cmdline << " -d " << tempdir; cmdline << " -d " << tempdir;
TExternal_app app(cmdline); TExternal_app app(cmdline);
ok = app.run(FALSE, FALSE, FALSE, FALSE) == 0; ok = app.run(FALSE, FALSE, FALSE, FALSE) == 0;
pi.addstatus(1); pi.addstatus(1);
}
}
if (ok)
{
msg.cut(0);
msg << "Aggiornamento del modulo '" << module << "' in corso...";
pi.set_text(msg);
ok = move_module(module, *ini, TRUE);
TAuto_token_string altri(ini->get("Moduli", module));
FOR_EACH_TOKEN(altri, mod)
{
const TString16 submod = mod;
if (submod.len() > 2) // sposta sottomoduli esterni
{
bool upd = ok;
if (ok)
{
TInstall_ini curini;
const TString16 curver = curini.version(submod);
const int curpatch = curini.patch(submod);
const TString16 reqver = ini->version(submod);
const int reqpatch = ini->patch(submod);
int distance = compare_version(reqver, reqpatch, curver, curpatch);
upd = distance > 0;
}
ok &= move_module(submod, *ini, upd);
if (upd && ok)
ini->export_paragraph(submod, ini->default_name());
}
} }
}
if (ok)
{
if (ok) ini->export_paragraph(module, ini->default_name());
} }
} // ***************
else // trasferimento
{
// non c'e' il .ini del modulo ma un unico "install.ini"
ininame = path;
ininame.add(TInstall_ini::default_name());
ok = fexist(ininame);
if (ok) if (ok)
{ {
ini = new TInstall_ini(ininame); // si assicura che sia leggibile il .ini del primo disco
ini->write_protect(); do {
lastpatch=ini->get_int("Patch",module); cmdline = path;
lastrelease=ini->get("Versione",module); cmdline.add(ininame.name());
if (!can_install(module, *ini)) ok = fexist(cmdline);
return FALSE; if (!ok)
TString_array list;
const int files = ini->build_complete_list(module, list);
if (files > 0)
{
if (patchlevel==0)
ok = pre_process(*ini, module);
if (ok)
{ {
TProgind pi(files, "Copia in corso...", FALSE, TRUE); if (askdisk(path,cmdline,1,dischi,(const char*)ini->get("Descrizione"))==K_QUIT)
TFilename src, dst; break;
for (int f = 0; f < files && ok; f++) ok = fexist(cmdline);
if (!ok)
message_box("Impossibile trovare %s\n",(const char*)cmdline);
else
{ {
pi.addstatus(1); delete ini;
dst = list.row(f).get(0); ini = new TInstall_ini (cmdline);
src = path;
src.add(dst);
ok = fcopy(src, dst);
} }
} }
} while (!ok);
if (ok)
{
msg.cut(0);
msg << "Aggiornamento del modulo '" << module << "' in corso...";
pi.set_text(msg);
ok = move_module(module, *ini, TRUE);
if (ok) TAuto_token_string altri(ini->get("Moduli", module));
FOR_EACH_TOKEN(altri, mod)
{ {
if (ok) ini->export_module_paragraphs(module, ini->default_name()); const TString16 submod = mod;
} if (submod.len() > 2) // sposta sottomoduli esterni
} {
} bool upd = ok;
} if (ok)
{
TInstall_ini curini;
const TString16 curver = curini.version(submod);
const int curpatch = curini.patch(submod);
const TString16 reqver = ini->version(submod);
const int reqpatch = ini->patch(submod);
int distance = compare_version(reqver, reqpatch, curver, curpatch);
upd = distance > 0;
}
ok &= move_module(submod, *ini, upd);
if (upd && ok) // marca sull'install.ini di destinazione l'avvenuta installazione del sottomodulo "esterno"
ini->export_paragraph(submod, ini->default_name(),!is_a_patch);
}
}
}
}
if (ok) // marca sull'install.ini di destinazione l'avvenuta installazione del modulo
ini->export_module_paragraphs(module, ini->default_name(),!is_a_patch);
} // installazione da directory con zip
else
if (!is_a_patch)
{
//
// non c'e' il .ini del modulo ma un unico "install.ini"
// (installazione da directory con eseguibili)
ininame = path;
ininame.add(TInstall_ini::default_name());
ok = fexist(ininame);
if (ok)
{
TInstall_ini ini(ininame);
ini.write_protect();
lastpatch=ini.get_int("Patch",module);
lastrelease=ini.get("Versione",module);
if (!can_install(module, ini))
return FALSE;
TString_array list;
const int files = ini.build_complete_list(module, list);
if (files > 0)
{
if (patchlevel==0)
ok = pre_process(ini, module);
if (ok)
{
TProgind pi(files, "Copia in corso...", FALSE, TRUE);
TFilename src, dst;
for (int f = 0; f < files && ok; f++)
{
pi.addstatus(1);
dst = list.row(f).get(0);
src = path;
src.add(dst);
ok = fcopy(src, dst);
}
}
if (ok) // marca sull'install.ini di destinazione l'avvenuta installazione del modulo
ini.export_module_paragraphs(module, ini.default_name(),TRUE);
} // controllo esistenza lista di file non vuota per questo modulo
} // controllo esistenza install.ini
} // fine installazione da directory con eseguibili
if (ok) if (ok)
{ {
{ {
TInstall_ini ini; TInstall_ini ini;
ini.set("DiskPath", get(F_PATH)); ini.set("DiskPath", get(F_PATH));
ini.set("Data", TDate(TODAY), module); ini.set("Data", TDate(TODAY), module);
ini.update_prices(ininame); ini.update_prices(ininame);
} }
// Non togliere le parentesi graffe soprastanti per permettere l'aggiornamento fisico del .ini (CON LA CHIAMATA DEL DISTRUTTORE) // Non togliere le parentesi graffe soprastanti per permettere l'aggiornamento fisico del .ini (CON LA CHIAMATA DEL DISTRUTTORE)
update_version(); update_version();
} }
if (patchlevel == 0) // Se installo un modulo pricipale ...
if (ok && patchlevel == 0) // Se installo un modulo pricipale ...
{ {
// ... installo DOPO tutte le patches successive // ... installo DOPO tutte le patches successive
install_patches(module, lastrelease, lastpatch); install_patches(module, lastrelease, lastpatch);
ok &= post_process(*ini, module); TInstall_ini ini;
ok &= post_process(ini, module);
} }
return ok; return ok;
@ -837,7 +929,7 @@ bool TInstaller_mask::install_patches(const TString& module, const TString& last
{ {
bool ok = FALSE; bool ok = FALSE;
TString_array modules; TString_array modules;
TFilename ininame = get(F_PATH); TFilename ininame = get(F_PATH);
if (is_internet_path(ininame)) if (is_internet_path(ininame))
{ {
ininame.tempdir(); ininame.tempdir();
@ -850,7 +942,7 @@ bool TInstaller_mask::install_patches(const TString& module, const TString& last
list_files(ininame, modules); list_files(ininame, modules);
modules.sort(); // sort by patch number modules.sort(); // sort by patch number
FOR_EACH_ARRAY_ROW(modules, am, arow) FOR_EACH_ARRAY_ROW(modules, am, arow)
{ {
TString& ininame = *arow; TString& ininame = *arow;
ininame.lower(); ininame.lower();
const int pos = ininame.find("a.ini"); const int pos = ininame.find("a.ini");
@ -866,8 +958,18 @@ bool TInstaller_mask::install_patches(const TString& module, const TString& last
return ok; return ok;
} }
bool TInstaller_mask::update_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
TInstaller_mask& m = (TInstaller_mask&)f.mask();
m.autoload();
}
return TRUE;
}
bool TInstaller_mask::path_handler(TMask_field& fld, KEY key) bool TInstaller_mask::path_handler(TMask_field& fld, KEY key)
{ {
bool ok = TRUE; bool ok = TRUE;
if (key == K_TAB && fld.focusdirty()) if (key == K_TAB && fld.focusdirty())
{ {
@ -894,7 +996,7 @@ void TInstaller_mask::install_selection()
FOR_EACH_ARRAY_ROW(arr, r, row) if (checked(r)) FOR_EACH_ARRAY_ROW(arr, r, row) if (checked(r))
{ {
const TString newver = row->get(C_RELEASE); const TString newver = row->get(C_RELEASE);
if (newver.blank()) if (newver.blank())
{ {
check(r, FALSE); check(r, FALSE);
@ -905,18 +1007,19 @@ void TInstaller_mask::install_selection()
const int newpatch = row->get_int(C_PATCH); const int newpatch = row->get_int(C_PATCH);
const TString oldver = row->get(C_CURRRELEASE); const TString oldver = row->get(C_CURRRELEASE);
const int oldpatch = row->get_int(C_CURRPATCH); const int oldpatch = row->get_int(C_CURRPATCH);
if (version2year(newver) < 1997) if (version2year(newver) < 1997)
{ {
error_box("Il modulo '%s' non ha una versione valida.", (const char*)modulo); error_box("Il modulo '%s' non ha una versione valida.", (const char*)modulo);
continue; continue;
} }
bool ok = TRUE; bool ok = TRUE;
bool is_patch = row->get_char(C_ISPATCH) > ' ';
const int cmp = compare_version(oldver, oldpatch, newver, newpatch); const int cmp = compare_version(oldver, oldpatch, newver, newpatch);
if (cmp == 0) if (cmp == 0)
ok = noyes_box("Si desidera reinstallare la versione %s.%d del modulo '%s' ?", (const char*)newver, newpatch, (const char*)modulo); ok = noyes_box("Si desidera reinstallare la versione %s.%d del modulo '%s' ?", (const char*)newver, newpatch, (const char*)modulo);
if (cmp > 0) if (!is_patch && cmp > 0)
{ {
TString256 msg; TString256 msg;
msg.format("Si desidera ritornare alla versione %s.%d del modulo '%s' ?\n" msg.format("Si desidera ritornare alla versione %s.%d del modulo '%s' ?\n"
@ -931,26 +1034,30 @@ void TInstaller_mask::install_selection()
// installo le patch solo se esiste già un modulo installato della stessa versione // installo le patch solo se esiste già un modulo installato della stessa versione
if (!oldver.blank() ) if (!oldver.blank() )
if (oldver != newver) if (oldver != newver)
ok =error_box("Impossibile installare le patch della versione %s \nperché il modulo '%s' installato ha versione %s ",(const char *)newver,(const char *)modulo,(const char *)oldver); ok =error_box("Il modulo '%s' installato ha versione %s:\nimpossibile installare le patch della versione %s",(const char *)modulo,(const char *)oldver,(const char *)newver);
} else
ok =FALSE;//error_box("Impossibile installare le patch perche' il modulo '%s' non e' installato",(const char *)modulo);
} }
if (ok) if (ok)
{ {
if (!is_patch) if (!is_patch)
{ {
if (newver == oldver && newpatch != oldpatch && if (newver == oldver && newpatch != oldpatch &&
!noyes_box("Si desidera reinstallare l'intero modulo?\n" !noyes_box("Si desidera reinstallare l'intero modulo?\n"
"Rispondendo NO verranno installate le sole patch")) "Rispondendo NO verranno installate le sole patch"))
{ {
is_patch = TRUE; is_patch = TRUE;
} }
} }
if (is_patch) if (is_patch)
{ {
ok = install_patches(modulo, oldver, oldpatch); // installa tutte le patch ok = install_patches(modulo, oldver, oldpatch); // installa tutte le patch
if (!ok) if (!ok)
ok = install(modulo, newpatch); // re-installa l'ultima per sicurezza () ok = install(modulo, newpatch); // re-installa l'ultima per sicurezza ()
if (!ok)
message_box("Impossibile installare le patch del modulo '%s'",(const char *)modulo);
} }
else else
{ {
@ -961,22 +1068,22 @@ void TInstaller_mask::install_selection()
if (ok) if (ok)
_installed = TRUE; // Setta il flag di almeno un modulo installato _installed = TRUE; // Setta il flag di almeno un modulo installato
if (ok) if (ok)
check(r, FALSE); check(r, FALSE);
} }
check(r,FALSE); // uncheck check(r,FALSE); // uncheck
} }
} }
bool TInstaller_mask::install_handler(TMask_field& fld, KEY key) bool TInstaller_mask::install_handler(TMask_field& fld, KEY key)
{ {
if (key == K_SPACE) if (key == K_SPACE)
{ {
if (_curr_mask->items() == 1) if (_curr_mask->items() == 1)
_curr_mask->check(0); _curr_mask->check(0);
if (_curr_mask->one_checked()) if (_curr_mask->one_checked())
_curr_mask->install_selection(); _curr_mask->install_selection();
else else
error_box("Selezionare uno piu' moduli da installare."); error_box("Selezionare uno piu' moduli da installare.");
} }
return TRUE; return TRUE;
} }
@ -984,7 +1091,7 @@ bool TInstaller_mask::install_handler(TMask_field& fld, KEY key)
bool TInstaller_mask::tutti_handler(TMask_field& f, KEY k) bool TInstaller_mask::tutti_handler(TMask_field& f, KEY k)
{ {
if (k == K_SPACE) if (k == K_SPACE)
{ {
TSheet& s = (TSheet&)f.mask(); TSheet& s = (TSheet&)f.mask();
if (s.check_enabled()) if (s.check_enabled())
{ {
@ -993,7 +1100,7 @@ bool TInstaller_mask::tutti_handler(TMask_field& f, KEY k)
else else
{ {
for (long i = s.items()-1; i >=0; i--) for (long i = s.items()-1; i >=0; i--)
{ {
TToken_string r = s.row(i); TToken_string r = s.row(i);
const TString16 newver = r.get(C_RELEASE); const TString16 newver = r.get(C_RELEASE);
const int newpatch = r.get_int(C_PATCH); const int newpatch = r.get_int(C_PATCH);
@ -1018,47 +1125,49 @@ bool TInstaller_mask::update_handler(TMask_field& f, KEY k)
} }
bool TInstaller_mask::on_key(KEY key) bool TInstaller_mask::on_key(KEY key)
{ {
bool ok = TRUE; bool ok = TRUE;
switch(key) switch (key)
{ {
case K_F7: autoload(); break; case K_F7: autoload(); break;
case K_F8: field(DLG_USER).on_hit(); break; case K_F8: field(DLG_USER).on_hit(); break;
default : ok = TArray_sheet::on_key(key); break; default : ok = TArray_sheet::on_key(key); break;
} }
return ok; return ok;
} }
TInstaller_mask::TInstaller_mask() TInstaller_mask::TInstaller_mask()
: TArray_sheet(0, 0, 0, 0, "Installazione", : TArray_sheet(0, 0, 0, 0, "Installazione",
"@1|Modulo@30|Cod.|Versione da\ninstallare@11|Livello\nPatch@8|Data\nRilascio@10|Versione\nInstallata@10|Livello\nPatch@8|Data\nInstallazione@13|Aggiornamento", "@1|Modulo@30|Cod.|Versione da\ninstallare@11|Livello\nPatch@8|Data\nRilascio@10|Versione\nInstallata@10|Livello\nPatch@8|Data\nInstallazione@13|Aggiornamento",
0x18, 3) 0x18, 3)
{ {
_curr_mask = this; _curr_mask = this;
_installed = FALSE; _installed = FALSE;
add_string(F_PATH, 0, "Installa da ", 1, 1, 50); add_string(F_PATH, 0, "Installa da ", 1, 1, 50);
add_string(F_CURPATH, 0, "Installa in ", 1, 2, 50, "D"); add_string(F_CURPATH, 0, "Installa in ", 1, 2, 50, "D");
add_button(F_UPDATE, "Lista", '\0'); add_button(F_UPDATE, "Aggiorna", '\0');
add_button(F_INSTALL, "Installa", '\0'); // NON mettere 'I' add_button(F_INSTALL, "Installa", '\0'); // NON mettere 'I'
set_handler(F_PATH, path_handler); set_handler(F_PATH, path_handler);
set_handler(F_INSTALL, install_handler); set_handler(F_INSTALL, install_handler);
set_handler(DLG_USER, tutti_handler);
set_handler(F_UPDATE, update_handler); set_handler(F_UPDATE, update_handler);
set_handler(DLG_USER, tutti_handler);
TDongle dongle; dongle.login(); dongle.logout(); TDongle dongle; dongle.login(); dongle.logout();
_year_assist = dongle.year_assist(); _year_assist = dongle.year_assist();
TInstall_ini ini; TInstall_ini ini;
TFilename path = ini.get("DiskPath"); TFilename path = ini.get("DiskPath");
set(F_PATH, path); set(F_PATH, path);
const bool floppy = ::os_is_removable_drive(path); const char lettera = toupper(path[0]);
const bool floppy = (path.len() > 1) && path[1] == ':' &&
GetDriveType(lettera - 'A') == DRIVE_REMOVABLE;
if (path.not_empty() && !floppy && !is_internet_path(path)) if (path.not_empty() && !floppy && !is_internet_path(path))
autoload(); autoload();
DIRECTORY dir; DIRECTORY dir;
xvt_fsys_get_dir(&dir); xvt_fsys_get_dir(&dir);
xvt_fsys_convert_dir_to_str(&dir, path.get_buffer(), path.size()); xvt_fsys_convert_dir_to_str(&dir, path.get_buffer(), path.size());
set(F_CURPATH, path); set(F_CURPATH, path);
@ -1074,7 +1183,7 @@ TInstaller_mask::~TInstaller_mask()
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TInstaller : public TSkeleton_application class TInstaller : public TSkeleton_application
{ {
protected: protected:
virtual bool use_files() const { return FALSE; } virtual bool use_files() const { return FALSE; }
virtual void main_loop(); virtual void main_loop();
@ -1093,8 +1202,12 @@ void TInstaller::main_loop()
} }
int ba1700(int argc, char* argv[]) int ba1700(int argc, char* argv[])
{ {
TInstaller app; if (user() == "PRASSI")
app.run(argc, argv, "Installer"); {
TInstaller app;
app.run(argc, argv, "Installer");
} else
error_box("L'utente %s non e' abilitato all'esecuzione di questo programma", (const char*)user());
return 0; return 0;
} }

View File

@ -1,9 +1,9 @@
[ba] [ba]
Data = 08-05-1998 Data = 03-08-1998
Descrizione = Base Descrizione = Base
Dischi = 1 Dischi = 1
Moduli = Moduli =
Patch = 22 Patch = 132
PostProcess = PostProcess =
PreProcess = PreProcess =
Prezzo(1) = 500,175 Prezzo(1) = 500,175
@ -23,7 +23,7 @@ File(4) = ba04.bmp
File(5) = ba05.bmp File(5) = ba05.bmp
File(6) = ba06.bmp File(6) = ba06.bmp
File(7) = baprassi.men File(7) = baprassi.men
Patch = 22 Patch = 132
Versione = 19980103 Versione = 19980103
[ba1] [ba1]
@ -97,117 +97,119 @@ File(74) = bagn002.msk
File(75) = bagn004.msk File(75) = bagn004.msk
File(76) = bagn005.msk File(76) = bagn005.msk
File(77) = bagn006.msk File(77) = bagn006.msk
File(78) = bainst.exe|X File(78) = bainst.exe
File(79) = bainst01.msk|X File(79) = bainst01.msk
File(80) = bainst02.msk|X File(80) = bainst02.msk
File(81) = bainst03.msk|X File(81) = bainst03.msk
File(82) = bainst04.msk|X File(82) = bainst04.msk
File(83) = bainst05.msk|X File(83) = bainst05.msk
File(84) = bastais.msk File(84) = bainst06.msk
File(85) = bastban.msk File(85) = bastais.msk
File(86) = bastclr.msk File(86) = bastban.msk
File(87) = bastcpg.msk File(87) = bastclr.msk
File(88) = bastcrs.msk File(88) = bastcpg.msk
File(89) = bastitl.msk File(89) = bastcrs.msk
File(90) = bastiva.msk File(90) = bastitl.msk
File(91) = bastlng.msk File(91) = bastiva.msk
File(92) = bastois.msk File(92) = bastlng.msk
File(93) = baststa.msk File(93) = bastois.msk
File(94) = baststt.msk File(94) = baststa.msk
File(95) = bastucc.msk File(95) = baststt.msk
File(96) = bastucs.msk File(96) = bastucc.msk
File(97) = bastues.msk File(97) = bastucs.msk
File(98) = bastuid.msk File(98) = bastues.msk
File(99) = bastuiv.msk File(99) = bastuid.msk
File(100) = basture.msk File(100) = bastuiv.msk
File(101) = bastuue.msk File(101) = basture.msk
File(102) = bastval.msk File(102) = bastuue.msk
File(103) = batbais.msk File(103) = bastval.msk
File(104) = batbais.rpt File(104) = batbais.msk
File(105) = batbban.msk File(105) = batbais.rpt
File(106) = batbban.rpt File(106) = batbban.msk
File(107) = batbclr.msk File(107) = batbban.rpt
File(108) = batbclr.rpt File(108) = batbclr.msk
File(109) = batbcpg.msk File(109) = batbclr.rpt
File(110) = batbcpg.rpt File(110) = batbcpg.msk
File(111) = batbcrs.msk File(111) = batbcpg.rpt
File(112) = batbcrs.rpt File(112) = batbcrs.msk
File(113) = batbitl.msk File(113) = batbcrs.rpt
File(114) = batbitl.rpt File(114) = batbitl.msk
File(115) = batbiva.msk File(115) = batbitl.rpt
File(116) = batbiva.rpt File(116) = batbiva.msk
File(117) = batblng.msk File(117) = batbiva.rpt
File(118) = batblng.rpt File(118) = batblng.msk
File(119) = batbois.msk File(119) = batblng.rpt
File(120) = batbois.rpt File(120) = batbois.msk
File(121) = batbrgi.msk File(121) = batbois.rpt
File(122) = batbsta.msk File(122) = batbrgi.msk
File(123) = batbsta.rpt File(123) = batbsta.msk
File(124) = batbstt.msk File(124) = batbsta.rpt
File(125) = batbstt.rpt File(125) = batbstt.msk
File(126) = batbucc.msk File(126) = batbstt.rpt
File(127) = batbucc.rpt File(127) = batbucc.msk
File(128) = batbucs.msk File(128) = batbucc.rpt
File(129) = batbucs.rpt File(129) = batbucs.msk
File(130) = batbues.msk File(130) = batbucs.rpt
File(131) = batbues.rpt File(131) = batbues.msk
File(132) = batbuid.msk File(132) = batbues.rpt
File(133) = batbuid.rpt File(133) = batbuid.msk
File(134) = batbuiv.msk File(134) = batbuid.rpt
File(135) = batbuiv.rpt File(135) = batbuiv.msk
File(136) = batbure.msk File(136) = batbuiv.rpt
File(137) = batbure.rpt File(137) = batbure.msk
File(138) = batbuue.msk File(138) = batbure.rpt
File(139) = batbuue.rpt File(139) = batbuue.msk
File(140) = batbval.msk File(140) = batbuue.rpt
File(141) = batbval.rpt File(141) = batbval.msk
File(142) = fconv.ini File(142) = batbval.rpt
File(143) = prassi.aut File(143) = fconv.ini
File(144) = prassi.hlp File(144) = prassi.aut
File(145) = prassice.men File(145) = prassi.hlp
File(146) = prassid.ini File(146) = prassice.men
File(147) = prassis.ini File(147) = prassid.ini
File(148) = unzip.pif File(148) = prassis.ini
File(149) = unzip32.exe File(149) = unzip.pif
File(150) = zip.pif File(150) = unzip32.exe
File(151) = zip386.bat File(151) = zip.pif
File(152) = zip386.exe File(152) = zip386.bat
Patch = 22 File(153) = zip386.exe
Patch = 132
Versione = 19980103 Versione = 19980103
[ba2] [ba2]
File(153) = recdesc\f10.dir File(154) = recdesc\f10.dir
File(154) = recdesc\f10.trr File(155) = recdesc\f10.trr
File(155) = recdesc\f105.dir File(156) = recdesc\f105.dir
File(156) = recdesc\f105.trr File(157) = recdesc\f105.trr
File(157) = recdesc\f11.dir File(158) = recdesc\f11.dir
File(158) = recdesc\f11.trr File(159) = recdesc\f11.trr
File(159) = recdesc\f12.dir File(160) = recdesc\f12.dir
File(160) = recdesc\f12.trr File(161) = recdesc\f12.trr
File(161) = recdesc\f13.dir File(162) = recdesc\f13.dir
File(162) = recdesc\f13.trr File(163) = recdesc\f13.trr
File(163) = recdesc\f15.dir File(164) = recdesc\f15.dir
File(164) = recdesc\f15.trr File(165) = recdesc\f15.trr
File(165) = recdesc\f2.dir File(166) = recdesc\f2.dir
File(166) = recdesc\f2.trr File(167) = recdesc\f2.trr
File(167) = recdesc\f3.dir File(168) = recdesc\f3.dir
File(168) = recdesc\f3.trr File(169) = recdesc\f3.trr
File(169) = recdesc\f4.dir File(170) = recdesc\f4.dir
File(170) = recdesc\f4.trr File(171) = recdesc\f4.trr
File(171) = recdesc\f5.dir File(172) = recdesc\f5.dir
File(172) = recdesc\f5.trr File(173) = recdesc\f5.trr
File(173) = recdesc\f50.dir File(174) = recdesc\f50.dir
File(174) = recdesc\f50.trr File(175) = recdesc\f50.trr
File(175) = recdesc\f54.dir File(176) = recdesc\f54.dir
File(176) = recdesc\f54.trr File(177) = recdesc\f54.trr
File(177) = recdesc\f6.dir File(178) = recdesc\f6.dir
File(178) = recdesc\f6.trr File(179) = recdesc\f6.trr
File(179) = recdesc\f7.dir File(180) = recdesc\f7.dir
File(180) = recdesc\f7.trr File(181) = recdesc\f7.trr
File(181) = recdesc\f8.dir File(182) = recdesc\f8.dir
File(182) = recdesc\f8.trr File(183) = recdesc\f8.trr
File(183) = recdesc\f9.dir File(184) = recdesc\f9.dir
File(184) = recdesc\f9.trr File(185) = recdesc\f9.trr
Patch = 22 File(186) = recdesc\level.dir
Patch = 132
Versione = 19980103 Versione = 19980103

1
ba/bainst03.h Executable file
View File

@ -0,0 +1 @@
#include "bainst.h"

View File

@ -1,5 +1,3 @@
#include "bainst.h"
#define F_USAMENUAVIS 101 #define F_USAMENUAVIS 101
#define F_LOADTAB 102 #define F_LOADTAB 102
#define G_PREINST 1
#define G_POSTINST 2
#define G_DITTA 3

View File

@ -1,4 +1,2 @@
#include "bainst.h"
#define F_LOADTAB 101 #define F_LOADTAB 101
#define G_PREINST 1
#define G_POSTINST 2
#define G_DITTA 3

58
ba/bainst06.cpp Executable file
View File

@ -0,0 +1,58 @@
#include <applicat.h>
#include <mask.h>
#include <config.h>
#include <utility.h>
#include <execp.h>
#include "bainst06.h"
class TInstall_MG : public TSkeleton_application
{
TMask * _m;
protected:
virtual void main_loop() ;
virtual bool install_firm() ; // setta i dati ditta
virtual bool install_com() ; // setta i dati comuni
public:
virtual ~TInstall_MG () {}
};
// setta i dati ditta
bool TInstall_MG ::install_firm()
{
// ciclo su ogni ditta
return TRUE;
}
bool TInstall_MG ::install_com()
{
bool ok=TRUE;
if (_m->get_bool(F_LOADTAB))
{
TExternal_app rice("bacnv 1 4 mgtab.txt");
ok &= (rice.run()==0);
}
return ok;
}
void TInstall_MG::main_loop()
{
TConfig ini("install.ini","mg");
const bool primainst=ini.get("Versione").blank();
_m = new TMask ("bainst06.msk");
if (primainst)
_m->set(F_LOADTAB,"X");
if (_m->run()!=K_QUIT)
{
install_firm();
install_com();
}
}
int bainst06(int argc, char** argv)
{
TInstall_MG app;
app.run(argc, argv, "Installazione Magazzino");
return 0;
}

2
ba/bainst06.h Executable file
View File

@ -0,0 +1,2 @@
#include "bainst.h"
#define F_LOADTAB 101

23
ba/bainst06.uml Executable file
View File

@ -0,0 +1,23 @@
#include "bainst06.h"
TOOLBAR "" 0 20 0 2
BUTTON DLG_OK 10 2
BEGIN
PROMPT -11 -1 "~Conferma"
MESSAGE EXIT,K_ENTER
PICTURE BMP_OK
END
ENDPAGE
PAGE "Installazione MG" -1 -1 78 8
// GROUP 1 = PRE-INSTALLATION
// GROUP 2 = POST-INSTALLATION
BOOL F_LOADTAB
BEGIN
PROMPT 2 4 "Carica le tabelle con le causali"
END
ENDPAGE
ENDMASK

View File

@ -94,7 +94,8 @@ Item_02 = "Compatta tutti i files", "ba1 -2", ""
Item_03 = "Utenti", "ba1 -3", "" Item_03 = "Utenti", "ba1 -3", ""
Item_04 = "Attivazione moduli", "ba1 -4", "" Item_04 = "Attivazione moduli", "ba1 -4", ""
Item_05 = "Installazione moduli", "ba1 -6", "" Item_05 = "Installazione moduli", "ba1 -6", ""
Item_06 = "Backup", "ba2 -1", "" Item_06 = "Creazione dischi di installazione", "ba1 -5", ""
Item_07 = "Backup", "ba2 -1", ""
[PRASSI_019] [PRASSI_019]
Caption = "Comunicazione" Caption = "Comunicazione"

View File

@ -1,3 +1,3 @@
3 3
1 1
%tabgen|0|0|885|0|Tabelle di studio|50|| %tabgen|0|0|895|0|Tabelle di studio|50||

View File

@ -1,5 +1,5 @@
3 3
63 65
COD|1|3|0| COD|1|3|0|
CODTAB|1|25|0| CODTAB|1|25|0|
S0|1|70|0| S0|1|70|0|
@ -12,6 +12,8 @@ S6|1|5|0|
S7|1|5|0| S7|1|5|0|
S8|1|5|0| S8|1|5|0|
S9|1|5|0| S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
I0|3|7|0| I0|3|7|0|
I1|3|7|0| I1|3|7|0|
I2|3|7|0| I2|3|7|0|

View File

@ -1,3 +1,3 @@
4 4
1 1
%tabcom|0|0|885|0|Tabelle comuni|1500|| %tabcom|0|0|895|0|Tabelle comuni|1500||

View File

@ -1,5 +1,5 @@
4 4
63 65
COD|1|3|0| COD|1|3|0|
CODTAB|1|25|0| CODTAB|1|25|0|
S0|1|70|0| S0|1|70|0|
@ -12,6 +12,8 @@ S6|1|5|0|
S7|1|5|0| S7|1|5|0|
S8|1|5|0| S8|1|5|0|
S9|1|5|0| S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
I0|3|7|0| I0|3|7|0|
I1|3|7|0| I1|3|7|0|
I2|3|7|0| I2|3|7|0|

View File

@ -1,3 +1,3 @@
5 5
0 0
$tab|0|0|885|0|Tabelle ditta|400|| $tab|0|0|895|0|Tabelle ditta|400||

View File

@ -1,5 +1,5 @@
5 5
63 65
COD|1|3|0| COD|1|3|0|
CODTAB|1|25|0| CODTAB|1|25|0|
S0|1|70|0| S0|1|70|0|
@ -12,6 +12,8 @@ S6|1|5|0|
S7|1|5|0| S7|1|5|0|
S8|1|5|0| S8|1|5|0|
S9|1|5|0| S9|1|5|0|
S10|1|5|0|
S11|1|5|0|
I0|3|7|0| I0|3|7|0|
I1|3|7|0| I1|3|7|0|
I2|3|7|0| I2|3|7|0|

File diff suppressed because it is too large Load Diff