We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34193
    • 330 Posts
    OK I'm sure I saw a thread on this recently but can't find it now.

    So here is my issue.

    I'm trying to create a package which is a plugin. The plugin uses a TV to decide on certain actions.

    I want to package this up tried using packman but it only allows me to include TV's via a Template.

    I don't really need a specific template so am reluctant to package one in.

    Am I best building the package manually and if so how do I go about this.
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      I don't see a reason you wouldnt be able to just do a TV. But yes, that will mean you own build script wjich is a php file that creates the transport package zip. I think theres a lenthy tutorial onthat in the rtfm. Searching for build should bring it up.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 34193
        • 330 Posts
        Thanks Mark, I found the details on custom build script,after posting.

        Was just hoping I'd missed something simple in packman, oh well time to get my hands dirty.
          • 3749
          • 24,544 Posts
          You might take a look at the GetMyComponent package. It does almost everything you'd want to do in a package and is designed to be modifiable to build your own package. It will also help you get the internationalization stuff right with language files for the add-on and its properties (especially their descriptions).

          http://bobsguides.com/mycomponent-tutorial.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 34178
            • 212 Posts
            Hi Pete,
            I want to add a TV to my package, too. And I also want to use PackMan which is unfortunately not able to add TVs. And unfortunately the last update of PackMan seems to be done long ago. So I am not sure if PackMan is still maintained by Shaun McCormick who wrote PackMan as far as I have seen in the rtfm ...

            Does anybody know if or when PackMan is to be updated to 1.2 which should allow to add TVs in packages?

            The other way to build a package without PackMan described by BobRay seems to be much more complicated ...
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Shaun has released a ton of different addons, he can't work on all of them at the same time. I'm sure it'll get to 1.2 at some point, but when is always the question when you have that many addons with your name on it smiley Luckily it's all open source though, so others can chime in too.
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 3749
                • 24,544 Posts
                PackMan is mainly for creating relatively simple packages. I don't think it was ever intended to be a complete package building utility. The number of permutations for transport packages is mind-boggling and I don't think we'll see a full UI for it any time soon (if ever).

                The GetMyComponent/MyComponent thingy is not as complicated as it looks and it does much of the work for you. I use it all the time.

                The trouble with TVs is that you need to connect them to Templates (sometimes Templates that don't exist yet). It's usually done in a script resolver that runs at the end of the package install.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 34178
                  • 212 Posts
                  The GetMyComponent/MyComponent thingy is not as complicated as it looks and it does much of the work for you. I use it all the time.

                  Thanks for these motivating words. Meanwhile I tried it once more but I still got a couple of problems when studying the explanations on your site. The first thing I got stuck is:

                  When you execute the mycomponent/_build/build.transport.php file, it will create a transport package called MyComponent and place it in your core/packages directory.

                  I don´t have a directory "core/packages" in my installation. Do I have to create this directory before starting? I only have the directory core/components ...
                    • 3749
                    • 24,544 Posts
                    The default install should create a core/packages directory. I guess it could be created automatically when you install the first package, but I doubt it.

                    If you have any packages installed, it must be there or they couldn't have been installed.

                    I would just try downloading and installing GetMyComponent and see what happens. wink
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Maybe there is no core/packages in a custom installation? I know in the standard installation you get a core/packages directory with core.transport.zip and the core folder that has all the stuff for actually installing the core itself.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org