Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress device name output from libdiscid in Windows #33

Closed
JonnyJD opened this issue Dec 11, 2012 · 8 comments
Closed

Suppress device name output from libdiscid in Windows #33

JonnyJD opened this issue Dec 11, 2012 · 8 comments
Assignees
Milestone

Comments

@JonnyJD
Copy link
Owner

JonnyJD commented Dec 11, 2012

The Windows code for libdiscid has:

 strcpy(filename, "\\\\.\\");
        len = strlen(device);
        if (colon = strchr(device, ':')) {
                len = colon - device + 1;
        }
        strncat(filename, device, len > 120 ? 120 : len);
        printf("%s\n", device);
        printf("%s\n", filename);

Which on our end leads to this output:

D:
\\.\D:

after using mediatools.

There is no output like this on other platforms.

Since we don't print these lines, we can't just "not print" these. We can try to disable stdout just before we use libdiscid: http://stackoverflow.com/questions/4178614/suppressing-output-of-module-calling-outside-library

@jesus2099
Copy link
Contributor

Wow, so cool !

@Freso
Copy link
Collaborator

Freso commented Dec 11, 2012

This should probably be fixed upstream though, instead of making a (relatively) lengthy work-around.

I do like the and not debug though. 👍

@JonnyJD
Copy link
Owner Author

JonnyJD commented Dec 11, 2012

I created an upstream report:
http://tickets.musicbrainz.org/browse/LIB-20

I doubt this will be fixed soon, though.

@JonnyJD
Copy link
Owner Author

JonnyJD commented Jan 10, 2013

Fixed upstream with metabrainz/libdiscid@15b4ba7

Actually this was already fixed 5 years ago, but this was only in the isrc branch.
The fix is now life with libdiscid 0.3.0

I can probably remove the hack when we have a working windows build of libdiscid 0.3.0.
http://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/libdiscid-0.3.0-win32bin.zip needs MSVCR100 and I don't want to include that in my windows package.

@jesus2099
Copy link
Contributor

You’re right, the less files, the better. :)

@JonnyJD
Copy link
Owner Author

JonnyJD commented Jan 15, 2013

Could you try http://isrcsubmit.jonnyjd.net/downloads/libdiscid-0.3.0-win32.zip? That shouldn't depend on anything that's not part of the system.

If that works, I can link that everywhere and remove that weird fix again.

@jesus2099
Copy link
Contributor

It worked with mediatools backend. :)
I will test your new release then, because I have a global name 'saneWhich' is not defined error when I try to use cdrdao. I think my version might be a mix of various file tries and be happy to install a new clean version. :)

@JonnyJD
Copy link
Owner Author

JonnyJD commented Jan 26, 2013

0.5.2 is this "new clean version".

0.6 is still not done.
Potentially 0.6 will be named 1.0 and I will work on 2.0 aftewards (with NGS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants