diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dc2a6322..f35f79bb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,6 @@ if(BUILD_ICD) add_subdirectory(icd) endif() -add_subdirectory(windows-runtime-installer) if(BUILD_TESTS) enable_testing() diff --git a/windows-runtime-installer/CMakeLists.txt b/windows-runtime-installer/CMakeLists.txt deleted file mode 100644 index d27bef8ef..000000000 --- a/windows-runtime-installer/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# ~~~ -# Copyright (c) 2023 Valve Corporation -# Copyright (c) 2023 LunarG, Inc. -# -# Licensed 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. -# ~~~ - -string(TIMESTAMP CURRENT_YEAR "%Y") - -# Keep windows-runtime-installer/VulkanRT-License.txt up to date. -# https://github.com/KhronosGroup/Vulkan-Tools/issues/754 -configure_file( - ${CMAKE_CURRENT_LIST_DIR}/VulkanRT-License.txt.in - ${CMAKE_CURRENT_LIST_DIR}/VulkanRT-License.txt - @ONLY -) diff --git a/windows-runtime-installer/InstallerRT.nsi b/windows-runtime-installer/InstallerRT.nsi deleted file mode 100644 index 63e555c75..000000000 --- a/windows-runtime-installer/InstallerRT.nsi +++ /dev/null @@ -1,165 +0,0 @@ -# The Vulkan runtime installer NSIS script - -!include LogicLib.nsh - -# Input file locations -!define RES "." - -# Input parameters -!ifndef MAJOR - !define MAJOR "1" - !define MINOR "1" - !define PATCH "73" - !define BUILD "0.dev" -!endif -!define VERSION "${MAJOR}.${MINOR}.${PATCH}.${BUILD}" -!ifndef PUBLISHER - !define PUBLISHER "YourCompany, Inc." -!endif -!ifndef COPYRIGHT - !define COPYRIGHT "" -!endif - -# Installer information -Icon ${RES}\V.ico -OutFile "VulkanRT-${VERSION}-Installer.exe" -InstallDir "$PROGRAMFILES\VulkanRT" - -RequestExecutionLevel admin -AddBrandingImage left 150 -Caption "Vulkan Runtime ${VERSION} Setup" -Name "Vulkan Runtime ${VERSION}" -LicenseData "${RES}\VulkanRT-License.txt" -Page custom brandimage "" ": Brand Image" -Page license -Page instfiles - -VIProductVersion "${VERSION}" -VIAddVersionKey "ProductName" "Vulkan Runtime" -VIAddVersionKey "FileVersion" "${VERSION}" -VIAddVersionKey "ProductVersion" "${VERSION}" -VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" -VIAddVersionKey "FileDescription" "Vulkan Runtime Installer" - -Function brandimage - SetOutPath "$TEMP" - SetFileAttributes V.bmp temporary - File "${RES}\V.bmp" - SetBrandingImage "$TEMP/V.bmp" -Functionend - -# Utilties to check if a file is older than this installer or not -Function NeedsReplacing - Pop $0 - - # Extract the version of the existing file - GetDllVersion "$0" $R0 $R1 - IntOp $R2 $R0 >> 16 - IntOp $R2 $R2 & 0xffff - IntOp $R3 $R0 & 0xffff - IntOp $R4 $R1 >> 16 - IntOp $R4 $R4 & 0xffff - IntOp $R5 $R1 & 0xffff - - # Check major versions - ${IF} ${MAJOR} > $R2 - Push True - ${ELSEIF} ${MAJOR} < $R2 - Push False - - # Check minor versions - ${ELSEIF} ${MINOR} > $R3 - Push True - ${ELSEIF} ${MINOR} < $R3 - Push False - - # Check patch versions - ${ELSEIF} ${PATCH} > $R4 - Push True - ${ELSEIF} ${PATCH} < $R4 - Push False - - # Check build versions - ${ELSEIF} ${BUILD} > $R5 - Push True - ${ELSEIF} ${BUILD} < $R5 - Push False - - # If they match exactly, then we update - ${ELSE} - Push True - ${ENDIF} -FunctionEnd - -!macro InstallIfNewer SrcPath OutName - Push "$OUTDIR\${OutName}" - Call NeedsReplacing - Pop $0 - - ${IF} $0 == True - DetailPrint "File $OUTDIR\${OutName} (version $R2.$R3.$R4.$R5) will be upgraded to ${VERSION}" - File /oname=${OutName} "${SrcPath}" - ${ELSE} - DetailPrint "File $OUTDIR\${OutName} (version $R2.$R3.$R4.$R5) will not be replaced with ${VERSION}" - ${ENDIF} -!macroend - -# Utilities to check if this is a 64-bit OS or not -!define IsWow64 `"" IsWow64 ""` -!macro _IsWow64 _a _b _t _f - !insertmacro _LOGICLIB_TEMP - System::Call kernel32::GetCurrentProcess()p.s - System::Call kernel32::IsWow64Process(ps,*i0s) - Pop $_LOGICLIB_TEMP - !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}` -!macroend - -!define RunningX64 `"" RunningX64 ""` -!macro _RunningX64 _a _b _t _f - !if ${NSIS_PTR_SIZE} > 4 - !insertmacro LogicLib_JumpToBranch `${_t}` `${_f}` - !else - !insertmacro _IsWow64 `${_a}` `${_b}` `${_t}` `${_f}` - !endif -!macroend - -# Installer -Section - Delete "$INSTDIR\install.log" - Delete "$INSTDIR\VULKANRT_LICENSE.rtf" - LogSet on - - # Disable filesystem redirection - System::Call kernel32::Wow64EnableWow64FsRedirection(i0) - - ${IF} ${RunningX64} - SetOutPath $WINDIR\System32 - !insertmacro InstallIfNewer "${LOADER64}" "vulkan-1.dll" - !insertmacro InstallIfNewer "${LOADER64}" "vulkan-1-999-0-0-0.dll" - !insertmacro InstallIfNewer "${VULKANINFO64}" "vulkaninfo.exe" - !insertmacro InstallIfNewer "${VULKANINFO64}" "vulkaninfo-1-999-0-0-0.exe" - SetOutPath $WINDIR\SysWOW64 - ${ELSE} - SetOutPath $WINDIR\System32 - ${ENDIF} - - # Install 32-bit contents - !insertmacro InstallIfNewer "${LOADER32}" "vulkan-1.dll" - !insertmacro InstallIfNewer "${LOADER32}" "vulkan-1-999-0-0-0.dll" - !insertmacro InstallIfNewer "${VULKANINFO32}" "vulkaninfo.exe" - !insertmacro InstallIfNewer "${VULKANINFO32}" "vulkaninfo-1-999-0-0-0.exe" - - # Dump licenses into a the installation directory - SetOutPath "$INSTDIR" - AccessControl::DisableFileInheritance $INSTDIR - AccessControl::SetFileOwner $INSTDIR "Administrators" - AccessControl::ClearOnFile $INSTDIR "Administrators" "FullAccess" - AccessControl::SetOnFile $INSTDIR "SYSTEM" "FullAccess" - AccessControl::GrantOnFile $INSTDIR "Everyone" "ListDirectory" - AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericExecute" - AccessControl::GrantOnFile $INSTDIR "Everyone" "GenericRead" - AccessControl::GrantOnFile $INSTDIR "Everyone" "ReadAttributes" - File "${RES}\VulkanRT-License.txt" - - LogSet off -SectionEnd diff --git a/windows-runtime-installer/NSIS_Security.patch b/windows-runtime-installer/NSIS_Security.patch deleted file mode 100644 index b275aae0a..000000000 --- a/windows-runtime-installer/NSIS_Security.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/nsis-3.0b3-src/SCons/Config/ms b/nsis-3.0b3-src/SCons/Config/ms -index 32d3d33..d2c4d25 100644 ---- a/nsis-3.0b3-src/SCons/Config/ms -+++ b/nsis-3.0b3-src/SCons/Config/ms -@@ -16,7 +16,7 @@ def entry(x,u): - - defenv['ENTRY_FLAG'] = entry - defenv['MAP_FLAG'] = '/map' --defenv['NODEFLIBS_FLAG'] = '/NODEFAULTLIB' -+#defenv['NODEFLIBS_FLAG'] = '/NODEFAULTLIB' - defenv['C_FLAG'] = '/TC' - defenv['CPP_FLAG'] = '/TP' - defenv['CPP_REQUIRES_STDLIB'] = 0 -@@ -29,7 +29,7 @@ defenv['STDCALL'] = '__stdcall' - msvs_version = float(defenv['MSVS_VERSION'].replace('Exp','')) - if msvs_version >= 8.0: - defenv['EXCEPTION_FLAG'] = '/EHsc' -- defenv.Append(CCFLAGS = ['/GS-']) -+ defenv.Append(CCFLAGS = ['/GS']) - defenv.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_WARNINGS', '_CRT_SECURE_NO_DEPRECATE', '_CRT_NON_CONFORMING_SWPRINTFS']) - defenv['MSVCRT_FLAG'] = '/MT' # Avoid msvcr?0.dll dependency - else: -@@ -43,6 +43,10 @@ if msvs_version >= 11.0: - defenv['SUBSYS_CON'] = '/subsystem:console,5.01' # support windows xp - defenv['SUBSYS_WIN'] = '/subsystem:windows,5.01' # support windows xp - -+if msvs_version >= 14.0: -+ defenv.Append(CCFLAGS = ['/guard:cf']) -+ defenv.Append(LINKFLAGS = ['/guard:cf']) -+ - ### defines - - defenv.Append(CPPDEFINES = [('NSISCALL', '$STDCALL')]) -@@ -143,9 +147,9 @@ stub_env.Append(CCFLAGS = ['/Fa${TARGET}.lst']) # listing file name - stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no default libraries - stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file - --if msvs_version >= 10.0: -- # no relocations that our resource editor ignores -- stub_env.Append(LINKFLAGS = ['/FIXED']) -+#if msvs_version >= 10.0: -+# # no relocations that our resource editor ignores -+# stub_env.Append(LINKFLAGS = ['/FIXED']) - - stub_uenv = stub_env.Clone() - stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE']) -diff --git a/nsis-3.0b3-src/Source/exehead/Main.c b/nsis-3.0b3-src/Source/exehead/Main.c -index eb231e7..e4642ce 100644 ---- a/nsis-3.0b3-src/Source/exehead/Main.c -+++ b/nsis-3.0b3-src/Source/exehead/Main.c -@@ -84,6 +84,7 @@ void *g_SHGetFolderPath; - NSIS_ENTRYPOINT_GUINOCRT - EXTERN_C void NSISWinMainNOCRT() - { -+ __security_init_cookie(); - int ret = 0; - const TCHAR *m_Err = _LANG_ERRORWRITINGTEMP; - diff --git a/windows-runtime-installer/README.md b/windows-runtime-installer/README.md deleted file mode 100644 index 81c581251..000000000 --- a/windows-runtime-installer/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Windows Runtime Installer - -This directory contains the files required for building the Windows Vulkan Runtime Installer package. -The runtime installer is a method of delivering a Vulkan loader to system. -The runtime installer is used by the SDK installer. -It is also used by some drivers to ensure that an adequate Vulkan loader is installed on a system. -Additionally, applications may install a runtime to ensure that a minimum loader version is present. - -To build a runtime installer: -1. Get a copy of the Nullsoft Install System (NSIS) version 3.0b3. - Other versions may work, but the patch included in this directory is built against version 3.0b3. - Apply the `NSIS_Security.patch` file provided in this directory to the NSIS source code. - This security patch adds the /DYNAMICBASE /GS, and /guard:cf options to the build. - In addition, it will be necessary to specify NSIS_CONFIG_LOG=yes and NSIS_MAX_STRLEN=8192 when compiling. - Once you have applied the patch, compile NSIS with the command: - ``` - scons SKIPUTILS="NSIS Menu","MakeLangId" UNICODE=yes \ - ZLIB_W32=\zlib-1.2.7-win32-x86 NSIS_MAX_STRLEN=8192 \ - NSIS_CONFIG_LOG=yes NSIS_CONFIG_LOG_TIMESTAMP=yes \ - APPEND_CCFLAGS="/DYNAMICBASE /Zi" APPEND_LINKFLAGS="/DYNAMICBASE \ - /DEBUG /OPT:REF /OPT:ICF" SKIPDOC=all dist-zip - ``` - -2. The compilation should have created a zip file containing the new NSIS build. - Unzip this file to the location of your choosing. - Download the NSIS Access Control plugin in copy it into the plugin directory in the build you just unzipped. - It may be useful to prepend this NSIS binary directory to your system's path, so that this NSIS will be run when you type "makensis". - Otherwise, you will just have to specify the full path to makensis.exe in the following steps. - It may be useful to verify that all shared libraries in the build have the DYNAMIC_BASE and NX_COMPAT flags set. - -3. Build the Vulkan-Loader repository and this one. - -4. Build the runtime installer from this directory with the command: - ``` - makensis InstallerRT.nsi -DLOADER64="?" -DLOADER32="?" -DVULKANINFO64="?" -DVULKANINFO32="?" - ``` - where the question marks are replaced with the 64 and 32 bit versions of the loader and vulkaninfo builds. diff --git a/windows-runtime-installer/V.bmp b/windows-runtime-installer/V.bmp deleted file mode 100644 index dea3353c3..000000000 Binary files a/windows-runtime-installer/V.bmp and /dev/null differ diff --git a/windows-runtime-installer/V.ico b/windows-runtime-installer/V.ico deleted file mode 100644 index 61166983e..000000000 Binary files a/windows-runtime-installer/V.ico and /dev/null differ diff --git a/windows-runtime-installer/VulkanRT-License.txt b/windows-runtime-installer/VulkanRT-License.txt deleted file mode 100644 index e8cd1a73c..000000000 --- a/windows-runtime-installer/VulkanRT-License.txt +++ /dev/null @@ -1,79 +0,0 @@ -Copyright (c) 2015-2024 The Khronos Group Inc. -Copyright (c) 2015-2024 LunarG, Inc. -Copyright (c) 2015-2024 Valve Corporation - -The Vulkan Runtime is comprised of 100% open-source components (MIT, and -Apache 2.0). The text of such licenses is included below along with the -copyrights. - -ALL INFORMATION HERE IS PROVIDED "AS IS." LUNARG MAKES NO REPRESENTATIONS OR -WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS LIST OR ITS ACCURACY OR -COMPLETENESS, OR WITH RESPECT TO ANY RESULTS TO BE OBTAINED FROM USE OR -DISTRIBUTION OF THE LIST. BY USING OR DISTRIBUTING THIS LIST, YOU AGREE THAT -IN NO EVENT SHALL LUNARG BE HELD LIABLE FOR ANY DAMAGES WHATSOEVER RESULTING -FROM ANY USE OR DISTRIBUTION OF THIS LIST, INCLUDING, WITHOUT LIMITATION, ANY -SPECIAL, CONSEQUENTIAL, INCIDENTAL OR OTHER DIRECT OR INDIRECT DAMAGES. - -=========================Apache 2.0========================= -Licensed 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 as "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. - -============================MIT============================ - -Copyright (c) 2009 Dave Gamble -Copyright (c) 2015-2024 The Khronos Group Inc. -Copyright (c) 2015-2024 Valve Corporation -Copyright (c) 2015-2024 LunarG, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -============================MIT============================ - -Copyright (c) 2014 joseph werle -Copyright (c) 2015-2024 The Khronos Group Inc. -Copyright (c) 2015-2024 Valve Corporation -Copyright (c) 2015-2024 LunarG, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and/or associated documentation files (the "Materials"), to -deal in the Materials without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Materials, and to permit persons to whom the Materials are -furnished to do so, subject to the following conditions: - -The above copyright notice(s) and this permission notice shall be included in -all copies or substantial portions of the Materials. - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE -USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/windows-runtime-installer/VulkanRT-License.txt.in b/windows-runtime-installer/VulkanRT-License.txt.in deleted file mode 100644 index 06c5f249a..000000000 --- a/windows-runtime-installer/VulkanRT-License.txt.in +++ /dev/null @@ -1,79 +0,0 @@ -Copyright (c) 2015-@CURRENT_YEAR@ The Khronos Group Inc. -Copyright (c) 2015-@CURRENT_YEAR@ LunarG, Inc. -Copyright (c) 2015-@CURRENT_YEAR@ Valve Corporation - -The Vulkan Runtime is comprised of 100% open-source components (MIT, and -Apache 2.0). The text of such licenses is included below along with the -copyrights. - -ALL INFORMATION HERE IS PROVIDED "AS IS." LUNARG MAKES NO REPRESENTATIONS OR -WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS LIST OR ITS ACCURACY OR -COMPLETENESS, OR WITH RESPECT TO ANY RESULTS TO BE OBTAINED FROM USE OR -DISTRIBUTION OF THE LIST. BY USING OR DISTRIBUTING THIS LIST, YOU AGREE THAT -IN NO EVENT SHALL LUNARG BE HELD LIABLE FOR ANY DAMAGES WHATSOEVER RESULTING -FROM ANY USE OR DISTRIBUTION OF THIS LIST, INCLUDING, WITHOUT LIMITATION, ANY -SPECIAL, CONSEQUENTIAL, INCIDENTAL OR OTHER DIRECT OR INDIRECT DAMAGES. - -=========================Apache 2.0========================= -Licensed 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 as "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. - -============================MIT============================ - -Copyright (c) 2009 Dave Gamble -Copyright (c) 2015-@CURRENT_YEAR@ The Khronos Group Inc. -Copyright (c) 2015-@CURRENT_YEAR@ Valve Corporation -Copyright (c) 2015-@CURRENT_YEAR@ LunarG, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -============================MIT============================ - -Copyright (c) 2014 joseph werle -Copyright (c) 2015-@CURRENT_YEAR@ The Khronos Group Inc. -Copyright (c) 2015-@CURRENT_YEAR@ Valve Corporation -Copyright (c) 2015-@CURRENT_YEAR@ LunarG, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and/or associated documentation files (the "Materials"), to -deal in the Materials without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Materials, and to permit persons to whom the Materials are -furnished to do so, subject to the following conditions: - -The above copyright notice(s) and this permission notice shall be included in -all copies or substantial portions of the Materials. - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE -USE OR OTHER DEALINGS IN THE MATERIALS.