mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
chore: update (+1 squashed commit)
Squashed commits: [78899ef] fix: bbr2 not working in windows 11(24H2)
This commit is contained in:
parent
d8d0a59371
commit
b66c07bd96
|
@ -1,38 +0,0 @@
|
||||||
!define ORIGINAL_PROVIDER_FILE "$TEMP\clash_verge_original_congestion_provider.txt"
|
|
||||||
|
|
||||||
!define NSIS_HOOK_POSTINSTALL "NSIS_HOOK_POSTINSTALL_"
|
|
||||||
|
|
||||||
!macro NSIS_HOOK_POSTINSTALL_
|
|
||||||
ExecWait 'netsh int tcp show global | findstr /R "^ *CongestionProvider" > "${ORIGINAL_PROVIDER_FILE}"'
|
|
||||||
|
|
||||||
FileOpen $0 "${ORIGINAL_PROVIDER_FILE}" r
|
|
||||||
FileRead $0 $1
|
|
||||||
FileClose $0
|
|
||||||
|
|
||||||
StrCpy $1 $1 "" 20
|
|
||||||
StrCmp $1 "bbr2" 0 +5
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=internet congestionprovider=CUBIC'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=internetcustom congestionprovider=CUBIC'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Compat congestionprovider=NewReno'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Datacenter congestionprovider=CUBIC'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Datacentercustom congestionprovider=CUBIC'
|
|
||||||
!macroend
|
|
||||||
|
|
||||||
!define NSIS_HOOK_PREUNINSTALL "NSIS_HOOK_PREUNINSTALL_"
|
|
||||||
|
|
||||||
!macro NSIS_HOOK_PREUNINSTALL_
|
|
||||||
FileOpen $0 "${ORIGINAL_PROVIDER_FILE}" r
|
|
||||||
FileRead $0 $1
|
|
||||||
FileClose $0
|
|
||||||
|
|
||||||
StrCpy $1 $1 "" 20
|
|
||||||
StrCmp $1 "bbr2" 0 +5
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=internet congestionprovider=$1'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=internetcustom congestionprovider=$1'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Compat congestionprovider=NewReno'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Datacenter congestionprovider=$1'
|
|
||||||
ExecWait 'netsh int tcp set supplemental template=Datacentercustom congestionprovider=$1'
|
|
||||||
|
|
||||||
Delete "${ORIGINAL_PROVIDER_FILE}"
|
|
||||||
ExecWait '"$INSTDIR\uninstall-service.exe"'
|
|
||||||
!macroend
|
|
|
@ -1,6 +1,6 @@
|
||||||
; This file is copied from https://github.com/tauri-apps/tauri/blob/tauri-v1.5/tooling/bundler/src/bundle/windows/templates/installer.nsi
|
; This file is copied from https://github.com/tauri-apps/tauri/blob/tauri-v1.5/tooling/bundler/src/bundle/windows/templates/installer.nsi
|
||||||
; and edit to fit the needs of the project. the latest tauri 2.x has a different base nsi script.
|
; and edit to fit the needs of the project. the latest tauri 2.x has a different base nsi script.
|
||||||
|
RequestExecutionLevel admin
|
||||||
Unicode true
|
Unicode true
|
||||||
; Set the compression algorithm. Default is LZMA.
|
; Set the compression algorithm. Default is LZMA.
|
||||||
!if "{{compression}}" == ""
|
!if "{{compression}}" == ""
|
||||||
|
@ -690,7 +690,7 @@ SectionEnd
|
||||||
|
|
||||||
Section Install
|
Section Install
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
|
nsExec::Exec 'netsh int tcp res'
|
||||||
!insertmacro CheckIfAppIsRunning
|
!insertmacro CheckIfAppIsRunning
|
||||||
!insertmacro CheckAllVergeProcesses
|
!insertmacro CheckAllVergeProcesses
|
||||||
; Copy main executable
|
; Copy main executable
|
|
@ -6,7 +6,7 @@
|
||||||
"linux": {
|
"linux": {
|
||||||
"deb": {
|
"deb": {
|
||||||
"depends": ["openssl"],
|
"depends": ["openssl"],
|
||||||
"desktopTemplate": "./template/clash-verge.desktop",
|
"desktopTemplate": "./packages/linux/clash-verge.desktop",
|
||||||
"provides": ["clash-verge"],
|
"provides": ["clash-verge"],
|
||||||
"conflicts": ["clash-verge"],
|
"conflicts": ["clash-verge"],
|
||||||
"replaces": ["clash-verge"],
|
"replaces": ["clash-verge"],
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"rpm": {
|
"rpm": {
|
||||||
"depends": ["openssl"],
|
"depends": ["openssl"],
|
||||||
"desktopTemplate": "./template/clash-verge.desktop",
|
"desktopTemplate": "./packages/linux/clash-verge.desktop",
|
||||||
"provides": ["clash-verge"],
|
"provides": ["clash-verge"],
|
||||||
"conflicts": ["clash-verge"],
|
"conflicts": ["clash-verge"],
|
||||||
"obsoletes": ["clash-verge"],
|
"obsoletes": ["clash-verge"],
|
||||||
"postInstallScript": "../packages/linux/post-install.sh",
|
"postInstallScript": "./packages/linux/post-install.sh",
|
||||||
"preRemoveScript": "../packages/linux/pre-remove.sh"
|
"preRemoveScript": "./packages/linux/pre-remove.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"externalBin": [
|
"externalBin": [
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
"installerIcon": "icons/icon.ico",
|
"installerIcon": "icons/icon.ico",
|
||||||
"languages": ["SimpChinese", "English"],
|
"languages": ["SimpChinese", "English"],
|
||||||
"installMode": "perMachine",
|
"installMode": "perMachine",
|
||||||
"template": "./template/installer.nsi",
|
"template": "./packages/windows/installer.nsi"
|
||||||
"installerHooks": "../packages/windows/nsis_hooks.sh"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"installerIcon": "icons/icon.ico",
|
"installerIcon": "icons/icon.ico",
|
||||||
"languages": ["SimpChinese", "English"],
|
"languages": ["SimpChinese", "English"],
|
||||||
"installMode": "perMachine",
|
"installMode": "perMachine",
|
||||||
"template": "./template/installer.nsi"
|
"template": "./packages/windows/installer.nsi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"installerIcon": "icons/icon.ico",
|
"installerIcon": "icons/icon.ico",
|
||||||
"languages": ["SimpChinese", "English"],
|
"languages": ["SimpChinese", "English"],
|
||||||
"installMode": "perMachine",
|
"installMode": "perMachine",
|
||||||
"template": "./template/installer.nsi"
|
"template": "./packages/windows/installer.nsi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"installerIcon": "icons/icon.ico",
|
"installerIcon": "icons/icon.ico",
|
||||||
"languages": ["SimpChinese", "English"],
|
"languages": ["SimpChinese", "English"],
|
||||||
"installMode": "perMachine",
|
"installMode": "perMachine",
|
||||||
"template": "./template/installer.nsi"
|
"template": "./packages/windows/installer.nsi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user