From 2b1f3840cfca9f83225cb80770c9b924e7cd812f Mon Sep 17 00:00:00 2001 From: tmoonlight Date: Mon, 19 Aug 2024 00:31:38 +0800 Subject: [PATCH] =?UTF-8?q?docker=E4=B8=AD=E5=85=B3=E9=97=AD=E8=A3=81?= =?UTF-8?q?=E5=89=AA=E9=98=B2=E6=AD=A2=E9=95=9C=E5=83=8F=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- azure-pipelines.yml | 4 +- .../NSmartProxy.ServerHost.csproj | 2 +- .../NSmartProxyClient.csproj | 1 + src/build.cmd | 68 ++++++++++--------- 4 files changed, 39 insertions(+), 36 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2695e47..6ea3358 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,7 +50,7 @@ steps: command: 'publish' publishWebProjects: false projects: './src/NSmartProxy.ServerHost/NSmartProxy.ServerHost.csproj' - arguments: ' --output $(System.DefaultWorkingDirectory)/build/nspserver' + arguments: ' --output $(System.DefaultWorkingDirectory)/build/nspserver /p:PublishTrimmed=false' workingDirectory: '$(System.DefaultWorkingDirectory)/' zipAfterPublish: false @@ -59,7 +59,7 @@ steps: command: 'publish' publishWebProjects: false projects: './src/NSmartProxyClient/NSmartProxyClient.csproj' - arguments: ' --output $(System.DefaultWorkingDirectory)/build/nspclient' + arguments: ' --output $(System.DefaultWorkingDirectory)/build/nspclient /p:PublishTrimmed=false' workingDirectory: '$(System.DefaultWorkingDirectory)/' zipAfterPublish: false diff --git a/src/NSmartProxy.ServerHost/NSmartProxy.ServerHost.csproj b/src/NSmartProxy.ServerHost/NSmartProxy.ServerHost.csproj index f1ac570..2ec37ad 100644 --- a/src/NSmartProxy.ServerHost/NSmartProxy.ServerHost.csproj +++ b/src/NSmartProxy.ServerHost/NSmartProxy.ServerHost.csproj @@ -3,7 +3,7 @@ Exe net6.0 - + true diff --git a/src/NSmartProxyClient/NSmartProxyClient.csproj b/src/NSmartProxyClient/NSmartProxyClient.csproj index db1a13e..8b1209a 100644 --- a/src/NSmartProxyClient/NSmartProxyClient.csproj +++ b/src/NSmartProxyClient/NSmartProxyClient.csproj @@ -3,6 +3,7 @@ Exe net6.0 + true diff --git a/src/build.cmd b/src/build.cmd index fce1c54..8301d3e 100644 --- a/src/build.cmd +++ b/src/build.cmd @@ -3,7 +3,7 @@ rem NSP v1.4.1 @ECHO on set Ver=v1.4.1 -set BuildPath=%~dp0../build +set BuildPath=%~dp0…/build set nsp_client_path=%BuildPath%/nspclient_unity_%Ver% set nsp_server_path=%BuildPath%/nspserver_unity_%Ver% @@ -23,55 +23,57 @@ set nsp_server_scd_win_arm_path=%BuildPath%/nspserver_scd_win_arm_%Ver% set nsp_client_winfform_path=%BuildPath%/nspclient_winform_%Ver% -rem del %~dp0/../build/*.* +rem 删除nsp_client和nsp_server相关的pdb文件 +powershell del %nsp_client_path%\*.pdb +powershell del %nsp_server_path%\*.pdb + rem NSPClient -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -c release -o %nsp_client_path% /p:PublishTrimmed=false +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -c release -o %nsp_client_path% /p:DebugType=None /p:PublishTrimmed=true rem NSPServer -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -c release -o %nsp_server_path% /p:PublishTrimmed=false +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -c release -o %nsp_server_path% /p:DebugType=None /p:PublishTrimmed=true rem NSPClient_SCD -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r linux-x64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_linux_path% -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r win-x64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_win_path% -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r osx-x64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_osx_path% -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r osx-arm64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_osx_arm_path% -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r linux-arm -c Release /p:PublishSingleFile=true -o %nsp_client_scd_linux_arm_path% -dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r win-arm64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_win_arm_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r linux-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_linux_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r win-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_win_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r osx-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_osx_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r osx-arm64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_osx_arm_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r linux-arm -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_linux_arm_path% +dotnet publish .\NSmartProxyClient\NSmartProxyClient.csproj -r win-arm64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_client_scd_win_arm_path% rem NSPServer_SCD -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r linux-x64 -c Release /p:PublishSingleFile=true -o %nsp_server_scd_linux_path% -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r win-x64 -c Release /p:PublishSingleFile=true -o %nsp_server_scd_win_path% -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r osx-x64 -c Release /p:PublishSingleFile=true -o %nsp_server_scd_osx_path% -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r osx-arm64 -c Release /p:PublishSingleFile=true -o %nsp_client_scd_osx_arm_path% -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r linux-arm -c Release /p:PublishSingleFile=true -o %nsp_server_scd_linux_arm_path% -dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r win-arm64 -c Release /p:PublishSingleFile=true -o %nsp_server_scd_win_arm_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r linux-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_linux_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r win-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_win_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r osx-x64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_osx_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r osx-arm64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_osx_arm_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r linux-arm -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_linux_arm_path% +dotnet publish .\NSmartProxy.ServerHost\NSmartProxy.ServerHost.csproj -r win-arm64 -c Release /p:PublishSingleFile=true /p:DebugType=None /p:PublishTrimmed=true -o %nsp_server_scd_win_arm_path% rem NSPWinform MSBuild .\NSmartProxyWinform\NSmartProxyWinform.csproj /t:build /p:OutDir=%nsp_client_winfform_path% -powershell del %nsp_client_winfform_path%/*.pdb -powershell del %nsp_client_winfform_path%/*.xml +powershell del %nsp_client_winfform_path%\*.pdb +powershell del %nsp_client_winfform_path%\*.xml rem ilmerge rem ruined :< rem compress -powershell Compress-Archive -Path '%nsp_client_path%/*' -DestinationPath '%nsp_client_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_path%/*' -DestinationPath '%nsp_server_path%.zip' -Force - -powershell Compress-Archive -Path '%nsp_client_scd_linux_path%/*' -DestinationPath '%nsp_client_scd_linux_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_client_scd_win_path%/*' -DestinationPath '%nsp_client_scd_win_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_client_scd_osx_path%/*' -DestinationPath '%nsp_client_scd_osx_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_client_scd_linux_arm_path%/*' -DestinationPath '%nsp_client_scd_linux_arm_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_client_scd_win_arm_path%/*' -DestinationPath '%nsp_client_scd_win_arm_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_path%/' -DestinationPath '%nsp_client_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_path%/' -DestinationPath '%nsp_server_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_scd_linux_path%/*' -DestinationPath '%nsp_server_scd_linux_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_scd_win_path%/*' -DestinationPath '%nsp_server_scd_win_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_scd_osx_path%/*' -DestinationPath '%nsp_server_scd_osx_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_scd_linux_arm_path%/*' -DestinationPath '%nsp_server_scd_linux_arm_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_server_scd_win_arm_path%/*' -DestinationPath '%nsp_server_scd_win_arm_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_scd_linux_path%/' -DestinationPath '%nsp_client_scd_linux_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_scd_win_path%/' -DestinationPath '%nsp_client_scd_win_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_scd_osx_path%/' -DestinationPath '%nsp_client_scd_osx_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_scd_linux_arm_path%/' -DestinationPath '%nsp_client_scd_linux_arm_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_scd_win_arm_path%/*' -DestinationPath '%nsp_client_scd_win_arm_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_scd_linux_path%/' -DestinationPath '%nsp_server_scd_linux_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_scd_win_path%/' -DestinationPath '%nsp_server_scd_win_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_scd_osx_path%/' -DestinationPath '%nsp_server_scd_osx_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_scd_linux_arm_path%/' -DestinationPath '%nsp_server_scd_linux_arm_path%.zip' -Force +powershell Compress-Archive -Path '%nsp_server_scd_win_arm_path%/*' -DestinationPath '%nsp_server_scd_win_arm_path%.zip' -Force -powershell Compress-Archive -Path '%nsp_client_winfform_path%/*' -DestinationPath '%BuildPath%/nspclient_winform_%Ver%.zip' -Force +powershell Compress-Archive -Path '%nsp_client_winfform_path%/*' -DestinationPath '%BuildPath%/nspclient_winform_%Ver%.zip' -Force -powershell explorer %~dp0..\build +powershell explorer %~dp0…\build pause \ No newline at end of file