Git Product home page Git Product logo

Comments (6)

yonaskolb avatar yonaskolb commented on May 4, 2024 1

I think that setting the RESOURCE_PATH to an absolute path will make it more easily usuable.

In regards to where the resources should be linked to, this should be changed due to this symlink issue and if people aren't using the RESOURCE_PATH env (we can't expect them to).

The usual place to put resources from my undestanding is /usr/local/share/$tool. Your suggested /usr/local/lib/${tool}/resources/ is another option though not standard I belive. In either case these resources could be symlinked back to Mint's installation directory, similar to how homebrew does it.

from mint.

yonaskolb avatar yonaskolb commented on May 4, 2024

Any resources can just be accessed with relative paths eg "scripts" or "../scripts".
Let me know if that doesn't work

from mint.

yonaskolb avatar yonaskolb commented on May 4, 2024

Actually that might be incorrect, perhaps it's Bundle.main.bundlePath + "/scripts"

from mint.

toshi0383 avatar toshi0383 commented on May 4, 2024

Thanks. Let's put symlink in the standard place 👌

from mint.

amichnia avatar amichnia commented on May 4, 2024

Hi, what is the status here? I had some issues recently trying to access the resources. I ended up with following symlink to find "real" binary location, and so the resources folder.

This is what I ended up with:

import PathKit

...

var tool = Path("$tool") // swiftymocky in my case
var bundlePath = Path(Bundle.main.bundlePath)
var resourcesPath: Path {
    return (try? (bundlePath + tool).symlinkDestination())?.removingLastComponent() ?? bundlePath
}

I'm just a bit concerned if it would keep working? As far as I got, when you move the stuff to /usr/local/share/$tool it would still be symlinked in the mint directory, right?

from mint.

yonaskolb avatar yonaskolb commented on May 4, 2024

I haven't had time to work on this. But yes, the directories would probably still be symlinked back to the mint directory

from mint.

Related Issues (20)

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.