[vlc-commits] [Git][videolan/vlc][master] 2 commits: package/win32: remove -pdb option from heat Python script

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Nov 25 15:12:40 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
075e167c by Steve Lhomme at 2024-11-25T14:46:24+00:00
package/win32: remove -pdb option from heat Python script

It's not handled. And BooleanOptionalAction only available since Python 3.9.
And we don't want to put the .pdb files in the .msi.

- - - - -
c198c3a1 by Steve Lhomme at 2024-11-25T14:46:24+00:00
package/win32: fix relative path joining with older Python

It's not supported with a Path before 3.6 [1].

[1] https://docs.python.org/3/library/os.path.html#os.path.join

- - - - -


1 changed file:

- extras/package/win32/msi/msi-heat.py


Changes:

=====================================
extras/package/win32/msi/msi-heat.py
=====================================
@@ -27,7 +27,6 @@ import hashlib
 parser = argparse.ArgumentParser(description="Generate WIX compatible wxs listing")
 parser.add_argument('-d', "--dir", type=pathlib.Path, help='directory with files to list')
 parser.add_argument('-out', type=argparse.FileType('w', encoding='UTF-8'), help="output file")
-parser.add_argument('-pdb', action=argparse.BooleanOptionalAction, help='keep PDB files', default=False)
 parser.add_argument('-dr', "--directory-reference", help='directory reference')
 parser.add_argument('-cg', "--component-group", help='component group')
 args, remaining = parser.parse_known_args()
@@ -50,7 +49,7 @@ args.out.write('        <DirectoryRef Id="{}">\r\n'.format(args.directory_refere
 
 fileIdList =[]
 
-def outputDir(top, parent: str, dir: str, with_pdb: bool):
+def outputDir(top, parent: str, dir: str):
     cwd = top.joinpath(parent).joinpath(dir)
     dirName = os.path.join(parent, dir)
     if dir=='':
@@ -65,7 +64,7 @@ def outputDir(top, parent: str, dir: str, with_pdb: bool):
             if not file.is_dir():
                 # args.out.write('          file   <{}>\r\n'.format(file))
                 if not file.name.endswith('.pdb'):
-                    outname = os.path.join(top.name, file.relative_to(top))
+                    outname = os.path.join(top.name, str(file.relative_to(top)))
                     fileId = generate_id('cmp', outname)
                     args.out.write('                    <Component Id="{}" Guid="*">\r\n'.format(fileId))
                     fileIdList.append(fileId)
@@ -75,13 +74,13 @@ def outputDir(top, parent: str, dir: str, with_pdb: bool):
         for file in cwd.iterdir():
             if file.is_dir():
                 # args.out.write('         dir    <{}>\r\n'.format(file))
-                outputDir(top, dirName, file.name, with_pdb)
+                outputDir(top, dirName, file.name)
 
     args.out.write('                </Directory>\r\n')
 
 print(args.dir.parent)
 print(args.dir.name)
-outputDir(args.dir, '', '', args.pdb)
+outputDir(args.dir, '', '')
 
 # args.out.write('            </Directory>\r\n')
 args.out.write('        </DirectoryRef>\r\n')



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e0986ee7833a16aab4c60c916fabaf9fc0472604...c198c3a1020248468ee1bebc3876365c9defdb9d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e0986ee7833a16aab4c60c916fabaf9fc0472604...c198c3a1020248468ee1bebc3876365c9defdb9d
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list