Properly deprecate WinMain flag
This commit is contained in:
parent
21c3c3d290
commit
164fadc857
@ -501,7 +501,7 @@
|
||||
"StaticRuntime",
|
||||
"Symbols", -- DEPRECATED
|
||||
"UndefinedIdentifiers",
|
||||
"WinMain",
|
||||
"WinMain", -- DEPRECATED
|
||||
"WPF",
|
||||
"C++11", -- DEPRECATED
|
||||
"C++14", -- DEPRECATED
|
||||
@ -1367,6 +1367,16 @@
|
||||
api.deprecateValue("flags", "C11", 'Use `language "C11"` instead', function(value) end, function(value) end)
|
||||
|
||||
|
||||
-- 13 April 2017
|
||||
|
||||
api.deprecateValue("flags", "WinMain", 'Use `entrypoint "WinMainCRTStartup"` instead',
|
||||
function(value)
|
||||
entrypoint "WinMainCRTStartup"
|
||||
end,
|
||||
function(value)
|
||||
entrypoint "mainCRTStartup"
|
||||
end)
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Install Premake's default set of command line arguments.
|
||||
@ -1526,4 +1536,7 @@
|
||||
filter { "system:macosx" }
|
||||
toolset "clang"
|
||||
|
||||
filter { "system:windows", "kind:WindowedApp or ConsoleApp" }
|
||||
entrypoint "mainCRTStartup"
|
||||
|
||||
filter {}
|
||||
|
@ -1121,11 +1121,8 @@
|
||||
|
||||
|
||||
function m.entryPointSymbol(cfg, toolset)
|
||||
if (cfg.kind == "ConsoleApp" or cfg.kind == "WindowedApp") and
|
||||
not cfg.flags.WinMain and
|
||||
not toolset
|
||||
then
|
||||
p.w('EntryPointSymbol="mainCRTStartup"')
|
||||
if cfg.entrypoint then
|
||||
p.w('EntryPointSymbol="%s"', cfg.entrypoint)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1310,14 +1310,6 @@
|
||||
function m.entryPointSymbol(cfg)
|
||||
if cfg.entrypoint then
|
||||
m.element("EntryPointSymbol", nil, cfg.entrypoint)
|
||||
else
|
||||
if (cfg.kind == premake.CONSOLEAPP or cfg.kind == premake.WINDOWEDAPP) and
|
||||
not cfg.flags.WinMain and
|
||||
cfg.clr == p.OFF and
|
||||
cfg.system ~= p.XBOX360
|
||||
then
|
||||
m.element("EntryPointSymbol", nil, "mainCRTStartup")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user