author | herrick |
Thu, 24 Oct 2019 17:14:42 -0400 | |
branch | JDK-8200758-branch |
changeset 58792 | 72daf2e005cd |
parent 57810 | e356758160cd |
permissions | -rw-r--r-- |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
1 |
# |
57106
ea870b9ce89a
8216492: Update copyright of all new jpackage fils to 2019
kcr
parents:
57064
diff
changeset
|
2 |
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
4 |
# |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
10 |
# |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
15 |
# accompanied this code). |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
16 |
# |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
20 |
# |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
23 |
# questions. |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
24 |
# |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
25 |
|
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
26 |
include LibCommon.gmk |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
27 |
|
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
28 |
################################################################################ |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
29 |
|
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
30 |
# Output app launcher library in resources dir, and symbols in the object dir |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
31 |
$(eval $(call SetupJdkLibrary, BUILD_LIB_APPLAUNCHER, \ |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
32 |
NAME := applauncher, \ |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
33 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \ |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
34 |
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libapplauncher, \ |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
35 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
36 |
OPTIMIZATION := LOW, \ |
57054
32d2b2d2d353
8213747: Makefile Improvements to Lib-jdk.packager.gmk
herrick
parents:
57039
diff
changeset
|
37 |
CFLAGS := $(CXXFLAGS_JDKLIB), \ |
57027
124983f48645
8212936: Makefile and other improvements for jpackager
herrick
parents:
57017
diff
changeset
|
38 |
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \ |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
39 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
40 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
56885
4c56efca06ca
8210438: [Linux] jpackager fails to build with older compilers
herrick
parents:
56821
diff
changeset
|
41 |
LIBS := $(LIBCXX), \ |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
42 |
LIBS_windows := user32.lib shell32.lib advapi32.lib ole32.lib, \ |
56885
4c56efca06ca
8210438: [Linux] jpackager fails to build with older compilers
herrick
parents:
56821
diff
changeset
|
43 |
LIBS_linux := -ldl -lpthread, \ |
4c56efca06ca
8210438: [Linux] jpackager fails to build with older compilers
herrick
parents:
56821
diff
changeset
|
44 |
LIBS_macosx := -ldl -framework Cocoa, \ |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
45 |
)) |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
46 |
|
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
47 |
$(BUILD_LIB_APPLAUNCHER): $(call FindLib, java.base, java) |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
48 |
|
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
57059
diff
changeset
|
49 |
TARGETS += $(BUILD_LIB_APPLAUNCHER) |
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
50 |
|
58792 | 51 |
JPACKAGE_APPLAUNCHER_SRC := \ |
52 |
$(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/jpackageapplauncher |
|
53 |
||
54 |
# Output app launcher executable in resources dir, and symbols in the object dir |
|
55 |
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \ |
|
56 |
NAME := jpackageapplauncher, \ |
|
57 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \ |
|
58 |
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \ |
|
59 |
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \ |
|
60 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
|
61 |
OPTIMIZATION := LOW, \ |
|
62 |
CFLAGS := $(CXXFLAGS_JDKEXE), \ |
|
63 |
CFLAGS_windows := -EHsc -DLAUNCHERC -DUNICODE -D_UNICODE, \ |
|
64 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
|
65 |
LIBS_macosx := -framework Cocoa, \ |
|
66 |
LIBS := $(LIBCXX), \ |
|
67 |
LIBS_linux := -ldl, \ |
|
68 |
LIBS_windows := user32.lib shell32.lib advapi32.lib, \ |
|
69 |
)) |
|
70 |
||
71 |
TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE) |
|
72 |
||
56821
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
73 |
################################################################################ |
565d54ca1f41
8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff
changeset
|
74 |
|
57399 | 75 |
ifeq ($(call isTargetOs, windows), true) |
57151
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
76 |
|
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
77 |
$(eval $(call SetupJdkLibrary, BUILD_LIB_JPACKAGE, \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
78 |
NAME := jpackage, \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
79 |
OPTIMIZATION := LOW, \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
80 |
CFLAGS := $(CXXFLAGS_JDKLIB), \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
81 |
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
82 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
83 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
84 |
LIBS := $(LIBCXX), \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
85 |
LIBS_windows := user32.lib shell32.lib advapi32.lib ole32.lib, \ |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
86 |
)) |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
87 |
|
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
88 |
TARGETS += $(BUILD_LIB_JPACKAGE) |
38d0b67617e3
8217317: Create jpackage native library for windows
herrick
parents:
57108
diff
changeset
|
89 |
|
57411
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
90 |
# Build Wix custom action helper |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
91 |
# Output library in resources dir, and symbols in the object dir |
57254
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
92 |
$(eval $(call SetupJdkLibrary, BUILD_LIB_WIXHELPER, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
93 |
NAME := wixhelper, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
94 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
95 |
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwixhelper, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
96 |
OPTIMIZATION := LOW, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
97 |
CFLAGS := $(CXXFLAGS_JDKLIB), \ |
57810
e356758160cd
8229788: Error dialog displays with DLL issue when installing WinChooserTest application
herrick
parents:
57707
diff
changeset
|
98 |
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE -MT, \ |
57254
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
99 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
100 |
LIBS := $(LIBCXX), \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
101 |
LIBS_windows := msi.lib Shlwapi.lib User32.lib, \ |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
102 |
)) |
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
103 |
|
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
104 |
TARGETS += $(BUILD_LIB_WIXHELPER) |
57411
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
105 |
|
58792 | 106 |
# Build exe installer wrapper for msi installer |
57411
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
107 |
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_MSIWRAPPER, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
108 |
NAME := msiwrapper, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
109 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
110 |
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/msiwrapper, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
111 |
SRC := $(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/msiwrapper, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
112 |
EXTRA_FILES := $(addprefix $(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/libjpackage/, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
113 |
FileUtils.cpp Log.cpp WinSysInfo.cpp tstrings.cpp WinErrorHandling.cpp ErrorHandling.cpp), \ |
57707
b089abe93ab7
8229334: JPackager .exe packages cannot be executed due to missing DL
herrick
parents:
57411
diff
changeset
|
114 |
CFLAGS := $(CXXFLAGS_JDKEXE) -MT \ |
57411
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
115 |
$(addprefix -I$(TOPDIR)/src/jdk.jpackage/$(OPENJDK_TARGET_OS)/native/, msiwrapper libjpackage), \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
116 |
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
117 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
118 |
LIBS := $(LIBCXX), \ |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
119 |
)) |
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
120 |
|
4a80a72a891d
8221333: Replace Inno Setup with custom MSI wrapper for .exe bundler
herrick
parents:
57399
diff
changeset
|
121 |
TARGETS += $(BUILD_JPACKAGE_MSIWRAPPER) |
58792 | 122 |
|
123 |
# Build non-console version of launcher |
|
124 |
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \ |
|
125 |
NAME := jpackageapplauncherw, \ |
|
126 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \ |
|
127 |
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \ |
|
128 |
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \ |
|
129 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
|
130 |
OPTIMIZATION := LOW, \ |
|
131 |
CFLAGS := $(CXXFLAGS_JDKEXE), \ |
|
132 |
CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \ |
|
133 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
|
134 |
LIBS := $(LIBCXX), \ |
|
135 |
LIBS_windows := user32.lib shell32.lib advapi32.lib, \ |
|
136 |
)) |
|
137 |
||
138 |
TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE) |
|
139 |
||
57254
c1b92a014e89
8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents:
57151
diff
changeset
|
140 |
endif |