2003-01-07 12:20:49 +00:00
|
|
|
#include <modaut.h>
|
2002-07-30 14:11:47 +00:00
|
|
|
#include <tabutil.h>
|
1998-11-04 18:04:26 +00:00
|
|
|
#include <utility.h>
|
2007-06-08 08:57:47 +00:00
|
|
|
|
|
|
|
#include "bainstlib.h"
|
1998-11-04 18:04:26 +00:00
|
|
|
#include "bainst17.h"
|
|
|
|
|
|
|
|
class TInstall_AT : public TInstallmodule_app
|
|
|
|
{
|
|
|
|
protected:
|
2007-06-08 08:57:47 +00:00
|
|
|
virtual bool something_to_load() const ;
|
2002-12-20 16:15:03 +00:00
|
|
|
virtual int module_number() const {return ATAUT;}
|
1998-11-04 18:04:26 +00:00
|
|
|
|
|
|
|
virtual bool preload_mask() ;
|
|
|
|
bool post_installer() ;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual ~TInstall_AT () {}
|
|
|
|
};
|
|
|
|
|
2002-12-20 16:15:03 +00:00
|
|
|
//controlla la tabella idoneita': se risulta vuota -> deve caricare i dati di default
|
2007-06-08 08:57:47 +00:00
|
|
|
bool TInstall_AT ::something_to_load() const
|
2002-07-30 14:11:47 +00:00
|
|
|
{
|
|
|
|
if (prefix().get_codditta() <= 0)
|
2007-06-08 08:57:47 +00:00
|
|
|
return true;
|
2002-07-30 14:11:47 +00:00
|
|
|
TTable ido("IDO");
|
|
|
|
const bool empty = ido.first() != NOERR;
|
|
|
|
|
|
|
|
return empty;
|
1998-11-04 18:04:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TInstall_AT ::post_installer()
|
|
|
|
{
|
2007-06-08 08:57:47 +00:00
|
|
|
bool ok = true;
|
1998-11-04 18:04:26 +00:00
|
|
|
if (_m->get_bool(F_USAMENUAVIS))
|
2002-12-20 16:15:03 +00:00
|
|
|
{
|
2007-06-08 08:57:47 +00:00
|
|
|
ok = fcopy("agaat.men","bamenu.men");
|
2002-12-20 16:15:03 +00:00
|
|
|
TConfig config (CONFIG_STUDIO, "at");
|
|
|
|
config.set("EdMask", "at0500a.msk");
|
|
|
|
config.set("EdApp", "at0 -4");
|
|
|
|
}
|
|
|
|
|
1998-11-04 18:04:26 +00:00
|
|
|
return ok;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TInstall_AT::preload_mask()
|
|
|
|
{
|
|
|
|
_m->field(F_USAMENUAVIS).set("X");
|
|
|
|
return TInstallmodule_app::preload_mask();
|
|
|
|
}
|
|
|
|
|
|
|
|
int bainst17(int argc, char** argv)
|
|
|
|
{
|
|
|
|
TInstall_AT app;
|
|
|
|
app.run(argc, argv);
|
|
|
|
return 0;
|
|
|
|
}
|