• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to make a installer for InDesign extension

New Here ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

Hey guys,

I don't know what will be the best way to share my extension. I have tried the adobe exchange but the problem is that not all users have permissions for the cc service, that get's the software. is it possible to force this, like you click a button and it asks for permissions, so it's not runnning in the background?

Or is there another way to deal with it?

TOPICS
Scripting

Views

491

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

Your on the wrong forum for this but..

1) Good for a custom made extension but not for mass distribution. Tell the client to unzip and plonk it in the correct folder.

2) Slightly more graceful script the above. see my Mac version below.

3) Tell them to download an installer from http://zxpinstaller.com/

3.5) You can package the installer if you don't care about ridiculously bloating the size of your extensions

4) Slightly more graceful script the above. You can have a look at GitHub - CreativeDo/ZXPInstaller: Open Source ZXP Installer for Adobe Extensions

5) See some other ideas HTML Panels Tips: #10 Packaging / ZXP Installers | Photoshop, etc.

HTH

Trevor

var xFile = File.openDialog("Please select the extension file", function(f){return /zxp$/.test(f.name) || f instanceof Folder})

if (!xFile) exit();

xSuffix = ".zxp";

xSuffix = xFile.name.slice(-4);

xName = '"' + xFile.name.replace(/\.[^.]+$/,"") + '"';

zipSource = '"' + xFile.fsName + '"';

installExtension = """

    tell application "Finder"

        set tryInstallToUser to true

        set xFolder to "Library:Application Support:Adobe:CEP:extensions"

        if tryInstallToUser then

            -- first try set the User specific location

            set xPath to POSIX path of ((home as Unicode text) & xFolder)

            try

                if not (exists xPath as POSIX file) then do shell script "mkdir -p -m a=rwx " & xPath

            on error errMsg

                set xPath to POSIX path of (xFolder as Unicode text)

            end try

        else

            set xPath to POSIX path of (xFolder as Unicode text)

        end if

            set zipSource to quoted form of """ + zipSource + """

            set xName to """ + xName + """

                -- process the files

                set destFolder to ((xPath & "/" & xName) as Unicode text)

                set zipDestination to quoted form of destFolder

                -- record file mod date to check that it's changed with installation

                if exists destFolder as POSIX file then

                    set modDate to do shell script "mdls -name kMDItemFSContentChangeDate " & zipDestination

                    do shell script "rm -fR " & zipDestination

                else

                    set modDate to "No Date"

                end if

                delay 1

                set installXtn to "unzip -o  " & zipSource & " -d " & zipDestination

                do shell script installXtn

                if exists destFolder as POSIX file then

                    set newModDate to do shell script "mdls -name kMDItemFSContentChangeDate " & zipDestination

                else

                    set newModDate to false

                end if

                if (newModDate is not false) and (modDate is not newModDate) then

                    display notification "Great it looks like the installation was successful. Please restart InDesign"

                else

                    -- Customize the message as required

                    display notification "Sorry the installation failed."

                end if

                delay 1

    end tell

""";

//installExtension

app.doScript (installExtension, ScriptLanguage.APPLESCRIPT_LANGUAGE);

A plain applescript sample is

tell application "Finder"

    set destinationPath to POSIX path of (((home as Unicode text) & "Library:Application Support:Adobe:CEP:extensions") as Unicode text)

    set resourcePath to quoted form of POSIX path of ((((path to me)) as Unicode text) & "Contents:Resources:InDesign_Druckbogen_Vorschau.zip")

    set zipFile to "\"" & destinationPath & "/InDesign_Druckbogen_Vorschau.zip\""

    set zp to destinationPath & "/InDesign_Druckbogen_Vorschau"

    set zipFolder to "\"" & zp & "\""

    do shell script "cp -RfX " & resourcePath & " " & zipFile

    set unzip to "unzip -o  " & zipFile & " -d " & zipFolder

    do shell script unzip

    delay 1

    do shell script "rm " & zipFile

    if exists zp as POSIX file then

        display notification "Die InDesign Druckbogen Vorschau Erweiterung scheint erfolgreich installiert haben"

    else

        display notification "Die InDesign Druckbogen Vorschau Verlängerung Erweiterung scheint gescheitert erfolgreich installiert haben"

    end if

    delay 1

end tell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

Thanks for the reply, but found some minutes ago the approch I will take, I will use the command line tool, that comes with extension manager. But one thing that I can't get to work is my self signed signature, when I test it on another computer without PlayerDebugMode, is it possible to sign it yourself and still be able to use the plugin?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

Signing is quite easy and certainly still possible (Not checked on CC2017).

See the link by 5)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

I have the extension signed but still won't work 😕 I just get a blank panel

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

LATEST

I'm adding this link as it contains some more info (links) of installers and signing

GitHub - Adobe-CEP/CEP-Resources: Getting Started with Adobe CC 2014 Extension SDK

This is a general beginners link A Short Guide to HTML5 Extensions | Adobe Developer Connection

Davide's site HTML Panels | Photoshop, etc.  is a good source of info.

HTH

Trevor

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines