Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/mozapps/update/updater/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 3 kB image not shown  

Quelle  updater-common.build   Sprache: unbekannt

 
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

link_with_nss = CONFIG["MOZ_USE_NSS_FOR_MAR"] or (
    CONFIG["OS_ARCH"] == "Linux" and CONFIG["MOZ_VERIFY_MAR_SIGNATURE"]
)
if link_with_nss:
    DEFINES["MAR_NSS"] = True

srcs = [
    "archivereader.cpp",
    "updater.cpp",
]

have_progressui = 0

if CONFIG["MOZ_VERIFY_MAR_SIGNATURE"]:
    USE_LIBS += [
        "verifymar",
    ]

    if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
        srcs += [
            "macos-frameworks/UpdateSettingsUtil.mm",
        ]
        USE_LIBS += [
            "UpdateSettings",
        ]
        LDFLAGS += [
            "-Wl,-rpath,@executable_path/../Frameworks/UpdateSettings.framework"
        ]

if CONFIG["OS_ARCH"] == "WINNT":
    have_progressui = 1
    srcs += [
        "loaddlls.cpp",
        "progressui_win.cpp",
    ]
    RCINCLUDE = "%supdater.rc" % updater_rel_path
    DEFINES["UNICODE"] = True
    DEFINES["_UNICODE"] = True
    USE_STATIC_MSVCRT = True

    # Pick up nsWindowsRestart.cpp
    LOCAL_INCLUDES += [
        "/toolkit/xre",
    ]
    OS_LIBS += [
        "comctl32",
        "ws2_32",
        "shell32",
        "shlwapi",
        "gdi32",
        "user32",
        "userenv",
        "uuid",
    ]

    if not link_with_nss:
        OS_LIBS += [
            "crypt32",
            "advapi32",
        ]

USE_LIBS += [
    "bspatch",
    "mar",
    "updatecommon",
    "xz-embedded",
]

if link_with_nss:
    USE_LIBS += [
        "nspr",
        "nss",
        "signmar",
    ]

if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    have_progressui = 1
    srcs += [
        "progressui_gtk.cpp",
    ]

if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
    have_progressui = 1
    srcs += [
        "launchchild_osx.mm",
        "progressui_osx.mm",
    ]
    OS_LIBS += [
        "-framework Cocoa",
        "-framework SystemConfiguration",
    ]
    if link_with_nss:
        LDFLAGS += ["-Wl,-rpath,@executable_path/../../../"]
    else:
        OS_LIBS += [
            "-framework Security",
        ]
    UNIFIED_SOURCES += [
        "/toolkit/xre/updaterfileutils_osx.mm",
    ]
    LOCAL_INCLUDES += [
        "/toolkit/xre",
    ]

if have_progressui == 0:
    srcs += [
        "progressui_null.cpp",
    ]

SOURCES += sorted(srcs)

if CONFIG["MOZ_TSAN"]:
    # Since mozglue is not linked to the updater,
    # we need to include our own TSan suppression list.
    SOURCES += [
        "TsanOptions.cpp",
    ]

DEFINES["SPRINTF_H_USES_VSNPRINTF"] = True
DEFINES["NS_NO_XPCOM"] = True
DisableStlWrapping()
for var in ("MAR_CHANNEL_ID", "MOZ_APP_VERSION", "ACCEPTED_MAR_CHANNEL_IDS"):
    DEFINES[var] = '"%s"' % CONFIG[var]

LOCAL_INCLUDES += [
    "/toolkit/mozapps/update/common",
    "/xpcom/base",  # for nsVersionComparator.cpp
]

DELAYLOAD_DLLS += [
    "crypt32.dll",
    "comctl32.dll",
    "userenv.dll",
    "wsock32.dll",
]

if CONFIG["CC_TYPE"] == "clang-cl":
    WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
elif CONFIG["OS_ARCH"] == "WINNT":
    WIN32_EXE_LDFLAGS += ["-municode"]

if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
    OS_LIBS += CONFIG["MOZ_GTK3_LIBS"]

if CONFIG["CC_TYPE"] == "gcc":
    CXXFLAGS += ["-Wno-format-truncation"]

[ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet)  ]