Skip to content

Installation

Relentless edited this page Jul 17, 2022 · 4 revisions

If you don't have a CurseForge launcher profile for your modpack yet, create one.
It does not matter if you have mods installed already.

Initial Setup

Follow these steps if you are the first team member setting up the tool:

  1. Download the latest zip or tar from the releases.
  2. Extract the AlmostPacked.jar and the setup scripts from the scripts folder.
  3. Drop the files into your modpack profile folder root (where minecraftinstance.json is located) or a sub-folder of your choice for better organization.
  4. Open a terminal, change the directory to the modpack folder and run the install script.
    • if you get an /bin/bash^M: bad interpreter error, run sed -i -e 's/\r$//' setup.sh
    • it doesn't matter if the tool files are located in a sub-folder or not, the script will automatically detect it
    • this will setup the git hooks in the .git/hooks folder so if you are using another folder for your hooks, move the files manually after creation
    • when the setup is done, the script will automatically start the tool for the initial data creation
  5. Restart your launcher!
  6. Make config adjustments (guide in the next section)
  7. Create a repository from your modpack profile folder
    • make sure to gitignore the minecraftinstance.json

Usage Setup

Follow these steps if you are a team member pulling the tool from the repository:

  1. Make sure your local repository folder is the same as your launcher instance profile folder.
  2. Pull the latest changes from the remote repository.
  3. Make sure you don't have the Edit Profile screen opened in your launcher.
    • we tested it multiple times and the initial installation works best if you open the modpack overview page of the launcher
  4. Open a terminal, change the directory to the modpack folder and run the install script.
    • if you get an /bin/bash^M: bad interpreter error, run sed -i -e 's/\r$//' setup.sh
    • it doesn't matter if the tool files are located in a sub-folder or not, the script will automatically detect it
    • this will setup the git hooks in the .git/hooks folder so if you are using another folder for your hooks, move the files manually after creation
    • when the setup is done, the script will automatically start the tool for the initial data creation
  5. Restart your launcher!

Usage

After the setup, the tool will run automatically with the help of the git hooks.
If you restarted your launcher after the setup, no further restarts should be required.

Since the launcher doesn't always update the minecraftinstance.json file immediately, make sure to start the profile once before pushing to your repository (wait until the Vanilla launcher opens, then you can close it).

If you feel like your local weren't synced correctly, git push again. The hook will fire even though you have no local changes.

Customization

When the tool runs for the first time, it will automatically create necessary files and directories.
For some customization, open the config.json which will be generated in the same directory as the AlmostPacked.jar.

Default config with explanation:

{
    // the name of the file which will be used for syncing
    // that's the file you will push to your repository
    // the .json file extension will be appended automatically
    "fileName": "sync",
    // whether the tool's files are in a sub directory or the
    // profile root, this is automatically detected on the first run
    // don't change this unless you know what you are doing
    "subFolder": true,
    // whether the sync file should be pretty-printed
    // disabling this will make the file shorter but you
    // won't get good diffs when it changes
    "prettyJson": true,
    // the max amount of concurrent mod downloads
    "concurrentDownloads": 10,
    // lets the push hook fail if changes were made to the sync file
    // allows you to push the sync file to the same commit as the original
    "failOnChange": true,
    // whether the dev mode is enabled which logs more
    // information to the console
    "devMode": false
}
Clone this wiki locally