mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-31 13:38:47 +00:00
8258755: jpackage: Invalid 32-bit exe when building app-image
Reviewed-by: asemenyuk, almatvee, kizune
This commit is contained in:
parent
c3bdbf9dda
commit
da4cf05dc6
@ -33,6 +33,11 @@
|
||||
#include "Toolbox.h"
|
||||
#include "ErrorHandling.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
#define LAUNCH_FUNC "_JLI_Launch@56"
|
||||
#else
|
||||
#define LAUNCH_FUNC "JLI_Launch"
|
||||
#endif
|
||||
|
||||
Jvm& Jvm::initFromConfigFile(const CfgFile& cfgFile) {
|
||||
const CfgFile::Properties& appOptions = cfgFile.getProperties(
|
||||
@ -204,7 +209,7 @@ void Jvm::launch() {
|
||||
|
||||
LOG_TRACE(tstrings::any() << "JVM library: \"" << jvmPath << "\"");
|
||||
|
||||
DllFunction<LaunchFuncType> func(Dll(jvmPath), "JLI_Launch");
|
||||
DllFunction<LaunchFuncType> func(Dll(jvmPath), LAUNCH_FUNC);
|
||||
int exitStatus = func(argc, argv.data(),
|
||||
0, 0,
|
||||
0, 0,
|
||||
|
||||
@ -112,7 +112,7 @@ public class WixPipeline {
|
||||
"-nologo",
|
||||
adjustPath.apply(wixSource.source).toString(),
|
||||
"-ext", "WixUtilExtension",
|
||||
"-arch", "x64",
|
||||
"-arch", WixSourcesBuilder.is64Bit() ? "x64" : "x86",
|
||||
"-out", wixObj.toAbsolutePath().toString()
|
||||
));
|
||||
|
||||
|
||||
@ -157,6 +157,10 @@ class WixSourcesBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
static boolean is64Bit() {
|
||||
return !("x86".equals(System.getProperty("os.arch")));
|
||||
}
|
||||
|
||||
private void normalizeFileAssociation(FileAssociation fa) {
|
||||
fa.launcherPath = addExeSuffixToPath(
|
||||
installedAppImage.launchersDirectory().resolve(fa.launcherPath));
|
||||
@ -301,7 +305,7 @@ class WixSourcesBuilder {
|
||||
static void startElement(XMLStreamWriter xml, String componentId,
|
||||
String componentGuid) throws XMLStreamException, IOException {
|
||||
xml.writeStartElement("Component");
|
||||
xml.writeAttribute("Win64", "yes");
|
||||
xml.writeAttribute("Win64", is64Bit() ? "yes" : "no");
|
||||
xml.writeAttribute("Id", componentId);
|
||||
xml.writeAttribute("Guid", componentGuid);
|
||||
}
|
||||
@ -823,7 +827,8 @@ class WixSourcesBuilder {
|
||||
|
||||
private final static Path DESKTOP_PATH = TARGETDIR.resolve("DesktopFolder");
|
||||
|
||||
private final static Path PROGRAM_FILES = TARGETDIR.resolve("ProgramFiles64Folder");
|
||||
private final static Path PROGRAM_FILES = TARGETDIR.resolve(
|
||||
is64Bit() ? "ProgramFiles64Folder" : "ProgramFilesFolder");
|
||||
|
||||
private final static Path LOCAL_PROGRAM_FILES = TARGETDIR.resolve("LocalAppDataFolder");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user