Skip to content

Commit

Permalink
Allow command line to force default options without invoking a UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 24, 2008
1 parent 1ce6f70 commit 25403b1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/mojosetup_mainline.lua
Expand Up @@ -1122,6 +1122,7 @@ local function do_install(install)

local skipeulas = MojoSetup.cmdline("i-agree-to-all-licenses")
local skipreadmes = MojoSetup.cmdline("noreadme")
local skipoptions = MojoSetup.cmdline("nooptions")

-- !!! FIXME: try to sanity check everything we can here
-- !!! FIXME: (unsupported URLs, bogus media IDs, etc.)
Expand Down Expand Up @@ -1259,10 +1260,12 @@ local function do_install(install)
-- Next stage: let user choose install options.
-- This may not produce a GUI stage if it decides that all options
-- are either required or disabled.
-- (install) becomes an upvalue in this function.
stages[#stages+1] = function(thisstage, maxstage)
-- This does some complex stuff with a hierarchy of tables in C.
return MojoSetup.gui.options(install, thisstage, maxstage)
if not skipoptions then -- (just take the defaults...)
-- (install) becomes an upvalue in this function.
stages[#stages+1] = function(thisstage, maxstage)
-- This does some complex stuff with a hierarchy of tables in C.
return MojoSetup.gui.options(install, thisstage, maxstage)
end
end


Expand Down

0 comments on commit 25403b1

Please sign in to comment.