summaryrefslogtreecommitdiffstats
path: root/Mac/scripts/buildpkg.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/scripts/buildpkg.py')
-rw-r--r--Mac/scripts/buildpkg.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py
index 88d8b59..280f8ae 100644
--- a/Mac/scripts/buildpkg.py
+++ b/Mac/scripts/buildpkg.py
@@ -70,6 +70,7 @@ Relocatable
Required
InstallOnly
RequiresReboot
+RootVolumeOnly
InstallFat\
"""
@@ -147,6 +148,7 @@ class PackageMaker:
'Required': 'NO',
'InstallOnly': 'NO',
'RequiresReboot': 'NO',
+ 'RootVolumeOnly' : 'NO',
'InstallFat': 'NO'}
@@ -280,13 +282,15 @@ class PackageMaker:
allFiles = allFiles + glob.glob(pattern)
# find pre-process and post-process scripts
- # naming convention: packageName.{pre,post}-{upgrade,install}
- # Alternatively the filenames can be {pre,post}-{upgrade,install}
+ # naming convention: packageName.{pre,post}_{upgrade,install}
+ # Alternatively the filenames can be {pre,post}_{upgrade,install}
# in which case we prepend the package name
packageName = self.packageInfo["Title"]
- for pat in ("*upgrade", "*install"):
+ for pat in ("*upgrade", "*install", "*flight"):
pattern = join(self.resourceFolder, packageName + pat)
+ pattern2 = join(self.resourceFolder, pat)
allFiles = allFiles + glob.glob(pattern)
+ allFiles = allFiles + glob.glob(pattern2)
# check name patterns
files = []
@@ -296,15 +300,19 @@ class PackageMaker:
files.append((f, f))
if f[-6:] == ".lproj":
files.append((f, f))
- elif f in ["pre-upgrade", "pre-install", "post-upgrade", "post-install"]:
- files.append((f, self.packageInfo["Title"]+"."+f))
- elif f[-8:] == "-upgrade":
+ elif basename(f) in ["pre_upgrade", "pre_install", "post_upgrade", "post_install"]:
+ files.append((f, packageName+"."+basename(f)))
+ elif basename(f) in ["preflight", "postflight"]:
+ files.append((f, f))
+ elif f[-8:] == "_upgrade":
files.append((f,f))
- elif f[-8:] == "-install":
+ elif f[-8:] == "_install":
files.append((f,f))
# copy files
for src, dst in files:
+ src = basename(src)
+ dst = basename(dst)
f = join(self.resourceFolder, src)
if isfile(f):
shutil.copy(f, os.path.join(self.packageResourceFolder, dst))