diff options
| author | ruki <[email protected]> | 2025-09-14 21:20:34 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-14 21:20:34 +0800 |
| commit | a553f8cf189239aa152644cddcb4d0e1fbd0f8ec (patch) | |
| tree | 5a17dd03ea0dc61b220c41f2b56aec6cbbd49672 | |
| parent | a8ac81886afa4c174b76016a8e49016eae86ffa8 (diff) | |
| parent | e031b87eaac04081ad0445bed7ffdd9c66dcd507 (diff) | |
Merge pull request #6796 from Arthapz/enable-custom-wdk-path
feat(wdk rules) enable support of incomplete wdk
| -rw-r--r-- | xmake/rules/wdk/inf/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/wdk/man/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/wdk/mc/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/wdk/mof/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/wdk/package/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/wdk/sign/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/wdk/tracewpp/xmake.lua | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/xmake/rules/wdk/inf/xmake.lua b/xmake/rules/wdk/inf/xmake.lua index 7163814c2..b25f967c3 100644 --- a/xmake/rules/wdk/inf/xmake.lua +++ b/xmake/rules/wdk/inf/xmake.lua @@ -41,7 +41,6 @@ rule("wdk.inf") -- get stampinf local stampinf = path.join(wdk.bindir, wdk.sdkver, arch, is_host("windows") and "stampinf.exe" or "stampinf") - assert(stampinf and os.isexec(stampinf), "stampinf not found!") -- save uic target:data_set("wdk.stampinf", stampinf) @@ -93,6 +92,7 @@ rule("wdk.inf") -- get stampinf local stampinf = target:data("wdk.stampinf") + assert(stampinf and os.isexec(stampinf), "stampinf not found!") -- update the timestamp os.cp(sourcefile, targetfile) diff --git a/xmake/rules/wdk/man/xmake.lua b/xmake/rules/wdk/man/xmake.lua index ab817ae6e..2e53493cb 100644 --- a/xmake/rules/wdk/man/xmake.lua +++ b/xmake/rules/wdk/man/xmake.lua @@ -44,7 +44,6 @@ rule("wdk.man") if not os.isexec(ctrpp) then ctrpp = path.join(wdk.bindir, wdk.sdkver, arch, "ctrpp.exe") end - assert(os.isexec(ctrpp), "ctrpp not found!") -- save ctrpp target:data_set("wdk.ctrpp", ctrpp) @@ -61,6 +60,7 @@ rule("wdk.man") -- get ctrpp local ctrpp = target:data("wdk.ctrpp") + assert(ctrpp and os.isexec(ctrpp), "ctrpp not found!") -- get output directory local outputdir = path.join(target:autogendir(), "rules", "wdk", "man") diff --git a/xmake/rules/wdk/mc/xmake.lua b/xmake/rules/wdk/mc/xmake.lua index 2559c2bb4..5fa6ca441 100644 --- a/xmake/rules/wdk/mc/xmake.lua +++ b/xmake/rules/wdk/mc/xmake.lua @@ -44,7 +44,6 @@ rule("wdk.mc") if not os.isexec(mc) then mc = path.join(wdk.bindir, wdk.sdkver, arch, is_host("windows") and "mc.exe" or "mc") end - assert(os.isexec(mc), "mc not found!") -- save mc target:data_set("wdk.mc", mc) @@ -61,6 +60,7 @@ rule("wdk.mc") -- get mc local mc = target:data("wdk.mc") + assert(mc and os.isexec(mc), "mc not found!") -- get output directory local outputdir = path.join(target:autogendir(), "rules", "wdk", "mc") diff --git a/xmake/rules/wdk/mof/xmake.lua b/xmake/rules/wdk/mof/xmake.lua index 909a58545..825910592 100644 --- a/xmake/rules/wdk/mof/xmake.lua +++ b/xmake/rules/wdk/mof/xmake.lua @@ -47,7 +47,6 @@ rule("wdk.mof") os.run("%s %s", program, tmpmof) os.tryrm(tmpmof) end}) - assert(mofcomp, "mofcomp not found!") -- get wmimofck local wmimofck = nil @@ -59,7 +58,6 @@ rule("wdk.mof") else wmimofck = path.join(wdk.bindir, wdk.sdkver, "x86", "wmimofck.exe") end - assert(wmimofck and os.isexec(wmimofck), "wmimofck not found!") -- save mofcomp and wmimofck target:data_set("wdk.mofcomp", mofcomp) @@ -77,9 +75,11 @@ rule("wdk.mof") -- get mofcomp local mofcomp = target:data("wdk.mofcomp") + assert(mofcomp and os.isexec(mofcomp), "mofcomp not found!") -- get wmimofck local wmimofck = target:data("wdk.wmimofck") + assert(wmimofck and os.isexec(wmimofck), "wmimofck not found!") -- get output directory local outputdir = path.join(target:autogendir(), "rules", "wdk", "mof") diff --git a/xmake/rules/wdk/package/xmake.lua b/xmake/rules/wdk/package/xmake.lua index d2d692c75..82ff7f0fe 100644 --- a/xmake/rules/wdk/package/xmake.lua +++ b/xmake/rules/wdk/package/xmake.lua @@ -55,7 +55,7 @@ rule("wdk.package.cab") -- get makecab local makecab = find_program("makecab", {check = "/?"}) - assert(makecab, "makecab not found!") + assert(makecab and os.isexec(makecab), "makecab not found!") -- make .ddf file local file = io.open(ddfile, "w") diff --git a/xmake/rules/wdk/sign/xmake.lua b/xmake/rules/wdk/sign/xmake.lua index d82f632e0..1837a7fd2 100644 --- a/xmake/rules/wdk/sign/xmake.lua +++ b/xmake/rules/wdk/sign/xmake.lua @@ -54,7 +54,6 @@ rule("wdk.sign") if not os.isexec(inf2cat) then inf2cat = path.join(wdk.bindir, wdk.sdkver, "x86", "inf2cat.exe") end - assert(os.isexec(inf2cat), "inf2cat not found!") target:data_set("wdk.sign.inf2cat", inf2cat) -- check @@ -117,6 +116,7 @@ rule("wdk.sign") -- get inf2cat local inf2cat = target:data("wdk.sign.inf2cat") + assert(inf2cat and os.isexec(inf2cat), "inf2cat not found!") -- sign the target file sign(target, target:targetfile(), signmode) diff --git a/xmake/rules/wdk/tracewpp/xmake.lua b/xmake/rules/wdk/tracewpp/xmake.lua index bbd198df5..fef0d5831 100644 --- a/xmake/rules/wdk/tracewpp/xmake.lua +++ b/xmake/rules/wdk/tracewpp/xmake.lua @@ -41,7 +41,6 @@ rule("wdk.tracewpp") if not os.isexec(tracewpp) then tracewpp = path.join(wdk.bindir, wdk.sdkver, arch, is_host("windows") and "tracewpp.exe" or "tracewpp") end - assert(os.isexec(tracewpp), "tracewpp not found!") -- save tracewpp target:data_set("wdk.tracewpp", tracewpp) @@ -61,6 +60,7 @@ rule("wdk.tracewpp") -- get tracewpp local tracewpp = target:data("wdk.tracewpp") + assert(tracewpp and os.isexec(tracewpp), "tracewpp not found!") -- get outputdir local outputdir = path.join(target:autogendir(), "rules", "wdk", "wpp") |
