-
-
Notifications
You must be signed in to change notification settings - Fork 882
add appimage pack for common project and qt project #6826
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
Changes from all commits
9d8565d
f6d069f
91b986f
6de69b2
254d7a6
6681a8e
a4ca5d8
f6e002b
2f6ad65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "deviceId": "1d865d85971033dbc6e2146fc84e4bab560676c51efb52db347df5c3d503bafb" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,10 @@ local apis = { | |
| "xpack.add_buildrequires", | ||
| -- set nsis display icon | ||
| "xpack.set_nsis_displayicon", | ||
| -- set appimage icon name | ||
| "xpack.set_iconname", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 按照上面的改下 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里还没改,暂时先分开单独设置 |
||
| -- set appimage tool | ||
| "xpack.set_appimage_tool", | ||
| -- set package component title | ||
| "xpack_component.set_title", | ||
| -- set package component description | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||
| --!A cross-platform build utility based on Lua | ||||
| -- | ||||
| -- Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| -- you may not use this file except in compliance with the License. | ||||
| -- You may obtain a copy of the License at | ||||
| -- | ||||
| -- http://www.apache.org/licenses/LICENSE-2.0 | ||||
| -- | ||||
| -- Unless required by applicable law or agreed to in writing, software | ||||
| -- distributed under the License is distributed on an "AS IS" BASIS, | ||||
| -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| -- See the License for the specific language governing permissions and | ||||
| -- limitations under the License. | ||||
| -- | ||||
| -- Copyright (C) 2015-present, TBOOX Open Source Group. | ||||
| -- | ||||
| -- @author RubMaker | ||||
| -- @file find_appimagetool.lua | ||||
| -- | ||||
|
|
||||
| -- imports | ||||
| import("lib.detect.find_program") | ||||
|
|
||||
| -- find appimagetool | ||||
| -- | ||||
| -- @param opt the argument options | ||||
| -- | ||||
| -- @return program path or nil | ||||
| -- | ||||
| -- @code | ||||
| -- | ||||
| -- local appimagetool = find_appimagetool() | ||||
| -- | ||||
| -- @endcode | ||||
| -- | ||||
| function main(opt) | ||||
| opt = opt or {} | ||||
|
|
||||
| -- find appimagetool in system PATH | ||||
| local program = find_program("appimagetool", opt) | ||||
|
|
||||
| -- if not found, check common installation paths | ||||
| if not program then | ||||
| local paths = { | ||||
| "/usr/local/bin/appimagetool", | ||||
| "/usr/bin/appimagetool", | ||||
| "/opt/appimagetool/appimagetool" | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里判断平台,这些都是 unix 路径,windows 下不会有 if not is_host("windows") then
table.insert(paths, ..)
end |
||||
| } | ||||
|
|
||||
| for _, p in ipairs(paths) do | ||||
| if os.isfile(p) and os.isexec(p) then | ||||
| program = p | ||||
| break | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里不对,find_program 支持 paths 参数传入,进行查找的,没必要额外自己实现。改下上面的 opt.paths 就行了 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 参考
|
||||
| end | ||||
| end | ||||
| end | ||||
|
|
||||
| return program | ||||
| end | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --!A cross-platform build utility based on Lua | ||
| -- | ||
| -- Licensed under the Apache License, Version 2.0 (the "License"); | ||
| -- you may not use this file except in compliance with the License. | ||
| -- You may obtain a copy of the License at | ||
| -- | ||
| -- http://www.apache.org/licenses/LICENSE-2.0 | ||
| -- | ||
| -- Unless required by applicable law or agreed to in writing, software | ||
| -- distributed under the License is distributed on an "AS IS" BASIS, | ||
| -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| -- See the License for the specific language governing permissions and | ||
| -- limitations under the License. | ||
| -- | ||
| -- Copyright (C) 2015-present, TBOOX Open Source Group. | ||
| -- | ||
| -- @author RubMaker | ||
| -- @file find_linuxdeploy.lua | ||
| -- | ||
|
|
||
| -- imports | ||
| import("lib.detect.find_program") | ||
|
|
||
| -- find linuxdeploy | ||
| -- | ||
| -- @param opt the argument options | ||
| -- | ||
| -- @return program path or nil | ||
| -- | ||
| -- @code | ||
| -- | ||
| -- local linuxdeploy = find_linuxdeploy() | ||
| -- | ||
| -- @endcode | ||
| -- | ||
| function main(opt) | ||
| opt = opt or {} | ||
|
|
||
| -- find linuxdeploy in system PATH | ||
| local program = find_program("linuxdeploy", opt) | ||
|
|
||
| -- if not found, check common installation paths | ||
| if not program then | ||
| local homedir = os.getenv("HOME") | ||
| local paths = { | ||
| "/usr/local/bin/linuxdeploy", | ||
| "/usr/bin/linuxdeploy", | ||
| "/opt/linuxdeploy/linuxdeploy", | ||
| path.join(os.tmpdir(), "linuxdeploy"), | ||
| path.join(homedir, "Downloads/linuxdeploy"), | ||
| path.join(homedir, "downloads/linuxdeploy"), | ||
| path.join(homedir, ".local/bin/linuxdeploy"), | ||
| path.join(homedir, "bin/linuxdeploy"), | ||
| "/snap/bin/linuxdeploy", | ||
| "/var/lib/flatpak/exports/bin/linuxdeploy", | ||
| path.join(homedir, ".local/share/flatpak/exports/bin/linuxdeploy"), | ||
| path.join(os.curdir(), "linuxdeploy"), | ||
| path.join(os.curdir(), "tools/linuxdeploy"), | ||
| path.join(os.curdir(), "bin/linuxdeploy") | ||
| } | ||
|
|
||
| for _, p in ipairs(paths) do | ||
| if os.isfile(p) and os.isexec(p) then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里也是,挪到 find_program opt.paths里面 |
||
| program = p | ||
| break | ||
| end | ||
| end | ||
| end | ||
|
|
||
| return program | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --!A cross-platform build utility based on Lua | ||
| -- | ||
| -- Licensed under the Apache License, Version 2.0 (the "License"); | ||
| -- you may not use this file except in compliance with the License. | ||
| -- You may obtain a copy of the License at | ||
| -- | ||
| -- http://www.apache.org/licenses/LICENSE-2.0 | ||
| -- | ||
| -- Unless required by applicable law or agreed to in writing, software | ||
| -- distributed under the License is distributed on an "AS IS" BASIS, | ||
| -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| -- See the License for the specific language governing permissions and | ||
| -- limitations under the License. | ||
| -- | ||
| -- Copyright (C) 2015-present, TBOOX Open Source Group. | ||
| -- | ||
| -- @author RubMaker | ||
| -- @file find_linuxdeployqt.lua | ||
| -- | ||
|
|
||
| -- imports | ||
| import("lib.detect.find_program") | ||
|
|
||
| -- find linuxdeployqt | ||
| -- | ||
| -- @param opt the argument options | ||
| -- | ||
| -- @return program path or nil | ||
| -- | ||
| -- @code | ||
| -- | ||
| -- local linuxdeployqt = find_linuxdeployqt() | ||
| -- | ||
| -- @endcode | ||
| -- | ||
| function main(opt) | ||
| opt = opt or {} | ||
|
|
||
| -- find linuxdeployqt in system PATH | ||
| local program = find_program("linuxdeployqt", opt) | ||
|
|
||
| -- if not found, check common installation paths | ||
| if not program then | ||
| -- get home directory safely | ||
| local homedir = os.getenv("HOME") | ||
|
|
||
| local paths = { | ||
| "/usr/local/bin/linuxdeployqt", | ||
| "/usr/bin/linuxdeployqt", | ||
| "/opt/linuxdeployqt/linuxdeployqt", | ||
| path.join(os.tmpdir(), "linuxdeployqt"), | ||
| path.join(homedir, "Downloads/linuxdeployqt"), | ||
| path.join(homedir, "downloads/linuxdeployqt"), | ||
| path.join(homedir, ".local/bin/linuxdeployqt"), | ||
| path.join(homedir, "bin/linuxdeployqt"), | ||
| "/snap/bin/linuxdeployqt", | ||
| "/var/lib/flatpak/exports/bin/linuxdeployqt", | ||
| path.join(homedir, ".local/share/flatpak/exports/bin/linuxdeployqt"), | ||
| path.join(os.curdir(), "linuxdeployqt"), | ||
| path.join(os.curdir(), "tools/linuxdeployqt"), | ||
| path.join(os.curdir(), "bin/linuxdeployqt") | ||
| } | ||
|
|
||
| for _, p in ipairs(paths) do | ||
| if os.isfile(p) and os.isexec(p) then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里 |
||
| program = p | ||
| break | ||
| end | ||
| end | ||
| end | ||
|
|
||
| return program | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是啥?删了