summaryrefslogtreecommitdiffstats
path: root/win/config_tap.py
blob: e69ee9b8c0db47de5bc38b743246256d17882c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
from wb import preprocess, home_fn, autogen, dict_def

def main(config):
    preprocess(config,
               in_fn=home_fn('tap-win32/SOURCES.in'),
               out_fn=home_fn('tap-win32/SOURCES'),
               quote_begin='@@',
               quote_end='@@',
               head_comment='# %s\n\n' % autogen)

    preprocess(config,
               in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'),
               out_fn=home_fn('tap-win32/i386/OemWin2k.inf'),
               quote_begin='@@',
               quote_end='@@',
               if_prefix='!',
               head_comment='; %s\n\n' % autogen)

    try:
        os.mkdir(home_fn('tap-win32/amd64'))
    except:
        pass
    preprocess(dict_def(config, [('AMD64', '1')]),
               in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'),
               out_fn=home_fn('tap-win32/amd64/OemWin2k.inf'),
               quote_begin='@@',
               quote_end='@@',
               if_prefix='!',
               head_comment='; %s\n\n' % autogen)

# if we are run directly, and not loaded as a module

if __name__ == "__main__":
    from wb import config
    main(config)