summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup/setup.scons
blob: 1a73359b1dafad5798b0c76929b36772d1a3deba (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Import('env')

env = env.Clone()

env.ApplySConscript([
    '$BASE_DIR/using_base.scons',
    '$BSPATCH_DIR/using_bspatch.scons',
    '$ICU38_DIR/using_icu38.scons',
    '$LZMA_SDK_DIR/using_lzma_sdk.scons',
])

if env['PLATFORM'] == 'win32':
  env_res = env.Clone()

  env_res.Append(
      CPPPATH = [
          ".",
          "$CHROME_SRC_DIR",
          "$CHROME_DIR/installer/util",
      ],
      RCFLAGS = [
          ["/l", "0x409"],
      ],
  )

  resources = env_res.RES('setup.rc')

  # TODO(sgk):  implicit dependency should be picked up automatically
  env_res.Depends(resources,
                  '$CHROME_DIR/installer/util/installer_util_strings.rc')


env.Prepend(
    CPPPATH = [
        '../util',
        '.',
        '$CHROME_SRC_DIR',
    ],
    LIBS = [
        'common',
        'util',
    ],
)

if env['PLATFORM'] == 'win32':
  env.Prepend(
      LINKFLAGS = [
          '/INCREMENTAL',
          '/DEBUG',

          '/DELAYLOAD:"dwmapi.dll"',
          '/DELAYLOAD:"uxtheme.dll"',

          '/OPT:NOWIN98',
          '/SUBSYSTEM:WINDOWS',
          '/MACHINE:X86',
          '/FIXED:No',

          '/safeseh',
          '/dynamicbase',
          '/ignore:4199',
          '/nxcompat',

          '/PDB:${TARGETS[1]}',
      ],
      LIBS = [
          'msi',
      ],
  )


input_files = [
    'install.cc',
    'main.cc',
    'setup.cc',
    'setup_constants.cc',
    'uninstall.cc',
]

env.ChromeProgram('setup', resources + input_files)

exe_version_rc = env.ChromeVersionRC('setup_exe_version.rc',
                                     'setup_exe_version.rc.version',
                                     PWD = env.Dir('.'))

if env['PLATFORM'] == 'win32':
  # TODO(sgk):  implicit dependency should be picked up automatically
  env_res.Depends(resources, exe_version_rc)