Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
cfad96f8
Commit
cfad96f8
authored
Apr 13, 2026
by
qq_38816927
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改win的打包脚本
parent
403a10a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
runOhosApp-Win.bat
runscript/runOhosApp-Win.bat
+9
-6
No files found.
runscript/runOhosApp-Win.bat
View file @
cfad96f8
...
...
@@ -33,7 +33,7 @@ set PLATFORM=
set TARGET_ID=
REM Parse options (supports options in any position, e.g. ohosArm64 62Q0226107024702 -m release)
REM NOTE: Do not use "goto" inside parenthesized IF blocks
—
cmd.exe may fail with
REM NOTE: Do not use "goto" inside parenthesized IF blocks
-
cmd.exe may fail with
REM "The system cannot find the batch label specified - parse" and mis-handle -b/-a.
:parse
if "%~1"=="" goto done_parse
...
...
@@ -83,7 +83,7 @@ if "!PLATFORM!"=="" set "PLATFORM=%DEFAULT_PLATFORM%"
if "!TARGET_ID!"=="" set "TARGET_ID=%DEFAULT_TARGET_ID%"
REM Record script start time (epoch seconds for elapsed calculation)
for /f
%%t in ('powershell -NoProfile -Command "[int][double]::Parse((Get-Date -UFormat '%%s'))"'
) do set START_TIME=%%t
for /f
"usebackq tokens=*" %%t in (`powershell -NoProfile -Command "[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()"`
) do set START_TIME=%%t
echo Run environment configuration:
echo - Platform: %PLATFORM%
...
...
@@ -112,12 +112,15 @@ echo Checking environment configuration...
set "MIN_VERSION=6.0.0"
set "PRODUCT_INFO=%DEVECO_PATH%\product-info.json"
REM Read version without "(expr).prop" in PowerShell: a closing ")" inside in ('...') breaks cmd parsing.
set "CURRENT_VERSION="
if exist "%PRODUCT_INFO%" (
for /f "
tokens=*" %%v in ('powershell -NoProfile -Command "(Get-Content '%PRODUCT_INFO%' | ConvertFrom-Json).version"'
) do set "CURRENT_VERSION=%%v"
for /f "
usebackq tokens=*" %%v in (`powershell -NoProfile -Command "Get-Content -LiteralPath '%PRODUCT_INFO%' ^| ConvertFrom-Json ^| Select-Object -ExpandProperty version"`
) do set "CURRENT_VERSION=%%v"
) else (
echo Warning: product-info.json not found, skipping version check.
set "CURRENT_VERSION=unknown"
)
if "!CURRENT_VERSION!"=="" set "CURRENT_VERSION=unknown"
if not "%CURRENT_VERSION%"=="unknown" (
echo Current DevEco version: %CURRENT_VERSION%
...
...
@@ -204,9 +207,9 @@ if "%PLATFORM%"=="ohosArm64" (
if errorlevel 1 exit /b %errorlevel%
echo [Harmony-Debug-Pipeline] Build: KMP publish finished
—
next ohpm/hvigor HAP (incremental builds may be faster)
echo [Harmony-Debug-Pipeline] Build: KMP publish finished
-
next ohpm/hvigor HAP (incremental builds may be faster)
REM SO packaging end time / HAP build start time
for /f
%%t in ('powershell -NoProfile -Command "[int][double]::Parse((Get-Date -UFormat '%%s'))"'
) do set HAP_START_TIME=%%t
for /f
"usebackq tokens=*" %%t in (`powershell -NoProfile -Command "[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()"`
) do set HAP_START_TIME=%%t
REM ====================== HAP build ======================
if not "%LOCAL_OHOS_PATH%"=="" (
...
...
@@ -299,7 +302,7 @@ echo.
echo App info:
echo - Bundle: %BUNDLE_NAME%
echo - Device: %TARGET_ID%
for /f
%%t in ('powershell -NoProfile -Command "[int][double]::Parse((Get-Date -UFormat '%%s'))"'
) do set END_TIME=%%t
for /f
"usebackq tokens=*" %%t in (`powershell -NoProfile -Command "[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()"`
) do set END_TIME=%%t
set /a ELAPSED=HAP_START_TIME-START_TIME
set /a MINUTES=ELAPSED/60
set /a SECONDS=ELAPSED%%60
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment