Git Product home page Git Product logo

python-installcab's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-installcab's Issues

Exception Breaks Script

I'm trying to solve the RE 2 Remake problem, but each time I execute ./install-mf-64.sh I get this:
Traceback (most recent call last):
File "installcab.py", line 303, in
output_files = extract_from_installer(cabfile, tmpdir, component)
File "installcab.py", line 192, in extract_from_installer
subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Doesnt work with python3

On Arch python defaults to python3. It is generally it is a good idea to write version independent code when stating only python in the header.
Workaround was to call it with python2 of course, and then it worked as intended.

Traceback (most recent call last):
File "/umaro/git/python-installcab/installcab.py", line 305, in
process_files(output_files)
File "/umaro/git/python-installcab/installcab.py", line 243, in process_files
install_dll(file_path)
File "/umaro/git/python-installcab/installcab.py", line 214, in install_dll
dest_dir = get_dll_destdir(dll_path)
File "/umaro/git/python-installcab/installcab.py", line 65, in get_dll_destdir
arch = check_dll_arch(dll_path)
File "/umaro/git/python-installcab/installcab.py", line 85, in check_dll_arch
if 'x86-64' in out:
TypeError: a bytes-like object is required, not 'str'

Script not working unable to determiner why, looks likes something to do with /usr/lib/python2.7/xml/etree/ElementTree.py

Trying to get this to work on my Debian testing/buster machine with Kernel: x86_64 Linux 4.19.0-4-amd64

$ python --version
Python 2.7.16

I've tried also to install this using just the installcab.py script with manualy pointing to the files but it gives me the same error.

Anyone know what I could be doing wrong?

fr1tz:python-installcab/ (master) $ ./install-mf-64.sh                                                                                                                                      [15:57:44]
mediafoundation
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
mf
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
mfreadwrite
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
wmadmod
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
wmvdecod
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 7
wmadmod
Traceback (most recent call last):
  File "/home/fr1tz/python-installcab/installcab.py", line 305, in <module>
    process_files(output_files)
  File "/home/fr1tz/python-installcab/installcab.py", line 233, in process_files
    outdata, arch = load_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 199, in load_manifest
    reg_data, arch = process_manifest(file_path)
  File "/home/fr1tz/python-installcab/installcab.py", line 171, in process_manifest
    elmt = xml.etree.ElementTree.parse(file_name).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1

Done!
Now you need to get mfplat.dll version 12.0.7601.23471 from elsewhere and place it in your application directory

No such file or directory error

when i tried this: python2 ./installcab.py ~/.cache/winetricks/win7sp1/windows6.1-KB976932-X64.exe mediafoundation


mediafoundation
- amd64_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_fa8534ab236134c4.manifest (win64)
- wow64_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_04d9defd57c1f6bf.manifest (wow64)
- mf.dll -> /media/alan/938d2aa0-3f75-4a82-a26a-82b3400b0b25/Games/steam/steamapps/compatdata/418370/pfx/drive_c/windows/system32
- mfps.dll -> /media/alan/938d2aa0-3f75-4a82-a26a-82b3400b0b25/Games/steam/steamapps/compatdata/418370/pfx/drive_c/windows/system32
- mf.dll -> /media/alan/938d2aa0-3f75-4a82-a26a-82b3400b0b25/Games/steam/steamapps/compatdata/418370/pfx/drive_c/windows/syswow64
Traceback (most recent call last):
  File "./installcab.py", line 305, in <module>
    process_files(output_files)
  File "./installcab.py", line 246, in process_files
    install_regfile(tmpdir, file_path+".reg", arch)
  File "./installcab.py", line 226, in install_regfile
    subprocess.call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.