浏览代码

fix bug for windows

ruki 3 年之前
父节点
当前提交
641e4ee7fe

+ 4 - 2
src/main/kotlin/io/xmake/project/XMakeDirectoryProjectGenerator.kt

@@ -29,8 +29,10 @@ class XMakeDirectoryProjectGenerator : DirectoryProjectGeneratorBase<XMakeConfig
         // get content entry path
         // get content entry path
         val contentEntryPath = baseDir.canonicalPath ?: return
         val contentEntryPath = baseDir.canonicalPath ?: return
 
 
-        // create empty project
-        SystemUtils.Runv(
+        /* create empty project
+         * @note we muse use ioRunv instead of Runv to read all output, otherwise it will wait forever on windows
+         */
+        SystemUtils.ioRunv(
             listOf(
             listOf(
                 SystemUtils.xmakeProgram,
                 SystemUtils.xmakeProgram,
                 "create",
                 "create",

+ 4 - 2
src/main/kotlin/io/xmake/project/XMakeModuleBuilder.kt

@@ -32,8 +32,10 @@ class XMakeModuleBuilder : ModuleBuilder() {
             LocalFileSystem.getInstance().refreshAndFindFileByPath(FileUtil.toSystemIndependentName(contentEntryPath))!!
             LocalFileSystem.getInstance().refreshAndFindFileByPath(FileUtil.toSystemIndependentName(contentEntryPath))!!
         contentEntry.addSourceFolder(sourceRoot, false)
         contentEntry.addSourceFolder(sourceRoot, false)
 
 
-        // create empty project
-        SystemUtils.Runv(
+        /* create empty project
+         * @note we muse use ioRunv instead of Runv to read all output, otherwise it will wait forever on windows
+         */
+        SystemUtils.ioRunv(
             listOf(
             listOf(
                 SystemUtils.xmakeProgram,
                 SystemUtils.xmakeProgram,
                 "create",
                 "create",