[Bug 18] New: [PATCH] copy files support

bugzilla-daemon at wpkg.org bugzilla-daemon at wpkg.org
Tue Feb 7 00:18:24 CET 2006


Please reply using this URL only: http://bugs.wpkg.org/show_bug.cgi?id=18

           Summary: [PATCH] copy files support
           Product: WPKG
           Version: other
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: wpkg.js
        AssignedTo: mangoo at mch.one.pl
        ReportedBy: greg at mtechsolutions.ca
         QAContact: wpkg-users at lists.wpkg.org


I needed the ability to run the normal installer for an application, and then
copy a default .ini file into the directory. I started playing around with
rebuilding the installer, but then decided that this would be a much easier
method. I did have situations in the past where I wanted my "installer" to just
copy a bunch of files to the server, so I'm sure this will be good as a general
installer.

I had to make a few structural changes to the executeOnce(), installPackage()
and upgradePackage.. basically I moved their for() loop to a new function called
runInstall(). This was more to make things simpler, as the code was (almost,
with the exception of one extra check during upgrade) identical anyways.

It adds a mode where you can do:

<install src="\\server\path\to\folder" dest="%PROGRAMFILES%\NewFolder" />

And it will copy the contents of \\oxygen\path\to\folder to NewFolder.
Optionally you can specify an overwrite="no" attribute to disallow overwriting
files, however, this is a bit buggy as it's just using the
FileSystemObject.CopyFolder method right now, and with overwrite off, if it runs
into an existing file, it just quits, even if it's already copied over half the
files. To really do this properly, a recursive function needs to be written to
copy files individually, and just not overwrite individual files. (Or
alternatively, check if any of the files exist before starting to copy, and
abort before copying anything. Perhaps two different no-overwrite modes would be
the way to go here).

Anyways. I'm using this successfully now on my system. It incorperates the same
path expansion ehancements as the patch in Bug #17

-- 
Configure bugmail: http://bugs.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wpkg-users mailing list