Skip to content

Commit b91add5

Browse files
committed
do some modify
1 parent 852e48b commit b91add5

File tree

3 files changed

+5
-67
lines changed

3 files changed

+5
-67
lines changed

xmake/includes/xpack/xmake.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ local apis = {
6969
"xpack.add_buildrequires",
7070
-- set nsis display icon
7171
"xpack.set_nsis_displayicon",
72-
-- set icon name
73-
"xpack.set_iconname",
7472
-- set dmg window position
7573
"xpack.set_dmg_window_pos",
7674
-- set dmg window size

xmake/modules/detect/tools/find_macdeployqt.lua

Lines changed: 0 additions & 54 deletions
This file was deleted.

xmake/plugins/pack/dmg/main.lua

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function _find_app_bundle(package)
7676
if os.isfile(info_plist) and os.isdir(macos_dir) then
7777
return abs_location, appbundle_name
7878
else
79-
print(" Invalid .app structure")
79+
raise("Invalid .app structure")
8080
end
8181
end
8282
end
@@ -135,7 +135,7 @@ function _create_staging_dir(package, app_source, appbundle_name, bg_image)
135135
local bg_dest = path.join(staging_dir, path.filename(bg_image))
136136
os.vcp(bg_image, bg_dest)
137137
if not os.isfile(bg_dest) then
138-
print("Warning: Failed to copy background image")
138+
wprint("Warning: Failed to copy background image")
139139
end
140140
end
141141
return staging_dir
@@ -192,15 +192,7 @@ function _create_dmg_with_create_dmg(create_dmg, package, staging_dir, dmg_file,
192192
os.vrunv("mkdir", {"-p", path.directory(dmg_file)})
193193
os.vrunv("rm", {"-f", dmg_file})
194194
-- run create-dmg
195-
local ok, errors = os.iorunv(create_dmg.program, args)
196-
if ok then
197-
return true
198-
else
199-
if errors then
200-
print("Error output:", errors)
201-
end
202-
return false
203-
end
195+
os.iorunv(create_dmg.program, args)
204196
end
205197
-- verify dmg file
206198
function _verify_dmg(dmg_file)
@@ -215,9 +207,11 @@ function _pack_dmg(package)
215207
local create_dmg = _get_create_dmg()
216208
-- find existing .app bundle
217209
local app_source, appbundle_name = _find_app_bundle(package)
210+
218211
if not app_source then
219212
return false
220213
end
214+
221215
-- find background image (optional)
222216
local bg_image = _find_background_image(package)
223217
-- get output dmg path

0 commit comments

Comments
 (0)