advpack: The Plan

Alexandre Julliard julliard at
Fri Mar 31 02:57:09 CST 2006

"James Hawkins" <truiken at> writes:

> Internally, there will be three main install functions: install_init,
> which will open the INF, make sure it's legit, and other
> initializations, spapi_install, which will call setupapi to install
> the base INF commands, and adv_install, which will parse the install
> section and run the provided commands.  Each advanced command will be
> implemented by a function of similar name, e.g., RegisterOCXs would be
> implemented by the function register_ocxs, etc.  All the command
> functions will be in a hash map, the key being the command name, the
> value being a pointer to the function that implements the command. 
> adv_install will use setupapi to parse the entries of the install
> section, calling the function returned by a query to the hash map. 
> According to INF Web [1], some commands are run before others, so
> there will probably be three or four maps, the functions in the maps
> grouped according to the order in which the commands should be run. 
> For example, RunPreSetupCommands is to be executed after the
> BeginPrompt command, so begin_prompt would be in the phase 1 map, and
> run_pre_setup_commands would be in the phase 2 map.  We would call the
> parser like so:
> run_adv_commands("InstallSection", phase1_map);
> run_adv_commands("InstallSection", phase2_map);
> run_adv_commands("InstallSection", phase3_map);
> If a command in the install section is not in the map, we just ignore it.

That hash map thing sounds like overkill to me. You have only a few
sections you know you will handle, you can just look for these
explicitly, like setupapi does. And if you look them up in the order
they should be executed you don't need the different phases either.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list