use path.getabsolute since os.realpath will return nil if the file doesn't exist

This commit is contained in:
otavepto 2024-05-27 04:03:27 +03:00
parent a150541303
commit cf38fda135

View File

@ -68,7 +68,8 @@ newaction {
else else
deps_install_prefix = 'install32' deps_install_prefix = 'install32'
end end
local protoc_exe = os.realpath(deps_dir .. 'protobuf/' .. deps_install_prefix .. '/bin/protoc') local protoc_exe = path.getabsolute(path.join(deps_dir, 'protobuf', deps_install_prefix, 'bin', 'protoc'), _MAIN_SCRIPT_DIR)
local out_dir = 'dll/proto_gen/' .. os_iden local out_dir = 'dll/proto_gen/' .. os_iden
if os.host() == "windows" then if os.host() == "windows" then
@ -426,8 +427,8 @@ filter { "system:windows", "action:gmake*", }
if os.target() == "windows" then if os.target() == "windows" then
-- token expansion like '%{cfg.platform}' happens later during project build -- token expansion like '%{cfg.platform}' happens later during project build
local dos_stub_exe = os.realpath('resources/win/file_dos_stub/file_dos_stub_%{cfg.platform}.exe') local dos_stub_exe = path.translate(path.getabsolute('resources/win/file_dos_stub/file_dos_stub_%{cfg.platform}.exe', _MAIN_SCRIPT_DIR), '\\')
local signer_tool = os.realpath('third-party/build/win/cert/sign_helper.bat') local signer_tool = path.translate(path.getabsolute('third-party/build/win/cert/sign_helper.bat', _MAIN_SCRIPT_DIR), '\\')
-- change dos stub -- change dos stub
filter { "system:windows", "options:dosstub", } filter { "system:windows", "options:dosstub", }
postbuildcommands { postbuildcommands {
@ -447,6 +448,7 @@ workspace "gbe"
location("build/project/%{_ACTION}/" .. os_iden) location("build/project/%{_ACTION}/" .. os_iden)
-- Project api_regular -- Project api_regular
--------- ---------
project "api_regular" project "api_regular"