Intended for Minecraft modpack creators to distribute custom modpacks for MultiMC, providing a deployable updater GUI powered by Python tkinter.
Using Python 3 (only 3.7 was tested):
- Optionally use a virtualenv:
- Windows:
python -m venv .venv
and then.venv\Scripts\activate.bat
- macOS or Linux:
python3 -m venv .venv
and thensource .venv/bin/activate
- Windows:
- Install pip packages (use
pip3
instead ofpip
if on macOS or Linux):- Install packages for deploy.py:
pip install ruamel.std.zipfile
- Install packages for updater.py:
pip install pyinstaller requests
- Install packages for deploy.py:
Be sure to run these commands within the virtualenv created in [Dependency installation](## Dependency installation) if you are using a virtualenv:
- Clone this repo with submodules:
git clone --recursive https://github.com/sbond75/ModpackDeployer.git
, or rungit submodule update --init --recursive
within the repo root if already cloned. - Set the modpack name in
Client/Modpack - MultiMC Instance/instance.cfg
next toname=
. - Add mods to
Client/mods
, configs toClient/config
, resource packs toClient/resourcepacks
, and/or shaders toClient/shaderpacks
. If needed, you can add server-only mods toClient/mods/Server Only
(create the directory). - Deploy the modpack to a zip file using
deploy.py
: first, copytemplate/deploy_config.py
into the repo root directory first, then editdeploy_config.py
as needed. Then you can runpython deploy.py
(usepython3
on macOS or Linux) to generate a zip file for the modpack and a sha256sum file. - Test the modpack updater using
updater.py
: first, copytemplate/updater_config.py
into the repo root directory first, then editupdater_config.py
as needed. Then you can runpython updater.py
(usepython3
on macOS or Linux) to see how the updater works:- Within the updater, you can set the path to the instance of the modpack within MultiMC. Users must add the zip to MultiMC first. The complete steps are under [Using a modpack](## Using a modpack). You can modify these steps according to where the modpack is hosted.
scp
can be used to copy the file to a remote server for hosting if needed, explained in the next step below.
- Within the updater, you can set the path to the instance of the modpack within MultiMC. Users must add the zip to MultiMC first. The complete steps are under [Using a modpack](## Using a modpack). You can modify these steps according to where the modpack is hosted.
- To build an updater application and deploy it with
scp
to a server to be hosted, copytemplate/build_updater_config.py
into the repo root directory first, then editbuild_updater_config.py
as needed. Then runbash buildUpdaterExe.sh
(usepython3
on macOS or Linux). This requires 7zip to be installed on Windows, as it uses the7z
command; on other operating systems,zip
is used.
Be sure to run this command within the virtualenv created in [Dependency installation](## Dependency installation) if you are using a virtualenv by replacing venvPathHere
with the path to your venv (such as .venv
), or leave it unprovided to not use a virtualenv:
- To compile the updater into an application that others can execute and to update your local copy at the path configured within the updater GUI, run
./deployAndUpdate.bat venvPathHere
in Git Bash on Windows (bash is required since it is invoked within the file) orbash ./deployAndUpdate.sh venvPathHere
on macOS or Linux. You can also perform individual steps from this process using the steps under Usage.
Installing the modpack:
- Download the modpack: http://hostedUrlHere/ModpackNameHere.zip
- Download MultiMC (a Minecraft launcher) from https://multimc.org/#Download and extract it.
- Run MultiMC.exe (or whatever the program name is). If you get a message saying "Windows Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.", you can click "More info" and then "Run anyway" to bypass it.
- Add your Minecraft account at the top right.
- Click "Add Instance" at the top left.
- Click "Import from zip" on the left.
- Click "Browse" and choose the modpack zip file which was downloaded in step 1.
- Click "OK" and wait for it to extract and install the modpack.
- Double-click the new modpack icon that appears inside MultiMC, and the game will start up.
If you get an error before the game starts such as "RuntimeException: No OpenGL context found in the current thread.", you may need to update Forge under Edit Instance -> Version -> Install Forge. Select the version at the top (latest), not the one that has a star next to it.
To update the modpack:
- Download, extract, and run the modpack updater:
- In the text box, enter the path to your MultiMC instance which can be gotten from the "Instance Folder" button on the right sidebar of the MultiMC window (only needs to be entered in once, since it will be remembered)
- Press the update button.