From ee1f411cfcbe76d2ec2c75f572187d436aa07ecf Mon Sep 17 00:00:00 2001 From: Jeremy Kniager Date: Fri, 22 Nov 2019 09:57:36 -0700 Subject: windows: Change winrt name Changed the name of the `winrt` directory to `windows-runtime-installer` as suggested in issue #134 Change-Id: I7cc29c78444c30bece214dc9ec8a3d5b4b6728b2 --- windows-runtime-installer/InstallerRT.nsi | 165 +++++++++++++++++++++++++ windows-runtime-installer/NSIS_Security.patch | 58 +++++++++ windows-runtime-installer/README.md | 38 ++++++ windows-runtime-installer/V.bmp | Bin 0 -> 27626 bytes windows-runtime-installer/V.ico | Bin 0 -> 101492 bytes windows-runtime-installer/VulkanRT-License.txt | 71 +++++++++++ winrt/InstallerRT.nsi | 165 ------------------------- winrt/NSIS_Security.patch | 58 --------- winrt/README.md | 38 ------ winrt/V.bmp | Bin 27626 -> 0 bytes winrt/V.ico | Bin 101492 -> 0 bytes winrt/VulkanRT-License.txt | 71 ----------- 12 files changed, 332 insertions(+), 332 deletions(-) create mode 100644 windows-runtime-installer/InstallerRT.nsi create mode 100644 windows-runtime-installer/NSIS_Security.patch create mode 100644 windows-runtime-installer/README.md create mode 100644 windows-runtime-installer/V.bmp create mode 100644 windows-runtime-installer/V.ico create mode 100644 windows-runtime-installer/VulkanRT-License.txt delete mode 100644 winrt/InstallerRT.nsi delete mode 100644 winrt/NSIS_Security.patch delete mode 100644 winrt/README.md delete mode 100644 winrt/V.bmp delete mode 100644 winrt/V.ico delete mode 100644 winrt/VulkanRT-License.txt diff --git a/windows-runtime-installer/InstallerRT.nsi b/windows-runtime-installer/InstallerRT.nsi new file mode 100644 index 00000000..63e555c7 --- /dev/null +++ b/windows-runtime-installer/InstallerRT.nsi @@ -0,0 +1,165 @@ +# 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 new file mode 100644 index 00000000..b275aae0 --- /dev/null +++ b/windows-runtime-installer/NSIS_Security.patch @@ -0,0 +1,58 @@ +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 new file mode 100644 index 00000000..d0dd5958 --- /dev/null +++ b/windows-runtime-installer/README.md @@ -0,0 +1,38 @@ + +## 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 new file mode 100644 index 00000000..dea3353c Binary files /dev/null and b/windows-runtime-installer/V.bmp differ diff --git a/windows-runtime-installer/V.ico b/windows-runtime-installer/V.ico new file mode 100644 index 00000000..61166983 Binary files /dev/null and b/windows-runtime-installer/V.ico differ diff --git a/windows-runtime-installer/VulkanRT-License.txt b/windows-runtime-installer/VulkanRT-License.txt new file mode 100644 index 00000000..6d40d844 --- /dev/null +++ b/windows-runtime-installer/VulkanRT-License.txt @@ -0,0 +1,71 @@ +Copyright (c) 2015-2019 The Khronos Group Inc. +Copyright (c) 2015-2019 LunarG, Inc. +Copyright (c) 2015-2019 Valve Corporation + +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. + +Unless otherwise noted in the LICENSE.txt file in the install folder, all +components of the Vulkan Runtime are licensed under the above license. +Licenses for any components not so licensed are listed in the LICENSE.txt +file. + +========================================================================================================================================= + +Copyright (c) 2009 Dave Gamble +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Valve Corporation +Copyright (c) 2015-2016 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. + +========================================================================================================================================= + +Copyright (c) 2014 joseph werle +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Valve Corporation +Copyright (c) 2015-2016 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/winrt/InstallerRT.nsi b/winrt/InstallerRT.nsi deleted file mode 100644 index 63e555c7..00000000 --- a/winrt/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/winrt/NSIS_Security.patch b/winrt/NSIS_Security.patch deleted file mode 100644 index b275aae0..00000000 --- a/winrt/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/winrt/README.md b/winrt/README.md deleted file mode 100644 index d0dd5958..00000000 --- a/winrt/README.md +++ /dev/null @@ -1,38 +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/winrt/V.bmp b/winrt/V.bmp deleted file mode 100644 index dea3353c..00000000 Binary files a/winrt/V.bmp and /dev/null differ diff --git a/winrt/V.ico b/winrt/V.ico deleted file mode 100644 index 61166983..00000000 Binary files a/winrt/V.ico and /dev/null differ diff --git a/winrt/VulkanRT-License.txt b/winrt/VulkanRT-License.txt deleted file mode 100644 index 6d40d844..00000000 --- a/winrt/VulkanRT-License.txt +++ /dev/null @@ -1,71 +0,0 @@ -Copyright (c) 2015-2019 The Khronos Group Inc. -Copyright (c) 2015-2019 LunarG, Inc. -Copyright (c) 2015-2019 Valve Corporation - -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. - -Unless otherwise noted in the LICENSE.txt file in the install folder, all -components of the Vulkan Runtime are licensed under the above license. -Licenses for any components not so licensed are listed in the LICENSE.txt -file. - -========================================================================================================================================= - -Copyright (c) 2009 Dave Gamble -Copyright (c) 2015-2016 The Khronos Group Inc. -Copyright (c) 2015-2016 Valve Corporation -Copyright (c) 2015-2016 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. - -========================================================================================================================================= - -Copyright (c) 2014 joseph werle -Copyright (c) 2015-2016 The Khronos Group Inc. -Copyright (c) 2015-2016 Valve Corporation -Copyright (c) 2015-2016 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. -- cgit v1.2.3