Site Tools


dev:setup_guide

Setting up the FF4FE generator

Initial Requirements

  1. Install Python, if it's not already installed
    • Versions 3.7 through 3.11 are supported, but 3.11 is recommended for performance reasons1)
  2. Set up site URLs and secrets in the .env file
    • EMBEDDED_REPORT_KEY must be 16, 24, or 32 bytes
  3. Set up a Python ENV (from project root dir) using your desired Python version: <path-to-python3.xx>\python -m venv ENV
    • It's highly recommended that you use the full path to the Python executable to ensure you're running the intended version.
  4. Create the file fe.pth at the specified location:
    • Windows: ENV\Lib\site-packages\fe.pth
    • Linux: ENV/lib/python3.xx/site-packages/fe.pth (adjust for the actual Python version used)
    • The contents of the file should be the path of the project root (relative or absolute, with no trailing slash)
  5. Activate the Python virtual environment
    • Windows: ENV\Scripts\activate.bat
    • Linux: source ENV/bin/activate
  6. Run pip install -r requirements.txt

Running the Generator from the Command Line

  1. Activate the Python virtual environment (only needs to be done if it's not currently active)
    • Windows:
      • Command prompt: ENV\Scripts\activate.bat
      • PowerShell: ENV\Scripts\activate.ps1
      • Git Bash: ENV\Scripts\activate
    • Linux: source ENV/bin/activate
  2. Run python -m FreeEnt /path/to/rom make <arguments>
    • Pass -h or --help as an argument for a list of command line generation flags

Web Server Requirements

  1. Install MongoDB
  2. Download Floating IPS and extract the appropriate executable to FreeEnt/server/bin/ (the directory will need to be created)
    • For Linux, set the executable bit (chmod +x) on the flips-linux executable
    • For a headless Linux setup, you may need to compile the source yourself

Running the Web Server

  1. Activate the Python virtual environment (only needs to be done if it's not currently active)
    • Windows:
      • Command prompt: ENV\Scripts\activate.bat
      • PowerShell: ENV\Scripts\activate.ps1
      • Git Bash: ENV\Scripts\activate
    • Linux: source ENV/bin/activate
  2. Run python -m FreeEnt /path/to/rom server <arguments>
    • Pass -h or --help as an argument for a list of server flags
    • The server can be run without any additional arguments, in which case it will be available at http://localhost:8080/
1)
Python 3.12 will likely remain incompatible until FE 5.0 or later
dev/setup_guide.txt · Last modified: 2024/08/22 07:01 by wylem