JonnyJD / musicbrainz-isrcsubmit

script to submit ISRCs from disc to musicbrainz
http://jonnyjd.github.io/musicbrainz-isrcsubmit/
GNU General Public License v3.0
40 stars 13 forks source link

Windows 64 bit (libdiscid) discid.dll #127

Closed jesus2099 closed 1 year ago

jesus2099 commented 3 years ago

It would fix #73.

In this PR I have only edited some plain text files. I don't know how to actually run them to build stuff.

What I did is unzipping latest isrcsubmit-2.1.0-win32.zip on two environments:

And replace the included discid.dll (32-bit v0.6.1) by various others.

And I have an issue with libdiscid version.

libdiscid version issue

Currently it's set to:

libdiscid := libdiscid-0.6.1

I wanted to change it to:

libdiscid := libdiscid-0.6.2

Here are the available pre-compiled discid.dllversions of libdiscid that I could find:

Here is the results of my testings:

Env. \ discid.dll 0.6.1 0.6.2
XP 32-bit OK OSError: exception: access violation reading 0x00000000
10 64-bit ? OK

Could we set 0.6.1 for win32 and 0.6.2 for win64? Or another solution?

Freso commented 3 years ago

@JonnyJD I have no way of testing this (I think). Any chance I could get you to take this for a spin? Even if just to create a 64-bit package that others can test?

JonnyJD commented 3 years ago

Unfortunately, I can neither test on a Windows machine nor can I build binaries.

However, I think I was successfull fixing the packaging in a way such that we raise libdiscid to 0.6.2, except for mac and win32. (including downloading win64 from a different place and fixing that the win64 zip does not extract to a folder) If you merge the win64 branch from JonnyJD:win64 into jesus2099:win64 that should fix this. (and then when this seems to be fine, you can merge this PR)

I could run the packaging on my machine and uploaded "2.1.1-beta" packages here: http://isrcsubmit.jonnyjd.net/downloads/ especially: http://isrcsubmit.jonnyjd.net/downloads/isrcsubmit-2.1.1-beta-win32.zip (libdiscid 0.6.1) http://isrcsubmit.jonnyjd.net/downloads/isrcsubmit-2.1.1-beta-win64.zip (libdiscid 0.6.2) So somebody (@jesus2099) still needs to check if these are fine.

What I did not commit, but used for packaging (just to give an insight on how things work): I changed the version to 2.1.1-beta in iscrsubmit.py and ran "make version" (in main folder) I changed the version and source_branch (to win64) in pkg/Makefile (and added a minor hack so I do not overwrite the current isrcsubmit.py)

Other than that I am happy that this monster of a packaging Makefile still seems to work and that you guys push the project :-)

jesus2099 commented 3 years ago

So I tested isrcsubmit-2.1.1-beta-win32.zip (libdiscid 0.6.1) on Windows XP and isrcsubmit-2.1.1-beta-win64.zip (libdiscid 0.6.2) on Windows 10. They both work great! I have used a CD Extra Disc ID, and the Disc ID computation was still bug-free.

I have also included your commit. I have noticed, though, that these 2.1.1-beta still display isrcsubmit 2.1.0 when I run them.

JonnyJD commented 3 years ago

I have noticed, though, that these 2.1.1-beta still display isrcsubmit 2.1.0 when I run them.

My mistake. Since I did not commit the version change and the release script is explicitly making a checkout of a branch, it does not include the version change. Also I need to run make clean first in "pkg" before running make. I did not want to commit I version change here. I created a separate branch (not pushed to GitHub) to fix the beta uploads.

You do not need to retest these, as the packaging is identical, only the version numbers are changed (now really).

jesus2099 commented 3 years ago

Great, @JonnyJD. Tell me if you need something else from me. :) @Freso is taking over this repo?

jesus2099 commented 1 year ago

Hi @Freso, I could I build locally some -win32.zip and -win64.zip files, including these recent commits, newer than the 2.1.1-beta-winXX.zip found in http://isrcsubmit.jonnyjd.net/downloads/ ?

jesus2099 commented 1 year ago

I am now on a new Windows 10 Pro and if I don't manually replace discid.dll with the 64 bit version, I still get this error:

Traceback (most recent call last):
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\discid\libdiscid.py", line 99, in _open_library
    return ctypes.cdll.LoadLibrary(lib_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 n’est pas une application Win32 valide

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\isrcsubmit.py", line 53, in <module>
    import discid
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\discid\__init__.py", line 30, in <module>
    from discid.disc import read, put, Disc, DiscError, TOCError
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\discid\disc.py", line 24, in <module>
    from discid.libdiscid import _LIB, FEATURES
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\discid\libdiscid.py", line 108, in <module>
    _LIB = _open_library(_LIB_NAME)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bob\AppData\Local\Programs\isrcsubmit-2.1.0-win32\discid\libdiscid.py", line 103, in _open_library
    raise OSError("could not find libdiscid: %s" % lib_name)
OSError: could not find libdiscid: discid.dll

This PR is merged but the downloadable zip are still the same old ones.