Skip to content

Commit 067fe6a

Browse files
committed
added '--[no-]relocatable' option
1 parent 76f0dc3 commit 067fe6a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

quickpkg

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,17 @@ if __name__ == "__main__":
354354
If this is a directory, then the
355355
package will be created with the default filename {name}-{version}.pkg''')
356356

357-
parser.add_argument('--clean', dest='clean', action='store_true', help="clean up temp files (default)")
357+
parser.add_argument('--clean', dest='clean', action='store_true', help="clean up temp files (DEFAULT)")
358358
parser.add_argument('--no-clean', dest='clean', action='store_false', help=" do NOT clean up temp files")
359359
parser.set_defaults(clean=True)
360360

361+
parser.add_argument('--relocatable', dest='relocatable', action='store_true',
362+
help="sets BundleIsRelocatable in the PackageInfo to true")
363+
parser.add_argument('--no-relocatable', dest='relocatable', action='store_false',
364+
help="sets BundleIsRelocatable in the PackageInfo (DEFAULT is false)")
365+
parser.set_defaults(relocatable=False)
366+
367+
361368
parser.add_argument("-v", "--verbosity", action="count", default=0, help="controls amount of logging output (max -vvv)")
362369
parser.add_argument('--version', help='prints the version', action='version', version=quickpkg_version)
363370

@@ -457,6 +464,15 @@ if __name__ == "__main__":
457464
print result["stderr"]
458465
cleanup_and_exit(1)
459466

467+
if not args.relocatable:
468+
# read and change component plist
469+
components = readPlist(component_plist)
470+
# component plist is an array of components
471+
for bundle in components:
472+
if "BundleIsRelocatable" in bundle.keys():
473+
bundle["BundleIsRelocatable"] = False
474+
writePlist(components, component_plist)
475+
460476
pkg_name = "{name}-{version}.pkg"
461477
if args.output:
462478
if os.path.isdir(args.output):

0 commit comments

Comments
 (0)