-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1d3358
commit 461c954
Showing
6 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Disable telemetry. | ||
|
||
diff --git a/Common7/Tools/VsDevCmd.bat b/Common7/Tools/VsDevCmd.bat | ||
--- a/Common7/Tools/VsDevCmd.bat | ||
+++ b/Common7/Tools/VsDevCmd.bat | ||
@@ -247,6 +247,7 @@ exit /B 0 | ||
:end | ||
|
||
@REM Send Telemetry if user's VS is opted-in | ||
+if 0 NEQ 0 ^ | ||
if "%VSCMD_SKIP_SENDTELEMETRY%"=="" ( | ||
if "%VSCMD_DEBUG%" NEQ "" ( | ||
@echo [DEBUG:%~nx0] Sending telemetry |
28 changes: 28 additions & 0 deletions
28
patches/Common7/Tools/vsdevcmd/core/vsdevcmd_start.bat.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Workaround for Wine CMD bug https://bugs.winehq.org/show_bug.cgi?id=57137. | ||
|
||
diff --git a/Common7/Tools/vsdevcmd/core/vsdevcmd_start.bat b/Common7/Tools/vsdevcmd/core/vsdevcmd_start.bat | ||
--- a/Common7/Tools/vsdevcmd/core/vsdevcmd_start.bat | ||
+++ b/Common7/Tools/vsdevcmd/core/vsdevcmd_start.bat | ||
@@ -8,6 +8,7 @@ call "%~dp0parse_cmd.bat" %* | ||
if "%ERRORLEVEL%" NEQ "0" set /A __vscmd_vsdevcmd_errcount=__vscmd_vsdevcmd_errcount+1 | ||
|
||
@REM Save the current directory, if -startdir=none was specified by the user. | ||
+set "__VSCMD_CURRENT_DIR=%CD%" | ||
if /I "%VSCMD_ARG_STARTDIR%" == "none" set "__VSCMD_CURRENT_DIR=%CD%" | ||
|
||
if "%VSCMD_DEBUG%" GEQ "2" ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Search Windows SDKs in VS installation root first. | ||
[PATCH] Search UCRT in just found Windows SDK first and then in VS installation root. | ||
|
||
diff --git a/Common7/Tools/vsdevcmd/core/winsdk.bat b/Common7/Tools/vsdevcmd/core/winsdk.bat | ||
--- a/Common7/Tools/vsdevcmd/core/winsdk.bat | ||
+++ b/Common7/Tools/vsdevcmd/core/winsdk.bat | ||
@@ -64,6 +64,8 @@ exit /B 0 | ||
|
||
if "%VSCMD_DEBUG%" GEQ "3" goto :GetWin10SdkDirVerbose | ||
|
||
+call :GetWin10SdkDirHelper > nul 2>&1 | ||
+if errorlevel 1 ^ | ||
call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node > nul 2>&1 | ||
if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node > nul 2>&1 | ||
if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE > nul 2>&1 | ||
@@ -73,6 +75,8 @@ exit /B 0 | ||
|
||
:GetWin10SdkDirVerbose | ||
|
||
+call :GetWin10SdkDirHelper | ||
+if errorlevel 1 ^ | ||
call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node | ||
if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node | ||
if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE | ||
@@ -84,6 +88,7 @@ exit /B 0 | ||
:GetWin10SdkDirHelper | ||
|
||
@REM Get Windows 10 SDK installed folder | ||
+if "%1"=="" (if exist "%VSINSTALLDIR%Windows Kits\10\include\" SET "WindowsSdkDir=%VSINSTALLDIR%Windows Kits\10\") else ^ | ||
for /F "tokens=1,2*" %%i in ('reg query "%1\Microsoft\Microsoft SDKs\Windows\v10.0" /v "InstallationFolder"') DO ( | ||
if "%%i"=="InstallationFolder" ( | ||
SET WindowsSdkDir=%%~k | ||
@@ -231,6 +236,8 @@ set UniversalCRTSdkDir= | ||
|
||
if "%VSCMD_DEBUG%" GEQ "3" goto :GetUniversalCRTSdkDirVerbose | ||
|
||
+call :GetUniversalCRTSdkDirHelper > nul 2>&1 | ||
+if errorlevel 1 ^ | ||
call :GetUniversalCRTSdkDirHelper HKLM\SOFTWARE\Wow6432Node > nul 2>&1 | ||
if errorlevel 1 call :GetUniversalCRTSdkDirHelper HKCU\SOFTWARE\Wow6432Node > nul 2>&1 | ||
if errorlevel 1 call :GetUniversalCRTSdkDirHelper HKLM\SOFTWARE > nul 2>&1 | ||
@@ -240,6 +247,8 @@ exit /B 0 | ||
|
||
:GetUniversalCRTSdkDirVerbose | ||
|
||
+call :GetUniversalCRTSdkDirHelper | ||
+if errorlevel 1 ^ | ||
call :GetUniversalCRTSdkDirHelper HKLM\SOFTWARE\Wow6432Node | ||
if errorlevel 1 call :GetUniversalCRTSdkDirHelper HKCU\SOFTWARE\Wow6432Node | ||
if errorlevel 1 call :GetUniversalCRTSdkDirHelper HKLM\SOFTWARE | ||
@@ -248,6 +257,8 @@ if errorlevel 1 exit /B 1 | ||
exit /B 0 | ||
|
||
:GetUniversalCRTSdkDirHelper | ||
+if "%1"=="" (if exist "%WindowsSdkDir%Lib\%WindowsSDKVersion%ucrt\" (SET "UniversalCRTSdkDir=%WindowsSdkDir%" | ||
+) else if exist "%VSINSTALLDIR%Windows Kits\10\Lib\" SET "UniversalCRTSdkDir=%VSINSTALLDIR%Windows Kits\10\") else ^ | ||
for /F "tokens=1,2*" %%i in ('reg query "%1\Microsoft\Windows Kits\Installed Roots" /v "KitsRoot10"') DO ( | ||
if "%%i"=="KitsRoot10" ( | ||
SET UniversalCRTSdkDir=%%k |
28 changes: 28 additions & 0 deletions
28
patches/Common7/Tools/vsdevcmd/ext/ConnectionManagerExe.bat.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Don't set error if ConnectionManager is not installed. | ||
|
||
diff --git a/Common7/Tools/vsdevcmd/ext/ConnectionManagerExe.bat b/Common7/Tools/vsdevcmd/ext/ConnectionManagerExe.bat | ||
--- a/Common7/Tools/vsdevcmd/ext/ConnectionManagerExe.bat | ||
+++ b/Common7/Tools/vsdevcmd/ext/ConnectionManagerExe.bat | ||
@@ -10,6 +10,7 @@ set "PATH=%PATH%;%VSINSTALLDIR%Common7\IDE\VC\Linux\bin\ConnectionManagerExe" | ||
goto :end | ||
|
||
:error_setting_path | ||
+goto :end | ||
exit /B 1 | ||
|
||
goto :end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Don't set error if CMake is not installed. | ||
|
||
diff --git a/Common7/Tools/vsdevcmd/ext/cmake.bat b/Common7/Tools/vsdevcmd/ext/cmake.bat | ||
--- a/Common7/Tools/vsdevcmd/ext/cmake.bat | ||
+++ b/Common7/Tools/vsdevcmd/ext/cmake.bat | ||
@@ -10,6 +10,7 @@ set "PATH=%PATH%;%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\CMak | ||
goto :end | ||
|
||
:error_setting_path | ||
+goto :end | ||
exit /B 1 | ||
|
||
goto :end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright (c) 2024 Huang Qinjin | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
# copyright notice and this permission notice appear in all copies. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
[PATCH] Workaround for Wine CMD bug https://bugs.winehq.org/show_bug.cgi?id=57649. | ||
|
||
diff --git a/VC/Auxiliary/Build/vcvarsall.bat b/VC/Auxiliary/Build/vcvarsall.bat | ||
--- a/VC/Auxiliary/Build/vcvarsall.bat | ||
+++ b/VC/Auxiliary/Build/vcvarsall.bat | ||
@@ -344,3 +344,4 @@ set __VCVARSALL_VSDEVCMD_ARGS= | ||
set __VCVARSALL_HELP= | ||
set __VCVARSALL_VER= | ||
set __VCVARSALL_SPECTRE= | ||
+exit /B %errorlevel% |