Skip to content

Relocatable data-files: support #1262

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

Closed
lukexi opened this issue Nov 1, 2015 · 4 comments
Closed

Relocatable data-files: support #1262

lukexi opened this issue Nov 1, 2015 · 4 comments

Comments

@lukexi
Copy link
Contributor

lukexi commented Nov 1, 2015

I have some packages that require some accompanying data to be placed alongside any executables that depend on them; in a few cases that's some closed-source DLLs, and in another it's some shader files. I could use file-embed as a workaround for the shaders, but the DLLs aren't as straightforward.

cabal-install has the ability to specify where the data-files: of a package are placed via --datadir and --datasubdir, which I think would solve this nicely alongside the existing --local-bin-dir option?

(I haven't needed this until I switched to Stack, but I assume cabal-install's --datadir flag works alongside the Paths_foo module system to enable use of getDataFileName regardless of installation destination, for the shader example case)

@mgsloan mgsloan added this to the P3: Optional milestone Nov 5, 2015
@borsboom
Copy link
Contributor

@lukexi, will #848 do what you need? If not, is there a way that proposal could be extended to support what you need?

@borsboom
Copy link
Contributor

For lack of feedback, closing as duplicate of #848.

@lukexi
Copy link
Contributor Author

lukexi commented Nov 18, 2015

Whoops, sorry I missed this!

I think #848 will do the trick — I'll explain exactly what I'm hoping for just in case and you can close again if #848 subsumes it : )

Say I have a dependency tree like this:

foo
|
bar baz
|    |
\   /
 bat

bat defines an executable, and all of the projects have data-files in their .cabal.

When I run stack install --prefix releasedir, I want to have all of foo, bar, baz and bat's data-files along with bat's executable installed into releasedir, and for Paths_Foo, Paths_Bar, and Paths_baz to be configured so that bat's executable can load data from them at runtime.

Hope that makes sense : )

@lukexi lukexi reopened this Nov 18, 2015
@borsboom
Copy link
Contributor

Pretty sure #848 will cover this case. I'll reference your case over there to make sure.

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