mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-16 20:31:48 +08:00
-删除不必要的生成脚本文件
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
*.snk
|
||||
*.pld
|
||||
CopyReleasedFiles.js
|
||||
ILRepack.targets
|
||||
7za.exe
|
||||
misc/
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release' and Exists('wmjordan.snk')">
|
||||
|
||||
<ItemGroup>
|
||||
<InputAssemblies Include="$(OutputPath)$(AssemblyName).exe" />
|
||||
<InputAssemblies Include="$(OutputPath)ColorPicker.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)Cyotek.Windows.Forms.ImageBox.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)FreeImageNET.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)HtmlRenderer.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)HtmlRenderer.WinForms.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)itextAsian.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)itextsharp.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)JacksonSoft.CustomTabControl.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)ObjectListView.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)PowerJSON.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ILRepack KeyFile="wmjordan.snk" Parallel="true" Internalize="true" InternalizeExclude="@(DoNotInternalizeAssemblies)" InputAssemblies="@(InputAssemblies)" TargetKind="SameAsPrimaryAssembly" TargetPlatformVersion="v4" OutputFile="$(OutputPath)$(AssemblyName).exe" />
|
||||
<Exec Command="if errorlevel 0 CScript.exe "$(SolutionDir)CopyReleasedFiles.js" "$(ProjectDir)Properties\AssemblyInfo.cs" "$(TargetDir)"" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,73 +0,0 @@
|
||||
var op = "m:\\"; // note: Be sure to change this for you, where compressed output file is copied to
|
||||
var names = ["FreeImage.dll", "JBig2.dll", "mupdflib.dll", "PDFPatcher.exe", "PDFPatcher.exe.config", "授权协议.txt", "更新历史.txt"];
|
||||
|
||||
var n = WScript.Arguments(0); // assembly info file path
|
||||
var p = WScript.Arguments(1); // bin path
|
||||
var s = new ActiveXObject("ADODB.Stream");
|
||||
s.Open();
|
||||
s.Type = 2;
|
||||
s.CharSet = "UTF-8"; // Make sure that the encoding is correct, otherwise damage may occur
|
||||
s.LoadFromFile (n);
|
||||
var t = s.ReadText ();
|
||||
s.Close();
|
||||
var r = /\[assembly: AssemblyFileVersion\s*\("(\d+\.\d+\.\d+\.\d+)"\)\]/g;
|
||||
var a = r.exec(t);
|
||||
var v;
|
||||
if (a != null && a.length > 1) {
|
||||
v = a[1]; // Major.Minor.Build.Revision
|
||||
}
|
||||
else {
|
||||
WScript.StdErr.WriteLine ("Error: AssemblyFileVersion not found.");
|
||||
WScript.Quit (1);
|
||||
}
|
||||
|
||||
var sh = WScript.CreateObject ("WScript.Shell");
|
||||
sh.CurrentDirectory = p;
|
||||
s.Open();
|
||||
s.Type = 2;
|
||||
s.CharSet = "UTF-8";
|
||||
s.LoadFromFile ("更新历史.txt");
|
||||
t = s.ReadText ();
|
||||
r = /\d+\.\d+\.\d+\.\d+ \d+年\d+月\d+日/;
|
||||
s.Position = 0;
|
||||
var d = new Date();
|
||||
var dt = d.getYear() + "年" + (d.getMonth()+1)+"月"+d.getDate()+"日";
|
||||
s.WriteText (t.replace(r, v + " " + dt));
|
||||
s.SetEOS ();
|
||||
s.SaveToFile ("更新历史.txt", 2);
|
||||
s.Close();
|
||||
|
||||
s.Open();
|
||||
s.Type = 2;
|
||||
s.CharSet = "UTF-8";
|
||||
s.LoadFromFile ("更新历史.txt");
|
||||
t = s.ReadText ();
|
||||
s.Position = 0;
|
||||
s.SetEOS ();
|
||||
s.WriteText ('<?xml version="1.0" encoding="utf-8"?><PDFPatcher');
|
||||
s.WriteText (' version="' + v + '" date="' + dt + '"');
|
||||
s.WriteText (' url="https://wwo.lanzouy.com/b02uobz5i"');
|
||||
s.WriteText ('>');
|
||||
s.WriteText ('<content><![CDATA[下载密码:8518\r\n\r\n');
|
||||
var tl = t.split("\r\n");
|
||||
for (var i=1; i<tl.length; i++) {
|
||||
if (tl[i].length == 0) {
|
||||
break;
|
||||
}
|
||||
s.WriteText (tl[i]+"\r\n");
|
||||
}
|
||||
s.WriteText (']]></content></PDFPatcher>');
|
||||
s.SaveToFile (op + "pdfpatcher.update.xml", 2);
|
||||
s.Close();
|
||||
|
||||
var c = "..\\..\\7za.exe u "+op+"PDFPatcher."+v+".7z "+names.join(" ") + " -mx9";
|
||||
WScript.StdOut.WriteLine (c);
|
||||
var z = sh.exec(c);
|
||||
var i = 0;
|
||||
while ((z.Status == 0 && i < 50) || z.StdOut.AtEndOfStream == false) {
|
||||
WScript.Sleep (100);
|
||||
i++;
|
||||
if (!z.StdOut.AtEndOfStream) {
|
||||
WScript.StdOut.Write (z.StdOut.ReadAll());
|
||||
}
|
||||
}
|
||||
+7
-8
@@ -1,18 +1,19 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31829.152
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32210.308
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFPatcher", "App\PDFPatcher.csproj", "{77A9FBD2-FB25-4590-864A-64A01A8724C4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A8C76A16-25E3-45B6-B974-4F4CB88E5AE2} = {A8C76A16-25E3-45B6-B974-4F4CB88E5AE2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "jbig2\jbig2.vcxproj", "{A8C76A16-25E3-45B6-B974-4F4CB88E5AE2}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "JBig2\jbig2.vcxproj", "{A8C76A16-25E3-45B6-B974-4F4CB88E5AE2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3243E921-0EC3-44D1-96CC-C3E05BF9C89B}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
CopyReleasedFiles.js = CopyReleasedFiles.js
|
||||
.gitattributes = .gitattributes
|
||||
.gitignore = .gitignore
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@@ -29,6 +30,7 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{77A9FBD2-FB25-4590-864A-64A01A8724C4}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{77A9FBD2-FB25-4590-864A-64A01A8724C4}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{77A9FBD2-FB25-4590-864A-64A01A8724C4}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{77A9FBD2-FB25-4590-864A-64A01A8724C4}.Debug|Win32.Build.0 = Debug|x86
|
||||
{77A9FBD2-FB25-4590-864A-64A01A8724C4}.Debug|x64.ActiveCfg = Debug|x86
|
||||
@@ -59,9 +61,6 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
BuildVersion_BuildVersioningStyle = None.None.None.None
|
||||
BuildVersion_UseGlobalSettings = False
|
||||
BuildVersion_StartDate = 2000/1/1
|
||||
SolutionGuid = {F089AFCD-642F-4853-96F5-5BDC47E92E72}
|
||||
SolutionGuid = {2A79F8C5-2A16-4D1C-9DCD-C6FA86808545}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Reference in New Issue
Block a user