mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
style: re-format tree with editorconfig
```
find $PWD \
-type f \
! -path '*/.git/*' ! -path '*/flatpak/shared-modules/*' \
! -path '*/libraries/*' ! -path '*/testdata/*' ! -name '*.patch' \
! -name '*.svg' ! -name '*.scd' ! -path '*/program_info/LICENSE' \
! -path '*/COPYING.md' ! -path '*/cmake/*' ! -name '.gitmodules' \
-exec eclint -fix {} \;
```
Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
parent
686ad72e03
commit
fd91f87c21
|
|
@ -427,7 +427,7 @@ if(UNIX AND APPLE)
|
|||
|
||||
else()
|
||||
message(WARNING "actool not found. Cannot compile macOS app icons.\n"
|
||||
"Install Xcode command line tools: 'xcode-select --install'")
|
||||
"Install Xcode command line tools: 'xcode-select --install'")
|
||||
endif()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,221 +1,221 @@
|
|||
{
|
||||
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||
"version": 8,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 28
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"binaryDir": "build",
|
||||
"installDir": "install",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"cacheVariables": {
|
||||
"Launcher_BUILD_ARTIFACT": "$penv{ARTIFACT_NAME}",
|
||||
"Launcher_BUILD_PLATFORM": "$penv{BUILD_PLATFORM}",
|
||||
"Launcher_ENABLE_JAVA_DOWNLOADER": "ON",
|
||||
"ENABLE_LTO": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"macos"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64",
|
||||
"VCPKG_TARGET_TRIPLET": "universal-osx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"configurePreset": "linux"
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||
"version": 8,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 28
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"binaryDir": "build",
|
||||
"installDir": "install",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"cacheVariables": {
|
||||
"Launcher_BUILD_ARTIFACT": "$penv{ARTIFACT_NAME}",
|
||||
"Launcher_BUILD_PLATFORM": "$penv{BUILD_PLATFORM}",
|
||||
"Launcher_ENABLE_JAVA_DOWNLOADER": "ON",
|
||||
"ENABLE_LTO": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"macos"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64",
|
||||
"VCPKG_TARGET_TRIPLET": "universal-osx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$penv{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"configurePreset": "linux"
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"configurePreset": "macos"
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"macos"
|
||||
],
|
||||
"configurePreset": "macos_universal"
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_mingw"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_msvc"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
},
|
||||
"execution": {
|
||||
"noTestsAction": "error"
|
||||
},
|
||||
"filter": {
|
||||
"exclude": {
|
||||
"name": "^example64|example$"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"configurePreset": "linux"
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"configurePreset": "macos"
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"configurePreset": "macos_universal"
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_mingw"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_msvc"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"macos"
|
||||
],
|
||||
"configurePreset": "macos_universal"
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_mingw"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_msvc"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
},
|
||||
"execution": {
|
||||
"noTestsAction": "error"
|
||||
},
|
||||
"filter": {
|
||||
"exclude": {
|
||||
"name": "^example64|example$"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux",
|
||||
"displayName": "Linux",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"configurePreset": "linux"
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"configurePreset": "macos"
|
||||
},
|
||||
{
|
||||
"name": "macos_universal",
|
||||
"displayName": "macOS (Universal Binary)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"configurePreset": "macos_universal"
|
||||
},
|
||||
{
|
||||
"name": "windows_mingw",
|
||||
"displayName": "Windows (MinGW)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_mingw"
|
||||
},
|
||||
{
|
||||
"name": "windows_msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"configurePreset": "windows_msvc"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<RCC version="1.0">
|
||||
<qresource prefix="/documents">
|
||||
<file>../../../COPYING.md</file>
|
||||
<file>credits.html</file>
|
||||
<file>credits.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
|
|
|||
|
|
@ -303,27 +303,27 @@ Function RunUninstall
|
|||
StrCpy $2 $1 1 ; take first char of string
|
||||
StrCmp $2 '"' quoteloop stringloop
|
||||
stringloop: ; get string length
|
||||
StrCpy $2 $1 1 $3 ; get next char
|
||||
IntOp $3 $3 + 1 ; index += 1
|
||||
StrCmp $2 "" +2 stringloop ; if empty exit loop
|
||||
IntOp $3 $3 - 1 ; index -= 1
|
||||
Goto run
|
||||
StrCpy $2 $1 1 $3 ; get next char
|
||||
IntOp $3 $3 + 1 ; index += 1
|
||||
StrCmp $2 "" +2 stringloop ; if empty exit loop
|
||||
IntOp $3 $3 - 1 ; index -= 1
|
||||
Goto run
|
||||
quoteloop: ; get string length with quotes removed
|
||||
StrCmp $3 "" 0 +2 ; if index is set skip quote removal
|
||||
StrCpy $1 $1 "" 1 ; Remove initial quote
|
||||
IntOp $3 $3 + 1 ; index += 1
|
||||
StrCpy $2 $1 1 $3 ; get next char
|
||||
StrCmp $2 "" +2 ; if empty exit loop
|
||||
StrCmp $2 '"' 0 quoteloop ; if ending quote exit loop, else loop
|
||||
StrCmp $3 "" 0 +2 ; if index is set skip quote removal
|
||||
StrCpy $1 $1 "" 1 ; Remove initial quote
|
||||
IntOp $3 $3 + 1 ; index += 1
|
||||
StrCpy $2 $1 1 $3 ; get next char
|
||||
StrCmp $2 "" +2 ; if empty exit loop
|
||||
StrCmp $2 '"' 0 quoteloop ; if ending quote exit loop, else loop
|
||||
run:
|
||||
StrCpy $2 $1 $3 ; Path to uninstaller ; (copy string up to ending quote - if it exists)
|
||||
StrCpy $1 161 ; ERROR_BAD_PATHNAME ; set exit code (it get's overwritten with uninstaller exit code if ExecWait call doesn't error)
|
||||
GetFullPathName $3 "$2\.." ; $InstDir
|
||||
IfFileExists "$2" 0 +4
|
||||
ExecWait $4 $1 ; The file exists, call the saved command
|
||||
StrCpy $2 $1 $3 ; Path to uninstaller ; (copy string up to ending quote - if it exists)
|
||||
StrCpy $1 161 ; ERROR_BAD_PATHNAME ; set exit code (it get's overwritten with uninstaller exit code if ExecWait call doesn't error)
|
||||
GetFullPathName $3 "$2\.." ; $InstDir
|
||||
IfFileExists "$2" 0 +4
|
||||
ExecWait $4 $1 ; The file exists, call the saved command
|
||||
IntCmp $1 0 "" +2 +2 ; Don't delete the installer if it was aborted ;
|
||||
Delete "$2" ; Delete the uninstaller
|
||||
RMDir "$3" ; Try to delete $InstDir
|
||||
Delete "$2" ; Delete the uninstaller
|
||||
RMDir "$3" ; Try to delete $InstDir
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
|
|
@ -339,11 +339,11 @@ Section "" UninstallPrevious
|
|||
${EndIf}
|
||||
|
||||
${If} $0 != ""
|
||||
!insertmacro RunUninstall $0 $0
|
||||
${If} $0 <> 0
|
||||
MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES +2
|
||||
Abort
|
||||
${EndIf}
|
||||
!insertmacro RunUninstall $0 $0
|
||||
${If} $0 <> 0
|
||||
MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES +2
|
||||
Abort
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
SectionEnd
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
## If current working dirctory is ./scripts, ask to invoke from one directory up
|
||||
if [ ! -d "scripts" ]; then
|
||||
echo "Please run this script from the root directory of the project"
|
||||
exit 1
|
||||
echo "Please run this script from the root directory of the project"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find . -type f -name '*.png' -not -path '*/libraries/*' -exec oxipng --opt max --strip all --alpha --interlace 0 {} \;
|
||||
|
|
|
|||
Loading…
Reference in a new issue