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

How to zip .InDesignPlugin by terminal

Participant ,
Jun 13, 2023 Jun 13, 2023

Copy link to clipboard

Copied

Hi everyone, 

currently to notarize plugins you have to use a command that expects the input plugin to be zipped, so every time I create the .InDesignPlugin file I would have to zip it manually, so I tried to make this process more automatic by trying to zip it from terminal, but with poor results.
I tried zipping from terminal with the following methods:

  • zip fileName.InDedisgnPlugin.zip fileName.InDedisgnPlugin.
  • zip -r fileName.InDedisgnPlugin.zip fileName.InDedisgnPlugin.

How do I know that something is wrong? Because when I try to notarize it returns invalid, while trying to notarize the same zipped plugin from the finder it doesn't give me any problems.

So, someone know a method to zip a .InDesignPlugin from terminal correctly?

Thanks in advance to anyone who can help me

- Stefano

 

TOPICS
SDK

Views

478
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
LEGEND ,
Jun 13, 2023 Jun 13, 2023

Copy link to clipboard

Copied

Please compare the contents of the Zip you made with the command line in each case, compare with one that worked. If stuck, screenshots side by side of the contents if the two zip files (labelled which is which)

Votes

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
Community Expert ,
Jun 13, 2023 Jun 13, 2023

Copy link to clipboard

Copied

Try ditto command as recommended by Apple in the article below

https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/cus...

Also please enlist all the steps you follow so that we can try this on our end as well

-Manan

Votes

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
Participant ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

Thanks Manan, with ditto I was able to notarize without any problem.

The procedure I'm doing now is the following:
I compile the plug-in for all the versions I need (in my case from 2019 onwards), but I'm doing it manually, i.e. I take the sdk (which I've all renamed "plugin" or maybe they were already called that , oh well it doesn't matter), I put it in the same folder of the project and set "ID_SDK_ROOT=../plugin".

So I take sdk 19 and build it then I swap 19 with 20 built it and so on up to 23.

I really think that there are better ways of working than this, maybe there is a way to send the project from the terminal to build, wait for it to finish building and change the sdk with simple terminal commands.

after building all the versions, I therefore end up with the following folder: 

Schermata 2023-06-28 alle 10.56.56.png

then I notarize all of them and delete some useless files with the following commands: 

  • cd /Users/stefano/Desktop/PlugInFolder/2019
    ditto -c -k --sequesterRsrc --keepParent PlugInName2019.InDesignPlugin PlugInName2019.InDesignPlugin.zip
    rm -r PlugInName2019.InDesignPlugin PlugInName2019.InDesignPlugin.dSYM
    xcrun notarytool submit PlugInName2019.InDesignPlugin.zip --keychain-profile "PluginNotarization" --wait
  • (don't read after this point because is the same command, i've only changing the year)
  • cd /Users/stefano/Desktop/PlugInFolder/2020
    ditto -c -k --sequesterRsrc --keepParent PlugInName2020.InDesignPlugin PlugInName2020.InDesignPlugin.zip
    rm -r PlugInName2020.InDesignPlugin PlugInName2020.InDesignPlugin.dSYM
    xcrun notarytool submit PlugInName2020.InDesignPlugin.zip --keychain-profile "PluginNotarization" --wait
  • cd /Users/stefano/Desktop/PlugInFolder/2021
    ditto -c -k --sequesterRsrc --keepParent PlugInName2021.InDesignPlugin PlugInName2021.InDesignPlugin.zip
    rm -r PlugInName2021.InDesignPlugin PlugInName2021.InDesignPlugin.dSYM
    xcrun notarytool submit PlugInName2021.InDesignPlugin.zip --keychain-profile "PluginNotarization" --wait
  • cd /Users/stefano/Desktop/PlugInFolder/2022
    ditto -c -k --sequesterRsrc --keepParent PlugInName2022.InDesignPlugin PlugInName2022.InDesignPlugin.zip
    rm -r PlugInName2022.InDesignPlugin PlugInName2022.InDesignPlugin.dSYM
    xcrun notarytool submit PlugInName2022.InDesignPlugin.zip --keychain-profile "PluginNotarization" --wait
  • cd /Users/stefano/Desktop/PlugInFolder/2023
    ditto -c -k --sequesterRsrc --keepParent PlugInName2023.InDesignPlugin PlugInName2023.InDesignPlugin.zip
    rm -r PlugInName2023.InDesignPlugin PlugInName2023.InDesignPlugin.dSYM
    xcrun notarytool submit PlugInName2023.InDesignPlugin.zip --keychain-profile "PluginNotarization" --wait

 

After sending this all this commnads I wait about 3 minutes so that all the plugins are notarized and I come back with all the zip files ready to be put on the server (they will then be taken by an installer)

Schermata 2023-06-28 alle 11.11.02.png

 

 

 

 

 

 

 

 

To Sum Up

I'm currently using this method, which works fine, but can definitely be improved finding a way to build all the plugins in one step, without having to change files or folders or paths from the xcode project all the time

 

The Dream

Create a software that telling it:

  • where is the sdk folder
  • Where is the project
  • For which year or for which years you want the plugin

Automatically compiles the project and notarizes it.

Where should I start from to create a program like this, considering that I don't know much about terminal commands and applescirpt, but I have a great desire to learn something new.

 

To end up

Maybe I'm doing everything not in the best way and there is a better way to do it, I wrote what I do and what I would like to do, I'd like to know the workflow of the most knowledgeable person during the notarize process of a plug-in.

if someone will write a method that is efficient I will rewrite the whole process in detail so that anyone can use the best workflow to notarize plug-in.

 

Votes

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
Community Expert ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

LATEST
quote

I take the sdk (which I've all renamed "plugin" or maybe they were already called that , oh well it doesn't matter), I put it in the same folder of the project and set "ID_SDK_ROOT=../plugin".

So I take sdk 19 and build it then I swap 19 with 20 built it and so on up to 23.


By @Stefano5C37

 

I assume you're using Xcode. In this case, if I understand your settings correctly, you should be able to create multiple targets: a separate target for each InDesign version (19, 20, 21 etc.) Assign the respective SDK to each target. Then build all targets at once: https://stackoverflow.com/questions/6859911/xcode-building-for-multiple-targets-simultaneously

 

(I personally never worked with InDesign SDK itself, but normally the process I described above should work.)

Votes

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