Patch level : 1.32 nopatch
Files correlati : Tg2-Odeon ... Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@10257 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b4592c4df8
commit
24035af0d5
@ -24,7 +24,8 @@ int main(int argc,char** argv)
|
|||||||
ba1700(argc,argv); break;
|
ba1700(argc,argv); break;
|
||||||
case 7:
|
case 7:
|
||||||
ba1800(argc,argv); break;
|
ba1800(argc,argv); break;
|
||||||
|
case 8:
|
||||||
|
ba1900(argc,argv); break;
|
||||||
default:
|
default:
|
||||||
ba1100(argc,argv); break; // Manutenzione
|
ba1100(argc,argv); break; // Manutenzione
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ public:
|
|||||||
virtual ~TInformazione_moduli() {};
|
virtual ~TInformazione_moduli() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool update_dninst(bool force);
|
||||||
bool update_assistance_year();
|
bool update_assistance_year();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -107,14 +107,13 @@ HIDDEN int module2number(const TString& mod)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool update_assistance_year()
|
bool update_dninst(bool force)
|
||||||
{
|
{
|
||||||
const TFilename keys_name = "dninst.zip";
|
const TFilename keys_name = "dninst.zip";
|
||||||
TFilename remote_name;
|
if (force || !keys_name.exist())
|
||||||
if (remote_name.empty()) // Dummy test
|
|
||||||
{
|
{
|
||||||
TConfig ini("install.ini", "Main");
|
TConfig ini("install.ini", "Main");
|
||||||
remote_name = ini.get("DiskPath");
|
TFilename remote_name = ini.get("DiskPath");
|
||||||
if (os_is_removable_drive(remote_name))
|
if (os_is_removable_drive(remote_name))
|
||||||
message_box("Assicuratevi che il CD di installazione sia nel lettore %c:", remote_name[0]);
|
message_box("Assicuratevi che il CD di installazione sia nel lettore %c:", remote_name[0]);
|
||||||
remote_name.add(keys_name);
|
remote_name.add(keys_name);
|
||||||
@ -124,9 +123,15 @@ bool update_assistance_year()
|
|||||||
else
|
else
|
||||||
build_dninst(remote_name);
|
build_dninst(remote_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
TScanner keys(keys_name);
|
bool update_assistance_year()
|
||||||
|
{
|
||||||
|
update_dninst(TRUE);
|
||||||
|
|
||||||
|
TScanner keys("dninst.zip");
|
||||||
bool ok = FALSE;
|
bool ok = FALSE;
|
||||||
if (keys.ok())
|
if (keys.ok())
|
||||||
{
|
{
|
||||||
@ -147,7 +152,7 @@ bool update_assistance_year()
|
|||||||
break;
|
break;
|
||||||
decode_string(dninst_key, line.get_buffer());
|
decode_string(dninst_key, line.get_buffer());
|
||||||
sn = atoi(line);
|
sn = atoi(line);
|
||||||
if (sn == serno || line[0] == '*')
|
if (sn == serno)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
TToken_string moduli(line, ';');
|
TToken_string moduli(line, ';');
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <agasys.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <defmask.h>
|
#include <defmask.h>
|
||||||
@ -1583,12 +1584,17 @@ bool TCreadischi_mask::zip_file(const char* archive, const char* listfile) const
|
|||||||
|
|
||||||
TIndwin waitw(100,msg,FALSE,FALSE);
|
TIndwin waitw(100,msg,FALSE,FALSE);
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
|
||||||
|
#ifdef XVAGA
|
||||||
|
return aga_zip_filelist(listfile, archive);
|
||||||
|
#else
|
||||||
TFilename cmd;
|
TFilename cmd;
|
||||||
int err=0;
|
int err=0;
|
||||||
cmd << "zip.pif " << archive << ' ' << listfile;
|
cmd << "zip.pif " << archive << ' ' << listfile;
|
||||||
TExternal_app app(cmd);
|
TExternal_app app(cmd);
|
||||||
err = app.run(FALSE, FALSE, FALSE, FALSE);
|
err = app.run(FALSE, FALSE, FALSE, FALSE);
|
||||||
return err == 0;
|
return err == 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCreadischi_mask::move_file(const TFilename& file, const char* dir) const
|
bool TCreadischi_mask::move_file(const TFilename& file, const char* dir) const
|
||||||
@ -2033,8 +2039,6 @@ int find(const TString& name, TString_array & rows)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int ba1600(int argc, char* argv[])
|
int ba1600(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if (user() == ::dongle().administrator())
|
if (user() == ::dongle().administrator())
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <colors.h>
|
|
||||||
#include <defmask.h>
|
#include <defmask.h>
|
||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
@ -8,8 +7,8 @@
|
|||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <prefix.h>
|
|
||||||
#include <urldefid.h>
|
#include <agasys.h>
|
||||||
|
|
||||||
#include "ba1.h"
|
#include "ba1.h"
|
||||||
#include "ba1500.h"
|
#include "ba1500.h"
|
||||||
@ -271,21 +270,7 @@ bool TInstaller_mask::autoload()
|
|||||||
|
|
||||||
if (internet)
|
if (internet)
|
||||||
{
|
{
|
||||||
parse_internet_path(http_server,http_path );
|
parse_internet_path(http_server,http_path);
|
||||||
/* http_server = get(F_PATH);
|
|
||||||
if (http_server.compare("http://", 7, TRUE) == 0)
|
|
||||||
http_server.ltrim(7);
|
|
||||||
|
|
||||||
const int slash = http_server.find('/');
|
|
||||||
if (slash > 0)
|
|
||||||
{
|
|
||||||
http_path = http_server.mid(slash);
|
|
||||||
if (http_path.right(1) != "/")
|
|
||||||
http_path << '/';
|
|
||||||
http_server.cut(slash);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
http_path = http_default_path;*/
|
|
||||||
|
|
||||||
make_dir(path);
|
make_dir(path);
|
||||||
|
|
||||||
@ -325,11 +310,6 @@ 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();
|
force_update();
|
||||||
|
|
||||||
@ -342,8 +322,8 @@ bool TInstaller_mask::autoload()
|
|||||||
{
|
{
|
||||||
// Presente il file ini generale "install.ini"
|
// Presente il file ini generale "install.ini"
|
||||||
TInstall_ini ini(ininame);
|
TInstall_ini ini(ininame);
|
||||||
|
|
||||||
ini.list_paragraphs(modules);
|
ini.list_paragraphs(modules);
|
||||||
|
|
||||||
FOR_EACH_ARRAY_ROW(modules, i, row)
|
FOR_EACH_ARRAY_ROW(modules, i, row)
|
||||||
{
|
{
|
||||||
const TString& module = *row;
|
const TString& module = *row;
|
||||||
@ -580,27 +560,14 @@ bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, co
|
|||||||
bool space_ok = FALSE;
|
bool space_ok = FALSE;
|
||||||
while (!space_ok)
|
while (!space_ok)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
int disk = 0;
|
|
||||||
if (dest[1] == ':')
|
|
||||||
{
|
|
||||||
const char letter = toupper(dest[0]);
|
|
||||||
disk = 'A' - letter + 1;
|
|
||||||
}
|
|
||||||
struct _diskfree_t drive;
|
|
||||||
_dos_getdiskfree(disk, &drive);
|
|
||||||
|
|
||||||
const unsigned requested_clusters = unsigned(filesize / drive.sectors_per_cluster / drive.bytes_per_sector) + 1;
|
|
||||||
space_ok = requested_clusters <= drive.avail_clusters;
|
|
||||||
*/
|
|
||||||
space_ok = os_test_disk_free_space(dest, filesize);
|
space_ok = os_test_disk_free_space(dest, filesize);
|
||||||
if (!space_ok)
|
if (!space_ok)
|
||||||
{
|
{
|
||||||
TString msg;
|
TString msg;
|
||||||
msg << "Lo spazio su disco e' insufficiente:\n";
|
msg << "Lo spazio sull'unita' e' insufficiente";
|
||||||
if (::os_is_removable_drive(todir))
|
if (os_is_removable_drive(dest))
|
||||||
{
|
{
|
||||||
msg << "Inserire un nuovo disco e ritentare?";
|
msg << ":\nInserire un nuovo disco e ritentare?";
|
||||||
if (!yesno_box(msg))
|
if (!yesno_box(msg))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -781,17 +748,21 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
{
|
{
|
||||||
TFilename remote = cmdline.name();
|
TFilename remote = cmdline.name();
|
||||||
remote.insert(http_path, 0);
|
remote.insert(http_path, 0);
|
||||||
http_get(http_server, remote, cmdline);
|
if (!http_get(http_server, remote, cmdline))
|
||||||
|
error_box("Errore di trasferimento del file '%s'", (const char*)remote);
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = cmdline.exist();
|
ok = cmdline.exist();
|
||||||
while (!ok)
|
if (!ok && !internet) // Chiedi cambio disco (sole se non sta scaricando da internet)
|
||||||
{
|
{
|
||||||
if (askdisk(path,cmdline,d,dischi,(const char*)ini->get("Descrizione"))==K_QUIT)
|
while (!ok)
|
||||||
break;
|
{
|
||||||
ok = fexist(cmdline);
|
if (askdisk(path,cmdline,d,dischi,(const char*)ini->get("Descrizione"))==K_QUIT)
|
||||||
if (!ok)
|
break;
|
||||||
message_box("Impossibile trovare %s\n",(const char*)cmdline);
|
ok = fexist(cmdline);
|
||||||
|
if (!ok)
|
||||||
|
message_box("Impossibile trovare il file '%s'",(const char*)cmdline);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
@ -807,11 +778,14 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
#ifdef XVAGA
|
||||||
|
aga_unzip(cmdline, tempdir);
|
||||||
|
#else
|
||||||
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;
|
||||||
|
#endif
|
||||||
pi.addstatus(1);
|
pi.addstatus(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -845,8 +819,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
|||||||
pi.set_text(msg);
|
pi.set_text(msg);
|
||||||
ok = move_module(module, *ini, TRUE);
|
ok = move_module(module, *ini, TRUE);
|
||||||
|
|
||||||
TAuto_token_string altri(ini->get("Moduli", module));
|
if (ok)
|
||||||
FOR_EACH_TOKEN(altri, mod)
|
|
||||||
{
|
{
|
||||||
TAuto_token_string altri(ini->get("Moduli", module));
|
TAuto_token_string altri(ini->get("Moduli", module));
|
||||||
FOR_EACH_TOKEN(altri, mod)
|
FOR_EACH_TOKEN(altri, mod)
|
||||||
@ -1207,9 +1180,7 @@ 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");
|
||||||
|
|
||||||
//TMask::add_button(F_UPDATE, 0, "Rileggi", 60,1,9,1,""/*,BMP_LINK*/);
|
|
||||||
add_button(F_UPDATE, "Rileggi", '\0');
|
add_button(F_UPDATE, "Rileggi", '\0');
|
||||||
//TMask::add_button(F_INSTALL, 0, "Installa", 60,1,9,1,""/*,BMP_LINK*/);
|
|
||||||
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);
|
||||||
@ -1293,13 +1264,13 @@ protected:
|
|||||||
|
|
||||||
bool TInstaller::testdatabase() const
|
bool TInstaller::testdatabase() const
|
||||||
{
|
{
|
||||||
TConfig ini(CONFIG_INSTALL);
|
TConfig ini(CONFIG_INSTALL, "Main");
|
||||||
return ini.get("TestDatabase","Main",-1,"Y") != "N";
|
return ini.get("TestDatabase","Main",-1,"Y") != "N";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInstaller::testprograms() const
|
bool TInstaller::testprograms() const
|
||||||
{
|
{
|
||||||
TConfig ini(CONFIG_INSTALL);
|
TConfig ini(CONFIG_INSTALL, "Main");
|
||||||
char c = ini.get("TestPrograms","Main",-1,"N")[0];
|
char c = ini.get("TestPrograms","Main",-1,"N")[0];
|
||||||
return c == 'X' || c == 'Y';
|
return c == 'X' || c == 'Y';
|
||||||
}
|
}
|
||||||
@ -1318,6 +1289,8 @@ bool TInstaller::create()
|
|||||||
attivazione.run();
|
attivazione.run();
|
||||||
dongle().login(); // Rilegge anno assistenza
|
dongle().login(); // Rilegge anno assistenza
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
update_dninst(FALSE); // Aggiorna se necessario
|
||||||
|
|
||||||
if (testprograms())
|
if (testprograms())
|
||||||
{
|
{
|
||||||
@ -1360,6 +1333,8 @@ bool TExtendedInstaller::create()
|
|||||||
attivazione.run();
|
attivazione.run();
|
||||||
dongle().login(); // Rilegge anno assistenza
|
dongle().login(); // Rilegge anno assistenza
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
update_dninst(FALSE); // Aggiorna se necessario
|
||||||
|
|
||||||
_m = new TInstaller_mask() ;
|
_m = new TInstaller_mask() ;
|
||||||
return TSkeleton_application::create();
|
return TSkeleton_application::create();
|
||||||
|
18
ba/ba2.cpp
18
ba/ba2.cpp
@ -8,18 +8,12 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
switch (r)
|
switch (r)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1: ba2200(argc, argv); break;
|
||||||
ba2200(argc, argv); break;
|
case 2: ba2300(argc, argv); break;
|
||||||
case 2:
|
case 3: ba2400(argc, argv); break;
|
||||||
ba2300(argc, argv) ; break;
|
case 4: ba2500(argc, argv); break;
|
||||||
case 3:
|
case 5: ba2600(argc, argv); break;
|
||||||
ba2400(argc, argv) ; break;
|
default: ba2100(argc, argv); break;
|
||||||
case 4:
|
|
||||||
ba2500(argc, argv) ; break;
|
|
||||||
case 5:
|
|
||||||
ba2600(argc, argv) ; break;
|
|
||||||
default:
|
|
||||||
ba2100(argc, argv); break;
|
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
#ifndef XVAGA
|
#include <agasys.h>
|
||||||
#define XVT_INCL_NATIVE
|
|
||||||
#include <archives.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <automask.h>
|
#include <automask.h>
|
||||||
#include <config.h>
|
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
@ -41,28 +37,28 @@ public:
|
|||||||
|
|
||||||
TArchive_mask::TArchive_mask() : TAutomask("ba2200")
|
TArchive_mask::TArchive_mask() : TAutomask("ba2200")
|
||||||
{
|
{
|
||||||
#if XVT_OS == XVT_OS_WIN16
|
|
||||||
TList_field& lf = (TList_field&)field(F_FLOPPY);
|
TList_field& lf = (TList_field&)field(F_FLOPPY);
|
||||||
TToken_string codes, values;
|
TToken_string codes, values;
|
||||||
TString4 str;
|
TString4 str;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
for (int d = 0; d < 26; d++)
|
for (int d = 0; d < 26; d++)
|
||||||
{
|
{
|
||||||
UINT t = ::GetDriveType(d);
|
str.format("%c:/", d+'A');
|
||||||
if (t != 0)
|
const bool isrem = os_is_removable_drive(str);
|
||||||
|
const bool isfix = !isrem && os_is_fixed_drive(str);
|
||||||
|
if (isrem || isfix)
|
||||||
{
|
{
|
||||||
str.format("%c:", d+'A');
|
str.rtrim(1); // Togli slash finale
|
||||||
codes.add(str);
|
codes.add(str);
|
||||||
values.add(str);
|
values.add(str);
|
||||||
TToken_string& message = *lf.message(k++, TRUE);
|
TToken_string& message = *lf.message(k++, TRUE);
|
||||||
if (t == DRIVE_REMOVABLE)
|
if (isrem)
|
||||||
message.format("DISABLE,%d", F_PATH);
|
message.format("DISABLE,%d", F_PATH);
|
||||||
else
|
else
|
||||||
message.format("ENABLE,%d", F_PATH);
|
message.format("ENABLE,%d", F_PATH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lf.replace_items(codes, values);
|
lf.replace_items(codes, values);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TArchive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TArchive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
@ -154,8 +150,6 @@ KEY TArchive_app::query(int& mode, long& firm, TFilename& floppy_path, TString&
|
|||||||
mode |= 0x4;
|
mode |= 0x4;
|
||||||
if (m.get_bool(F_770))
|
if (m.get_bool(F_770))
|
||||||
mode |= 0x8;
|
mode |= 0x8;
|
||||||
if (m.get_bool(F_CESP))
|
|
||||||
mode |= 0x10;
|
|
||||||
|
|
||||||
floppy_path.format("%c:%c", toupper(m.get(F_FLOPPY)[0]), SLASH);
|
floppy_path.format("%c:%c", toupper(m.get(F_FLOPPY)[0]), SLASH);
|
||||||
floppy_path.add(m.get(F_PATH));
|
floppy_path.add(m.get(F_PATH));
|
||||||
@ -228,30 +222,21 @@ bool TArchive_app::zip_dir(const TFilename& name, unsigned long max_chunk)
|
|||||||
tmp.ext("zip");
|
tmp.ext("zip");
|
||||||
|
|
||||||
TFilename filenames = name; filenames.add("*.*");
|
TFilename filenames = name; filenames.add("*.*");
|
||||||
ofstream o("ziplist.txt");
|
|
||||||
o << filenames << endl;
|
|
||||||
o.close();
|
|
||||||
|
|
||||||
TString msg;
|
TString msg;
|
||||||
msg << "Creazione del file temporaneo " << tmp << "...";
|
msg << "Creazione del file temporaneo " << tmp << "...";
|
||||||
|
|
||||||
TIndwin waitw(100,msg,FALSE,FALSE);
|
TIndwin waitw(100,msg,FALSE,FALSE);
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
|
||||||
TFilename cmd;
|
bool ok = aga_zip(filenames, tmp);
|
||||||
cmd << "zip.pif " << tmp << ' ' << "ziplist.txt" << " -j"; // -j NON salvare i path
|
if (ok && tmp.exist())
|
||||||
TExternal_app app(cmd);
|
{
|
||||||
int err = app.run(FALSE, FALSE, FALSE, FALSE);
|
ok = split_file(tmp, max_chunk);
|
||||||
remove("ziplist.txt");
|
remove(tmp);
|
||||||
|
}
|
||||||
if (err == 0 && tmp.exist())
|
|
||||||
{
|
return ok;
|
||||||
if (!split_file(tmp, max_chunk))
|
|
||||||
err = 1;
|
|
||||||
remove(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return err == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TArchive_app::can_save_as(const TFilename& src, const TFilename& dst) const
|
bool TArchive_app::can_save_as(const TFilename& src, const TFilename& dst) const
|
||||||
@ -402,13 +387,6 @@ void TArchive_app::backup(int mode, long firm, const TFilename& floppy_path, con
|
|||||||
ok = zip_dir(name, max_chunk);
|
ok = zip_dir(name, max_chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok && (mode & 0x10))
|
|
||||||
{
|
|
||||||
name = firm2dir(-1); // __ptprf
|
|
||||||
name.add("cesp"); // Aggiungi cespiti
|
|
||||||
ok = zip_dir(name, max_chunk);
|
|
||||||
}
|
|
||||||
|
|
||||||
prefix().set(old); // Ripristina prefix
|
prefix().set(old); // Ripristina prefix
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
@ -525,9 +503,6 @@ void TArchive_app::restore(int mode, long firm, const TFilename& floppy_path)
|
|||||||
if (mode & 0x8)
|
if (mode & 0x8)
|
||||||
read_paragraph(ini, "m770");
|
read_paragraph(ini, "m770");
|
||||||
|
|
||||||
if (mode & 0x10)
|
|
||||||
read_paragraph(ini, "cesp");
|
|
||||||
|
|
||||||
const int tot = _zip_list.items();
|
const int tot = _zip_list.items();
|
||||||
if (tot > 0)
|
if (tot > 0)
|
||||||
{
|
{
|
||||||
@ -571,40 +546,15 @@ void TArchive_app::interactive_mode()
|
|||||||
{
|
{
|
||||||
if (k == K_SAVE)
|
if (k == K_SAVE)
|
||||||
{
|
{
|
||||||
const bool use_zip = TRUE;
|
backup(mode, firm, floppy_path, desc);
|
||||||
if (use_zip)
|
|
||||||
backup(mode, firm, floppy_path, desc);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TArchive arc;
|
|
||||||
arc.backup(mode, firm, floppy_path[0], desc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TFilename ini_name; ini_name = floppy_path; ini_name.add("backup.ini");
|
TFilename ini_name = floppy_path; ini_name.add("backup.ini");
|
||||||
if (os_is_removable_drive(floppy_path.left(3)))
|
if (os_is_removable_drive(floppy_path.left(3)))
|
||||||
message_box("Inserire il primo disco del backup nel drive %c", floppy_path[0]);
|
message_box("Inserire il primo disco del backup nel drive %c", floppy_path[0]);
|
||||||
if (ini_name.exist())
|
if (ini_name.exist())
|
||||||
{
|
restore(mode, firm, floppy_path);
|
||||||
#ifdef XVAGA
|
|
||||||
restore(mode, firm, floppy_path);
|
|
||||||
#else
|
|
||||||
bool use_zip = FALSE;
|
|
||||||
{
|
|
||||||
TConfig ini(ini_name, "Main");
|
|
||||||
ini.write_protect();
|
|
||||||
use_zip = ini.get("Format").compare("zip", TRUE) == 0;
|
|
||||||
}
|
|
||||||
if (use_zip)
|
|
||||||
restore(mode, firm, floppy_path);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TArchive arc;
|
|
||||||
arc.restore(mode, firm, floppy_path[0], FALSE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
error_box("Impossibile trovare il file %s", (const char*)ini_name);
|
error_box("Impossibile trovare il file %s", (const char*)ini_name);
|
||||||
}
|
}
|
||||||
|
@ -11,4 +11,3 @@
|
|||||||
#define F_COM 111
|
#define F_COM 111
|
||||||
#define F_CONFIG 112
|
#define F_CONFIG 112
|
||||||
#define F_770 113
|
#define F_770 113
|
||||||
#define F_CESP 114
|
|
||||||
|
@ -7,6 +7,7 @@ BEGIN
|
|||||||
PROMPT 1 1 "Disco "
|
PROMPT 1 1 "Disco "
|
||||||
ITEM "A|A:" MESSAGE CLEAR,F_PATH
|
ITEM "A|A:" MESSAGE CLEAR,F_PATH
|
||||||
ITEM "B|B:" MESSAGE CLEAR,F_PATH
|
ITEM "B|B:" MESSAGE CLEAR,F_PATH
|
||||||
|
ITEM "C|C:" MESSAGE ENABLE,F_PATH
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_PATH 45
|
STRING F_PATH 45
|
||||||
@ -17,7 +18,7 @@ END
|
|||||||
BOOLEAN F_DITTA
|
BOOLEAN F_DITTA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 2 "Dati ditta"
|
PROMPT 1 2 "Dati ditta"
|
||||||
MESSAGE TRUE ENABLE,1@|"X",F_770|"X",F_CESP
|
MESSAGE TRUE ENABLE,1@|"X",F_770
|
||||||
MESSAGE FALSE CLEAR,1@
|
MESSAGE FALSE CLEAR,1@
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -37,11 +38,6 @@ BEGIN
|
|||||||
PROMPT 1 5 "Dati 770"
|
PROMPT 1 5 "Dati 770"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_CESP
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 6 "Cespiti"
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 15 2 ""
|
PROMPT 15 2 ""
|
||||||
@ -64,7 +60,7 @@ END
|
|||||||
BUTTON F_ALL 10 2
|
BUTTON F_ALL 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 58 4 "~Tutti"
|
PROMPT 58 4 "~Tutti"
|
||||||
MESSAGE "X",F_DITTA|"X",F_COM|"X",F_CONFIG|"X",F_770|"X",F_CESP|"",F_CODDITTA
|
MESSAGE "X",F_DITTA|"X",F_COM|"X",F_CONFIG|"X",F_770|"",F_CODDITTA
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCR 50
|
STRING F_DESCR 50
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
class TConfig;
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class TArchive_app : public TSkeleton_application
|
class TArchive_app : public TSkeleton_application
|
||||||
|
Loading…
x
Reference in New Issue
Block a user