Forums

Suggestion for POL_Call

Auteur Réponses
ragefast Jeudi 19 Avril 2012 à 23:20
ragefastAnonymous

Hello guys!

Is there a way for POL_Call to run a local script instead of downloading it from the repository, or do I need to invoke POL_Source instead?

I ask this because I'm trying to update the Adobe Photoshop CS4 script to CS5, as well as optimizing/cleaning/updating the script to be more compliant with current commands/functions.

But some of the scripts downloaded by POL_Call, for example gdiplus, keep on downloading the file even though it is already downloaded, and IE6 keep changing the windows version to win2k, while CS5 requires winxp sp2 or higher. I changed the scripts and am invoking them with POL_Source, but it doesn't feel like the right way to do it. And since it has been a lot of trials and errors, I think that the possibility to load local scripts would allow for faster development of complex scripts.

Thanks!
Quentin PÂRIS Jeudi 19 Avril 2012 à 23:43
Quentin PÂRISAnonymous

Hi!

Yep, for local testing, POL_Source is the right command.

However, when script are validated, you'll need tu use POL_Call. If our function does not fit with your script, we can modify them.

Also, we won't accepte duplicate functions (For example, two different POL_Install_ie6)
That's why POL_Call script can read exec arguments (we could create for example POL_Call POL_Install_ie6 --no-change-os). But I recommand to use default's behavior and use Set_OS AFTER

For the downloads, we are currently upgrading function to use POL_Get_Resource, but it takes time.
ragefast Vendredi 20 Avril 2012 à 0:13
ragefastAnonymous

Thank you for replying, Quentin!

Yes, I though POL_Source was the right thing, but since there is no mention of it in the documentation, I though it was an internal function which should not be messed with. I'll stick with that.

As for the POL_Install_ie6, my two cents are that it doesn't really need to go as far as adding arguments, maybe just a revision to the function might do the trick. Maybe even adding a documentation specific for developing function scripts, with tips like reusing the downloaded files, for example. Some thing as "functions stardard", if you may. As a matter of fact, I understand that for compatibility's sake it sets the OS version to win2k, but I don't think that is the right place for Set_OS to go, really. Not with the current version of POL at least.

This aside, thanks for this great software! Almost cried when I saw good ol' Pharaoh running as if it was natively installed in linux.
Quentin PÂRIS Vendredi 20 Avril 2012 à 0:25
Quentin PÂRISAnonymous

Most available functions are here:

http://www.playonmac.com/en/documentation.html

For the resources, you have POL_Download_Resource [url] [md5].

It will automatically use the local version if it is available


Quentin PÂRIS Vendredi 20 Avril 2012 à 0:26
Quentin PÂRISAnonymous

Also, for CS4, you could try POL_Call POL_Install_LunaTheme. Might be very user-friendler
ragefast Vendredi 20 Avril 2012 à 0:48
ragefastAnonymous

Sorry, when I said functions, I mean those called by POL_Call, from here:

http://www.playonmac.com/repository/?cat=100

Wouldn't calling POL_Download_Resource directly kind of break compatibility with the function scripts from the repository? I mean, it may likely work alright localy, but when revised for upload, using the proper POL_Call, it would not work with current functions from repository, right?
Quentin PÂRIS Vendredi 20 Avril 2012 à 14:21
Quentin PÂRISAnonymous

Yeah right,

It was in case you wanted to modify a function

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com