Installer (script) problem

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

undavide

Installer (script) problem

Post by undavide »

Hello,
I'm having troubles with the last part my coding job, namely: distributing it. Let me give you a bit of (offtopic) background.

I have one PS extensions, in two flavors: CS5 and CS4. While he CS5 version *has* to be packed with ExtensionManager (EM) to exploit all of its features, the CS4 version (being a panel) could be simply zipped. The user will unzip it, and copy the folder in the Plug-ins/Panels dir.
I'm biased toward this hypothesis because when you have both CS4 and CS5 and wish to install both versions, if you double-click the CS4 package... by default EM CS5 will open and install it in CS5 (wrong), where the extension won't work (unhappy customer), leaving alone CS4 (plus one email in the support inbox). I could warn the users to open first EM CS4, but it seems users don't like to read documentation.
I'm letting alone Windows Vista and 7 who need to be run as administrator, they will cause some extra headaches.

One option I'm considering to make life lazy to them is to write an installer script for CS4 (like this one, or the Xtools one), but it seems I'm stuck at a strategic question: if you have both CS4 and CS5, it'll be the latter which will run the installer. I'm right, am I? There's no way to make one specific PS version to run a jsx, AFAIK. So, while I can use app.path to determine precisely its location (the CS5 one), I won't be sure about the CS4 path - it could be nested in some subfolder, who knows. I could always write "open PS CS4, run the script", but I'm looking for a "double-click" solution, if there's one.
Any idea about it?
Another plan could be the creation of a custom DMG with aliases for drag&drop (same problem than above - how could I be sure about PS location?) - this for Mac, for PC I've read about InstallJammer but haven't seen it yet.
Maybe there's an easy solution that I'm missing...
Thanks in advance for your help and ideas,

Davide

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Installer (script) problem

Post by Mike Hale »

If you use a javascript installer similar to the one for xtools it runs with Photoshop as the host so even if they have several version of Photoshop installed the script can be written to install in whichever version is running at the time.

If you are just talking about the user double-clicking on the install.jsx then yes chances are the script will open in the latest version installed on the system unless the user has changed the file associations.

I myself would use Extension Manager for both CS4 and CS5. I think it is a better way to distribute scripts/panels and gives the user an option to enable/disable as needed. It seems to me that neither EM or a installer script(javascript) can keep a novice user from installing in the wrong version if the have more than one.

And if I am not mistaken you can set up the EM package to only install on one version with an alert to the user that they are trying to install to the wrong version. Of course that would then require two EM packages, one for each version. Again I think it better just to have one package and assume that any users that has more than one version of Photoshop installed will be advanced enough to follow simple install instructions.
undavide

Installer (script) problem

Post by undavide »

Good morning Mike,
thanks for your answer.
f you use a javascript installer similar to the one for xtools it runs with Photoshop as the host so even if they have several version of Photoshop installed the script can be written to install in whichever version is running at the time.
Do you mean that if I run the script with CS5, it will be able to find an installed copy of CS4 anyway and copy files in the appropriate location, right? That's would be fine: I want to keep EM as the installing tool for CS5, and I'm looking for a neat CS4 solution.
And if I am not mistaken you can set up the EM package to only install on one version with an alert to the user that they are trying to install to the wrong version. Of course that would then require two EM packages, one for each version. Again I think it better just to have one package and assume that any users that has more than one version of Photoshop installed will be advanced enough to follow simple install instructions.

Could you give me some more info about? I'll distribute 2 different installers anyway (1 EM, 1 script, or 2 EM), but I wasn't been able to write a EM package that will instruct the OS about the EM version to open the package with.
Or maybe you were suggesting to fit the 2 extensions (CS4 + CS5) into one package? I could do with AE CS5 maybe, but I'm not sure that a zxp will be correctly opened by a "CS4 only" user. (sorry for the confusion, it perfectly reflect my personal own one
Davide
xbytor

Installer (script) problem

Post by xbytor »

Here's something that might help. You can specify which version of PS you a script to run in like this for CS4:

Code: Select all#target photoshop-11

and this for CS5:

Code: Select all#target photoshop-12

BTW, I've had problems with EM packages. They work for some people but not for others. I was going to use it for my next CSX release but will probably have to provide a zip file with an install script for those cases where it doesn't work.
undavide

Installer (script) problem

Post by undavide »

xbytor wrote:Here's something that might help. You can specify which version of PS you a script to run in like this for CS4:
Code: Select all#target photoshop-11


AAAAAH!
This is... AAAAAH!

Well, if you happen to travel to Italy, please let me know, I'll do my best to make your stay enjoyable
By the way, is this documented somewhere?
A **huge** thank you,

Davide

PS
I'm on Mac so I've missed many Windows versions (since XP, actually) - do you think that an installer script would bypass Vista and 7 security system? I've read (in the link of my first post) that there's people who had problems with them.
xbytor

Installer (script) problem

Post by xbytor »

Well, if you happen to travel to Italy, please let me know, I'll do my best to make your stay enjoyable

Sounds like a plan.


By the way, is this documented somewhere?

The '#target' stuff id documented in the JavaScript Tools Guide. The way it's written led me to believe that the '-11' bit would work so I tested it out.


Code: Select alldo you think that an installer script would bypass Vista and 7 security system?

No. If you have to put anything in Presets/Scripts or anywhere else in the Adobe apps' folders, you have to run PS (or whatever) as Administrator. I actually have that documented in my README files (I think). You could probably add code to test creating a temp file in Presets/Scripts to see if you actually can. If you can't, alert the user to restart PS as Administrator.