[NETBEANS-1227] Mark Windows launchers as DPI-aware (#883)
* Fix paths that broke in windows launcher sources when directories were moved around.
* Fix a small documentation bug in the platform app launcher configuration template.
* Rename Makefile.migw (typo) to Makefile.mingw in one of the windows launcher sources.
* Ignore files generated when NetBeans 8.2 is used to open the windows launcher projects.
* [NETBEANS-1227] Mark Windows launchers as DPI-aware
diff --git a/Makefile.mingw b/Makefile.mingw
index 4f7d188..1e54da8 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -20,15 +20,15 @@
clean:
rm -f *.res *.exe
-app64.res: app.rc
- x86_64-w64-mingw32-windres -oapp64.res -Ocoff app.rc
+app64.res: app.rc app.exe.manifest
+ x86_64-w64-mingw32-windres -oapp64.res -Ocoff -DMANIFEST_FILE=app.exe.manifest app.rc
-app64.exe: app.cpp applauncher.cpp app64.res ../../o.n.bootstrap/launcher/windows/utilsfuncs.cpp
- x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp applauncher.cpp app64.res ../../o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../ide/launcher/windows/nblauncher.cpp -I ../../o.n.bootstrap/launcher/windows/ -oapp64.exe -static -lstdc++ -static-libstdc++ -static-libgcc
+app64.exe: app.cpp applauncher.cpp app64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
+ x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp applauncher.cpp app64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../../nb/ide.launcher/windows/nblauncher.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -oapp64.exe -static -lstdc++ -static-libstdc++ -static-libgcc
-app.res: app.rc
- i686-w64-mingw32-windres -oapp.res -Ocoff app.rc
+app.res: app.rc app.exe.manifest
+ i686-w64-mingw32-windres -oapp.res -Ocoff -DMANIFEST_FILE=app.exe.manifest app.rc
-app.exe: app.cpp applauncher.cpp app.res ../../o.n.bootstrap/launcher/windows/utilsfuncs.cpp
- i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp applauncher.cpp app.res ../../o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../ide/launcher/windows/nblauncher.cpp -I ../../o.n.bootstrap/launcher/windows/ -oapp.exe -static -lstdc++ -static-libstdc++ -static-libgcc
+app.exe: app.cpp applauncher.cpp app.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
+ i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp applauncher.cpp app.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../../nb/ide.launcher/windows/nblauncher.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -oapp.exe -static -lstdc++ -static-libstdc++ -static-libgcc
diff --git a/app.exe.manifest b/app.exe.manifest
new file mode 100644
index 0000000..26921b3
--- /dev/null
+++ b/app.exe.manifest
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity version="9.0.0.0"
+ processorArchitecture="x86"
+ name="app.exe"
+ type="win32"/>
+
+<description>NBP application process</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+<!-- Identify the application security requirements. -->
+<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+</trustInfo>
+<!-- NETBEANS-1227: Indicate the same HiDPI capabilities as javaw.exe from JDK 11. -->
+<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <asmv3:windowsSettings xmlns:dpi1="http://schemas.microsoft.com/SMI/2005/WindowsSettings" xmlns:dpi2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
+ <dpi1:dpiAware>true/PM</dpi1:dpiAware>
+ <dpi2:dpiAwareness>PerMonitorV2, PerMonitor, system</dpi2:dpiAwareness>
+ </asmv3:windowsSettings>
+</asmv3:application>
+<!-- List of explicitly supported Windows versions. This is the list from
+ javaw.exe on JDK 8.0.172, which is the same as that of JDK 11ea. -->
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ </application>
+</compatibility>
+</assembly>
diff --git a/app.rc b/app.rc
index 345b1a5..d52211e 100644
--- a/app.rc
+++ b/app.rc
@@ -18,5 +18,9 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
+#include <winuser.h>
+
100 ICON "app.ico"
+// Value MANIFEST_FILE id taken from windres parameter -DMANIFEST_FILE
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST MANIFEST_FILE
diff --git a/applauncher.cpp b/applauncher.cpp
index 3a89379..f816316 100644
--- a/applauncher.cpp
+++ b/applauncher.cpp
@@ -21,8 +21,8 @@
*/
#include "applauncher.h"
-#include "../../o.n.bootstrap/launcher/windows/utilsfuncs.h"
-#include "../../o.n.bootstrap/launcher/windows/argnames.h"
+#include "../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.h"
+#include "../../../platform/o.n.bootstrap/launcher/windows/argnames.h"
using namespace std;
diff --git a/applauncher.h b/applauncher.h
index 35569bf..0801c8a 100644
--- a/applauncher.h
+++ b/applauncher.h
@@ -27,7 +27,7 @@
#include <windows.h>
#include "shlobj.h"
-#include "../../ide/launcher/windows/nblauncher.h"
+#include "../../../nb/ide.launcher/windows/nblauncher.h"
class AppLauncher : public NbLauncher {
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 6738d4d..55d0647 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -25,8 +25,8 @@
displayName="Header Files"
projectFiles="true">
<itemPath>applauncher.h</itemPath>
- <itemPath>../../ide/launcher/windows/nblauncher.h</itemPath>
- <itemPath>../../o.n.bootstrap/launcher/windows/utilsfuncs.h</itemPath>
+ <itemPath>../../../nb/ide.launcher/windows/nblauncher.h</itemPath>
+ <itemPath>../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.h</itemPath>
</logicalFolder>
<logicalFolder name="ResourceFiles"
displayName="Resource Files"
@@ -37,8 +37,8 @@
projectFiles="true">
<itemPath>app.cpp</itemPath>
<itemPath>applauncher.cpp</itemPath>
- <itemPath>../../ide/launcher/windows/nblauncher.cpp</itemPath>
- <itemPath>../../o.n.bootstrap/launcher/windows/utilsfuncs.cpp</itemPath>
+ <itemPath>../../../nb/ide.launcher/windows/nblauncher.cpp</itemPath>
+ <itemPath>../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"