-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xpack 打包应用改进? #5308
Comments
Title: xpack Packaging application improvements? |
这不打包进去了么 ruki:test3 ruki$ xmake pack
checking for platform ... macosx
checking for architecture ... x86_64
checking for SDK version of Xcode for macosx (x86_64) ... 14.0
checking for Minimal target version of Xcode for macosx (x86_64) ... 14.0
[ 50%]: cache compiling.release src/foo.cpp
[ 62%]: cache compiling.release src/main.cpp
[ 62%]: linking.release libfoo.dylib
[ 87%]: linking.release App
packing build/xpack/test/test.zip ..
pack ok
ruki:test3 ruki$ unzip -l build/xpack/test/test.zip
Archive: build/xpack/test/test.zip
Length Date Time Name
--------- ---------- ----- ----
34776 07-06-2024 22:29 bin/App
16496 07-06-2024 22:29 bin/libfoo.dylib
--------- -------
51272 2 files
使用 |
尝试了下确实会打包动态库。
这里的target("foo")的add_installfiles,并没有触发。 此外似乎如果target是一个静态库,也不会安装。(可能我之前以为 add_installfiles,没被触发就认为xpack不会级联依赖安装)。 #使用 set_libdir(),set_bindir() |
After trying it, the dynamic library will indeed be packaged.
The add_installfiles of target("foo") here is not triggered. In addition, it seems that if the target is a static library, it will not be installed. (Maybe I thought that add_installfiles was not triggered before and thought that xpack would not cascade dependency installation). #Use set_libdir(), set_bindir() |
其实这块按理就不应该默认被安装。。
所以按理不应该无脑级联安装所有,不过目前的默认安装策略确实有点乱,且不够灵活,应该默认走上面的策略,然后单独搞个策略, 针对性开启某些 target 的依赖级联。 这个要后面捋下才行。 |
In fact, this piece of software should not be installed by default. .
Therefore, it stands to reason that you should not install everything in a mindless cascade. However, the current default installation strategy is indeed a bit messy and not flexible enough. You should default to the above strategy, and then create a separate strategy to specifically enable the dependency cascade of certain targets. This will have to be sorted out later. |
我重构设计了下默认安装策略,可以看下,后面会基于这个,同步 |
你在什么场景下需要该功能?
几个问题:
add_targets("App", "foo")
,能够打包foo,但是我不希望走xmake install类似的方式(在安装位置加入了 include、lib等内容),只需要一个动态库文件即可。/plugins
目录?描述可能的解决方案
无
描述你认为的候选方案
无
其他信息
无
The text was updated successfully, but these errors were encountered: