Changeset 384


Ignore:
Timestamp:
Dec 5, 2009, 2:23:41 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

general: Embed information provided by DEF_FILE_VERSION, DEF_FILE_DESCRIPTION and DEF_FILE_VENDOR qmake variables to the generated EXE files too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mkspecs/features/os2/default_post.prf

    r382 r384  
    1313build_pass {
    1414    isEmpty(DEF_FILE_VERSION) {
    15         !isEmpty(VERSION):DEF_FILE_VERSION = $$VERSION
    16             !isEmpty(QT_BUILD_VERSION):DEF_FILE_VERSION = $${DEF_FILE_VERSION}-$${QT_BUILD_VERSION}
    17             !isEmpty(QMAKESPEC):DEF_FILE_VERSION = $${DEF_FILE_VERSION}_$$basename(QMAKESPEC)
     15        DEF_FILE_VERSION = $$VERSION
    1816        }
    1917        isEmpty(DEF_FILE_DESCRIPTION) {
     
    3129}
    3230
    33 wlink:build_pass {
    34     # Neither WLINK nor EMXOMFLD allows us to specify the application type of
    35     # the .EXE on the command line. For this reason, we need an implicit .DEF
    36     # file which we create unless an explicit .DEF file is provided in .pro.
    37     contains(TEMPLATE, ".*app") {
    38         isEmpty(DEF_FILE) {
     31build_pass {
     32    contains(TEMPLATE, ".*app"):isEmpty(DEF_FILE) {
     33        DEF_FILE_DESCR =
     34        !isEmpty(DEF_FILE_VERSION)|!isEmpty(DEF_FILE_DESCRIPTION)|!isEmpty(DEF_FILE_VENDOR) {
     35            DEF_FILE_DESCR = "@$${LITERAL_HASH}vendor:version$${LITERAL_HASH}@ description"
     36            DEF_FILE_DESCR = $$replace(DEF_FILE_DESCR, vendor, $$DEF_FILE_VENDOR)
     37            DEF_FILE_DESCR = $$replace(DEF_FILE_DESCR, version, $$DEF_FILE_VERSION)
     38            DEF_FILE_DESCR = $$replace(DEF_FILE_DESCR, description, $$DEF_FILE_DESCRIPTION)
     39        }
     40        !isEmpty(DEF_FILE_DESCR)|wlink {
     41            # Note: neither WLINK nor EMXOMFLD allows to specify the app type of
     42            # the .EXE on the command line. For this reason, we need an implicit
     43            # .DEF which we create if no explicit .DEF file is provided in .pro,
     44            # even if DEF_FILE_DESCR is actually empty.
     45
    3946            DEF_FILE = $(OBJECTS_DIR)/$(TARGET).def
    4047
    41             make_apptype_def.target = $(DEF_FILE)
    42             make_apptype_def.depends = $(call q,$(MAKEFILE))
    43             windows {
    44                 make_apptype_def.commands = @echo NAME $(QMAKE_TARGET) WINDOWAPI > $(DEF_FILE)
    45             } else {
    46                 make_apptype_def.commands = @echo NAME $(QMAKE_TARGET) WINDOWCOMPAT > $(DEF_FILE)
    47             }
    48             QMAKE_EXTRA_TARGETS += make_apptype_def
     48            windows:DEF_FILE_APPTYPE = WINDOWAPI
     49            else::DEF_FILE_APPTYPE = WINDOWCOMPAT
     50
     51            make_exe_def.target = $(DEF_FILE)
     52            make_exe_def.depends = $(call q,$(MAKEFILE))
     53            make_exe_def.commands = \
     54                @echo NAME $(QMAKE_TARGET) $$DEF_FILE_APPTYPE > $(DEF_FILE)
     55            !isEmpty(DEF_FILE_DESCR):make_exe_def.commands += $$escape_expand(\n\t) \
     56                @echo DESCRIPTION \'$${DEF_FILE_DESCR}\' >> $(DEF_FILE)
     57            QMAKE_EXTRA_TARGETS += make_exe_def
    4958            QMAKE_CLEAN += $(DEF_FILE)
    5059        }
Note: See TracChangeset for help on using the changeset viewer.