Files
Funkin/docs/COMPILING_MOBILE.md
T
2025-05-01 23:27:05 +07:00

3.0 KiB
Raw Blame History

Compiling Friday Night Funkin' for Mobile Devices

Before starting, make sure your game builds on desktop. Check COMPILING.md if you haven’t done that yet.

Android

  1. Create a new folder – this will store Android tools (remember where you put it!).

  2. Open a terminal as Administrator.

  3. Run this in the terminal (replace the path with your actual folder):

    setx ANDROID_HOME "C:\path\to\your\folder" /M
    
  4. Download Android Studio Command-line Tools.

  5. Extract the ZIP into your folder from step 1.

  6. (Optional) Close and reopen the terminal if needed.

  7. Run:

    sdkmanager --install "build-tools;35.0.0" "ndk;29.0.13113456" "platforms;android-29" "platforms;android-35"
    
    • The latest NDK is not compatible with Lime you have to use the old one.
  8. Download and install JDK 17 (MSI).

  9. Run:

    lime setup android
    

    Use these when asked:

    • Android SDK: C:\path\to\your\folder
    • Android NDK: C:\path\to\your\folder\ndk\29.0.13113456
    • JDK: C:\Program Files\Java\jdk-17
  10. Now build your game:

    lime test android
    

macOS

  1. Create a new folder – this will store Android tools (remember where you put it!).

  2. Open Terminal (Command ⌘ + Space → type “terminal” → Enter).

  3. In Terminal:

    cd /path/to/your/folder
    export ANDROID_HOME=/path/to/your/folder
    export PATH=$PATH:$ANDROID_HOME/cmdline-tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools
    
  4. Download Android Studio Command-line Tools.

  5. Extract the ZIP into your folder from step 1.

  6. (Optional) Restart Terminal if needed.

  7. Run:

    sdkmanager --install "build-tools;35.0.0" "ndk;29.0.13113456" "platforms;android-29" "platforms;android-35"
    
  8. Download and install JDK 17 for macOS.

  9. Run:

    lime setup android
    

    Use these when asked:

    • Android SDK: /path/to/your/folder
    • Android NDK: /path/to/your/folder/ndk/28.0.13004108
    • JDK: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home (If not asked for JDK, don’t worry — just skip it.)
  10. Build your game:

    lime test android
    

iOS

Note that you can only build the game for iOS on a computer running MacOS.

  1. Build the game for desktop to make sure everything works. Check COMPILING.md.
  2. Get Xcode from the app store on your MacOS Machine.
  3. Download the iPhone SDK (First thing that pops up in Xcode)
  4. Open up a terminal tab and run lime test ios -xcode
  5. You will need to sign your own copy in order to run the game with a real iOS device!
    • To run with an iOS simulator instead of -xcode use -simulator