-
Notifications
You must be signed in to change notification settings - Fork 8
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
trying to use artifacts #49
base: main
Are you sure you want to change the base?
Conversation
Thanks for this contribution! I think you forgot to add May I also ask how you uploaded the artifact to github? |
Because include_dependency(joinpath(TEMPLATE_DIR, "no-slides.pptx"))
include_dependency(joinpath(TEMPLATE_DIR, "tableStyles.xml"))
const default_template_data = read(joinpath(TEMPLATE_DIR, "no-slides.pptx"))
const default_table_style_data = read(joinpath(TEMPLATE_DIR, "tableStyles.xml")) This way reading the template files would happen during precompile. |
@nhz2 , this might be possible but I'm not sure how this will work with package compiler. When I tried PPTX as a part of the compiled app, TEMPLATE_DIR was pointing on the folder were the PPTX "was compiled". IMHO package compiler is not very good with "assets" but it's OK with artifacts. |
@matthijscox-asml , about "how you uploaded the artifact to github?" As I was told in Julia Slack channel, I made a fake package release (on my Github account) and added the artifact file as an |
This should work with package compiler because the reading from the path won't happen at run time. Though you will also need to edit Line 144 in 64435fe
Line 70 in 64435fe
Vector{UInt8}
|
@nhz2 thanks for the explanation! |
But as I understand it, when you define the path at compile time, the compiled library won't be relocatable anymore, right? |
Yes, a package isn't relocatable if it uses a string path at runtime that was defined at compile time. One solution is to use https://github.com/JuliaPackaging/RelocatableFolders.jl or Artifacts to allow the path to change to point to the correct folder. The other option is to not read the template files at runtime. |
…ated (and articact also updated)
Can somebody have a look at the conflicts? |
Sorry for the delay. Lets see how it goes now.. |
A few very simple changes are proposed, the purpose is to be able to use a PackageCompiler.jl / make pptx file from inside the Julia app on Windows. It also addresses #15 at some point. In short, all the templates are part of the artifact now. The exact location of the artifact is an open question, though.. https://julialang.slack.com/archives/C67EFTEF3/p1715193409165059