As part of the Getting Started process, this baserom uses a set-up script to initialize your baserom project. The main purpose of the script is to keep the GitHub project free from the binary files and executables that come with tools to avoid being in the sticky situation of re-distributing them with the baserom.
The batch script "!initialize_baserom.bat" in the main folder is actually just calling a Powershell file: "baserom_init.ps1" (that you can find in the tools/init folder). This Powershell script is the majority of the initialization process and has few main functions:
If you are using Windows with a restrictive Execution Policy, you may have trouble running the initialization script. See that link for details.
A supplementary script (tool_defines.ps1
) comes with the initialization script that contains all the information about the tools used. Definitions for each tool's download location, what directory in the baserom it gets installed into, what "junk" files come in its zip, and what documentation files come with it are in this file.
These definitions are used in a number of functions in the main script to: download a tool to a temporary directory, extract its files into the tools folder, clean up any junk files, as well as copy any of its documentation into the docs folder. What the script does in steps is:
Invoke-WebRequest
.Expand-Archive
function of Powershell to extract the the tool to its folder in "tools".Most tools files are copied as-is into their respective directories but during tool set-up the script copies a few files into the appropriate tool folders to either "fill" empty list files, or install additional functionality.
These files are mainly pre-filled "list.txt" files that are used for AddMusicK, GPS, PIXI and UberASM Tool, as well as things for the custom User Toolbar. You can find them in tools/init/lists and tools/init/usertoolbar folders.
Technically this step isn't strictly necessary but it is included to ensure that your project can build successfully after initialization and to catch any problems. If it runs successfully you can move on to working on the project.
At some point you may want to re-initialize the baserom, or update a tool. You can do this in the baserom by deleting the hidden ".is_setup" file in a given tool's folder and running the "Download Tools" step of the initialization script again.
Important: Callisto uses a modified Asar DLL to track dependencies in a project and the initialization process replaces instances of Asar in each tool with Callisto's. So, if you are updating a tool you will need a copy of the modded DLL to make use of dependencies tracking.