Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qprocess Not working for MAC OSX
Forum Updated to NodeBB v4.3 + New Features

Qprocess Not working for MAC OSX

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jaswinder
    wrote on last edited by
    #1

    Hello,
    I am trying to run lastfm fingerprint commandline tool with my qt application using qprocess. I download two different tool one for windows(lastfmfpclient.exe) and other for MAC (lastfmfpclient.app with libs). Window tool is working on windows CMD as well as in Qt but MAC tool only working in Terminal but not working in Qt. can anyone have any idea about this.
    Terminal Code.

    @MachMachine-iMac:~ tech$ cd /Users/tech/Downloads/lastfm.fpclient.beta2.OSX-intel\ 2/
    MachMachine-iMac:lastfm.fpclient.beta2.OSX-intel 2 tech$ ./lastfmfpclient -url /Users/tech/ffmpegcommandline/a.mp3
    TagLib: String::prepare() - Invalid UTF16 string.
    http://ws.audioscrobbler.com/fingerprint/144953361.xml
    This code give me the path of a xml file which i need.@

    Qt Code :
    I want same result in Qt by using qprocess but this is not working.

    @QString lastfmHandler::getFingerprintURL(QString trackPath)
    {
    QProcess getURL;
    QString ToolName;

    #ifdef Q_OS_MAC
    ToolName="/Users/tech/Downloads/lastfm.fpclient.beta2.OSX-intel 2/lastfmfpclient.app";
    QStringList passArgument;
    passArgument<<"-url"<<"/Users/tech/ffmpegcommandline/a.mp3";
    getURL.start(ToolName,passArgument);
    getURL.waitForFinished();
    QString output=getURL.readAllStandardOutput();
    getURL.kill();
    qDebug()<<"url"<<output;
    return output;

    #endif

    }@

    Take lastfm client code from "here":http://rapidlibrary.com/files/lastfm-fpclient-beta2-1-osx-intel-zip_ulc89cyc8ni89on.html
    Can some one have any idea how to work this code.
    Thanks in advance

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Try it with this change:
      @
      passArgument<<"-url /Users/tech/ffmpegcommandline/a.mp3";
      @

      Or even put the whole line (invocation + all arguments) into the ToolName variable.

      (Z(:^

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jaswinder
        wrote on last edited by
        #3

        Hello Sierdzio
        I try this but this also not working any other way.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You can try using QDesktopServices or running "open" through QProcess.

          But, to get it working in QProcess like you are trying to, you need to get into the app bundle ("/Users/tech/Downloads/lastfm.fpclient.beta2.OSX-intel 2/lastfmfpclient.app/Contents/MacOS/lastfmfpclient").

          (Z(:^

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved