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

[Q] InDesign CEP plugin version string seems not updated. Is there way to refresh?

Contributor ,
Sep 04, 2017 Sep 04, 2017

Copy link to clipboard

Copied

Hi all,

CEP plugin's version string from Window menu seems get cached and does not update.

It does not happen on Photoshop and Illustrator.

Is there any way InDesign to refresh CEP plugin from script (JS or JSX)?

Steps:

1) Deploy CEP plugin

2) Launch InDesign and check CEP plugin version string from Menu: Window => Extension

3) Change version string on Manifest.XML file in CEP plugin folder for InDesign

4) Quite InDesign

5) Sign CEP plugin and deploy again.

6) same as 2)

Expected result

The version string updated to 3)

Actual result

The version string is not updated and same as 2)

Note:

Same steps does not reproduce on Photoshop and Illustrator.

Thank you,

Naoki

TOPICS
Scripting

Views

637

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
People's Champ ,
Sep 05, 2017 Sep 05, 2017

Copy link to clipboard

Copied

Hi

In HTML/JS

var csInterface = new CSInterface();

    var extensionRoot = csInterface.getSystemPath(SystemPath.EXTENSION);

    var manifestUrl = extensionRoot+"/CSXS/manifest.xml";

    var extScript = "$._ext_global.readVersion('"+manifestUrl+"')";

    csInterface.evalScript (extScript, function(result) {

        alert( result );

    } )

IN JSX

$._ext_global={

    readVersion:function(manifestUrl) {

        var f = File ( manifestUrl );

        if ( !f.exists ) {

            return "unknown";

        }

        var open = f.open('r');

        if ( !open ) {

            return "unknown";

        }

        var manifest = XML ( f.read() );

        f.close();

        var version = String(manifest..Extension.@Version);

        return version==""? "unknown" : version;

    }

};

Capture d’écran 2017-09-05 à 09.45.36.png

I think it would be safer to make a copy of the manifest, especially if the extension is signed and deployed.

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
Contributor ,
Sep 05, 2017 Sep 05, 2017

Copy link to clipboard

Copied

Loic.Aigon

Thank you very much for the code snippet.

I think it read version info from manifest.xml file.

It does not resolve my issue that InDesign is caching version string from XML file and display on UI (Menu: Window -> Extension).

The cache data seems stay even InDesign has relaunched and even OS has restarted.

CEP plugin seems loaded after first document opened or clicked extension info from Window menu.

So it might be not able to force from JS/JSX.

It might be not so much on end user environment as not so often to update plugin.

Version up technical support could be issue.

I think it is InDesign bug, but I'm looking for any work around.

But for develop environment is dragging for development process as bring wrong version info.

For this part, your code may become life saver.

Thank you,

Naoki

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
Contributor ,
Sep 06, 2017 Sep 06, 2017

Copy link to clipboard

Copied

LATEST

Hi all,

One manual work around found as following, but I'm still looking for automatic method in end user environment.

1) Quit all Adobe apps

2) Move _CEP_Plugin_Folder_ from installed folder to some where else (don't delete)

    ex) C:\Program Files (x86)\Common Files\Adobe\CEP\extensions

3) Launch InDesign

     to refresh CEP plugin list

4) Quite InDesign

5) Move back _CEP_Plugin_Folder_ to 2)'s folder

6) Launch InDesign again

     to refresh CEP plugin list

Note:

* Restarting InDesign does not work

* Restarting OS does not work too

* It looks like InDesign caches in persistent place

Thank you,

Naoki

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