mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
编译脚本简化,修复加密代理控制器停止缓存日志未写入文件,修复更新0条订阅不提示
This commit is contained in:
14
BUILD.ps1
14
BUILD.ps1
@@ -16,19 +16,17 @@ function Build-NetFrameworkx64
|
||||
|
||||
$outdir = "$net_baseoutput\x64"
|
||||
|
||||
msbuild -v:m -m -t:Build /p:Configuration="Release" /p:Platform="x64" /p:TargetFramework=net48 /p:Runtimeidentifier=win-x64 /restore
|
||||
msbuild -v:n -m:1 /p:Configuration="Release" `
|
||||
/p:Platform="x64" `
|
||||
/p:TargetFramework=net48 `
|
||||
/p:Runtimeidentifier=win-x64 `
|
||||
/restore
|
||||
if ($LASTEXITCODE) { cd $mainDir ; exit $LASTEXITCODE }
|
||||
|
||||
Write-Host 'Build x64 Completed, start copy bin, mode, i18n file'
|
||||
Remove-Item -Recurse -Force "$net_baseoutput\x64\Release\win-x64\bin\tap-driver"
|
||||
Copy-Item -Recurse "$mainDir\binaries\*" "$net_baseoutput\x64\Release\win-x64\bin"
|
||||
Copy-Item -Recurse "$mainDir\modes\mode\*" "$net_baseoutput\x64\Release\win-x64\mode"
|
||||
Copy-Item -Recurse "$mainDir\translations\i18n\*" "$net_baseoutput\x64\Release\win-x64\i18n"
|
||||
|
||||
Write-Host 'Build done'
|
||||
}
|
||||
|
||||
cd $mainDir\Netch
|
||||
cd $mainDir
|
||||
Build-NetFrameworkx64
|
||||
cd $mainDir
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ Global
|
||||
{A8715AF4-ACC6-43F9-9381-4294C5360623}.Release|x64.Build.0 = Release|x64
|
||||
{828318A8-9B90-4A5F-BD6B-E632CC9D8933}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{828318A8-9B90-4A5F-BD6B-E632CC9D8933}.Debug|x64.Build.0 = Debug|x64
|
||||
{828318A8-9B90-4A5F-BD6B-E632CC9D8933}.Release|x64.ActiveCfg = Release|x64
|
||||
{828318A8-9B90-4A5F-BD6B-E632CC9D8933}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -169,6 +169,7 @@ namespace Netch.Controllers
|
||||
{
|
||||
SaveBufferTimer.Enabled = false;
|
||||
}
|
||||
SaveBufferTimerEvent(null,null);
|
||||
|
||||
State = State.Stopped;
|
||||
}
|
||||
|
||||
@@ -187,8 +187,9 @@ namespace Netch.Forms
|
||||
foreach (var x in result) x.Group = item.Remark;
|
||||
|
||||
Global.Settings.Server.AddRange(result);
|
||||
NotifyTip(i18N.TranslateFormat("Update {1} server(s) from {0}", item.Remark, result.Count));
|
||||
}
|
||||
|
||||
NotifyTip(i18N.TranslateFormat("Update {1} server(s) from {0}", item.Remark, result?.Count ?? 0));
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
|
||||
@@ -107,6 +107,6 @@
|
||||
</ItemGroup>
|
||||
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="@ECHO OFF
RD /S /Q $(TargetDir)bin > NUL 2>&1
RD /S /Q $(TargetDir)i18n > NUL 2>&1
RD /S /Q $(TargetDir)mode > NUL 2>&1

MKDIR $(TargetDir)bin > NUL 2>&1
MKDIR $(TargetDir)i18n > NUL 2>&1
MKDIR $(TargetDir)mode > NUL 2>&1

COPY /Y $(SolutionDir)binaries\* $(TargetDir)bin > NUL 2>&1
COPY /Y $(SolutionDir)translations\i18n\* $(TargetDir)i18n > NUL 2>&1
COPY /Y $(SolutionDir)modes\mode\* $(TargetDir)mode > NUL 2>&1
MKDIR $(TargetDir)bin\tap-driver > NUL 2>&1
COPY /Y $(SolutionDir)binaries\tap-driver\* $(TargetDir)bin\tap-driver > NUL 2>&1

DEL / f $(TargetDir)\*.config
DEL / f $(TargetDir)\*.pdb
RD /s /Q $(TargetDir)\x86" />
|
||||
<Exec Command="@ECHO OFF
RD /S /Q $(TargetDir)bin >NUL 2>&1
RD /S /Q $(TargetDir)i18n >NUL 2>&1
RD /S /Q $(TargetDir)mode >NUL 2>&1

XCOPY /s /Y $(SolutionDir)binaries $(TargetDir)bin\ >NUL
XCOPY /s /Y $(SolutionDir)translations\i18n $(TargetDir)i18n\ >NUL
XCOPY /s /Y $(SolutionDir)modes\mode $(TargetDir)mode\ >NUL

DEL /f $(TargetDir)*.config >NUL 2>&1
DEL /f $(TargetDir)*.pdb >NUL 2>&1
RD /s /Q $(TargetDir)x86 >NUL 2>&1" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user