Git Product home page Git Product logo

Comments (6)

ConnorGray avatar ConnorGray commented on July 30, 2024

Hi @strelda, thanks for filing this high quality issue!

There are a few inherent complications with app discovery on Linux that make it somewhat trickier than on macOS and Windows, but it should in principle be possible for this to work when you've supplied an explicit WOLFRAM_APP_DIRECTORY value.

I'll begin working on a fix, and update this issue once I've finished.

from wolfram-app-discovery-rs.

ConnorGray avatar ConnorGray commented on July 30, 2024

Hi @strelda, I've just published v0.4.0 of wolfram-app-discovery, which adds support for Linux.

Edit: You can update to the latest version by executing:

$ cargo update -p wolfram-app-discovery

I'll note that the WOLFRAM_APP_DIRECTORY value you set in your issue description is not quite correct; it should point at the root directory of the application, not the Executables/ subdirectory. The correct value is:

WOLFRAM_APP_DIRECTORY="/usr/local/Wolfram/Mathematica/13.0/"

Please try it out and let me know if it works, so I'll know if I can mark this issue as resolved. Thanks!

from wolfram-app-discovery-rs.

strelda avatar strelda commented on July 30, 2024

Thanks for your help, indeed you are right. Running export WOLFRAM_APP_DIRECTORY="/usr/local/Wolfram/Mathematica/" fixes the error. But then the code can't find LICENSE.txt, leading to an error

thread 'main' panicked at 'unable to locate any Wolfram applications: Error(UnexpectedLayout { resource_name: "LICENSE.txt file", path: "/usr/local/Wolfram/Mathematica/LICENSE.txt" })'

Essentially there are two problems with the function in src/os/linux.rs, as you call it a "very hacky way of getting information about an app on Linux" :) it is indeed a good idea but seems to break when either user has more Mathematica licenses or it is a Student license*. I might try to add rules which will fix my problem, but instead, it might be better to add an option to set this path manually (this might be just a workaround for specific use cases, of course, the meaning of the code is to find it).

*In my case there is no LICENSE.txt, and the version folder /13.0/ is ignored in the code, so it searches the executable as /usr/local/Wolfram/Mathematica/Executables/WolframKernel, instead of /usr/local/Wolfram/Mathematica/13.0/Executables/WolframKernel.

from wolfram-app-discovery-rs.

ConnorGray avatar ConnorGray commented on July 30, 2024

Hi @strelda, I think there may be a conceptual confusion or miscommunication here regarding what we each think the "application directory" is; I'll offer my understanding, and let me know if that helps.

My understanding is that:

  • /usr/local/Wolfram/Mathematica/ is NOT an application directory; it is an arbitrary directory that happens to contain different unrelated copies of the Mathematica application.

  • /usr/local/Wolfram/Mathematica/13.0/ is an application directory.

    • (And there are also alternative application directories as well: /usr/local/Wolfram/Mathematica/13.1/ would potentially also be another valid value for WOLFRAM_APP_DIRECTORY if you have Mathematica v13.1 installed.)

Based on that understanding, I would set WOLFRAM_APP_DIRECTORY to the specific version of Mathematica that I want to use:

WOLFRAM_APP_DIRECTORY="/usr/local/Wolfram/Mathematica/13.0/"

Setting WOLFRAM_APP_DIRECTORY equal to /usr/local/Wolfram/Mathematica/ as you mention is therefore an invalid value. The /13.0/ component is required to fully specify the application you want to use.

Therefore, I'd expect that 'UnexpectedLayout' error shown in your previous comment to go away if you were to set:

WOLFRAM_APP_DIRECTORY="/usr/local/Wolfram/Mathematica/13.0/"

Does app discovery succeed if you set the value above?

from wolfram-app-discovery-rs.

strelda avatar strelda commented on July 30, 2024

Ok, sure. Sorry for the misunderstanding, and thanks for the quick help.

from wolfram-app-discovery-rs.

ConnorGray avatar ConnorGray commented on July 30, 2024

No worries, and you're welcome! Thanks again for the issue and feedback :)

It sounds like this is working for you now? So I'll presume that this issue is resolved, but feel free to re-open or file another issue if you run into any more problems.

from wolfram-app-discovery-rs.

Related Issues (7)

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.