pack-mmip, an automatic MMIP packer using Node.js

Post a reply

:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review

Expand view Topic review: pack-mmip, an automatic MMIP packer using Node.js

Re: pack-mmip, an automatic MMIP packer using Node.js

by drakinite » Wed Oct 18, 2023 12:06 am

New release, v1.3.0: Major archive bugfix + minor improvements
  • Updated dependencies, including a new version of archiver which seems to fix the occasional issue where the archive gets corrupted
  • When there's an error creating a symlink (pack-mmip --create-symlink), it'll now open the problematic folder in file explorer so that you can fix the symlink issue by hand
  • Added the ability to insert a "LICENSE" file into the archive, via pack-mmip -l <filename> or pack-mmip --LicenseFile <filename> (undocumented; mostly for use in

Install it with Install it with npm install --global pack-mmip.

Re: pack-mmip, an automatic MMIP packer using Node.js

by drakinite » Sun Oct 02, 2022 2:26 pm

New release, v1.2.0: Major update!
  • Can now automatically detect the addon version and append it to the file, e.g. MyAddon-1.0.0.mmip, with the command-line argument -a / --appendversion
  • Now prints its own version with the command-line argument -v / --version
  • Now supports "preamble" comments to be automatically added to the top of any specified text file, in case you wish to include something like licensing agreements. Specify the file containing your preamble with --preamblefile <filename> and specify the comment pattern with --preamble-<filetype> <pattern>.
  • The --create-symlink tool now works more easily, and it outputs to the AppData folder by default instead of the MM5 install folder.
  • If you just type pack-mmip or pack-zip into the command line, it'll now print the entire help text.
  • .archiveignore is also now supported as an ignore file.

Install it with npm install --global pack-mmip.

Re: pack-mmip, an automatic MMIP packer using Node.js

by programmer1311 » Fri Dec 17, 2021 4:04 am

Thank you very much for the information provided, it will be helpful for the installation.

Re: pack-mmip, an automatic MMIP packer using Node.js

by drakinite » Sun Nov 07, 2021 2:41 pm

New release, v1.1.1: Ignore rule support! You can now add a file, .mmipignore, to your project directory, containing file patterns to ignore. Operates similarly to .gitignore. The .mmipignore file is always skipped when creating a zip/mmip.


Install it with npm install --global pack-mmip.

Re: pack-mmip, an automatic MMIP packer using Node.js

by drakinite » Tue Oct 05, 2021 9:21 pm

Pack-MMIP is now available on NPM, making it easier than ever to install!

Install it with npm install --global pack-mmip.

Additionally, a new feature has been added for version 1.0.2. Run pack-mmip --create-symlink and follow the instructions to create a symbolic link to your project folder, so you don't even have to re-pack your addon while testing it during development.

pack-mmip Release v1.0.0

by drakinite » Sat Nov 28, 2020 10:27 pm

I'm proud to announce pack-mmip version 1.0.0! This is a major release, which brings some great new usability features and improvements:
  • Configurable default settings
  • Ability to easily archive .zip files as well, with pack-zip
  • Ability to automatically put your packed files into a "bin" subfolder
You can download it here:

pack-mmip Release v0.0.5

by drakinite » Sun Nov 08, 2020 12:26 pm

New release, v0.0.5: Better recognition & handling of broken command-line arguments, and changed the destination-inside-source warning to have a default answer of no.

pack-mmip Release v0.0.4

by drakinite » Thu Oct 29, 2020 2:30 pm

New release, v0.0.4: Node screws up command-line arguments if you include a backslash before a quotation mark, which occurs in PowerShell when you automatically populate a directory. I did as much as much as I could to rectify those situations when process.argv is broken.

Also, thanks Ludek! :slight_smile:

pack-mmip Release v0.0.3

by drakinite » Tue Oct 27, 2020 3:12 pm

Published version 0.0.3! You can download it here:

Now, if you just specify the source folder, it'll automatically give the resultant MMIP the same name as the source folder.

pack-mmip, an automatic MMIP packer using Node.js

by drakinite » Mon Oct 12, 2020 12:14 pm

Hey there! I wrote a tool that makes it quick and easy to pack and install MM5 extensions! I named it pack-mmip, and it's available on github and npm.

It requires Node.js. Install it with one of two methods:
  1. NPM: npm install --global pack-mmip
  2. Download the latest release from the github page, extract it into the folder of your choice, and add the folder to your system PATH.
Then you can use the pack-mmip and pack-zip commands from any folder.

Pack-mmip automatically creates an archive with an .mmip extension, and pack-zip automatically creates an archive with a .zip extension. MMIPs are just zip archives with a different filename, so the same tool can be used for both purposes.


Code: Select all

        pack-mmip <path to project> <[optional] path to packed extension OR just its name> <options>
        -a      --AppendVersion         Read the project's version from its info.json and append it to the
                                        filename. For example: MyAddon-1.2.3.mmip
        -b      --PutFileIntoBin        Put resulting file into a subfolder named "bin"
        -d      --Debug                 Debug logs. Please use this if you encounter a bug, and paste the
                                        logs into a new GitHub issue.
        -h      --help                  Print this help text and exit
        -i      --IgnoreDefaults        Ignore configuration rules
        -o      --OpenAfterComplete     Open file (Install to MediaMonkey) after complete
        -s      --ShowAfterComplete     Show in folder after complete
        -v      --version               Print version and exit
        -y      --Yes                   Automatically answer "yes" to prompts

        -p      --PreambleFile <name>   File containing a preamble to be added to the top of text files.
        --preamble-<filetype> <pattern> Pattern for the preamble to be inserted into files of the specified
                                        patterns for comments. Use %s for where the preamble text should go.
                                        Add a file named .mmipignore or .archiveignore in your project root.
                                        It uses glob syntax similar to .gitignore
        pack-mmip config                Different configuration files are saved for pack-mmip and pack-zip.
If path to packed extension is not specified, it will default to the name of the folder.

        --create-symlink <path>         Tool that creates a symbolic link from your install's scripts folder to
                                        your project folder, making it easier for development. Just restart
                                        MediaMonkey for your changes to take effect, instead of having to
                                        re-pack and re-install the addon.
        --init                          Tool that automatically creates a new info.json file in the current
                                        folder, after prompting for title, ID, version, etc. Similar to `npm init`.
You can set your own default options with the following commands:

Code: Select all

pack-mmip config
pack-zip config

Code: Select all

# Packs C:/projects/MyPackage into C:/projects/MyPackage.mmip
pack-mmip C:/projects/MyPackage C:/projects/MyPackage.mmip

# Does the same as above, but with relative paths instead of absolute paths
# If you do not add a .mmip file extension, it will do it for you.
cd C:/projects/MyPackage
pack-mmip ./ ../MyPackage

# If you do not specify a file name, it will automatically give it the name of the original folder.
cd C:/projects
pack-mmip MyPackage MyCustomPackageName
# result: C:/projects/MyCustomPackageName.mmip
pack-mmip MyPackage
# result: C:/projects/MyPackage.mmip
pack-zip MyPackage
# result: C:/projects/

# The -s argument will open a file explorer window containing the newly packed file.
pack-mmip MyPackage -s

# The -o argument will attempt to run the file, causing MediaMonkey to install it.
pack-mmip MyPackage -o

# The -b argument will place your packaged file into a subfoler named "bin".
pack-mmip MyPackage -b
# result: C:/projects/bin/MyPackage.mmip
So for example, if you have PowerShell/cmd open in your project's parent folder, and the project is named MyExtension, this will pack MyExtension.mmip and immediately install it.

Code: Select all

pack-mmip MyExtension MyExtension.mmip -o
I've been working on this tool for a few months, and it's reaching the point where it's becoming a genuinely useful tool.

I really hope this is helpful! Let me know if any of you use it, or if you have suggestions for improvements!