diff options
| author | ruki <[email protected]> | 2018-01-31 22:43:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-31 10:21:26 +0800 |
| commit | 91b7ce3946a91022ddca0a3822346d81a2f1f74f (patch) | |
| tree | b19d5b54398f7eab928026c32485b1413c6eacb5 | |
| parent | b3e5b85cc8c74d934eaa437f00523284b773d4cc (diff) | |
add platform menu category
| -rw-r--r-- | xmake/actions/config/xmake.lua | 1 | ||||
| -rw-r--r-- | xmake/core/language/menu.lua | 4 | ||||
| -rw-r--r-- | xmake/core/platform/menu.lua | 2 | ||||
| -rw-r--r-- | xmake/platforms/android/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/platforms/iphoneos/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/platforms/macosx/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/platforms/watchos/xmake.lua | 28 | ||||
| -rw-r--r-- | xmake/platforms/windows/xmake.lua | 6 |
8 files changed, 25 insertions, 26 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua index 75821bf75..de03f8e17 100644 --- a/xmake/actions/config/xmake.lua +++ b/xmake/actions/config/xmake.lua @@ -137,7 +137,6 @@ task("config") end -- show platform menu options - , {category = "Platform Options Configuration"} , function () -- import platform menu diff --git a/xmake/core/language/menu.lua b/xmake/core/language/menu.lua index 66690394a..03fcb127e 100644 --- a/xmake/core/language/menu.lua +++ b/xmake/core/language/menu.lua @@ -62,14 +62,14 @@ function menu.options(action) for _, option in ipairs(options) do -- merge it and remove repeat - local name = option[2] + local name = option[2] or option[1] if name then if not exist[name] then table.insert(results, option) exist[name] = true newline = false end - elseif not newline then + elseif option.category or not newline then table.insert(results, option) newline = true end diff --git a/xmake/core/platform/menu.lua b/xmake/core/platform/menu.lua index 9bd7aeef3..8231117e8 100644 --- a/xmake/core/platform/menu.lua +++ b/xmake/core/platform/menu.lua @@ -73,7 +73,7 @@ function menu.options(action) exist[name] = true newline = false end - elseif not newline then + elseif option.category or not newline then table.insert(results, option) newline = true end diff --git a/xmake/platforms/android/xmake.lua b/xmake/platforms/android/xmake.lua index c10fa469c..adeaadc95 100644 --- a/xmake/platforms/android/xmake.lua +++ b/xmake/platforms/android/xmake.lua @@ -47,9 +47,9 @@ platform("android") set_menu { config = { - {} - , {nil, "ndk", "kv", nil, "The NDK Directory" } - , {nil, "ndk_sdkver", "kv", "auto", "The SDK Version for NDK" } + {category = "Android NDK Configuration" } + , {nil, "ndk", "kv", nil, "The NDK Directory" } + , {nil, "ndk_sdkver", "kv", "auto", "The SDK Version for NDK" } } , global = diff --git a/xmake/platforms/iphoneos/xmake.lua b/xmake/platforms/iphoneos/xmake.lua index b5445cac0..549cf4fac 100644 --- a/xmake/platforms/iphoneos/xmake.lua +++ b/xmake/platforms/iphoneos/xmake.lua @@ -47,7 +47,7 @@ platform("iphoneos") set_menu { config = { - {} + {category = "XCode SDK Configuration" } , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } , {nil, "xcode_sdkver", "kv", "auto", "the sdk version for xcode" } , {nil, "target_minver", "kv", "auto", "the target minimal version" } diff --git a/xmake/platforms/macosx/xmake.lua b/xmake/platforms/macosx/xmake.lua index 91bb4292d..80b3bf64a 100644 --- a/xmake/platforms/macosx/xmake.lua +++ b/xmake/platforms/macosx/xmake.lua @@ -50,7 +50,7 @@ platform("macosx") set_menu { config = { - {} + {category = "XCode SDK Configuration" } , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } , {nil, "xcode_sdkver", "kv", "auto", "the sdk version for xcode" } , {nil, "target_minver", "kv", "auto", "the target minimal version" } diff --git a/xmake/platforms/watchos/xmake.lua b/xmake/platforms/watchos/xmake.lua index 4d851fa12..850c5eaab 100644 --- a/xmake/platforms/watchos/xmake.lua +++ b/xmake/platforms/watchos/xmake.lua @@ -47,24 +47,24 @@ platform("watchos") set_menu { config = { - {} - , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } - , {nil, "xcode_sdkver", "kv", "auto", "the sdk version for xcode" } - , {nil, "target_minver", "kv", "auto", "the target minimal version" } - , {} - , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } - , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } - , {nil, "entitlements", "kv", "auto", "The Code Signing Entitlements" } + {category = "XCode SDK Configuration" } + , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } + , {nil, "xcode_sdkver", "kv", "auto", "the sdk version for xcode" } + , {nil, "target_minver", "kv", "auto", "the target minimal version" } + , { } + , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } + , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } + , {nil, "entitlements", "kv", "auto", "The Code Signing Entitlements" } } , global = { - {} - , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } - , {} - , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } - , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } - , {nil, "entitlements", "kv", "auto", "The Code Signing Entitlements" } + { } + , {nil, "xcode_dir", "kv", "auto", "the xcode application directory" } + , { } + , {nil, "mobileprovision","kv", "auto", "The Provisioning Profile File" } + , {nil, "codesign", "kv", "auto", "The Code Signing Indentity" } + , {nil, "entitlements", "kv", "auto", "The Code Signing Entitlements" } } } diff --git a/xmake/platforms/windows/xmake.lua b/xmake/platforms/windows/xmake.lua index 21f42e635..f7353f442 100644 --- a/xmake/platforms/windows/xmake.lua +++ b/xmake/platforms/windows/xmake.lua @@ -65,14 +65,14 @@ platform("windows") set_menu { config = { - {} + {category = "Visual Studio SDK Configuration" } , {nil, "vs", "kv", "auto", "The Microsoft Visual Studio" } } , global = { - {} - , {nil, "vs", "kv", "auto", "The Microsoft Visual Studio" } + { } + , {nil, "vs", "kv", "auto", "The Microsoft Visual Studio" } } } |
