CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Package creation automation
https://forum.codesys.com/viewtopic.php?f=18&t=6408
Page 1 of 1

Author:  cgage@opto22.com [ Mon Sep 21, 2015 4:32 pm ]
Post subject:  Package creation automation

Is there a way to automate the creation of .package files using Python in CodeSys? If so, could you give an example and/or point me to documentation about it? Thank you.

Author:  M.Schaber [ Thu Sep 24, 2015 10:13 am ]
Post subject:  Re: Package creation automation

Hi,

cgage@opto22.com wrote:
Is there a way to automate the creation of .package files using Python in CodeSys? If so, could you give an example and/or point me to documentation about it?


Currently, there is no dedicated Scripting API for package creation.

However, the CODESYS packages are just Zip files with a manifest file in XML.

So you could use our Package Designer to manually create a "template" package, unzip it, and then use standard XML and Zip APIs in the Script to create the packages.

Our own buildservers build the packages the same way - they collect the artifacts from the build directories and the source repository (including the mainifest file), and zip it together to create the package. Small adaptions like setting the version number in the manifest are performed by the build scripts during that process.

The Package Designer is available in our store for free download, and it has online help explaining all the options and settings. If you want to go the hard way and manipulate the XML yourself, we have some documentation for the XML format available - it is part of the Automation Platform SDK (Packages.pdf in the Documentation subdirectory), or you can request the "OEM Specification: Packages" it via support@codesys.com.

HTH,
Markus

Author:  cgage@opto22.com [ Thu Sep 24, 2015 6:57 pm ]
Post subject:  Re: Package creation automation

Hi Markus,

Thank you very much for the information, it is precisely what I needed to know.

Author:  chenhe [ Fri Nov 09, 2018 3:16 pm ]
Post subject:  Re: Package creation automation

M.Schaber wrote:
Hi,

cgage@opto22.com wrote:
Is there a way to automate the creation of .package files using Python in CodeSys? If so, could you give an example and/or point me to documentation about it?


Currently, there is no dedicated Scripting API for package creation.

However, the CODESYS packages are just Zip files with a manifest file in XML.

So you could use our Package Designer to manually create a "template" package, unzip it, and then use standard XML and Zip APIs in the Script to create the packages.



Hi, I was trying to unzip the package and zip it again. As a result, the package became a .zip file. How can I turn it into a .package file again? I have tried to rename it directly by putting .package instead of .zip. When installing it, error occurred. it said "Invalid package. The manifest could not be found". What is the problem? I want to use the script to include the libraries and device description file.

Best regards
Chen He

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/