Commit 4e8dcd77 authored by 罗显健's avatar 罗显健

1、打包时增加Image目录。2、打包后的文件,放入子目录Package。

parent d7b182c0
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
......@@ -10,8 +11,14 @@ namespace Ftt.PatchPack
{
private const int WIDTH_LOG_AREA = 360;
Dictionary<string, Project> projects = new Dictionary<string, Project>();
/// <summary>
/// 打包文件存放目录
/// </summary>
public string PackageFileDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Package");
public FrmMain()
{
......@@ -125,7 +132,7 @@ namespace Ftt.PatchPack
try
{
var files = project.GetAllPathFiles();
FilePack patch = new FilePack(AppDomain.CurrentDomain.BaseDirectory, project.Name, files, ckbDelHisPack.Checked);
FilePack patch = new FilePack(PackageFileDirectory, project.Name, files, ckbDelHisPack.Checked);
patch.Pack();
item.Checked = false;
......@@ -163,7 +170,8 @@ namespace Ftt.PatchPack
/// <param name="e"></param>
private void btnOpenDirectory_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory);
if (Directory.Exists(PackageFileDirectory))
System.Diagnostics.Process.Start(PackageFileDirectory);
}
/// <summary>
......
......@@ -157,7 +157,7 @@ namespace Ftt.PatchPack
#endregion
#region ConfigFile 文件夹下xml文件
#region ConfigFile 文件夹下xml文件 , image 目录下新增的图片资源
var xmlPath = Path.Combine(AbsoluteRootDirectory, RelativeAppFilePath, "ConfigFile");
if (System.IO.Directory.Exists(xmlPath))
......@@ -165,6 +165,13 @@ namespace Ftt.PatchPack
valid.AddRange(GetValidPatchFile(xmlPath, "*.xml", SearchOption.TopDirectoryOnly, xmlPath, $"{ExeName}\\ConfigFile", PatchTimeFrame_Xml));
}
var imgPath = Path.Combine(AbsoluteRootDirectory, RelativeAppFilePath, "Image");
if (System.IO.Directory.Exists(imgPath))
{
valid.AddRange(GetValidPatchFile(imgPath, "*.*", SearchOption.TopDirectoryOnly, imgPath, $"{ExeName}\\Image", PatchTimeFrame_Xml));
}
#endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment