Skip to content

Minor Windows path escaping issue when building for Android #2107

Description

@JUGYx

ArmorPaint version:

019192c

OS / GPU model:
Building on Windows for Android.

Issue description:
make.bat generates an unescaped Windows path for app/CMakeLists.txt, it's caused by this line in base/project.js:

project.add_define("EMBED_H_PATH=\"" + os_cwd() + "/build/embed.h" + "\"");

os_cwd outputs a native Windows path containing backslashes.

Here's the Android Studio error:

when parsing string

    ${CMAKE_C_FLAGS_DEBUG} -DEMBED_H_PATH=\\\"C:\Users\intel\Downloads\armorpaint\paint/build/embed.h\\\" -DIRON_ANDROID -DIRON_VULKAN -DVK_USE_PLATFORM_ANDROID_KHR -DWITH_KONG -DWITH_PLUGINS -DWITH_PHYSICS -DWITH_EVAL -DWITH_BC7 -DIDLE_SLEEP -DWITH_IMAGE_WRITE -DWITH_VIDEO_WRITE

  Invalid character escape '\U'

Manually escaping the generated backslashes resolves the issue.

Steps to reproduce:

  • Run make.bat:
..\base\make.bat --target android
  • Open and attempt to build the project in Android Studio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions