This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
build-logic/ide/src/main/java/com/itsaky/androidide/plugins Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ package com.itsaky.androidide.plugins
2020import com.itsaky.androidide.plugins.util.DownloadUtils
2121import org.gradle.api.Plugin
2222import org.gradle.api.Project
23+ import org.gradle.internal.os.OperatingSystem
2324import java.io.File
2425
2526/* *
@@ -74,11 +75,11 @@ class TerminalBootstrapPackagesPlugin : Plugin<Project> {
7475 .section .rodata
7576 blob:
7677 #if defined __aarch64__
77- .incbin "${files[" aarch64" ]!! .absolutePath} "
78+ .incbin "${escapePathOnWindows( files[" aarch64" ]!! .absolutePath) } "
7879 #elif defined __arm__
79- .incbin "${files[" arm" ]!! .absolutePath} "
80+ .incbin "${escapePathOnWindows( files[" arm" ]!! .absolutePath) } "
8081 #elif defined __x86_64__
81- .incbin "${files[" x86_64" ]!! .absolutePath} "
82+ .incbin "${escapePathOnWindows( files[" x86_64" ]!! .absolutePath) } "
8283 #else
8384 # error Unsupported arch
8485 #endif
@@ -90,4 +91,13 @@ class TerminalBootstrapPackagesPlugin : Plugin<Project> {
9091 )
9192 }
9293 }
94+
95+ private fun escapePathOnWindows (path : String ): String {
96+ if (OperatingSystem .current().isWindows) {
97+ // escape backslashes when building on Windows
98+ return path.replace(" \\ " , " \\\\ " )
99+ }
100+
101+ return path
102+ }
93103}
You can’t perform that action at this time.
0 commit comments