1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-07-27 07:41:02 +00:00
Funkin/docs/COMPILING_MOBILE.md
2025-06-03 06:06:24 -04:00

4.1 KiB
Raw Permalink Blame History

Compiling Friday Night Funkin' for Mobile Devices

Before starting, make sure your game builds on desktop. Check COMPILING.md if you havent 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, dont 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! That requires an Apple Developer account, sorry!
    • To run with an iOS simulator instead of -xcode use -simulator

iOS Troubleshooting

  • A required plugin failed to load. Please ensure system content is up-to-date — try running 'xcodebuild -runFirstLaunch'. Make sure you have the iOS SDK isntalled, see Step 2.

  • error: No Accounts: Add a new account in Accounts settings. (in target 'Funkin' from project 'Funkin')

Open XCode, press CMD+, to open Settings, select Accounts, add an Apple ID.

  • error: No Account for Team "Z7G7AVNGSH". Add a new account in Accounts settings or verify that your accounts have valid credentials.

Open project.hxp and change IOS_TEAM_ID to your personal team's ID.

  • error: Failed Registering Bundle Identifier: The app identifier "me.funkin.fnf" cannot be registered to your development team because it is not available.

The Funkin' Crew are the only ones that can build an iOS app with the identifier me.funkin.fnf. Open project.hxp and change PACKAGE_NAME to a unique value.

  • error: No profiles for 'me.funkin.fnf' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'me.funkin.fnf'