lcui-dev / lcui-router-app

A very simple browser-like application to show the LCUI and LCUI Router features
Creative Commons Zero v1.0 Universal
32 stars 8 forks source link

出去折腾了一圈又回来了,还是不行unknown option '--mode' #2

Closed fxqy closed 4 months ago

fxqy commented 3 years ago

又去duilib那折腾了一圈,还是需要装vcpkg,他那个更麻烦,又回来了,还是觉得lcui优雅。这次vs2015,vcpkg,lcpkg都装成功了,但是按照github readme上的还是不行,命令参数不对,希望帮我解决下。

PS D:\lcui-router-app> npm install
up to date in 1.501s

1 package is looking for funding
  run `npm fund` for details

PS D:\lcui-router-app> npm fund
lcui-router-app@0.1.0
`-- https://github.com/sponsors/sindresorhus
  `-- is-finite@1.1.0

PS D:\lcui-router-app> lcpkg run start --mode debug
error: unknown option '--mode'
PS D:\lcui-router-app> cd ..\lcui-quick-start\
PS D:\lcui-quick-start> lcpkg run start --mode debug
error: unknown option '--mode'
PS D:\lcui-quick-start>

image

lc-soft commented 3 years ago

你可以手动下载安装 vcpkg,然后给 lcpkg 配置 vcpkg 的目录路径。

https://github.com/lc-soft/lcpkg/blob/master/README.zh-cn.md#%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B

image

lc-soft commented 3 years ago

request 和 har-validator 过期只是警告,仍然可用,以后我会再花时间更新这些依赖。

fxqy commented 3 years ago

request 和 har-validator 过期只是警告,仍然可用,以后我会再花时间更新这些依赖。

虽然喜欢这个库,但能不能用mingw gcc来编译这个库啊,vs + vcpkg 太笨重了,我想装vs2019还不让装,不知道为啥,安装就是报错,只能安装vs2015,安装还附带了微软的全家桶sqlserver, .net, silverlight, web开发的,SSDT太多了。虽然库本身强调轻量级,但是开发环境太笨重了,普通人太难上手了,不用vs的开发者就别提了,微软的软件就是开源拦路虎。 image

lc-soft commented 3 years ago

这是 lcpkg 的问题, lcpkg run 只是简单的执行脚本,不会把 --mode 参数带过去,之前改脚本的时候没做测试,也没更新文档。

image

start 脚本由这四个命令组成,你改用 npm 执行它们试试:

npm run configure -- --mode debug
npm run build:bin
npm run build:css
npm run run

其中 configurebuild:bin 脚本本质上就是调用 CMake 或 XMake。

zjh-nuc-AIOT commented 3 years ago

missing script: [object Object] 咋解?

zjh-nuc-AIOT commented 3 years ago

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

lc-soft commented 3 years ago

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

临时解决方法:用 npm 代替 lcpkg ,我上面的评论已经解释过了。

lc-soft commented 3 years ago

运行lcpkg run start就出现missing script: [object Object] ,咋解呢?

0.3.2 版本已经修复 missing script: [object Object] 问题了,你再重新安装试试。

npm install -g lcpkg@0.3.2
lc-soft commented 3 years ago

构建配置已更新,要是还不行的话,你可以对比自己本地环境跑的脚本及输出的内容是否与 GitHub Actions 上的输出一致。

https://github.com/lc-ui/lcui-router-app/runs/1607474952?check_suite_focus=true

https://github.com/lc-ui/lcui-router-app/blob/71e79d4d03c2d63487cc615aae4bce7e62c8bf5c/.github/workflows/ccpp.yml#L5-L27

image

zjh-nuc-AIOT commented 3 years ago

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! lcui-router-app@0.1.0 run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the lcui-router-app@0.1.0 run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-27T09_48_28_590Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! lcui-router-app@0.1.0 start: npm run configure && npm run build:bin && npm run build:css && npm run run npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the lcui-router-app@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-27T09_48_28_646Z-debug.log 感觉就差一步了,话说必须需要vs2015的支持吗,安装了vs2019就不行吗

zjh-nuc-AIOT commented 3 years ago

[run] ERROR: the application is not working properly. child_process.js:674 throw err; ^

Error: Command failed: node ./scripts/run.js at checkExecSyncError (child_process.js:635:11) at execSync (child_process.js:671:15) at Command.runScript (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\run-script.js:15:3) at Command.listener [as _actionHandler] (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:426:31) at Command._parseCommand (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:1002:14) at Command.parse (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:801:10) at Object. (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\cli-run-script.js:7:4) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) { status: 4294967295, signal: null, output: [ null, null, null ], pid: 10216, stdout: null, stderr: null } child_process.js:674 throw err; ^

Error: Command failed: lcpkg run configure && lcpkg run build:bin && lcpkg run build:css && lcpkg run run at checkExecSyncError (child_process.js:635:11) at execSync (child_process.js:671:15) at Command.runScript (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\run-script.js:15:3) at Command.listener [as _actionHandler] (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:426:31) at Command._parseCommand (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:1002:14) at Command.parse (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\node_modules\commander\index.js:801:10) at Object. (C:\Users\宏\AppData\Roaming\npm\node_modules\lcpkg\src\cli-run-script.js:7:4) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) { status: 1, signal: null, output: [ null, null, null ], pid: 17580, stdout: null, stderr: null }

lc-soft commented 3 years ago

@zhangjianhong111 进 app 目录,手动双击 app.exe 文件,看看报什么错,顺便再把 app 目录的文件列表截图发上来。

lc-soft commented 3 years ago

@zhangjianhong111 我看你贴日志还是在跑 start 脚本,你按照我上面的评论跑这几个命令看看有什么输出。

image

zjh-nuc-AIOT commented 3 years ago

image

zjh-nuc-AIOT commented 3 years ago

![Uploading image.png…]()

lc-soft commented 3 years ago

@zhangjianhong111 app 目录的文件列表截图呢?

zjh-nuc-AIOT commented 3 years ago

image

zjh-nuc-AIOT commented 3 years ago

image

lc-soft commented 3 years ago

@zhangjianhong111 脚本输出的内容就这么点吗?把前面跑的脚本的输出都贴出来。

[run]
ERROR: the application is not working properly.
child_process.js:674
throw err;
zjh-nuc-AIOT commented 3 years ago

lcui-router-app@0.1.0 configure D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/configure.js "--mode" "debug"

'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���

[configure] 'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� write config to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\config\builder.json: { mode: 'debug', arch: 'x64', tool: 'cmake' } -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. -- Configuring done -- Generating done -- Build files have been written to: D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/build PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run build:bin

lcui-router-app@0.1.0 build:bin D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-bin.js

[build] 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.4.0+e901037fe

Checking Build System AppLib.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\lib\Debug\AppLib.lib AppUI.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\Debug\AppUI.lib about.c AppUIComponents.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\components\Debug\AppUIComponents.lib AppUIViews.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\views\Debug\AppUIViews.lib ui.c app.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\Debug\app.exe Building Custom Rule D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/CMakeLists.txt

[after build] exporting LCUI:x64-windows-release exporting lcui-router:x64-windows-release exporting lc-design:x64-windows-release PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run build:css

lcui-router-app@0.1.0 build:css D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-css.js

compile stylesheets... Rendering Complete, saving .css file... Wrote CSS to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\assets\stylesheets\app.css PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm run run

lcui-router-app@0.1.0 run D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/run.js

run application...

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! lcui-router-app@0.1.0 run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the lcui-router-app@0.1.0 run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_37_08_968Z-debug.log PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master>

zjh-nuc-AIOT commented 3 years ago

麻烦了,最近学校在交课设,这不想用下这个

zjh-nuc-AIOT commented 3 years ago

PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master> npm start

lcui-router-app@0.1.0 start D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master npm run configure && npm run build:bin && npm run build:css && npm run run

lcui-router-app@0.1.0 configure D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/configure.js

'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���

[configure] 'xmake' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� write config to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\config\builder.json: { mode: 'release', arch: 'x64', tool: 'cmake' } -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. -- Configuring done -- Generating done -- Build files have been written to: D:/baiduyunxiazai/qs/lcui-router-app-master (1)/lcui-router-app-master/build

lcui-router-app@0.1.0 build:bin D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-bin.js

[build] 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.4.0+e901037fe 版权所有(C) Microsoft Corporation。保留所有权利。

AppLib.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\lib\Debug\AppLib.lib AppUI.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\Debug\AppUI.lib about.c AppUIComponents.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\components\Debug\AppUIComponents.lib AppUIViews.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\build\src\ui\views\Debug\AppUIViews.lib ui.c app.vcxproj -> D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\Debug\app.exe

[after build] exporting LCUI:x64-windows-release exporting lcui-router:x64-windows-release exporting lc-design:x64-windows-release

lcui-router-app@0.1.0 build:css D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/build-css.js

compile stylesheets... Rendering Complete, saving .css file... Wrote CSS to D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master\app\assets\stylesheets\app.css

lcui-router-app@0.1.0 run D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master node ./scripts/run.js

run application...

[run] ERROR: the application is not working properly. npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! lcui-router-app@0.1.0 run: node ./scripts/run.js npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the lcui-router-app@0.1.0 run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_45_17_707Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! lcui-router-app@0.1.0 start: npm run configure && npm run build:bin && npm run build:css && npm run run npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the lcui-router-app@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\宏\AppData\Roaming\npm-cache_logs\2020-12-28T03_45_17_765Z-debug.log PS D:\baiduyunxiazai\qs\lcui-router-app-master (1)\lcui-router-app-master>

zjh-nuc-AIOT commented 3 years ago

我没装vs2015,有vs2019 我这些命令是在vscode下执行的

lc-soft commented 3 years ago

@zhangjianhong111 我在 Windows 上跑了一次,已经知道问题了:

lc-soft commented 3 years ago

我没装vs2015,有vs2019 我这些命令是在vscode下执行的

与 vs2015 无关,我 vs2017 都能编译通过。

zjh-nuc-AIOT commented 3 years ago

那要如何修改下呢?

zjh-nuc-AIOT commented 3 years ago

太麻烦你了

zjh-nuc-AIOT commented 3 years ago

大佬加油完善

lc-soft commented 3 years ago

@zhangjianhong111 晚上我花点时间再改改。

zjh-nuc-AIOT commented 3 years ago

爱你,大佬。

lc-soft commented 3 years ago

@zhangjianhong111 Windows 的构建脚本已更新,你再下载这个项目跑一遍脚本试试。

zjh-nuc-AIOT commented 3 years ago

成功了感谢

zjh-nuc-AIOT commented 3 years ago

image

zjh-nuc-AIOT commented 3 years ago

大佬牛逼