Skip to content

2468785842/krkr2

Repository files navigation

KrKr2 Emulator

This repository contains the KrKr2 Emulator, a cross-platform emulator designed to run games made with the KiriKiri engine (also known as T Visual Presenter).
It supports Android, Windows, Linux, and MacOS, allowing users to play KiriKiri engine games on multiple platforms.

语言 / Language: 中文 | English


KrKr2 Emulator

Table of Contents


Supported Platforms

  • Android:
    • arm64-v8a
    • x86_64
  • Windows:
    • x86_64
  • Linux:
    • x86_64
  • MacOS:
    • arm64

Build Tools


Build Environment Setup

Environment Variables

  • Android:
    • VCPKG_ROOT=/path/to/vcpkg
    • ANDROID_SDK=/path/to/androidsdk
    • ANDROID_NDK=/path/to/androidndk
  • Windows:
    • VCPKG_ROOT=D:/vcpkg
    • Add winflexbison path to PATH.
  • Linux / MacOS:
    • VCPKG_ROOT=/path/to/vcpkg

Note: On Windows, use / or \\ instead of a single \ in paths.


Build Steps

  • Android:

    ./platforms/android/gradlew -p ./platforms/android assembleDebug

    If you encounter glib installation issues, see FAQ#安装glib失败

  • Windows:

    ./scripts/build-windows.bat
  • Linux:

    ./scripts/build-linux.sh
  • MacOS:

    cmake --preset="MacOS Debug Config"
    cmake --build --preset="MacOS Debug Build"
  • Using Docker:

  • Build Linux: docker build -f dockers/linux.Dockerfile -t linux-builder .

  • Build Android: docker build -f dockers/android.Dockerfile -t android-builder .


Executable Location

  • Android:
    • Debug: platforms/android/out/android/app/outputs/apk/debug/*.apk
    • Release: platforms/android/out/android/app/outputs/apk/release/*.apk
  • Windows: out/windows/debug/bin/krkr2/krkr2.exe
  • Linux: out/linux/debug/bin/krkr2/krkr2
  • MacOS: out/macos/debug/bin/krkr2/krkr2.app

Code Formatting

  • clang-format@20

  • Linux:

    clang-format -i --verbose $(find ./cpp ./platforms ./tests ./tools -regex ".+\.\(cpp\|cc\|h\|hpp\|inc\)")
  • MacOS:

    clang-format -i --verbose $(find ./cpp ./platforms ./tests ./tools -name "*.cpp" -o -name "*.cc" -o -name "*.h" -o -name "*.hpp" -o -name "*.inc")
  • Windows:

    Get-ChildItem -Path ./cpp, ./platforms, ./tests, ./tools -Recurse -File | 
    Where-Object { $_.Name -match '\.(cpp|cc|h|hpp|inc)$' } | 
    ForEach-Object { clang-format -i --verbose $_.FullName }

Supported Games


Plugin Resources


License

MIT License. See LICENSE for details.