Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeSettings.json: start with a copy of a UTF-8-BOM file. #11513

Merged
merged 1 commit into from
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -33,14 +33,15 @@ repos:
rev: v4.3.0
hooks:
- id: fix-byte-order-marker
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters)$
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters|UTF-8-BOM.txt)$
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
exclude: ^\.clang-format$
- id: end-of-file-fixer
exclude: ^.*UTF-8-BOM.txt$
- id: mixed-line-ending
- id: trailing-whitespace
exclude: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|vert)$
1 change: 1 addition & 0 deletions tools/UTF-8-BOM.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 5 additions & 6 deletions tools/windows_buildenv.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
REM this � is just to force some editors to recognize this file as ANSI, not UTF8.

CALL :REALPATH "%~dp0\.."
SET MIXXX_ROOT=%RETVAL%
@@ -174,13 +173,13 @@ REM Generate CMakeSettings.json which is read by MS Visual Studio to determine t

CALL :SETANSICONSOLE
SET OLDCODEPAGE=%RETVAL%
REM set byte order mark (BOM) for the file .
REM WARNING: Ensure that the script is saved as ANSI, or these characters will not
REM contain the correct values. Correct values are EF BB BF (ï » ¿) .
REM The last character is an actual character for the file, the start "{"
>"%CMakeSettings%" echo {
REM Start with a UTF-8-BOM
REM Correct values are EF BB BF (ï » ¿)
REM Make sure the BOM is not removed from UTF-8-BOM.txt
copy "%MIXXX_ROOT%\tools\UTF-8-BOM.txt" "%CMakeSettings%"
CALL :SETUTF8CONSOLE

>>"%CMakeSettings%" echo {
>>"%CMakeSettings%" echo "configurations": [
SET configElementTermination=,
CALL :Configuration2CMakeSettings_JSON off Debug