Welcome to Our Community

Registration on our forums are now open for some days! Feel free to sign up today.

Development Packager 0.1.0

Development Packager

  1. XenForo Rocks
    About This File
    Development Packager
    Introduction
    Development Packager is an IPS application for third party developers that fully automates the task of packaging development files with other IPS applications.

    It also has the added benefit of doing all this in a fully transparent manner, meaning you never have to manually include these development files with your application releases again.

    How does it work?
    Integrating Development Packager into your own IPS application can be done in three easy steps.

    Step 1:Install the Development Packager application as normal.

    Step 2:Now that the hard stuff is out of the way, create a new coreBuildextension for your application in the Development Center.

    In this file, replace thebuildmethod with the following,

    Code:
    /**
    * Build
    *
    * @return  void
    * @throws  \RuntimeException
    */
    public function build()
    {
        /**
         * Make sure we have the DevPackager application installed.
         * If you want to require developers install this application, simply remove this check.
         */
        if ( !class_exists( 'IPS\devpackager\Packager' ) )
        {
            return;
        }
    
        /**
         * Package our development files and build our extraction class
         */
        $devPackager = new \IPS\devpackager\Packager( 'yourAppDirHere' );
        $devPackager->packageDevFiles();
        $devPackager->createDevFilesClass();
    }
    Naturally, replaceyourAppDirHerewith your actual application directory.

    Step 3:In your applications Application.php file, add the following method,

    Code:
    /**
    * Extract developer resources on installation
    */
    public function installOther()
    {
        try
        {
            \IPS\yourAppDirHere\DevFiles::extract();
        }
        catch ( \Exception $e ) {}
    }
    Again, replaceyourAppDirHererespectively.

    Once that's done, build your application. That's it!

    Now whenever your application is built, all of your development resources should be re-packaged and saved to your applicationsdatadirectory.

    These files are always included with your applications installation archive. Not only this, but any time your application is installed in an environment where\IPS\IN_DEVis enabled, your development files will beautomaticallyextracted on installation.

    This means you no longer have to maintain copies of your development files with every release, and other developers no longer have to manually extract these files every time they install or upgrade your application in their development environments. Awesome!

    Show your love!
    Was this application helpful to you, and would you like to see more free resources like this in the future? Tips are greatly appreciated, and the more support I get for my free applications, the more time I can dedicate to writing and improving them!

    Pay Makoto using PayPal.Me
    RoSiCkY likes this.