Skip to content
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

User's qt.deploy.flags should have priority over defaults #5351

Merged
merged 1 commit into from
Jul 16, 2024
Merged

User's qt.deploy.flags should have priority over defaults #5351

merged 1 commit into from
Jul 16, 2024

Conversation

yh-sb
Copy link
Contributor

@yh-sb yh-sb commented Jul 15, 2024

@yh-sb yh-sb changed the title User's qt.deploy.flags have priority over defaults User's qt.deploy.flags should have priority over defaults Jul 15, 2024
@yh-sb yh-sb changed the title User's qt.deploy.flags should have priority over defaults User's qt.deploy.flags should have priority over defaults Jul 15, 2024
@waruqi waruqi added this to the v2.9.4 milestone Jul 15, 2024
@waruqi waruqi merged commit 2e0fb34 into xmake-io:dev Jul 16, 2024
19 checks passed
@yh-sb yh-sb deleted the qt-deploy-flags branch July 16, 2024 07:51
@jingkaimori
Copy link
Contributor

@waruqi @yh-sb value of qt.deploy.flags may be array, but there is no table:find method.

> xmake l
xmake> ({"-print"}):find("-p", 1, true) 
stdin:1: method 'find' is not callable (a nil value)
stack traceback:
        stdin:1: in main chunk
        [C]: in function 'sandbox/sandbox.interactive'
        ...dir\core\sandbox\modules\import\core\sandbox\sandbox.lua:102: in field 'interactive'
        @programdir\plugins\lua\main.lua:183: in function <@programdir\plugins\lua\main.lua:161>
        (...tail calls...)
        [C]: in function 'xpcall'
        @programdir\core\base\utils.lua:275: in function 'base/utils.trycall'
        (...tail calls...)
        @programdir\core\base\task.lua:491: in function 'base/task.run'
        @programdir\core\main.lua:327: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>

thus the follow code will throw error when running xmake install:

add_rules("mode.debug", "mode.release")

add_requires("qt5widgets")

target("testqt2")
    add_rules("qt.widgetapp")
    set_values("qt.deploy.flags", {"-printsupport", "--no-opengl-sw", "--no-translations"})
    add_headerfiles("src/*.h")
    add_files("src/*.cpp")
    add_files("src/mainwindow.ui")
    -- add files with Q_OBJECT meta (only for qt.moc)
    add_files("src/mainwindow.h")
    add_packages("qt5widgets")

@waruqi
Copy link
Member

waruqi commented Jul 23, 2024

@waruqi @yh-sb value of qt.deploy.flags may be array, but there is no table:find method.

> xmake l
xmake> ({"-print"}):find("-p", 1, true) 
stdin:1: method 'find' is not callable (a nil value)
stack traceback:
        stdin:1: in main chunk
        [C]: in function 'sandbox/sandbox.interactive'
        ...dir\core\sandbox\modules\import\core\sandbox\sandbox.lua:102: in field 'interactive'
        @programdir\plugins\lua\main.lua:183: in function <@programdir\plugins\lua\main.lua:161>
        (...tail calls...)
        [C]: in function 'xpcall'
        @programdir\core\base\utils.lua:275: in function 'base/utils.trycall'
        (...tail calls...)
        @programdir\core\base\task.lua:491: in function 'base/task.run'
        @programdir\core\main.lua:327: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>

thus the follow code will throw error when running xmake install:

add_rules("mode.debug", "mode.release")

add_requires("qt5widgets")

target("testqt2")
    add_rules("qt.widgetapp")
    set_values("qt.deploy.flags", {"-printsupport", "--no-opengl-sw", "--no-translations"})
    add_headerfiles("src/*.h")
    add_files("src/*.cpp")
    add_files("src/mainwindow.ui")
    -- add files with Q_OBJECT meta (only for qt.moc)
    add_files("src/mainwindow.h")
    add_packages("qt5widgets")

you can open a pr to improve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants