El Foro

Suggestion for POL_Call

Autor Respuestas
ragefast Thursday 19 April 2012 at 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 Thursday 19 April 2012 at 23:43
Quentin PÂRIS
Admin

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 Friday 20 April 2012 at 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 Friday 20 April 2012 at 0:25
Quentin PÂRIS
Admin

Most available functions are here:

http://www.playonlinux.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 Friday 20 April 2012 at 0:26
Quentin PÂRIS
Admin

Also, for CS4, you could try POL_Call POL_Install_LunaTheme. Might be very user-friendler
ragefast Friday 20 April 2012 at 0:48
ragefastAnonymous

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

http://www.playonlinux.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 Friday 20 April 2012 at 14:21
Quentin PÂRIS
Admin

Yeah right,

It was in case you wanted to modify a function