Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions xmake/includes/xpack/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ local apis = {
"xpack.add_buildrequires",
-- set nsis display icon
"xpack.set_nsis_displayicon",
-- set icon name
"xpack.set_iconname",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也是

Copy link
Member

Choose a reason for hiding this comment

The 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
Expand Down
60 changes: 60 additions & 0 deletions xmake/modules/detect/tools/find_appimagetool.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
--!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, Xmake Open Source Community.
--
-- @author RubMaker
-- @file find_appimagetool.lua
--

-- imports
import("lib.detect.find_program")
import("lib.detect.find_programver")

-- find appimagetool
--
-- @param opt the argument options, e.g. {version = true}
--
-- @return program
--
-- @code
--
-- local appimagetool = find_appimagetool()
--
-- @endcode
--
function main(opt)
-- init options
opt = opt or {}

-- add common appimagetool installation paths if no specific program is given
if not opt.program then
opt.paths = opt.paths or {}
local appimagetool_paths = {
"/usr/bin", -- standard system path
"/usr/local/bin", -- local installation
"/opt/appimagetool", -- custom installation directory
path.join(os.getenv("HOME") or "~", ".local/bin") -- user local bin
}

opt.paths = table.wrap(opt.paths)
for _, apppath in ipairs(appimagetool_paths) do
table.insert(opt.paths, apppath)
end
end

-- find program
local program = find_program(opt.program or "appimagetool", opt)
return program
end
70 changes: 70 additions & 0 deletions xmake/modules/detect/tools/find_linuxdeploy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
--!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, Xmake Open Source Community.
--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删了

-- @author RubMaker
-- @file find_linuxdeploy.lua
--

-- imports
import("lib.detect.find_program")
import("lib.detect.find_programver")

-- find linuxdeploy
--
-- @param opt the argument options, e.g. {version = true}
--
-- @return program, version
--
-- @code
--
-- local linuxdeploy = find_linuxdeploy()
--
-- @endcode
--
function main(opt)
-- init options
opt = opt or {}

-- add common linuxdeploy installation paths if no specific program is given
if not opt.program then
opt.paths = opt.paths or {}
local homedir = os.getenv("HOME") or "~"
local linuxdeploy_paths = {
"/usr/local/bin", -- standard system path
"/usr/bin", -- system binary path
"/opt/linuxdeploy", -- custom installation directory
path.join(homedir, ".local/bin"), -- user local bin
path.join(homedir, "bin"), -- user bin
path.join(homedir, "Downloads"), -- common download location
path.join(homedir, "downloads"), -- lowercase download location
os.tmpdir(), -- temporary directory
"/snap/bin", -- snap packages
"/var/lib/flatpak/exports/bin", -- flatpak system
path.join(homedir, ".local/share/flatpak/exports/bin"), -- flatpak user
path.join(os.curdir(), "tools"), -- project tools directory
path.join(os.curdir(), "bin") -- project bin directory
}

opt.paths = table.wrap(opt.paths)
for _, deploypath in ipairs(linuxdeploy_paths) do
table.insert(opt.paths, deploypath)
end
end

-- find program
local program = find_program(opt.program or "linuxdeploy", opt)
return program
end
Loading