mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
[3.6.0] fix ohos make (#11942)
* add rawfilw dir * fix res_path missing * fix check java path
This commit is contained in:
@@ -55,7 +55,7 @@ export class OHOSPackTool extends NativePackTool {
|
||||
|
||||
// gradle.properties
|
||||
await cchelper.replaceInFile([
|
||||
{ reg: '^RES_ps.*', text: `RES_PATH=${cchelper.fixPath(this.paths.buildDir)}` },
|
||||
{ reg: '^RES_PATH.*', text: `RES_PATH=${cchelper.fixPath(this.paths.buildDir)}` },
|
||||
{ reg: '^ENGINE_ROOT.*', text: `ENGINE_ROOT=${cchelper.fixPath(cocosXRoot)}` },
|
||||
{ reg: '^COMMON_DIR.*', text: `COMMON_DIR=${cchelper.fixPath(process.env.COMMON_DIR || '')}` },
|
||||
], ps.join(ohosProjDir, 'gradle.properties'));
|
||||
|
||||
@@ -366,7 +366,7 @@ export class cchelper {
|
||||
console.error(`'java' is not found in PATH`);
|
||||
} else {
|
||||
try {
|
||||
const version = execSync(`${javaPath} --version`).toString();
|
||||
const version = execSync(`"${cchelper.fixPath(javaPath)}" -version`).toString();
|
||||
if (/Java\(TM\)/.test(version)) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user