*.将打包功能移植到RyProject.cs。
This commit is contained in:
1 parent
59677e1a85
commit
d32f91ab95
11 files changed
+983
-952
No files matched your search
@@ -117,7 +117,7 @@ namespace 开发辅助工具.Tools
|
||||
if (!System.IO.File.Exists(full_path + "\\CHANGELOG.md"))
|
||||
{ ryCommon.RyFiles.WriteAllText(full_path + "\\CHANGELOG.md", "", Encoding.UTF8); }
|
||||
if (!System.IO.File.Exists(full_path + "\\README.md"))
|
||||
{ ryCommon.RyFiles.WriteAllText(full_path + "\\README.md", "", Encoding.UTF8); }
|
||||
{ ryCommon.RyFiles.WriteAllText(full_path + "\\README.md", "# "+ project_name+ "\r\n\r\n#### 介绍\r\n", Encoding.UTF8); }
|
||||
if (!System.IO.File.Exists(full_path + "\\Publish\\Publish.set"))
|
||||
{
|
||||
ryCommon.RyFiles.WriteAllText(full_path + "\\Publish\\Publish.set", "#del表示删除文件;copy表示复制文件;" +
|
||||
@@ -133,39 +133,38 @@ namespace 开发辅助工具.Tools
|
||||
if (!System.IO.File.Exists(full_path + "\\Bin\\混淆_Debug.nrproj"))
|
||||
{
|
||||
List<string> files_debug = new List<string>
|
||||
{
|
||||
"Debug\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
|
||||
"Debug\\"+project_Eng_name+"\\" + "MyDb.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "ryUpdate.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "ryControls.dll"
|
||||
};
|
||||
{
|
||||
"Debug\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
|
||||
"Debug\\"+project_Eng_name+"\\" + "MyDb.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "ryUpdate.dll",
|
||||
"Debug\\"+project_Eng_name+"\\" + "ryControls.dll"
|
||||
};
|
||||
xml.Save(full_path + "\\Bin\\混淆_Debug.nrproj", files_debug);
|
||||
}
|
||||
if (!System.IO.File.Exists(full_path + "\\Bin\\混淆_Release.nrproj"))
|
||||
{
|
||||
List<string> files_Release = new List<string>
|
||||
{
|
||||
"Release\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
|
||||
"Release\\"+project_Eng_name+"\\" + "MyDb.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "ryUpdate.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "ryControls.dll"
|
||||
};
|
||||
{
|
||||
"Release\\"+project_Eng_name+"\\" + project_Eng_name + ".exe",
|
||||
"Release\\"+project_Eng_name+"\\" + "MyDb.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "MyDb_SQLite.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "ryUpdate.dll",
|
||||
"Release\\"+project_Eng_name+"\\" + "ryControls.dll"
|
||||
};
|
||||
xml.Save(full_path + "\\Bin\\混淆_Release.nrproj", files_Release);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#region 设置项目配置文件
|
||||
if (!System.IO.File.Exists(full_path + "\\查看项目.ryp"))
|
||||
{
|
||||
ryCommon.Ini ini = new ryCommon.Ini(full_path + "\\查看项目.ryp");
|
||||
ini.WriteIni("project", "name", project_name);//项目名称
|
||||
ini.WriteIni("project", "engname", project_Eng_name);//英文项目名称
|
||||
ini.WriteIni("project", "usqver", 2.1);//使用的标准版本,新毕方项目标准基于USQ 2.1
|
||||
ini.WriteIni("project", "proglang", prog_lang);//项目使用的语言
|
||||
ini.WriteIni("project", "progID", Guid.NewGuid().ToString("D"));//项目唯一ID,用于区分不同项目
|
||||
}
|
||||
ryCommon.Ini ini = new ryCommon.Ini(full_path + "\\查看项目.ryp");
|
||||
ini.WriteIni("project", "name", project_name);//项目名称
|
||||
ini.WriteIni("project", "engname", project_Eng_name);//英文项目名称
|
||||
ini.WriteIni("project", "usqver", 2.1);//使用的标准版本,新毕方项目标准基于USQ 2.1
|
||||
ini.WriteIni("project", "proglang", prog_lang);//项目使用的语言
|
||||
var guid = ini.ReadIni("project", "progID", Guid.NewGuid().ToString("D"));
|
||||
ini.WriteIni("project", "progID", guid);//项目唯一ID,用于区分不同项目
|
||||
|
||||
if (!System.IO.File.Exists(full_path + "\\.gitignore")) //复制git忽略规则
|
||||
{
|
||||
RyFiles.CopyFile(Application.StartupPath+ "\\SysDb\\.gitignore", full_path + "\\.gitignore");
|
||||
|
||||
@@ -239,95 +239,24 @@ namespace 开发辅助工具.Tools
|
||||
th.Start();
|
||||
void Start()
|
||||
{
|
||||
var com_mode = "Debug";
|
||||
DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
var ds = db.ReadData("select * from Settings where name='Setting'");
|
||||
if (mydb.HaveData(ds))
|
||||
{
|
||||
var row = mydb.GetData(ds);
|
||||
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
|
||||
mStor.SelectNodeBySet();
|
||||
var ReactorPath = mStor.GetAttrValue("ReactorPath");
|
||||
var WinRARPath = mStor.GetAttrValue("WinRARPath");
|
||||
if (WinRARPath == "")
|
||||
{
|
||||
if (System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
|
||||
{
|
||||
WinRARPath = @"C:\Program Files\WinRAR\WinRAR.exe";
|
||||
}
|
||||
}
|
||||
var bf_folder = GetBFFolderPath();
|
||||
if (bf_folder != "")
|
||||
{
|
||||
ryCommon.Ini ini = new Ini(bf_folder + "\\查看项目.ryp");
|
||||
var eng_name = ini.ReadIni("project", "engname");
|
||||
var proglang = ini.ReadIni("project", "proglang");
|
||||
var ouput_folder = bf_folder + "\\Bin\\" + com_mode + "\\" + eng_name;
|
||||
var file_ver = "";
|
||||
if (System.IO.File.Exists(ouput_folder + "\\" + eng_name + ".exe"))
|
||||
{
|
||||
FileVersionInfo fileVerInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(ouput_folder + "\\" + eng_name + ".exe");
|
||||
file_ver = fileVerInfo.ProductVersion;
|
||||
}
|
||||
if (proglang == "c#")
|
||||
{
|
||||
ShowState("正在进行混淆...");
|
||||
if (System.IO.File.Exists(bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj"))
|
||||
{
|
||||
var cmd = Read_Prog(ReactorPath, "-project \"" + bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj\"");
|
||||
}
|
||||
}
|
||||
ShowState("正在清理不重要的缓存...");
|
||||
ryCommon.RyFiles.DeleteFile(ouput_folder + "\\Secure\\*.pdb");
|
||||
ShowState("复制混淆文件到底包目录...");
|
||||
ryCommon.RyFiles.CopyFile(ouput_folder + "\\Secure\\*", bf_folder + "\\Publish\\OriginalFiles\\");
|
||||
#region 复制自定义规则文件到底包目录
|
||||
ShowState("复制自定义规则文件到底包目录...");
|
||||
var Publish = ryCommon.RyFiles.ReadAllLines(bf_folder + "\\Publish\\Publish.set");
|
||||
for (int m = 0; m < Publish.Length; m++)
|
||||
{
|
||||
var line = Publish[m].Trim();
|
||||
if (line == "" || line.IndexOf("#") == 0) { continue; }
|
||||
if (line.IndexOfEx("del:") == 0)
|
||||
{
|
||||
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles\\" + line.Substring(4));
|
||||
}
|
||||
else if (line.IndexOfEx("copy:") == 0)
|
||||
{
|
||||
var from_to = line.Substring(5).Replace("->", "|").Split('|');
|
||||
if (from_to.Length == 2)
|
||||
{
|
||||
var from_path = from_to[0];
|
||||
var to_path = from_to[1];
|
||||
ryCommon.RyFiles.CopyFile(ouput_folder + "\\" + from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
ShowState("正在打包...");
|
||||
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \"" + bf_folder + "\\Publish\\Green\\" + eng_name + ".zip\" \"" + bf_folder + "\\Publish\\OriginalFiles\\\"");
|
||||
RyFiles.CopyFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip", bf_folder + "\\Publish\\Green\\HistoryVer\\" + eng_name + "_" + file_ver + ".zip");
|
||||
ShowState("打包完成...");
|
||||
}
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
void ShowState(string text)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
LblState.Text = "状态:" + text;
|
||||
}));
|
||||
}
|
||||
RyProject project = new RyProject();
|
||||
project.OnStateChanged += Project_OnStateChanged;
|
||||
project.Pack(GetBFFolderPath());
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
BtnBatchZip.Enabled = true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Project_OnStateChanged(object sender, string e)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
LblState.Text = "状态:" + e;
|
||||
}));
|
||||
}
|
||||
|
||||
private void GetVersBySln(string path)
|
||||
{
|
||||
RyProject project = new RyProject();
|
||||
|
||||
+274
-249
@@ -28,254 +28,278 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.BtnCustomMessageBox = new ryControls.ButtonEx();
|
||||
this.BtnCopyCMD = new System.Windows.Forms.Button();
|
||||
this.BtnOpenOutput = new System.Windows.Forms.Button();
|
||||
this.BtnMessageBox = new ryControls.ButtonEx();
|
||||
this.table1 = new XPTable.Models.Table();
|
||||
this.columnModel1 = new XPTable.Models.ColumnModel();
|
||||
this.ColName = new XPTable.Models.TextColumn();
|
||||
this.ColPath = new XPTable.Models.TextColumn();
|
||||
this.ColDes = new XPTable.Models.TextColumn();
|
||||
this.tableModel1 = new XPTable.Models.TableModel();
|
||||
this.BtnClean = new ryControls.ButtonEx();
|
||||
this.BtnBatchZip = new ryControls.ButtonEx();
|
||||
this.LblState = new System.Windows.Forms.Label();
|
||||
this.BtnInsertUpdate = new ryControls.ButtonEx();
|
||||
this.BtnUpdateDll = new ryControls.ButtonEx();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.BtnUpdateVer = new ryControls.ButtonEx();
|
||||
this.BtnUpdateDllVer = new ryControls.ButtonEx();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// BtnCustomMessageBox
|
||||
//
|
||||
this.BtnCustomMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnCustomMessageBox.Location = new System.Drawing.Point(111, 19);
|
||||
this.BtnCustomMessageBox.Name = "BtnCustomMessageBox";
|
||||
this.BtnCustomMessageBox.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnCustomMessageBox.TabIndex = 12;
|
||||
this.BtnCustomMessageBox.Text = "自定义对话框";
|
||||
this.BtnCustomMessageBox.UseVisualStyleBackColor = true;
|
||||
this.BtnCustomMessageBox.Click += new System.EventHandler(this.BtnCustomMessageBox_Click);
|
||||
//
|
||||
// BtnCopyCMD
|
||||
//
|
||||
this.BtnCopyCMD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnCopyCMD.Location = new System.Drawing.Point(775, 12);
|
||||
this.BtnCopyCMD.Name = "BtnCopyCMD";
|
||||
this.BtnCopyCMD.Size = new System.Drawing.Size(142, 38);
|
||||
this.BtnCopyCMD.TabIndex = 11;
|
||||
this.BtnCopyCMD.Text = "设置自动更新版本号";
|
||||
this.BtnCopyCMD.UseVisualStyleBackColor = true;
|
||||
this.BtnCopyCMD.Click += new System.EventHandler(this.BtnCopyCMD_Click);
|
||||
//
|
||||
// BtnOpenOutput
|
||||
//
|
||||
this.BtnOpenOutput.Location = new System.Drawing.Point(12, 12);
|
||||
this.BtnOpenOutput.Name = "BtnOpenOutput";
|
||||
this.BtnOpenOutput.Size = new System.Drawing.Size(142, 38);
|
||||
this.BtnOpenOutput.TabIndex = 9;
|
||||
this.BtnOpenOutput.Text = "打开输出文件夹";
|
||||
this.BtnOpenOutput.UseVisualStyleBackColor = true;
|
||||
this.BtnOpenOutput.Click += new System.EventHandler(this.BtnOpenOutput_Click);
|
||||
//
|
||||
// BtnMessageBox
|
||||
//
|
||||
this.BtnMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnMessageBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.BtnMessageBox.Name = "BtnMessageBox";
|
||||
this.BtnMessageBox.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnMessageBox.TabIndex = 8;
|
||||
this.BtnMessageBox.Text = "对话框代码";
|
||||
this.BtnMessageBox.UseVisualStyleBackColor = true;
|
||||
this.BtnMessageBox.Click += new System.EventHandler(this.BtnMessageBox_Click);
|
||||
//
|
||||
// table1
|
||||
//
|
||||
this.table1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.table1.ColumnModel = this.columnModel1;
|
||||
this.table1.EnableToolTips = true;
|
||||
this.table1.FullRowSelect = true;
|
||||
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.table1.Location = new System.Drawing.Point(12, 208);
|
||||
this.table1.Name = "table1";
|
||||
this.table1.NoItemsText = "当前列表没有任何项";
|
||||
this.table1.Size = new System.Drawing.Size(905, 296);
|
||||
this.table1.TabIndex = 20;
|
||||
this.table1.TableModel = this.tableModel1;
|
||||
this.table1.Text = "table1";
|
||||
this.table1.DoubleClick += new System.EventHandler(this.table1_DoubleClick);
|
||||
//
|
||||
// columnModel1
|
||||
//
|
||||
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
|
||||
this.ColName,
|
||||
this.ColPath,
|
||||
this.ColDes});
|
||||
//
|
||||
// ColName
|
||||
//
|
||||
this.ColName.Editable = false;
|
||||
this.ColName.Tag = null;
|
||||
this.ColName.Text = "名称";
|
||||
this.ColName.Width = 150;
|
||||
//
|
||||
// ColPath
|
||||
//
|
||||
this.ColPath.Editable = false;
|
||||
this.ColPath.Tag = null;
|
||||
this.ColPath.Text = "路径";
|
||||
this.ColPath.Width = 200;
|
||||
//
|
||||
// ColDes
|
||||
//
|
||||
this.ColDes.Editable = false;
|
||||
this.ColDes.Tag = null;
|
||||
this.ColDes.Text = "备注";
|
||||
this.ColDes.Width = 400;
|
||||
//
|
||||
// BtnClean
|
||||
//
|
||||
this.BtnClean.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnClean.Location = new System.Drawing.Point(216, 20);
|
||||
this.BtnClean.Name = "BtnClean";
|
||||
this.BtnClean.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnClean.TabIndex = 22;
|
||||
this.BtnClean.Text = "清理垃圾";
|
||||
this.toolTip1.SetToolTip(this.BtnClean, "清理debug目录下的pdb、dcu文件");
|
||||
this.BtnClean.UseVisualStyleBackColor = true;
|
||||
this.BtnClean.Click += new System.EventHandler(this.BtnClean_Click);
|
||||
//
|
||||
// BtnBatchZip
|
||||
//
|
||||
this.BtnBatchZip.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnBatchZip.Location = new System.Drawing.Point(531, 20);
|
||||
this.BtnBatchZip.Name = "BtnBatchZip";
|
||||
this.BtnBatchZip.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnBatchZip.TabIndex = 23;
|
||||
this.BtnBatchZip.Text = "一键打包";
|
||||
this.toolTip1.SetToolTip(this.BtnBatchZip, "一键混淆并打包当前项目生成的文件。");
|
||||
this.BtnBatchZip.UseVisualStyleBackColor = true;
|
||||
this.BtnBatchZip.Click += new System.EventHandler(this.BtnBatchZip_Click);
|
||||
//
|
||||
// LblState
|
||||
//
|
||||
this.LblState.AutoSize = true;
|
||||
this.LblState.Location = new System.Drawing.Point(10, 190);
|
||||
this.LblState.Name = "LblState";
|
||||
this.LblState.Size = new System.Drawing.Size(83, 12);
|
||||
this.LblState.TabIndex = 24;
|
||||
this.LblState.Text = "状态:准备就绪";
|
||||
//
|
||||
// BtnInsertUpdate
|
||||
//
|
||||
this.BtnInsertUpdate.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnInsertUpdate.Location = new System.Drawing.Point(321, 20);
|
||||
this.BtnInsertUpdate.Name = "BtnInsertUpdate";
|
||||
this.BtnInsertUpdate.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnInsertUpdate.TabIndex = 25;
|
||||
this.BtnInsertUpdate.Text = "插入更新日志";
|
||||
this.toolTip1.SetToolTip(this.BtnInsertUpdate, "将当前版本加入更新日志");
|
||||
this.BtnInsertUpdate.UseVisualStyleBackColor = true;
|
||||
this.BtnInsertUpdate.Click += new System.EventHandler(this.BtnInsertUpdate_Click);
|
||||
//
|
||||
// BtnUpdateDll
|
||||
//
|
||||
this.BtnUpdateDll.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnUpdateDll.Location = new System.Drawing.Point(6, 20);
|
||||
this.BtnUpdateDll.Name = "BtnUpdateDll";
|
||||
this.BtnUpdateDll.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateDll.TabIndex = 26;
|
||||
this.BtnUpdateDll.Text = "更新引用dll";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateDll, "将当前输出文件夹里的dll文件更新到最新版\r\n将当前项目文件里的引用dll位置修改至输出目录。");
|
||||
this.BtnUpdateDll.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateDll.Click += new System.EventHandler(this.BtnUpdateDll_Click);
|
||||
//
|
||||
// BtnUpdateVer
|
||||
//
|
||||
this.BtnUpdateVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnUpdateVer.Location = new System.Drawing.Point(426, 20);
|
||||
this.BtnUpdateVer.Name = "BtnUpdateVer";
|
||||
this.BtnUpdateVer.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateVer.TabIndex = 27;
|
||||
this.BtnUpdateVer.Text = "更新版本号";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateVer, "每点一次自动更新一下版本号。");
|
||||
this.BtnUpdateVer.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateVer.Click += new System.EventHandler(this.BtnUpdateVer_Click);
|
||||
//
|
||||
// BtnUpdateDllVer
|
||||
//
|
||||
this.BtnUpdateDllVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnUpdateDllVer.Location = new System.Drawing.Point(111, 20);
|
||||
this.BtnUpdateDllVer.Name = "BtnUpdateDllVer";
|
||||
this.BtnUpdateDllVer.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateDllVer.TabIndex = 29;
|
||||
this.BtnUpdateDllVer.Text = "更新dll版本";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateDllVer, "将当前输出文件夹里的dll文件更新到最新版");
|
||||
this.BtnUpdateDllVer.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateDllVer.Click += new System.EventHandler(this.BtnUpdateDllVer_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateVer);
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateDll);
|
||||
this.groupBox1.Controls.Add(this.BtnInsertUpdate);
|
||||
this.groupBox1.Controls.Add(this.BtnBatchZip);
|
||||
this.groupBox1.Controls.Add(this.BtnClean);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 120);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(905, 62);
|
||||
this.groupBox1.TabIndex = 27;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "项目管理";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.BtnMessageBox);
|
||||
this.groupBox2.Controls.Add(this.BtnCustomMessageBox);
|
||||
this.groupBox2.Location = new System.Drawing.Point(12, 56);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(905, 60);
|
||||
this.groupBox2.TabIndex = 28;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "快速代码";
|
||||
//
|
||||
// FrmProject
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(929, 516);
|
||||
this.CloseButton = false;
|
||||
this.CloseButtonVisible = false;
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.LblState);
|
||||
this.Controls.Add(this.table1);
|
||||
this.Controls.Add(this.BtnCopyCMD);
|
||||
this.Controls.Add(this.BtnOpenOutput);
|
||||
this.Name = "FrmProject";
|
||||
this.Text = "项目";
|
||||
this.Load += new System.EventHandler(this.FrmProject_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.BtnCustomMessageBox = new ryControls.ButtonEx();
|
||||
this.BtnCopyCMD = new System.Windows.Forms.Button();
|
||||
this.BtnOpenOutput = new System.Windows.Forms.Button();
|
||||
this.BtnMessageBox = new ryControls.ButtonEx();
|
||||
this.table1 = new XPTable.Models.Table();
|
||||
this.columnModel1 = new XPTable.Models.ColumnModel();
|
||||
this.ColName = new XPTable.Models.TextColumn();
|
||||
this.ColPath = new XPTable.Models.TextColumn();
|
||||
this.ColDes = new XPTable.Models.TextColumn();
|
||||
this.tableModel1 = new XPTable.Models.TableModel();
|
||||
this.BtnClean = new ryControls.ButtonEx();
|
||||
this.BtnBatchZip = new ryControls.ButtonEx();
|
||||
this.LblState = new System.Windows.Forms.Label();
|
||||
this.BtnInsertUpdate = new ryControls.ButtonEx();
|
||||
this.BtnUpdateDll = new ryControls.ButtonEx();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.BtnUpdateVer = new ryControls.ButtonEx();
|
||||
this.BtnUpdateDllVer = new ryControls.ButtonEx();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.BtnRepairFolder = new ryControls.ButtonEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// BtnCustomMessageBox
|
||||
//
|
||||
this.BtnCustomMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnCustomMessageBox.Location = new System.Drawing.Point(111, 19);
|
||||
this.BtnCustomMessageBox.Name = "BtnCustomMessageBox";
|
||||
this.BtnCustomMessageBox.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnCustomMessageBox.TabIndex = 12;
|
||||
this.BtnCustomMessageBox.Text = "自定义对话框";
|
||||
this.BtnCustomMessageBox.UseVisualStyleBackColor = true;
|
||||
this.BtnCustomMessageBox.Click += new System.EventHandler(this.BtnCustomMessageBox_Click);
|
||||
//
|
||||
// BtnCopyCMD
|
||||
//
|
||||
this.BtnCopyCMD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnCopyCMD.Location = new System.Drawing.Point(775, 12);
|
||||
this.BtnCopyCMD.Name = "BtnCopyCMD";
|
||||
this.BtnCopyCMD.Size = new System.Drawing.Size(142, 38);
|
||||
this.BtnCopyCMD.TabIndex = 11;
|
||||
this.BtnCopyCMD.Text = "设置自动更新版本号";
|
||||
this.BtnCopyCMD.UseVisualStyleBackColor = true;
|
||||
this.BtnCopyCMD.Click += new System.EventHandler(this.BtnCopyCMD_Click);
|
||||
//
|
||||
// BtnOpenOutput
|
||||
//
|
||||
this.BtnOpenOutput.Location = new System.Drawing.Point(12, 12);
|
||||
this.BtnOpenOutput.Name = "BtnOpenOutput";
|
||||
this.BtnOpenOutput.Size = new System.Drawing.Size(142, 38);
|
||||
this.BtnOpenOutput.TabIndex = 9;
|
||||
this.BtnOpenOutput.Text = "打开输出文件夹";
|
||||
this.BtnOpenOutput.UseVisualStyleBackColor = true;
|
||||
this.BtnOpenOutput.Click += new System.EventHandler(this.BtnOpenOutput_Click);
|
||||
//
|
||||
// BtnMessageBox
|
||||
//
|
||||
this.BtnMessageBox.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnMessageBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.BtnMessageBox.Name = "BtnMessageBox";
|
||||
this.BtnMessageBox.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnMessageBox.TabIndex = 8;
|
||||
this.BtnMessageBox.Text = "对话框代码";
|
||||
this.BtnMessageBox.UseVisualStyleBackColor = true;
|
||||
this.BtnMessageBox.Click += new System.EventHandler(this.BtnMessageBox_Click);
|
||||
//
|
||||
// table1
|
||||
//
|
||||
this.table1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.table1.ColumnModel = this.columnModel1;
|
||||
this.table1.EnableToolTips = true;
|
||||
this.table1.FullRowSelect = true;
|
||||
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.table1.Location = new System.Drawing.Point(12, 208);
|
||||
this.table1.Name = "table1";
|
||||
this.table1.NoItemsText = "当前列表没有任何项";
|
||||
this.table1.Size = new System.Drawing.Size(905, 296);
|
||||
this.table1.TabIndex = 20;
|
||||
this.table1.TableModel = this.tableModel1;
|
||||
this.table1.Text = "table1";
|
||||
this.table1.DoubleClick += new System.EventHandler(this.table1_DoubleClick);
|
||||
//
|
||||
// columnModel1
|
||||
//
|
||||
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
|
||||
this.ColName,
|
||||
this.ColPath,
|
||||
this.ColDes});
|
||||
//
|
||||
// ColName
|
||||
//
|
||||
this.ColName.Editable = false;
|
||||
this.ColName.Tag = null;
|
||||
this.ColName.Text = "名称";
|
||||
this.ColName.Width = 150;
|
||||
//
|
||||
// ColPath
|
||||
//
|
||||
this.ColPath.Editable = false;
|
||||
this.ColPath.Tag = null;
|
||||
this.ColPath.Text = "路径";
|
||||
this.ColPath.Width = 200;
|
||||
//
|
||||
// ColDes
|
||||
//
|
||||
this.ColDes.Editable = false;
|
||||
this.ColDes.Tag = null;
|
||||
this.ColDes.Text = "备注";
|
||||
this.ColDes.Width = 400;
|
||||
//
|
||||
// BtnClean
|
||||
//
|
||||
this.BtnClean.BaseColor = System.Drawing.Color.Green;
|
||||
this.BtnClean.ColorGradient = true;
|
||||
this.BtnClean.Location = new System.Drawing.Point(216, 20);
|
||||
this.BtnClean.Name = "BtnClean";
|
||||
this.BtnClean.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnClean.TabIndex = 22;
|
||||
this.BtnClean.Text = "清理垃圾";
|
||||
this.toolTip1.SetToolTip(this.BtnClean, "清理debug目录下的pdb、dcu文件");
|
||||
this.BtnClean.UseDefSkin = false;
|
||||
this.BtnClean.UseVisualStyleBackColor = true;
|
||||
this.BtnClean.Click += new System.EventHandler(this.BtnClean_Click);
|
||||
//
|
||||
// BtnBatchZip
|
||||
//
|
||||
this.BtnBatchZip.BaseColor = System.Drawing.Color.Navy;
|
||||
this.BtnBatchZip.ColorGradient = true;
|
||||
this.BtnBatchZip.Location = new System.Drawing.Point(648, 20);
|
||||
this.BtnBatchZip.Name = "BtnBatchZip";
|
||||
this.BtnBatchZip.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnBatchZip.TabIndex = 23;
|
||||
this.BtnBatchZip.Text = "一键打包";
|
||||
this.toolTip1.SetToolTip(this.BtnBatchZip, "一键混淆并打包当前项目生成的文件。");
|
||||
this.BtnBatchZip.UseDefSkin = false;
|
||||
this.BtnBatchZip.UseVisualStyleBackColor = true;
|
||||
this.BtnBatchZip.Click += new System.EventHandler(this.BtnBatchZip_Click);
|
||||
//
|
||||
// LblState
|
||||
//
|
||||
this.LblState.AutoSize = true;
|
||||
this.LblState.Location = new System.Drawing.Point(10, 190);
|
||||
this.LblState.Name = "LblState";
|
||||
this.LblState.Size = new System.Drawing.Size(83, 12);
|
||||
this.LblState.TabIndex = 24;
|
||||
this.LblState.Text = "状态:准备就绪";
|
||||
//
|
||||
// BtnInsertUpdate
|
||||
//
|
||||
this.BtnInsertUpdate.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnInsertUpdate.Location = new System.Drawing.Point(321, 20);
|
||||
this.BtnInsertUpdate.Name = "BtnInsertUpdate";
|
||||
this.BtnInsertUpdate.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnInsertUpdate.TabIndex = 25;
|
||||
this.BtnInsertUpdate.Text = "插入更新日志";
|
||||
this.toolTip1.SetToolTip(this.BtnInsertUpdate, "将当前版本加入更新日志");
|
||||
this.BtnInsertUpdate.UseVisualStyleBackColor = true;
|
||||
this.BtnInsertUpdate.Click += new System.EventHandler(this.BtnInsertUpdate_Click);
|
||||
//
|
||||
// BtnUpdateDll
|
||||
//
|
||||
this.BtnUpdateDll.BaseColor = System.Drawing.Color.Green;
|
||||
this.BtnUpdateDll.ColorGradient = true;
|
||||
this.BtnUpdateDll.Location = new System.Drawing.Point(6, 20);
|
||||
this.BtnUpdateDll.Name = "BtnUpdateDll";
|
||||
this.BtnUpdateDll.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateDll.TabIndex = 26;
|
||||
this.BtnUpdateDll.Text = "更新引用dll";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateDll, "将当前输出文件夹里的dll文件更新到最新版\r\n将当前项目文件里的引用dll位置修改至输出目录。");
|
||||
this.BtnUpdateDll.UseDefSkin = false;
|
||||
this.BtnUpdateDll.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateDll.Click += new System.EventHandler(this.BtnUpdateDll_Click);
|
||||
//
|
||||
// BtnUpdateVer
|
||||
//
|
||||
this.BtnUpdateVer.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.BtnUpdateVer.ColorGradient = true;
|
||||
this.BtnUpdateVer.Location = new System.Drawing.Point(426, 20);
|
||||
this.BtnUpdateVer.Name = "BtnUpdateVer";
|
||||
this.BtnUpdateVer.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateVer.TabIndex = 27;
|
||||
this.BtnUpdateVer.Text = "更新版本号";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateVer, "每点一次自动更新一下版本号。");
|
||||
this.BtnUpdateVer.UseDefSkin = false;
|
||||
this.BtnUpdateVer.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateVer.Click += new System.EventHandler(this.BtnUpdateVer_Click);
|
||||
//
|
||||
// BtnUpdateDllVer
|
||||
//
|
||||
this.BtnUpdateDllVer.BaseColor = System.Drawing.Color.Green;
|
||||
this.BtnUpdateDllVer.ColorGradient = true;
|
||||
this.BtnUpdateDllVer.Location = new System.Drawing.Point(111, 20);
|
||||
this.BtnUpdateDllVer.Name = "BtnUpdateDllVer";
|
||||
this.BtnUpdateDllVer.Size = new System.Drawing.Size(99, 34);
|
||||
this.BtnUpdateDllVer.TabIndex = 29;
|
||||
this.BtnUpdateDllVer.Text = "更新dll版本";
|
||||
this.toolTip1.SetToolTip(this.BtnUpdateDllVer, "将当前输出文件夹里的dll文件更新到最新版");
|
||||
this.BtnUpdateDllVer.UseDefSkin = false;
|
||||
this.BtnUpdateDllVer.UseVisualStyleBackColor = true;
|
||||
this.BtnUpdateDllVer.Click += new System.EventHandler(this.BtnUpdateDllVer_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.BtnRepairFolder);
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateVer);
|
||||
this.groupBox1.Controls.Add(this.BtnUpdateDll);
|
||||
this.groupBox1.Controls.Add(this.BtnInsertUpdate);
|
||||
this.groupBox1.Controls.Add(this.BtnBatchZip);
|
||||
this.groupBox1.Controls.Add(this.BtnClean);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 120);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(905, 62);
|
||||
this.groupBox1.TabIndex = 27;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "项目管理";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.BtnMessageBox);
|
||||
this.groupBox2.Controls.Add(this.BtnCustomMessageBox);
|
||||
this.groupBox2.Location = new System.Drawing.Point(12, 56);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(905, 60);
|
||||
this.groupBox2.TabIndex = 28;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "快速代码";
|
||||
//
|
||||
// BtnRepairFolder
|
||||
//
|
||||
this.BtnRepairFolder.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnRepairFolder.Location = new System.Drawing.Point(531, 20);
|
||||
this.BtnRepairFolder.Name = "BtnRepairFolder";
|
||||
this.BtnRepairFolder.Size = new System.Drawing.Size(111, 34);
|
||||
this.BtnRepairFolder.TabIndex = 30;
|
||||
this.BtnRepairFolder.Text = "修复毕方文件结构";
|
||||
this.toolTip1.SetToolTip(this.BtnRepairFolder, "将当前毕方项目中缺失的一些文件和文件夹进行重新创建。");
|
||||
this.BtnRepairFolder.UseVisualStyleBackColor = true;
|
||||
this.BtnRepairFolder.Click += new System.EventHandler(this.BtnRepairFolder_Click);
|
||||
//
|
||||
// FrmProject
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(929, 516);
|
||||
this.CloseButton = false;
|
||||
this.CloseButtonVisible = false;
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.LblState);
|
||||
this.Controls.Add(this.table1);
|
||||
this.Controls.Add(this.BtnCopyCMD);
|
||||
this.Controls.Add(this.BtnOpenOutput);
|
||||
this.Name = "FrmProject";
|
||||
this.Text = "项目";
|
||||
this.Load += new System.EventHandler(this.FrmProject_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -299,6 +323,7 @@
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private ryControls.ButtonEx BtnUpdateVer;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private ryControls.ButtonEx BtnUpdateDllVer;
|
||||
private ryControls.ButtonEx BtnUpdateDllVer;
|
||||
private ryControls.ButtonEx BtnRepairFolder;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,8 @@ namespace 开发辅助工具.Tools
|
||||
}
|
||||
private string GetDebugPath()
|
||||
{
|
||||
if (_ProjectPath == "") { return ""; }
|
||||
if (_ProjectPath.Length==0) { return ""; }
|
||||
if (!System.IO.File.Exists(_ProjectPath)) { return ""; }
|
||||
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
|
||||
xml.Load(_ProjectPath);
|
||||
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
|
||||
@@ -359,96 +360,22 @@ namespace 开发辅助工具.Tools
|
||||
th.Start();
|
||||
void Start()
|
||||
{
|
||||
var com_mode = "Debug";
|
||||
DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
{
|
||||
var ds = db.ReadData("select * from Settings where name='Setting'");
|
||||
if (mydb.HaveData(ds))
|
||||
{
|
||||
var row = mydb.GetData(ds);
|
||||
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
|
||||
mStor.SelectNodeBySet();
|
||||
var ReactorPath = mStor.GetAttrValue("ReactorPath");
|
||||
var WinRARPath = mStor.GetAttrValue("WinRARPath");
|
||||
if (WinRARPath == "")
|
||||
{
|
||||
if (System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
|
||||
{
|
||||
WinRARPath = @"C:\Program Files\WinRAR\WinRAR.exe";
|
||||
}
|
||||
}
|
||||
var bf_folder = GetBFFolderPath();
|
||||
if (bf_folder != "")
|
||||
{
|
||||
ryCommon.Ini ini = new Ini(bf_folder+ "\\查看项目.ryp");
|
||||
var eng_name = ini.ReadIni("project", "engname");
|
||||
var proglang= ini.ReadIni("project", "proglang");
|
||||
var ouput_folder = bf_folder + "\\Bin\\" + com_mode + "\\" + eng_name;
|
||||
var file_ver = "";
|
||||
if (System.IO.File.Exists(ouput_folder + "\\" + eng_name + ".exe"))
|
||||
{
|
||||
FileVersionInfo fileVerInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(ouput_folder + "\\" + eng_name + ".exe");
|
||||
file_ver = fileVerInfo.ProductVersion;
|
||||
}
|
||||
if (proglang == "c#")
|
||||
{
|
||||
ShowState("正在进行混淆...");
|
||||
if (System.IO.File.Exists(bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj"))
|
||||
{
|
||||
var cmd = Read_Prog(ReactorPath, "-project \"" + bf_folder + "\\Bin\\混淆_" + com_mode + ".nrproj\"");
|
||||
MessageBox.Show(cmd, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
ShowState("正在清理不重要的缓存...");
|
||||
ryCommon.RyFiles.DeleteFile(ouput_folder + "\\Secure\\*.pdb");
|
||||
ShowState("复制混淆文件到底包目录...");
|
||||
ryCommon.RyFiles.CopyFile(ouput_folder + "\\Secure\\*", bf_folder + "\\Publish\\OriginalFiles\\");
|
||||
#region 复制自定义规则文件到底包目录
|
||||
ShowState("复制自定义规则文件到底包目录...");
|
||||
var Publish = ryCommon.RyFiles.ReadAllLines(bf_folder + "\\Publish\\Publish.set");
|
||||
for (int m = 0; m < Publish.Length; m++)
|
||||
{
|
||||
var line = Publish[m].Trim();
|
||||
if (line == "" || line.IndexOf("#") == 0) { continue; }
|
||||
if (line.IndexOfEx("del:") == 0)
|
||||
{
|
||||
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles\\" + line.Substring(4));
|
||||
}
|
||||
else if (line.IndexOfEx("copy:") == 0)
|
||||
{
|
||||
var from_to = line.Substring(5).Replace("->", "|").Split('|');
|
||||
if (from_to.Length == 2)
|
||||
{
|
||||
var from_path = from_to[0];
|
||||
var to_path = from_to[1];
|
||||
ryCommon.RyFiles.CopyFile(ouput_folder + "\\"+ from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
ShowState("正在打包...");
|
||||
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \""+ bf_folder + "\\Publish\\Green\\"+ eng_name + ".zip\" \""+ bf_folder + "\\Publish\\OriginalFiles\\\"");
|
||||
RyFiles.CopyFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip", bf_folder + "\\Publish\\Green\\HistoryVer\\" + eng_name + "_"+file_ver+".zip");
|
||||
ShowState("打包完成...");
|
||||
}
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
void ShowState(string text)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
LblState.Text = "状态:" + text;
|
||||
}));
|
||||
}
|
||||
RyProject project = new RyProject();
|
||||
project.OnStateChanged += Project_OnStateChanged;
|
||||
project.Pack(GetBFFolderPath());
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
BtnBatchZip.Enabled = true;
|
||||
BtnBatchZip.Enabled = true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
private void Project_OnStateChanged(object sender, string e)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
LblState.Text = "状态:" + e;
|
||||
}));
|
||||
}
|
||||
private void GetVersBySln(string path)
|
||||
{
|
||||
var _bf_path = GetBFFolderPath();
|
||||
@@ -491,7 +418,7 @@ namespace 开发辅助工具.Tools
|
||||
private void BtnInsertUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
var _path = GetBFFolderPath();
|
||||
if (_path != "")
|
||||
if (_path.Length>0)
|
||||
{
|
||||
var files = System.IO.Directory.GetFiles(_path+"\\Source");
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
@@ -587,6 +514,26 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
MessageBox.Show("更新dll完成,共失败" + error + "项。\r\n\r\n"+ _error_str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnRepairFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
var _path = GetBFFolderPath();
|
||||
if (_path.Length > 0)
|
||||
{
|
||||
if (!System.IO.File.Exists(_path + "\\CHANGELOG.md"))
|
||||
{
|
||||
BtnInsertUpdate.PerformClick();
|
||||
}
|
||||
ryCommon.Ini ini = new Ini(_path + "\\查看项目.ryp");
|
||||
FrmCreateProject frm = new FrmCreateProject();
|
||||
frm.TxtFolder.Text = _path;
|
||||
frm.ChkUnCreateProject.Checked = true;
|
||||
frm.TxtProjectEngName.Text = ini.ReadIni("project", "engname");
|
||||
frm.TxtProjectName.Text = ini.ReadIni("project", "name");
|
||||
frm.StartPosition = FormStartPosition.CenterParent;
|
||||
frm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+134
-128
@@ -1,129 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>158, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>285, 17</value>
|
||||
</metadata>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>158, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>285, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>285, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>285, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in new issue
Block a user