diff --git a/build.ps1 b/build.ps1 index 42541be8..1cda22e1 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,7 +22,7 @@ param ( $PublishSingleFile = $True ) -.\download.ps1 $OutputPath +.\scripts\download.ps1 $OutputPath if ( -Not $? ) { Exit 1 diff --git a/download.ps1 b/scripts/download.ps1 similarity index 79% rename from download.ps1 rename to scripts/download.ps1 index f7f67958..39b9c839 100644 --- a/download.ps1 +++ b/scripts/download.ps1 @@ -2,7 +2,7 @@ param([string]$OutputPath) $NetchDataURL="https://github.com/NetchX/NetchData/archive/refs/heads/master.zip" $NetchModeURL="https://github.com/NetchX/NetchMode/archive/refs/heads/master.zip" -$NetchI18NURL="https://github.com/NetchX/NetchTranslation/archive/refs/heads/master.zip" +$NetchI18NURL="https://github.com/NetchX/NetchI18N/archive/refs/heads/master.zip" $last=$(Get-Location) New-Item -ItemType Directory -Name $OutputPath | Out-Null @@ -22,15 +22,18 @@ New-Item -ItemType Directory -Name i18n | Out-Null Copy-Item -Recurse -Force .\NetchData-master\* .\bin Copy-Item -Recurse -Force .\NetchMode-master\mode\* .\mode -Copy-Item -Recurse -Force .\NetchTranslation-master\i18n\* .\i18n +Copy-Item -Recurse -Force .\NetchI18N-master\i18n\* .\i18n Remove-Item -Recurse -Force NetchData-master Remove-Item -Recurse -Force NetchMode-master -Remove-Item -Recurse -Force NetchTranslation-master +Remove-Item -Recurse -Force NetchI18N-master Remove-Item -Force data.zip Remove-Item -Force mode.zip Remove-Item -Force i18n.zip +..\scripts\downloads\cloak.ps1 -OutputPath bin +..\scripts\downlaods\xray-core.ps1 -OutputPath bin + Get-Item * Set-Location $last -exit 0 \ No newline at end of file +exit 0 diff --git a/scripts/downloads/cloak.ps1 b/scripts/downloads/cloak.ps1 new file mode 100644 index 00000000..d6087f59 --- /dev/null +++ b/scripts/downloads/cloak.ps1 @@ -0,0 +1,7 @@ +param([string]$OutputPath) +$address="https://github.com/cbeuw/Cloak/releases/download/v2.5.3/ck-client-windows-amd64-v2.5.3.exe" + +Invoke-WebRequest -Uri $address -OutFile ck-client.exe + +Move-Item -Force ck-client.exe $OutputPath +exit 0 diff --git a/scripts/downloads/xray-core.ps1 b/scripts/downloads/xray-core.ps1 new file mode 100644 index 00000000..e65fd5ed --- /dev/null +++ b/scripts/downloads/xray-core.ps1 @@ -0,0 +1,13 @@ +param([string]$OutputPath) +$address="https://github.com/XTLS/Xray-core/releases/download/v1.4.2/Xray-windows-64.zip" + +Invoke-WebRequest -Uri $address -OutFile xray-core.zip +Expand-Archive -Force -Path xray-core.zip -DestinationPath xray-core + +Move-Item -Force xray-core\xray.exe $OutputPath +Move-Item -Force xray-core\geoip.dat $OutputPath +Move-Item -Force xray-core\geosite.dat $OutputPath + +Remove-Item -Recurse -Force xray-core +Remove-Item -Recurse -Force xray-core.zip +exit 0