Compiled scripts and older versions of DS...
Totte
Posts: 13,965
I just learned from QA that a compiled script only works in DS at the same or higher version than the version in which it was compliled. Is there a reason for that, and is there a way to "fix that"? Having 4.9.1.30 (last release version) and the compiled script won't work in 4.8. I want to compile it, at least be script backend, it it a rather complicated script that I don't want to be "flying around" as I will probably use that backend in more products.
Hints or tips anyone?
Comments
All binary-formats for scripts (.dsb compressed or .dse encrupted, which I assume is what you mean by compiled) are tagged with the version they were saved from and won't run in older versions of DS in case of compatibility issues. If you, or someone you trust, has an older version of DS you could open the .dsa in that and then save as .dse (the .dsa gets the version number added but DS doesn't pay attention, since it could be edited or removed).
OK, then I will be looking for someone thrustworthy, QA wasn't really helpful as they don't encrypt scripts. Do you no someone trustworthy with DS 4.8?
Not me - trustworthiness aside I forgot to back up my 4.8 installers before downloading 4.9. PA Support may be able to help with a copy of 4.8.
Richard, I did it for him...
Thanks.
Add the SDK to your account. Download and run the Daz Studio 4.5.0.114 standalone installer that is included with the SDK from your Product Library—install it to a separate development path, so as to avoid conflicting with the version(s) you have for regular use. Execute the DSA Converter sample in the 4.5.0.114 build to convert your dsa to dse (hold Ctrl/Cmd when executing the script). Be sure to wrap your code in an anonymous function and exit said function early if the version of the application executing your script does not meet or exceed the version of the API that you are using (see the Version Conversion sample), or use checks similar to the DSA Converter sample to validate the API you are using and gracefully handle the cases when it doesn't exist.
-Rob
Rob, a quick question...when I saved out the script, it at first wouldn't let me save it as a dse, until after I saved it as another type first. I pasted in the script code to the editor. The save encrypted option was actually greyed out.
Is that 'normal' or just something odd on my end?
I don't remember that happening before, but I seldom ever save dse scripts.
Probably user-protection - a .dse file cannot be edited even by the creator so if you saved it only that way you'd effectively have locked it up and thrown the key away.
That's what I thought...after I posted the question.
I just never noticied it before. And if that is the case...then it makes sense and is worth saving it twice.
thanks for the reply Rob!
Good to know. I was still keeping my 4.8.0.59 only for conversion to dse... well not only also to ensure the right behaviour with it...
Correct.
-Rob
Thanks.
This was the third or or fourth dse I've saved out in the last 2 or 3 yrs, and the other ones had been previously saved, so I wasn't sure what was going on. But after a little more thought, realized that, yeah, it has to be some kind of 'save yourself from something really stupid' feature.
About that, let's say I have a function which will work only for Daz Studio versions above 4.9.2.23, and that I want to disable it for users bellow this version and make it usable it for users above 4.9.2.23, is there a way to link the :
"App.Version" encoded integer to the "4.9.2.23" somehow?
Edit : forget about that, I just found back the "Version Conversion" script that Rob had provided and which does the job!