Is there a documentation about packaging archives for DIM ?
Hello,
I ask because I'm writting a Bash script to be able to create such archives and I want to avoid various pitfalls that could lead to problems for people using the archives I'm creating.
I know products are sold on Daz Store to take care of it, but most are for Windows and I don't see myself using them enough to justify buying them.
Does someone know if there is documentation somewhere about the requirement of an archive packaged to allow DIM to install what's inside it ? Or a list of the special characters that must to be escaped in Manifest.dsx (like '&' replaced by '&'), ?
I opened a couple of them from my library and they seem to be standard zip archives, with a simple structure:
- A Content directory with the various files needed by a product to work in Daz (including the metadata stored in the file in /Runtime/Support)
- A Manifest.dsx file
- A Supplement.dsx
Is that the case or is there some hidden requirements somewhere (to use a similar example: epub files are zip archives but with a special twist: their first file must to be named mimetype must to be uncompressed) I may have missed?
Comments
http://docs.daz3d.com/doku.php/public/software/install_manager/referenceguide/tech_articles/start
@Elor
I have a Python module to do this you might be interested in - https://github.com/Omniflux/gendazpack
Thank you
Hello,
It looks interesting, but I don't know how to use Python. While I learned a bit of Python a couple of years ago, I never used it and have since forgotten what I learned back then.
I tried to find a video about using Poetry but I have mostly found videos about using it while creating a project, not using it to launch someonelse's project.
If you have one that you find good, I'm all ears :)
Assuming you have a recent version of Python installed, which is likely if you are writing for Bash, you can try
pip install gendazpack
The Manifest is standard XML. There are a number of characters that need to be escaped depending on their location. Lookup XML escaping rules for details. It's best to use a library to do this, although I'm not sure which can be called from a shell script.
Look at this freeware:
https://sharecg.com/v/88851/related/10/Software-and-Tools/Install-Manager-Package-Maker-Version-2
It creates files that can be installed with DIM.
I have Python 3.13, installed with Homebrew afair but didn't think a pip package was available. But now (after installing pip from homebrew because apparently it was necessary) I have gendazpack installed Thank you!
As for what can be launched from a shell script ? I think anything as long as it has a CLI.
Apparently, there is mainly 5 characters that may appear in the name of a product that need to be escaped (other caracthers have to be from what I read, but I don't think I'm supposed to see them in the name of a product) and I have already a function based on Bash Parameters expansion to take care of escaping characters: I'll adjust it and see how it goes, comparing the result of your program and from my script to see if I missed something.
I forgot about it, thank you! I'll keep it in mind but I prefer to work on my Mac.
Hello,
I finished the first version of my Shell script, corrected a bug that made DIM a bit angry (a missing " in Supplement.dsx ) and now as far as I can see in its log, DIM seems happy to install the package I created.
So, the main question: if DIM doesn't raise any error during the installation process and if everything is where it should be in Daz Studio (either in the Content Library or in the Smart Library), loading without raising any visible error (I didn't check the log yet), does it mean the packages produced are ready to be shared (when the licence of the packaged products allows it of course) without any risk for someonelse's computer ? Or is there some traps somewhere I may have missed ?
A secondary question: are some people willing to test one of the produced package once I set the finished touch to the documentation (to give the proper attribution to the person who was nice enough to share the original model under a CC-BY licence, which require attribution) ?
I have a question: when I click on the i in DIM, on the same line as a package, a window opens, saying something like:
But there is no information about where am I supposed to placed it, so does someone know where it should be placed ?
You can place a ReadMe.pdf in the root of the archive, next to Manifest.dsx and Supplement.dsx (gendazpack does this).
I think it'll work ! I can help with the test.
See the box out part way down this section http://docs.daz3d.com/doku.php/public/software/install_manager/referenceguide/interface/installed_page/start
Thank you, but it doesn't seem to solve the problem in DIM.
Thank you, I'll try to finish the documentation tomorrow and will send you the package in a PM.
Placing it in DIM download directory solved the problem, so it's not something I can fix inside the archive.
Thank you !
DIM will extract the ReadMe.pdf and name it as one of the three options listed when it discovers a new package and generates the corresponding .dsx file. If the .dsx file already exists, I don't think it performs the extraction.
I think I deleted the .dsx each time, but I'll do some tests just to be sure. Do you know if DIM has a cache somewhere I should also empty between two attempts ?
I created the package using Gendazpack (maybe triggering a bug in the process*) and DIM did extract 'ReadMe.pdf'.
Which was a bit perplexing until I extracted the package created by Gendazpack, then compressed it back using Keka (but it's not Keka's fault, the same behavior happened when I compressed it with zip, using the command line I'm using in my script) and apparently, DIM doesn't like when someone does that, because once I moved the re-compressed package inside its download directory, it didn't extract 'ReadMe.pdf'.
I don't know why but it does explain why it didn't work with my script: by itself, my script didn't know how to add ReadMe.pdf and I simply added it manually, extracting the package, compressing it back with ReadMe.pdf
Now, my script knows how to add ReadMe.pdf, so I have a solution but I still don't know why DIM doesn't look further down the hierachy in the package because I have a properly named PDF at the root of my product (alongside Daz script to open PDF from Daz).
But it's a task for another day: a duplicate file inside the archive is not the cleanest way to solve the problem, but the documentation shouldn't be too big even with the screenshots I intend to include.
So thank you again @Omniflux
*About that possible bug in Gendazpack: my own script is built to be launched from the root of a Daz Library who only includes the product I want to package and it's how I launched Gendazpack the first time. Which is not a great idea.
Instead of having a 2-3 MB package, I ended with one over 1.5 GB (and only because I cancelled Gendazpack with CTRL+C) and I suppose the reason is Gendazpack was stuck in a infinite loop, adding to the package everything inside the directory of the product, including the package archive itself, because once I opened the archive Gendazpack has created, I saw a copy of that archive in it.
Once I launched Gendazpack outside of the directory of the product I asked it to package, everything went fine.
I don't know if it was a consequence of Gendazpack being use on my Mac.