xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.53k stars 763 forks source link

Xpack打包nsis应用时,组件的描述显示为nil #5310

Closed jingkaimori closed 5 days ago

jingkaimori commented 6 days ago

Xmake 版本

v2.9.3+HEAD.a5da06f37

操作系统版本和架构

Windows 10 22H2

描述问题

tests/plugins/pack 项目上,运行以下命令:

xmake f
xmake build
xmake pack -f "nsis"

生成的安装包中,Enable long path组件的属性显示为nil。

期待的结果

组件的描述显示正常。

工程配置

https://github.com/xmake-io/xmake/blob/f56b497bd223e9d5e01291c8ef81ce3bf0d6e69d/tests/plugins/pack/xmake.lua

附加信息和错误日志

build cache stats:
cache directory: build\.build_cache
cache hit rate: 0%
cache hit: 0
cache hit total time: 0.000s
cache miss: 0
cache miss total time: 0.000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0.000s

packing build\xpack\test\test-windows-x64-v1.0.0.exe
  > replace PACKAGE_VERSION -> 1.0.0
  > replace PACKAGE_VERSION_BUILD ->
  > replace PACKAGE_VERSION -> 1.0.0
  > replace PACKAGE_VERSION_BUILD ->
  > replace PACKAGE_VERSION -> 1.0.0
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_OUTPUTFILE -> C:\Users\jingkaimori\Documents\Source\xmake\tests\plugins\pack\build\xpack\test\test-windows-x64-v1.0.0.exe
  > replace PACKAGE_WORKDIR -> C:\Users\jingkaimori\Documents\Source\xmake\tests\plugins\pack
  > replace PACKAGE_ARCH -> x64
  > replace PACKAGE_ICONFILE -> src\assets\xmake.ico
  > replace PACKAGE_ICONFILE -> src\assets\xmake.ico
  > replace PACKAGE_LICENSEFILE -> LICENSE.md
  > replace PACKAGE_LICENSEFILE -> LICENSE.md
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_DESCRIPTION -> A test installer.
  > replace PACKAGE_COMPANY ->
  > replace PACKAGE_COPYRIGHT ->
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_FILENAME -> test-windows-x64-v1.0.0.exe
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_INSTALLCMDS -> SetOutPath "$InstDir\images\assets"
  File /oname=img1.png "src\assets\img1.png"
  SetOutPath "$InstDir\images\assets"
  File /oname=img2.png "src\assets\img2.png"
  SetOutPath "$InstDir\bin"
  File /oname=test.exe "build\windows\x64\release\test.exe"
  SetOutPath "$InstDir\bin"
  File /oname=foo.dll "build\windows\x64\release\foo.dll"
  SetOutPath "$InstDir\bin"
  File /oname=zlib.dll "C:\Users\jingkaimori\AppData\Local\.xmake\packages\z\zlib\v1.3.1\fdaeb710132544f88b434d4e5b01717a\bin\zlib.dll"
  SetOutPath "$InstDir\include"
  File /oname=test.h "include\test.h"
  CreateDirectory "$InstDir\resources"
  SetOutPath "$InstDir\resources\assets"
  File /oname=file1.txt "src\assets\file1.txt"
  SetOutPath "$InstDir\resources\assets"
  File /oname=file2.txt "src\assets\file2.txt"
  CreateDirectory "$InstDir\stub"
  > replace PACKAGE_TITLE -> hello
  > replace PACKAGE_NSIS_DISPLAY_ICON -> $InstDir\bin\test.exe
  > replace PACKAGE_NSIS_DISPLAY_ICON -> $InstDir\bin\test.exe
  > replace PACKAGE_DESCRIPTION -> A test installer.
  > replace PACKAGE_COPYRIGHT ->
  > replace PACKAGE_HOMEPAGE -> https://xmake.io
  > replace PACKAGE_HOMEPAGE -> https://xmake.io
  > replace PACKAGE_HOMEPAGE -> https://xmake.io
  > replace PACKAGE_VERSION_MAJOR -> 1
  > replace PACKAGE_VERSION_MINOR -> 0
  > replace PACKAGE_BINDIR -> $InstDir\bin
  > replace PACKAGE_BINDIR -> $InstDir\bin
  > replace PACKAGE_BINDIR -> $InstDir\bin
  > replace PACKAGE_BINDIR -> $InstDir\bin
  > replace PACKAGE_NSIS_INSTALL_SECTIONS -> Section /o "Enable Long Path" InstallLongPath
    ${If} $NoAdmin == "false"
    ; Enable long path
    WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1
  ${EndIf}
  SectionEnd
  > replace PACKAGE_DESCRIPTION -> A test installer.
  > replace PACKAGE_NAME -> test
  > replace PACKAGE_NSIS_INSTALL_DESCS -> LangString DESC_InstallLongPath ${LANG_ENGLISH} "nil"
  > replace PACKAGE_NSIS_INSTALL_DESCRIPTION_TEXTS -> !insertmacro MUI_DESCRIPTION_TEXT ${InstallLongPath}
  > replace PACKAGE_UNINSTALLCMDS -> ${unRMFileIfExists} "$InstDir\images\assets\img1.png"
  ${unRMEmptyParentDirs} "$InstDir\images\assets\img1.png"
  ${unRMFileIfExists} "$InstDir\images\assets\img2.png"
  ${unRMEmptyParentDirs} "$InstDir\images\assets\img2.png"
  ${unRMFileIfExists} "$InstDir\bin\test.exe"
  ${unRMEmptyParentDirs} "$InstDir\bin\test.exe"
  ${unRMFileIfExists} "$InstDir\bin\test.pdb"
  ${unRMEmptyParentDirs} "$InstDir\bin\test.pdb"
  ${unRMFileIfExists} "$InstDir\bin\foo.dll"
  ${unRMEmptyParentDirs} "$InstDir\bin\foo.dll"
  ${unRMFileIfExists} "$InstDir\bin\foo.pdb"
  ${unRMEmptyParentDirs} "$InstDir\bin\foo.pdb"
  ${unRMFileIfExists} "$InstDir\lib\foo.lib"
  ${unRMEmptyParentDirs} "$InstDir\lib\foo.lib"
  ${unRMFileIfExists} "$InstDir\include\test.h"
  ${unRMEmptyParentDirs} "$InstDir\include\test.h"
  ${unRMFileIfExists} "$InstDir\bin\zlib.dll"
  ${unRMEmptyParentDirs} "$InstDir\bin\zlib.dll"
  ${unRMDirIfExists} "$InstDir\resources"
  ${unRMDirIfExists} "$InstDir\stub"
  > replace PACKAGE_BINDIR -> $InstDir\bin
  > replace PACKAGE_BINDIR -> $InstDir\bin
makensis build\.xpack\test\test-windows-x64-v1.0.0.nsi
Processing config: C:\Users\jingkaimori\AppData\Local\.xmake\packages\n\nsis\3.09\2af10279736745119f8aa0ff338acbba\nsisconf.nsh
Processing script file: "build\.xpack\test\test-windows-x64-v1.0.0.nsi" (ACP)

Processed 1 file, writing output (x86-unicode):
warning 6010: install function "RMDirIfExists" not referenced - zeroing code (390-396) out

warning 6010: install function "RMFileIfExists" not referenced - zeroing code (396-402) out

Output: "C:\Users\jingkaimori\Documents\Source\xmake\tests\plugins\pack\build\xpack\test\test-windows-x64-v1.0.0.exe"
Install: 6 pages (384 bytes), 3 sections (1 required) (49224 bytes), 1031 instructions (28868 bytes), 326 strings (32272 bytes), 
1 language table (362 bytes).
Uninstall: 3 pages (256 bytes), 1 section (16408 bytes), 524 instructions (14672 bytes), 211 strings (5832 bytes), 1 language table (282 bytes).
Datablock optimizer saved 26517 bytes (~2.5%).

Using lzma (compress whole) compression.

EXE header size:              161280 / 38912 bytes
Install code:                          (111574 bytes)
Install data:                          (811433 bytes)
Uninstall code+data:                   (115188 bytes)
Compressed data:              268736 / 1038195 bytes
CRC (0xE9A51FBC):                  4 / 4 bytes

Total size:                   430020 / 1077111 bytes (39.9%)

2 warnings:
  6010: install function "RMDirIfExists" not referenced - zeroing code (390-396) out

  6010: install function "RMFileIfExists" not referenced - zeroing code (396-402) out

pack ok
Issues-translate-bot commented 6 days ago

Bot detected the issue body's language is not English, translate it automatically.


Title: When Xpack packages nsis application, the component description is displayed as nil

waruqi commented 5 days ago

再试试,xmake update -s dev

Issues-translate-bot commented 5 days ago

Bot detected the issue body's language is not English, translate it automatically.


Try again, xmake update -s dev

jingkaimori commented 5 days ago

fixed, thanks