forked from cocos/cocos-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.8 Support openharmony4.0 (cocos#15708)
* Fix openharmony platform issues: 1. Fix xmlhttprequest request problems. 2. Repair the problem of not being able to display full screen. * fix: crash on OH 4.0 (cocos#15656) * Openharmony adapted to the new Deveco(3.1 beta2) version * Runtime environment using harmonyos * Modifying configuration content * Modify the usage syntax Restore default values --------- Co-authored-by: PP <[email protected]>
- Loading branch information
Showing
17 changed files
with
188 additions
and
1,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
}, | ||
"targets": [ | ||
{ | ||
"name": "default" | ||
"name": "default", | ||
"runtimeOS": "HarmonyOS" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"license": "", | ||
"devDependencies": {}, | ||
"author": "", | ||
"name": "entry", | ||
"description": "example description", | ||
"main": "", | ||
"version": "1.0.0", | ||
"dependencies": {} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
# ---------------------------------------------------------------------------- | ||
# Hvigor startup script, version 1.0.0 | ||
# | ||
# Required ENV vars: | ||
# ------------------ | ||
# NODE_HOME - location of a Node home dir | ||
# or | ||
# Add /usr/local/nodejs/bin to the PATH environment variable | ||
# ---------------------------------------------------------------------------- | ||
|
||
HVIGOR_APP_HOME=$(dirname $(readlink -f $0)) | ||
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js | ||
warn() { | ||
echo "" | ||
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" | ||
} | ||
|
||
error() { | ||
echo "" | ||
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" | ||
} | ||
|
||
fail() { | ||
error "$@" | ||
exit 1 | ||
} | ||
|
||
# Determine node to start hvigor wrapper script | ||
if [ -n "${NODE_HOME}" ];then | ||
EXECUTABLE_NODE="${NODE_HOME}/bin/node" | ||
if [ ! -x "$EXECUTABLE_NODE" ];then | ||
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed" | ||
fi | ||
else | ||
EXECUTABLE_NODE="node" | ||
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path" | ||
fi | ||
|
||
# Check hvigor wrapper script | ||
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then | ||
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}" | ||
fi | ||
|
||
# start hvigor-wrapper script | ||
exec "${EXECUTABLE_NODE}" \ | ||
"${HVIGOR_WRAPPER_SCRIPT}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Hvigor startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
|
||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
|
||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
|
||
@rem Resolve any "." and ".." in APP_HOME to make it shorter. | ||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi | ||
|
||
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js | ||
set NODE_EXE=node.exe | ||
|
||
goto start | ||
|
||
:start | ||
@rem Find node.exe | ||
if defined NODE_HOME goto findNodeFromNodeHome | ||
|
||
%NODE_EXE% --version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto execute | ||
|
||
echo. | ||
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. | ||
echo. | ||
echo Please set the NODE_HOME variable in your environment to match the | ||
echo location of your NodeJs installation. | ||
|
||
goto fail | ||
|
||
:findNodeFromNodeHome | ||
set NODE_HOME=%NODE_HOME:"=% | ||
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% | ||
|
||
if exist "%NODE_EXE_PATH%" goto execute | ||
echo. | ||
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. | ||
echo. | ||
echo Please set the NODE_HOME variable in your environment to match the | ||
echo location of your NodeJs installation. | ||
|
||
goto fail | ||
|
||
:execute | ||
@rem Execute hvigor | ||
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* | ||
|
||
if "%ERRORLEVEL%" == "0" goto hvigorwEnd | ||
|
||
:fail | ||
exit /b 1 | ||
|
||
:hvigorwEnd | ||
if "%OS%" == "Windows_NT" endlocal | ||
|
||
:end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"license": "", | ||
"devDependencies": { | ||
"@ohos/hypium": "1.0.6" | ||
}, | ||
"author": "", | ||
"name": "test-cases", | ||
"description": "example description", | ||
"main": "", | ||
"version": "1.0.0", | ||
"dependencies": {} | ||
} |
Oops, something went wrong.