Zipping an application package by script
Chipp Walters
chipp at chipp.com
Fri Sep 12 00:03:18 EDT 2008
OOPS, the previous routines depended on Altuit's revZipper.dll for windows.
This one works with Rev's versions. I still use the altUnzip one above for
Mac. This is a more dedicated one, but I'm sure the necessary bits can be
used. Sorry if this has already been handled.
on UnzipWxPythonZip
put mgcTempPath() & "/" & "wxPythonPC.zip" into tZipPath
if there is not a file tZipPath then
answer information "No file to Unzip!" &cr& tZipPath
exit to top
end if
put gVuePath into tFolderToUnzipTo
if there is not a folder tFolderToUnzipTo then create folder
tFolderToUnzipTo
set the cursor to busy
revUnZip tZipPath,tFolderToUnzipTo
altBusy false
if the result is not empty then
answer warning the result
exit to top
end if
answer information "WxPython Installed Successfully!"
end UnzipWxPythonZip
on UnzipWxPythonMacZip
put mgcTempPath() & "/" & "wxPythonMAC.zip" into tZipPath
if there is not a file tZipPath then
wait 1 second with messages
end if
if there is not a file tZipPath then
answer information "No file to Unzip!" &cr& tZipPath
exit to top
end if
altBusy true,"Installing Files..."
put gVuePath into tFolderToUnzipTo
if there is not a folder tFolderToUnzipTo then create folder
tFolderToUnzipTo
set the cursor to busy
altUnZip tZipPath,tFolderToUnzipTo
altBusy false
if the result is not empty then
answer warning the result
exit to top
end if
answer information "WxPython Installed Successfully!"
end UnzipWxPythonMacZip
I also forgot the WinXP unlock file function in the previous post:
function altUnlockWinFile pFilePath
if the platform is "Win32" then
put pFilePath into tfile
replace "/" with "\" in tfile
put "attrib"&& quote & tfile & quote && "-R" into DosCommand
put DosCommand
set the hideConsoleWindows to true
put shell (DosCommand)
return true
end if
end altUnlockWinFile
More information about the use-livecode
mailing list