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:
parent
6ba68de641
commit
4b004eff90
@ -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();
|
||||||
|
118
ba/ba1100.cpp
118
ba/ba1100.cpp
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
435
ba/ba1600.cpp
435
ba/ba1600.cpp
@ -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;
|
virtual bool zip_file(const char* archive, const char* file) const;
|
||||||
int split_file(const TFilename& file, long size) const;
|
virtual int split_file(const TFilename& file, long size) const;
|
||||||
bool move_file(const TFilename& file, const char* dir) const;
|
virtual bool move_file(const TFilename& file, const char* dir) const;
|
||||||
bool zip_module(const TString& module, bool agg, int patch_level) const;
|
virtual bool zip_module(const TString& module, bool agg, int patch_level) const;
|
||||||
|
|
||||||
const TFilename& build_export_path(TFilename& path) const;
|
virtual bool set_version_info(const TFilename& filename,
|
||||||
|
|
||||||
long find_signature(const TFilename& filename, const char* signature) const;
|
|
||||||
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 FALSE;}
|
||||||
public:
|
public:
|
||||||
void load();
|
virtual void save();
|
||||||
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;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
virtual bool show_all_modules() {return TRUE;}
|
||||||
|
public:
|
||||||
|
virtual 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,18 +984,36 @@ bool TFascicolator_mask::patchl_handler(TMask_field& f, KEY k)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
|
|
||||||
|
bool TCreadischi_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;
|
||||||
mm.load(module);
|
mm.load(module);
|
||||||
|
if (mm.run() == K_ENTER)
|
||||||
|
mm.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TFascicolator_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(TRUE);
|
||||||
|
mm.load(module);
|
||||||
if (mm.run() == K_ENTER)
|
if (mm.run() == K_ENTER)
|
||||||
mm.save();
|
mm.save();
|
||||||
m.need_check();
|
m.need_check();
|
||||||
@ -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)
|
||||||
@ -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] == '_')
|
||||||
@ -1051,7 +1212,7 @@ void TFascicolator_mask::load()
|
|||||||
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);
|
||||||
@ -1072,16 +1233,26 @@ void TFascicolator_mask::load()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -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() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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,31 +108,32 @@ 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
|
||||||
|
@ -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
|
||||||
|
315
ba/ba1700.cpp
315
ba/ba1700.cpp
@ -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,7 +25,11 @@
|
|||||||
#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)
|
||||||
{
|
{
|
||||||
@ -53,6 +57,21 @@ HIDDEN word version2year(const char* v)
|
|||||||
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
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -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;
|
||||||
@ -292,7 +313,17 @@ 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();
|
||||||
|
|
||||||
|
ininame=path;
|
||||||
|
ininame.add(TInstall_ini::default_name());
|
||||||
|
|
||||||
TString_array modules;
|
TString_array modules;
|
||||||
|
|
||||||
@ -377,6 +408,7 @@ bool TInstaller_mask::autoload()
|
|||||||
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;
|
||||||
@ -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,10 +686,11 @@ 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);
|
||||||
@ -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;
|
||||||
@ -696,15 +768,11 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
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)
|
||||||
@ -729,85 +797,108 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
pi.addstatus(1);
|
pi.addstatus(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// ***************
|
||||||
|
// trasferimento
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
msg.cut(0);
|
// si assicura che sia leggibile il .ini del primo disco
|
||||||
msg << "Aggiornamento del modulo '" << module << "' in corso...";
|
do {
|
||||||
pi.set_text(msg);
|
cmdline = path;
|
||||||
ok = move_module(module, *ini, TRUE);
|
cmdline.add(ininame.name());
|
||||||
|
ok = fexist(cmdline);
|
||||||
TAuto_token_string altri(ini->get("Moduli", module));
|
if (!ok)
|
||||||
FOR_EACH_TOKEN(altri, mod)
|
|
||||||
{
|
|
||||||
const TString16 submod = mod;
|
|
||||||
if (submod.len() > 2) // sposta sottomoduli esterni
|
|
||||||
{
|
{
|
||||||
bool upd = ok;
|
if (askdisk(path,cmdline,1,dischi,(const char*)ini->get("Descrizione"))==K_QUIT)
|
||||||
|
break;
|
||||||
|
ok = fexist(cmdline);
|
||||||
|
if (!ok)
|
||||||
|
message_box("Impossibile trovare %s\n",(const char*)cmdline);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete ini;
|
||||||
|
ini = new TInstall_ini (cmdline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (!ok);
|
||||||
|
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) // 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)
|
if (ok)
|
||||||
{
|
{
|
||||||
TInstall_ini curini;
|
TProgind pi(files, "Copia in corso...", FALSE, TRUE);
|
||||||
const TString16 curver = curini.version(submod);
|
TFilename src, dst;
|
||||||
const int curpatch = curini.patch(submod);
|
for (int f = 0; f < files && ok; f++)
|
||||||
const TString16 reqver = ini->version(submod);
|
{
|
||||||
const int reqpatch = ini->patch(submod);
|
pi.addstatus(1);
|
||||||
|
dst = list.row(f).get(0);
|
||||||
int distance = compare_version(reqver, reqpatch, curver, curpatch);
|
src = path;
|
||||||
upd = distance > 0;
|
src.add(dst);
|
||||||
|
ok = fcopy(src, dst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
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
|
|
||||||
{
|
|
||||||
// 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)
|
|
||||||
{
|
|
||||||
ini = new TInstall_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;
|
if (ok) // marca sull'install.ini di destinazione l'avvenuta installazione del modulo
|
||||||
const int files = ini->build_complete_list(module, list);
|
ini.export_module_paragraphs(module, ini.default_name(),TRUE);
|
||||||
if (files > 0)
|
} // controllo esistenza lista di file non vuota per questo modulo
|
||||||
{
|
} // controllo esistenza install.ini
|
||||||
if (patchlevel==0)
|
} // fine installazione da directory con eseguibili
|
||||||
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)
|
|
||||||
{
|
|
||||||
if (ok) ini->export_module_paragraphs(module, ini->default_name());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
@ -822,11 +913,12 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;
|
||||||
@ -866,6 +958,16 @@ 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;
|
||||||
@ -913,10 +1015,11 @@ void TInstaller_mask::install_selection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,7 +1034,9 @@ 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)
|
||||||
@ -939,10 +1044,10 @@ void TInstaller_mask::install_selection()
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -951,6 +1056,8 @@ void TInstaller_mask::install_selection()
|
|||||||
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
|
||||||
{
|
{
|
||||||
@ -1020,11 +1127,11 @@ 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;
|
||||||
}
|
}
|
||||||
@ -1039,13 +1146,13 @@ TInstaller_mask::TInstaller_mask()
|
|||||||
|
|
||||||
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();
|
||||||
@ -1054,7 +1161,9 @@ TInstaller_mask::TInstaller_mask()
|
|||||||
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();
|
||||||
|
|
||||||
@ -1094,7 +1203,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
226
ba/bainst.ini
226
ba/bainst.ini
@ -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
1
ba/bainst03.h
Executable file
@ -0,0 +1 @@
|
|||||||
|
#include "bainst.h"
|
@ -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
|
|
||||||
|
@ -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
58
ba/bainst06.cpp
Executable 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
2
ba/bainst06.h
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#include "bainst.h"
|
||||||
|
#define F_LOADTAB 101
|
23
ba/bainst06.uml
Executable file
23
ba/bainst06.uml
Executable 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
|
@ -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"
|
||||||
|
@ -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||
|
||||||
|
@ -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|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
4
|
4
|
||||||
1
|
1
|
||||||
%tabcom|0|0|885|0|Tabelle comuni|1500||
|
%tabcom|0|0|895|0|Tabelle comuni|1500||
|
||||||
|
@ -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|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
5
|
5
|
||||||
0
|
0
|
||||||
$tab|0|0|885|0|Tabelle ditta|400||
|
$tab|0|0|895|0|Tabelle ditta|400||
|
||||||
|
@ -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|
|
||||||
|
2180
ba/install.ini
2180
ba/install.ini
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user