Package Magic - Package Destination Documentation

Dashboard > Extend concrete5 > Download Package

The Package Destinations dashboard page is where you can select an installed or uploaded and ready to install package, zip it up into an archive, and save the zip to any of a suite of desyinations.

Files omitted from the archive

The available options are pre-configured to suit most developers. In most cases you will keep all the checkbox options selected in order to create a package that passes upload validation.

  • Omit .dot files and directories   
  • Omit __MACOSX    
  • Omit Thumbs.db  
  • Omit .psd 
  • Omit .sh and other batch file types
  • Omit executable files and typical file types such as .exe    
  • Omit .xcf    
  • Omit .svg that have an associated .png  
  • Omit files with non alpha-numeric extension  
  • Omit IDE project files

In addition to the checkboxes, you can also enter patterns to Omit files matching. Simply provide patterns for additional file paths to omit when creating the zip archive, one per line. Patterns may contain shell wildcards * and ?. For example, */vendor/* will omit the /vendor/ directory from the package archive. *.bak will omit any .bak files from the package archive.

Version numbers

Under Options you can select a checkbox to attach the package version number to the zip file name, so package_handle.zip would be become package_handle-0.0.1.zip. 

Such version number suffixes are not supported by the concrete5 marketplace, but some developers find it useful to keep track of package archive versions. If you are installing packages using Package MagicPackage Magic Sources will accept packages with version numbers in the zipped archive name and double-check the version number against that in the package controller.

Compile Checks

By default, before creating an archive all php files are checked to confirm they compile. Should a particularly large package take too long to zip up, under Relaxed validation you can disable this check and remove a substantial part of the processing involved. You can then check compilation before downloading by using Extend concrete5 > Package Tools > Check Compilation to run a compilation check file-by-file. 

[ Package Magic ]

Package Destination Plugins

Package Magic can direct packages to destinations provided by Package Destination plugins.

Functionality can be extended by adding plugin classes for additional Package Destinations. Package Destination plugins are simple classes that provide the functionality to adapt Package Magic to alternative package destinations. They should inherit from PackageDestinationPluginBase. Details are provided by comments in the code.

Plugins can be added by placing the plugin classes at packages/anyPackageName/src/PackageMagic/PackageDestinations/Plugins/PluginName or application/src/PackageMagic/PackageDestinations/Plugins/PluginName. Plugins can also be similarly placed beneath any namespace declared in a package controller's AutoloaderRegistries.

[ Package Magic ]

Direct Download

Download a package zip file.

Generates a package zip file and forces a download.

[ Package Magic ]

To FTP

Save a zipped package to an FTP location.

Enter an FTP or SFTP location to which a zip archive for the package can be saved. A further dialog manages a list of FTP hosts allowing hosts to be added, removed, edited and selected. This will typically be the /application/files/incoming/ directory of a site that will subsequently 'upload' the package. It could also be the container for an FTP hosted repository of package archives.

[ Package Magic ]

To FTP Repository

Save a zipped package within a structured FTP repository.

Once configured with a FTP connection as the root of the repository, the package archive will be saved to a directory structure beneath that directory. The directories must be accessible to the configured FTP connection.

[ Package Magic ]

To File Manager

Save a zipped package to the File Manager.

Select a concrete5 package and a save it in the site's File Manager. Allowed File Types must be configured to include .zip files.

You need to add the "zip" file extension to the Allowed File Types before you can use the To File Manager package source.

[ Package Magic ]

To Local Repository

Save a zipped package within a structured repository directory.

Once configured with a local system directory as the root of the repository, the package archive will be saved to a directory structure beneath that directory. The directories must be directly accessible to the web server and outside of the site root.

[ Package Magic ]

To System File

Save a zipped package to a system directory.

Enter a local system directory path to which a zip archive for the package can be saved. The directory path must be directly accessible to the web server and outside of the site root.