From 551ad587e5292d30feb6add3981252f0d48b3390 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 24 Oct 2003 07:45:38 +0000 Subject: [PATCH] Patch level : 2.0 614 Files correlati : ba1.exe Ricompilazione Demo : [ ] Commento : MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AO20113 In fase di installazione moduli su un client con "Installazione di rete con programmi su disco locale" non viene creata la cartella HTMLHELP, su ogni modulo viene pertanto restituito l'errore: "Impossibile creare il file htmlhelp\XXhelp.zip per copiare il file F:\Campo32\htmlhelp\XXhelp.zip" dove la XX sta ad indicare il modulo in questione ed F:\ è il percorso del server. Sul server nell'installazione standard invece è tutto corretto. AO20114 In fase di installazione moduli su un client con "Installazione di rete con programmi su disco locale" non vengono "unzippati" i files necessari per l'installazione dell'Help On-Line e non vengono nemmeno create le cartelle dentro le quali scompattare questi files (ba, ve, cg, ecc…); nonostante la segnalazione AO20113 ho potuto verificare questa cosa creando a mano, in fase di installazione, la cartella HTMLHELP e la cartella HTMLHELP\BA. L'unica cosa che viene riportata dal server sono i files .ZIP dell'help di ogni modulo. git-svn-id: svn://10.65.10.50/trunk@11530 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba1200.cpp | 14 +++++++------- ba/ba1700.cpp | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/ba/ba1200.cpp b/ba/ba1200.cpp index 135af2771..4100f0953 100755 --- a/ba/ba1200.cpp +++ b/ba/ba1200.cpp @@ -24,10 +24,9 @@ public: clock_t TTest_application::start_timer() const { - clock_t t, s = clock(); - do - t = clock(); - while (t == s); + clock_t t = clock(); + while (clock() == t); + t = clock(); return t; } @@ -56,7 +55,8 @@ void TTest_application::test1() } } const clock_t t = clock() - start; - msg.format("%ld records in %ld msec\n%lg records per sec", r, t, 1000.0*r/t); + msg.format("Lettura file comuni\n" + "%ld records in %ld msec\n%lg records per sec", r, t, 1000.0*r/t); message_box(msg); } @@ -81,7 +81,7 @@ void TTest_application::test2() for (tab = 0; tab.pos() < n; ++tab) r++; - msg.format("%ld records %ld msec", r, clock() - start); + msg.format("Lettura cursore comuni\n%ld records %ld msec", r, clock() - start); p.addstatus(1); p.set_text(msg); if (p.iscancelled()) @@ -117,7 +117,7 @@ void TTest_application::test3() for (tab = 0; tab.pos() < n; ++tab) r++; - msg.format("%ld records %ld msec", r, clock() - start); + msg.format("Lettura cursore C.A.P.\n%ld records %ld msec", r, clock() - start); p.addstatus(1); p.set_text(msg); if (p.iscancelled()) diff --git a/ba/ba1700.cpp b/ba/ba1700.cpp index d53c387d2..15ef39b66 100755 --- a/ba/ba1700.cpp +++ b/ba/ba1700.cpp @@ -572,6 +572,27 @@ bool TInstaller_mask::is_zip_file(const TFilename& n) const return xvt_str_compare_ignoring_case(ext, "zip") == 0; } +void TInstaller_mask::create_dirs(const char* path) const +{ + TToken_string dirs(path, SLASH); + if (SLASH == '\\') + dirs.replace('/', SLASH); + else + dirs.replace('\\', SLASH); + + // file contains non existent subdir specification ? + TFilename subdir; + for (int c=0; c < dirs.items()-1; c++) + { + subdir.add(dirs.get(c)); + if (subdir.right(1) == ":" ) + subdir << SLASH; + if (!subdir.exist() ) + // build destination directory + make_dir(subdir); + } +} + // sposta il file dal direttorio temporaneo a quello passato come destinazione bool TInstaller_mask::move_file(const TFilename& src, const TFilename& dst) const { @@ -584,20 +605,7 @@ bool TInstaller_mask::move_file(const TFilename& src, const TFilename& dst) cons } if (!dest.exist()) - { - TToken_string dirs(dest.path(), SLASH); - // file contains non existent subdir specification ? - TFilename subdir; - for (int c=0; c < dirs.items()-1; c++) - { - subdir.add(dirs.get(c)); - if (subdir.right(1) == ":" ) - subdir << SLASH; - if (!subdir.exist() ) - // build destination directory - make_dir(subdir); - } - } + create_dirs(dest.path()); const bool is_zip = is_zip_file(src); const long filesize = fsize(src) * (is_zip ? 4 : 1); @@ -931,7 +939,12 @@ bool TInstaller_mask::install(const TString& module, int patchlevel) dst.rtrim(1); dst << '_'; } + if (!dst.exist()) + create_dirs(dst.path()); + ok = ::fcopy(src, dst); + if (ok && is_zip_file(src)) + aga_unzip(src, dst.path()); if (ok && reboot != NONE) _reboot_program |= reboot;