fix packege
This commit is contained in:
parent
f77a512451
commit
5f6714e4c1
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 17.0.31912.275
|
VisualStudioVersion = 16.0.32228.343
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSocketTool", "WebSocketTool\WebSocketTool.csproj", "{1002416D-BE37-48F3-97FA-630D37C5FC91}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSocketTool", "WebSocketTool\WebSocketTool.csproj", "{1002416D-BE37-48F3-97FA-630D37C5FC91}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -8,11 +8,11 @@ using System.Windows;
|
|||||||
// 控制。更改这些特性值可修改
|
// 控制。更改这些特性值可修改
|
||||||
// 与程序集关联的信息。
|
// 与程序集关联的信息。
|
||||||
[assembly: AssemblyTitle("WebSocketTool")]
|
[assembly: AssemblyTitle("WebSocketTool")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("WebSocket Test Tool")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("DevWiki")]
|
||||||
[assembly: AssemblyProduct("WebSocketTool")]
|
[assembly: AssemblyProduct("WebSocketTool")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
[assembly: AssemblyCopyright("Copyright DevWiki © 2022")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using log4net.Appender;
|
||||||
|
using log4net.Core;
|
||||||
|
using log4net.Repository;
|
||||||
|
using log4net.Repository.Hierarchy;
|
||||||
|
|
||||||
namespace WebSocketTool.Util
|
namespace WebSocketTool.Util
|
||||||
{
|
{
|
||||||
@ -25,6 +31,40 @@ namespace WebSocketTool.Util
|
|||||||
{
|
{
|
||||||
LogName = logName;
|
LogName = logName;
|
||||||
}
|
}
|
||||||
|
InitLog4Net();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitLog4Net()
|
||||||
|
{
|
||||||
|
Hierarchy hierarchy = (Hierarchy)log4net.LogManager.GetRepository();
|
||||||
|
var appender = CreateReleaseAppender();
|
||||||
|
appender.ActivateOptions();
|
||||||
|
if (hierarchy != null)
|
||||||
|
{
|
||||||
|
hierarchy.Root.Level = Level.Info;
|
||||||
|
log4net.Config.BasicConfigurator.Configure(hierarchy, appender);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log4net.Config.BasicConfigurator.Configure(appender);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static RollingFileAppender CreateReleaseAppender()
|
||||||
|
{
|
||||||
|
var appender = new RollingFileAppender
|
||||||
|
{
|
||||||
|
Name = "ReleaseFileLog",
|
||||||
|
File = Path.Combine("log", "WebSocketTool.log"),
|
||||||
|
AppendToFile = true,
|
||||||
|
MaxSizeRollBackups = 10,
|
||||||
|
MaximumFileSize = "10MB",
|
||||||
|
RollingStyle = RollingFileAppender.RollingMode.Size,
|
||||||
|
StaticLogFileName = true,
|
||||||
|
Encoding = Encoding.UTF8,
|
||||||
|
Layout = new log4net.Layout.PatternLayout("%date [%thread] %-5level %logger - %message%newline")
|
||||||
|
};
|
||||||
|
return appender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Log GetLog(string tag)
|
public Log GetLog(string tag)
|
||||||
|
@ -111,9 +111,6 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="log4net.config">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<log4net>
|
|
||||||
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
|
|
||||||
<file value="log/WebSocketTool.log" />
|
|
||||||
<appendToFile value="true" />
|
|
||||||
<rollingStyle value="Size" />
|
|
||||||
<maxSizeRollBackups value="10" />
|
|
||||||
<maximumFileSize value="20MB" />
|
|
||||||
<staticLogFileName value="true" />
|
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
|
||||||
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
|
|
||||||
</layout>
|
|
||||||
<param name="Encoding" value="UTF-8"/>
|
|
||||||
</appender>
|
|
||||||
<root>
|
|
||||||
<level value="INFO" />
|
|
||||||
<appender-ref ref="RollingFileAppender" />
|
|
||||||
</root>
|
|
||||||
</log4net>
|
|
BIN
WebSocketTool/pack/libz.exe
Normal file
BIN
WebSocketTool/pack/libz.exe
Normal file
Binary file not shown.
4
WebSocketTool/pack/pack.bat
Normal file
4
WebSocketTool/pack/pack.bat
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
libz.exe inject-dll --assembly ../bin/Release/WebSocketTool.exe --include ../bin/Release/*.dll --move
|
||||||
|
|
||||||
|
mkdir output
|
||||||
|
move ../bin/Release/WebSocketTool.exe output/WebSocketTool.exe
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
@ -12,6 +12,11 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>websocket-sharp.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>websocket-sharp.snk</AssemblyOriginatorKeyFile>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
Loading…
Reference in New Issue
Block a user