修改发布软件

Test.EIImageViewer
hang 2023-05-18 09:43:34 +08:00
parent 3047ce7ab7
commit 97644addef
4 changed files with 293 additions and 269 deletions

View File

@ -36,6 +36,26 @@
groupBox3 = new GroupBox();
logTBox = new RichTextBox();
tabControl1 = new TabControl();
tabPage2 = new TabPage();
groupBox7 = new GroupBox();
backExePath = new TextBox();
bakConfigSaveBtn = new Button();
label3 = new Label();
startBakBtn = new Button();
backPathTBox = new TextBox();
label4 = new Label();
label5 = new Label();
bakDbName = new TextBox();
groupBox6 = new GroupBox();
sshNetCorePublishBtn2 = new Button();
selectPublishFolderPathBtn = new Button();
label8 = new Label();
publishFolderTBox = new TextBox();
sshNetCorePublishBtn = new Button();
sshVuePublishBtn = new Button();
selectPublishFilePathBtn = new Button();
publishFileTBox = new TextBox();
label7 = new Label();
tabPage1 = new TabPage();
groupBox4 = new GroupBox();
serviceConfigSaveBtn = new Button();
@ -57,25 +77,6 @@
startServiceBtn = new Button();
label2 = new Label();
startOrStopServiceTbox = new TextBox();
tabPage2 = new TabPage();
groupBox6 = new GroupBox();
sshNetCorePublishBtn2 = new Button();
selectPublishFolderPathBtn = new Button();
label8 = new Label();
publishFolderTBox = new TextBox();
sshNetCorePublishBtn = new Button();
sshVuePublishBtn = new Button();
selectPublishFilePathBtn = new Button();
publishFileTBox = new TextBox();
label7 = new Label();
bakConfigSaveBtn = new Button();
startBakBtn = new Button();
backExePath = new TextBox();
label5 = new Label();
bakDbName = new TextBox();
label4 = new Label();
backPathTBox = new TextBox();
label3 = new Label();
groupBox5 = new GroupBox();
netCorePublishBtn = new Button();
vuePublishBtn = new Button();
@ -85,11 +86,12 @@
groupBox1.SuspendLayout();
groupBox3.SuspendLayout();
tabControl1.SuspendLayout();
tabPage2.SuspendLayout();
groupBox7.SuspendLayout();
groupBox6.SuspendLayout();
tabPage1.SuspendLayout();
groupBox4.SuspendLayout();
groupBox2.SuspendLayout();
tabPage2.SuspendLayout();
groupBox6.SuspendLayout();
groupBox5.SuspendLayout();
SuspendLayout();
//
@ -99,9 +101,10 @@
groupBox1.Controls.Add(rb_Verify);
groupBox1.Controls.Add(rb_test);
groupBox1.Controls.Add(rb_local);
groupBox1.Location = new Point(12, 175);
groupBox1.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
groupBox1.Location = new Point(12, 147);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(796, 116);
groupBox1.Size = new Size(694, 116);
groupBox1.TabIndex = 1;
groupBox1.TabStop = false;
groupBox1.Text = "环境(服务的操作,备份操作作用的主机)";
@ -111,7 +114,7 @@
rb_production.AutoSize = true;
rb_production.Location = new Point(434, 53);
rb_production.Name = "rb_production";
rb_production.Size = new Size(50, 21);
rb_production.Size = new Size(55, 24);
rb_production.TabIndex = 3;
rb_production.Text = "正式";
rb_production.UseVisualStyleBackColor = true;
@ -122,7 +125,7 @@
rb_Verify.AutoSize = true;
rb_Verify.Location = new Point(300, 53);
rb_Verify.Name = "rb_Verify";
rb_Verify.Size = new Size(50, 21);
rb_Verify.Size = new Size(55, 24);
rb_Verify.TabIndex = 2;
rb_Verify.Text = "验证";
rb_Verify.UseVisualStyleBackColor = true;
@ -133,7 +136,7 @@
rb_test.AutoSize = true;
rb_test.Location = new Point(164, 53);
rb_test.Name = "rb_test";
rb_test.Size = new Size(50, 21);
rb_test.Size = new Size(55, 24);
rb_test.TabIndex = 1;
rb_test.Text = "测试";
rb_test.UseVisualStyleBackColor = true;
@ -145,7 +148,7 @@
rb_local.Checked = true;
rb_local.Location = new Point(24, 53);
rb_local.Name = "rb_local";
rb_local.Size = new Size(50, 21);
rb_local.Size = new Size(55, 24);
rb_local.TabIndex = 0;
rb_local.TabStop = true;
rb_local.Text = "本机";
@ -155,9 +158,10 @@
// groupBox3
//
groupBox3.Controls.Add(logTBox);
groupBox3.Location = new Point(844, 24);
groupBox3.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
groupBox3.Location = new Point(712, 12);
groupBox3.Name = "groupBox3";
groupBox3.Size = new Size(621, 1048);
groupBox3.Size = new Size(621, 1059);
groupBox3.TabIndex = 3;
groupBox3.TabStop = false;
groupBox3.Text = "日志";
@ -166,7 +170,7 @@
//
logTBox.Location = new Point(23, 21);
logTBox.Name = "logTBox";
logTBox.Size = new Size(577, 1013);
logTBox.Size = new Size(577, 1021);
logTBox.TabIndex = 1;
logTBox.Text = "";
//
@ -174,20 +178,221 @@
//
tabControl1.Controls.Add(tabPage2);
tabControl1.Controls.Add(tabPage1);
tabControl1.Location = new Point(12, 318);
tabControl1.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
tabControl1.Location = new Point(12, 266);
tabControl1.Name = "tabControl1";
tabControl1.SelectedIndex = 0;
tabControl1.Size = new Size(796, 764);
tabControl1.Size = new Size(694, 791);
tabControl1.TabIndex = 2;
//
// tabPage2
//
tabPage2.Controls.Add(groupBox7);
tabPage2.Controls.Add(groupBox6);
tabPage2.Location = new Point(4, 29);
tabPage2.Name = "tabPage2";
tabPage2.Padding = new Padding(3);
tabPage2.Size = new Size(686, 758);
tabPage2.TabIndex = 1;
tabPage2.Text = "备份与发布";
tabPage2.UseVisualStyleBackColor = true;
//
// groupBox7
//
groupBox7.BackColor = Color.Transparent;
groupBox7.Controls.Add(backExePath);
groupBox7.Controls.Add(bakConfigSaveBtn);
groupBox7.Controls.Add(label3);
groupBox7.Controls.Add(startBakBtn);
groupBox7.Controls.Add(backPathTBox);
groupBox7.Controls.Add(label4);
groupBox7.Controls.Add(label5);
groupBox7.Controls.Add(bakDbName);
groupBox7.ForeColor = SystemColors.InactiveCaptionText;
groupBox7.Location = new Point(3, 6);
groupBox7.Name = "groupBox7";
groupBox7.Size = new Size(677, 280);
groupBox7.TabIndex = 44;
groupBox7.TabStop = false;
groupBox7.Text = "后端备份";
//
// backExePath
//
backExePath.Enabled = false;
backExePath.Location = new Point(200, 81);
backExePath.Name = "backExePath";
backExePath.Size = new Size(464, 25);
backExePath.TabIndex = 5;
//
// bakConfigSaveBtn
//
bakConfigSaveBtn.Location = new Point(124, 194);
bakConfigSaveBtn.Name = "bakConfigSaveBtn";
bakConfigSaveBtn.Size = new Size(128, 40);
bakConfigSaveBtn.TabIndex = 42;
bakConfigSaveBtn.Text = "备份配置保存";
bakConfigSaveBtn.UseVisualStyleBackColor = true;
bakConfigSaveBtn.Click += bakConfigSaveBtn_Click;
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(7, 134);
label3.Name = "label3";
label3.Size = new Size(191, 20);
label3.TabIndex = 0;
label3.Text = "后端数据库和程序备份根路径";
//
// startBakBtn
//
startBakBtn.Location = new Point(378, 194);
startBakBtn.Name = "startBakBtn";
startBakBtn.Size = new Size(128, 40);
startBakBtn.TabIndex = 6;
startBakBtn.Text = "开始备份";
startBakBtn.UseVisualStyleBackColor = true;
startBakBtn.Click += startBakBtn_Click;
//
// backPathTBox
//
backPathTBox.Location = new Point(200, 131);
backPathTBox.Name = "backPathTBox";
backPathTBox.Size = new Size(464, 25);
backPathTBox.TabIndex = 1;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(79, 41);
label4.Name = "label4";
label4.Size = new Size(107, 20);
label4.TabIndex = 2;
label4.Text = "被备份数据库名";
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(79, 85);
label5.Name = "label5";
label5.Size = new Size(107, 20);
label5.TabIndex = 4;
label5.Text = "被备份程序路径";
//
// bakDbName
//
bakDbName.Location = new Point(200, 36);
bakDbName.Name = "bakDbName";
bakDbName.Size = new Size(464, 25);
bakDbName.TabIndex = 3;
//
// groupBox6
//
groupBox6.Controls.Add(sshNetCorePublishBtn2);
groupBox6.Controls.Add(selectPublishFolderPathBtn);
groupBox6.Controls.Add(label8);
groupBox6.Controls.Add(publishFolderTBox);
groupBox6.Controls.Add(sshNetCorePublishBtn);
groupBox6.Controls.Add(sshVuePublishBtn);
groupBox6.Controls.Add(selectPublishFilePathBtn);
groupBox6.Controls.Add(publishFileTBox);
groupBox6.Controls.Add(label7);
groupBox6.Location = new Point(3, 292);
groupBox6.Name = "groupBox6";
groupBox6.Size = new Size(677, 413);
groupBox6.TabIndex = 43;
groupBox6.TabStop = false;
groupBox6.Text = "上传文件到远程服务器发布";
//
// sshNetCorePublishBtn2
//
sshNetCorePublishBtn2.Location = new Point(378, 367);
sshNetCorePublishBtn2.Name = "sshNetCorePublishBtn2";
sshNetCorePublishBtn2.Size = new Size(128, 40);
sshNetCorePublishBtn2.TabIndex = 52;
sshNetCorePublishBtn2.Text = "发布后端";
sshNetCorePublishBtn2.UseVisualStyleBackColor = true;
sshNetCorePublishBtn2.Click += sshNetCorePublishBtn2_Click;
//
// selectPublishFolderPathBtn
//
selectPublishFolderPathBtn.Location = new Point(529, 282);
selectPublishFolderPathBtn.Name = "selectPublishFolderPathBtn";
selectPublishFolderPathBtn.Size = new Size(95, 27);
selectPublishFolderPathBtn.TabIndex = 51;
selectPublishFolderPathBtn.Text = "选择";
selectPublishFolderPathBtn.UseVisualStyleBackColor = true;
selectPublishFolderPathBtn.Click += selectPublishFolderPathBtn_Click;
//
// label8
//
label8.AutoSize = true;
label8.Location = new Point(9, 243);
label8.Name = "label8";
label8.Size = new Size(447, 20);
label8.TabIndex = 50;
label8.Text = "方式二: 后端发布程序文件夹(程序自动打成压缩包,上传然后发布)";
//
// publishFolderTBox
//
publishFolderTBox.Location = new Point(79, 282);
publishFolderTBox.Name = "publishFolderTBox";
publishFolderTBox.Size = new Size(427, 25);
publishFolderTBox.TabIndex = 49;
//
// sshNetCorePublishBtn
//
sshNetCorePublishBtn.Location = new Point(378, 166);
sshNetCorePublishBtn.Name = "sshNetCorePublishBtn";
sshNetCorePublishBtn.Size = new Size(128, 40);
sshNetCorePublishBtn.TabIndex = 48;
sshNetCorePublishBtn.Text = "发布后端";
sshNetCorePublishBtn.UseVisualStyleBackColor = true;
sshNetCorePublishBtn.Click += sshNetCorePublishBtn_Click;
//
// sshVuePublishBtn
//
sshVuePublishBtn.Location = new Point(124, 166);
sshVuePublishBtn.Name = "sshVuePublishBtn";
sshVuePublishBtn.Size = new Size(128, 40);
sshVuePublishBtn.TabIndex = 47;
sshVuePublishBtn.Text = "发布前端";
sshVuePublishBtn.UseVisualStyleBackColor = true;
sshVuePublishBtn.Click += sshVuePublishBtn_Click;
//
// selectPublishFilePathBtn
//
selectPublishFilePathBtn.Location = new Point(529, 94);
selectPublishFilePathBtn.Name = "selectPublishFilePathBtn";
selectPublishFilePathBtn.Size = new Size(95, 27);
selectPublishFilePathBtn.TabIndex = 46;
selectPublishFilePathBtn.Text = "选择";
selectPublishFilePathBtn.UseVisualStyleBackColor = true;
selectPublishFilePathBtn.Click += selectPublishFilePathBtn_Click;
//
// publishFileTBox
//
publishFileTBox.Location = new Point(79, 98);
publishFileTBox.Name = "publishFileTBox";
publishFileTBox.Size = new Size(427, 25);
publishFileTBox.TabIndex = 45;
//
// label7
//
label7.AutoSize = true;
label7.Location = new Point(7, 63);
label7.Name = "label7";
label7.Size = new Size(428, 20);
label7.TabIndex = 44;
label7.Text = "方式一: 前端发布选择html | 后端发布选择压缩包 (上传后发布)";
//
// tabPage1
//
tabPage1.Controls.Add(groupBox4);
tabPage1.Controls.Add(groupBox2);
tabPage1.Location = new Point(4, 26);
tabPage1.Location = new Point(4, 29);
tabPage1.Name = "tabPage1";
tabPage1.Padding = new Padding(3);
tabPage1.Size = new Size(788, 734);
tabPage1.Size = new Size(686, 758);
tabPage1.TabIndex = 0;
tabPage1.Text = "服务相关操作";
tabPage1.UseVisualStyleBackColor = true;
@ -208,9 +413,9 @@
groupBox4.Controls.Add(label1);
groupBox4.Controls.Add(exePathTbox);
groupBox4.Controls.Add(selectPathBtn);
groupBox4.Location = new Point(20, 28);
groupBox4.Location = new Point(6, 16);
groupBox4.Name = "groupBox4";
groupBox4.Size = new Size(738, 430);
groupBox4.Size = new Size(660, 439);
groupBox4.TabIndex = 40;
groupBox4.TabStop = false;
groupBox4.Text = "服务创建与删除";
@ -227,9 +432,9 @@
//
// servicePortTBox
//
servicePortTBox.Location = new Point(141, 220);
servicePortTBox.Location = new Point(155, 220);
servicePortTBox.Name = "servicePortTBox";
servicePortTBox.Size = new Size(366, 23);
servicePortTBox.Size = new Size(366, 25);
servicePortTBox.TabIndex = 40;
//
// label6
@ -237,15 +442,15 @@
label6.AutoSize = true;
label6.Location = new Point(47, 226);
label6.Name = "label6";
label6.Size = new Size(80, 17);
label6.Size = new Size(93, 20);
label6.TabIndex = 39;
label6.Text = "服务启动端口";
//
// serviceNameTBox
//
serviceNameTBox.Location = new Point(140, 52);
serviceNameTBox.Location = new Point(154, 52);
serviceNameTBox.Name = "serviceNameTBox";
serviceNameTBox.Size = new Size(366, 23);
serviceNameTBox.Size = new Size(366, 25);
serviceNameTBox.TabIndex = 30;
//
// label10
@ -253,13 +458,13 @@
label10.AutoSize = true;
label10.Location = new Point(23, 55);
label10.Name = "label10";
label10.Size = new Size(104, 17);
label10.Size = new Size(121, 20);
label10.TabIndex = 28;
label10.Text = "网站后端服务名称";
//
// deleteService_Btn
//
deleteService_Btn.Location = new Point(589, 31);
deleteService_Btn.Location = new Point(538, 56);
deleteService_Btn.Name = "deleteService_Btn";
deleteService_Btn.Size = new Size(95, 27);
deleteService_Btn.TabIndex = 38;
@ -272,7 +477,7 @@
label11.AutoSize = true;
label11.Location = new Point(0, 114);
label11.Name = "label11";
label11.Size = new Size(128, 17);
label11.Size = new Size(149, 20);
label11.TabIndex = 29;
label11.Text = "网站后端服务显示名称";
//
@ -288,16 +493,16 @@
//
// serviceDisplayNameTBox
//
serviceDisplayNameTBox.Location = new Point(141, 111);
serviceDisplayNameTBox.Location = new Point(155, 111);
serviceDisplayNameTBox.Name = "serviceDisplayNameTBox";
serviceDisplayNameTBox.Size = new Size(366, 23);
serviceDisplayNameTBox.Size = new Size(366, 25);
serviceDisplayNameTBox.TabIndex = 31;
//
// en_TBox
//
en_TBox.Location = new Point(140, 274);
en_TBox.Location = new Point(154, 274);
en_TBox.Name = "en_TBox";
en_TBox.Size = new Size(366, 23);
en_TBox.Size = new Size(366, 25);
en_TBox.TabIndex = 36;
//
// label9
@ -305,7 +510,7 @@
label9.AutoSize = true;
label9.Location = new Point(47, 172);
label9.Name = "label9";
label9.Size = new Size(80, 17);
label9.Size = new Size(93, 20);
label9.TabIndex = 32;
label9.Text = "程序完整路径";
//
@ -314,20 +519,20 @@
label1.AutoSize = true;
label1.Location = new Point(35, 280);
label1.Name = "label1";
label1.Size = new Size(92, 17);
label1.Size = new Size(107, 20);
label1.TabIndex = 35;
label1.Text = "服务定义环境名";
//
// exePathTbox
//
exePathTbox.Location = new Point(141, 168);
exePathTbox.Location = new Point(155, 168);
exePathTbox.Name = "exePathTbox";
exePathTbox.Size = new Size(366, 23);
exePathTbox.Size = new Size(366, 25);
exePathTbox.TabIndex = 33;
//
// selectPathBtn
//
selectPathBtn.Location = new Point(589, 172);
selectPathBtn.Location = new Point(538, 165);
selectPathBtn.Name = "selectPathBtn";
selectPathBtn.Size = new Size(95, 27);
selectPathBtn.TabIndex = 34;
@ -341,16 +546,16 @@
groupBox2.Controls.Add(startServiceBtn);
groupBox2.Controls.Add(label2);
groupBox2.Controls.Add(startOrStopServiceTbox);
groupBox2.Location = new Point(19, 495);
groupBox2.Location = new Point(6, 484);
groupBox2.Name = "groupBox2";
groupBox2.Size = new Size(739, 219);
groupBox2.Size = new Size(660, 232);
groupBox2.TabIndex = 39;
groupBox2.TabStop = false;
groupBox2.Text = "服务停止与启动";
//
// stopServiceBtn
//
stopServiceBtn.Location = new Point(380, 106);
stopServiceBtn.Location = new Point(380, 115);
stopServiceBtn.Name = "stopServiceBtn";
stopServiceBtn.Size = new Size(128, 40);
stopServiceBtn.TabIndex = 39;
@ -360,7 +565,7 @@
//
// startServiceBtn
//
startServiceBtn.Location = new Point(142, 106);
startServiceBtn.Location = new Point(142, 115);
startServiceBtn.Name = "startServiceBtn";
startServiceBtn.Size = new Size(128, 40);
startServiceBtn.TabIndex = 38;
@ -373,7 +578,7 @@
label2.AutoSize = true;
label2.Location = new Point(60, 57);
label2.Name = "label2";
label2.Size = new Size(56, 17);
label2.Size = new Size(65, 20);
label2.TabIndex = 32;
label2.Text = "服务名称";
//
@ -381,204 +586,17 @@
//
startOrStopServiceTbox.Location = new Point(141, 54);
startOrStopServiceTbox.Name = "startOrStopServiceTbox";
startOrStopServiceTbox.Size = new Size(366, 23);
startOrStopServiceTbox.Size = new Size(366, 25);
startOrStopServiceTbox.TabIndex = 31;
//
// tabPage2
//
tabPage2.Controls.Add(groupBox6);
tabPage2.Controls.Add(bakConfigSaveBtn);
tabPage2.Controls.Add(startBakBtn);
tabPage2.Controls.Add(backExePath);
tabPage2.Controls.Add(label5);
tabPage2.Controls.Add(bakDbName);
tabPage2.Controls.Add(label4);
tabPage2.Controls.Add(backPathTBox);
tabPage2.Controls.Add(label3);
tabPage2.Location = new Point(4, 26);
tabPage2.Name = "tabPage2";
tabPage2.Padding = new Padding(3);
tabPage2.Size = new Size(788, 734);
tabPage2.TabIndex = 1;
tabPage2.Text = "备份与发布";
tabPage2.UseVisualStyleBackColor = true;
//
// groupBox6
//
groupBox6.Controls.Add(sshNetCorePublishBtn2);
groupBox6.Controls.Add(selectPublishFolderPathBtn);
groupBox6.Controls.Add(label8);
groupBox6.Controls.Add(publishFolderTBox);
groupBox6.Controls.Add(sshNetCorePublishBtn);
groupBox6.Controls.Add(sshVuePublishBtn);
groupBox6.Controls.Add(selectPublishFilePathBtn);
groupBox6.Controls.Add(publishFileTBox);
groupBox6.Controls.Add(label7);
groupBox6.Location = new Point(3, 292);
groupBox6.Name = "groupBox6";
groupBox6.Size = new Size(776, 413);
groupBox6.TabIndex = 43;
groupBox6.TabStop = false;
groupBox6.Text = "上传文件到远程服务器发布";
//
// sshNetCorePublishBtn2
//
sshNetCorePublishBtn2.Location = new Point(290, 341);
sshNetCorePublishBtn2.Name = "sshNetCorePublishBtn2";
sshNetCorePublishBtn2.Size = new Size(128, 40);
sshNetCorePublishBtn2.TabIndex = 52;
sshNetCorePublishBtn2.Text = "发布后端";
sshNetCorePublishBtn2.UseVisualStyleBackColor = true;
sshNetCorePublishBtn2.Click += sshNetCorePublishBtn2_Click;
//
// selectPublishFolderPathBtn
//
selectPublishFolderPathBtn.Location = new Point(606, 282);
selectPublishFolderPathBtn.Name = "selectPublishFolderPathBtn";
selectPublishFolderPathBtn.Size = new Size(95, 27);
selectPublishFolderPathBtn.TabIndex = 51;
selectPublishFolderPathBtn.Text = "选择";
selectPublishFolderPathBtn.UseVisualStyleBackColor = true;
selectPublishFolderPathBtn.Click += selectPublishFolderPathBtn_Click;
//
// label8
//
label8.AutoSize = true;
label8.Location = new Point(14, 245);
label8.Name = "label8";
label8.Size = new Size(384, 17);
label8.TabIndex = 50;
label8.Text = "方式二: 后端发布程序文件夹(程序自动打成压缩包,上传然后发布)";
//
// publishFolderTBox
//
publishFolderTBox.Location = new Point(14, 282);
publishFolderTBox.Name = "publishFolderTBox";
publishFolderTBox.Size = new Size(547, 23);
publishFolderTBox.TabIndex = 49;
//
// sshNetCorePublishBtn
//
sshNetCorePublishBtn.Location = new Point(290, 153);
sshNetCorePublishBtn.Name = "sshNetCorePublishBtn";
sshNetCorePublishBtn.Size = new Size(128, 40);
sshNetCorePublishBtn.TabIndex = 48;
sshNetCorePublishBtn.Text = "发布后端";
sshNetCorePublishBtn.UseVisualStyleBackColor = true;
sshNetCorePublishBtn.Click += sshNetCorePublishBtn_Click;
//
// sshVuePublishBtn
//
sshVuePublishBtn.Location = new Point(55, 153);
sshVuePublishBtn.Name = "sshVuePublishBtn";
sshVuePublishBtn.Size = new Size(128, 40);
sshVuePublishBtn.TabIndex = 47;
sshVuePublishBtn.Text = "发布前端";
sshVuePublishBtn.UseVisualStyleBackColor = true;
sshVuePublishBtn.Click += sshVuePublishBtn_Click;
//
// selectPublishFilePathBtn
//
selectPublishFilePathBtn.Location = new Point(606, 94);
selectPublishFilePathBtn.Name = "selectPublishFilePathBtn";
selectPublishFilePathBtn.Size = new Size(95, 27);
selectPublishFilePathBtn.TabIndex = 46;
selectPublishFilePathBtn.Text = "选择";
selectPublishFilePathBtn.UseVisualStyleBackColor = true;
selectPublishFilePathBtn.Click += selectPublishFilePathBtn_Click;
//
// publishFileTBox
//
publishFileTBox.Location = new Point(14, 98);
publishFileTBox.Name = "publishFileTBox";
publishFileTBox.Size = new Size(547, 23);
publishFileTBox.TabIndex = 45;
//
// label7
//
label7.AutoSize = true;
label7.Location = new Point(27, 65);
label7.Name = "label7";
label7.Size = new Size(368, 17);
label7.TabIndex = 44;
label7.Text = "方式一: 前端发布选择html | 后端发布选择压缩包 (上传后发布)";
//
// bakConfigSaveBtn
//
bakConfigSaveBtn.Location = new Point(160, 186);
bakConfigSaveBtn.Name = "bakConfigSaveBtn";
bakConfigSaveBtn.Size = new Size(128, 40);
bakConfigSaveBtn.TabIndex = 42;
bakConfigSaveBtn.Text = "备份配置保存";
bakConfigSaveBtn.UseVisualStyleBackColor = true;
bakConfigSaveBtn.Click += bakConfigSaveBtn_Click;
//
// startBakBtn
//
startBakBtn.Location = new Point(494, 186);
startBakBtn.Name = "startBakBtn";
startBakBtn.Size = new Size(128, 40);
startBakBtn.TabIndex = 6;
startBakBtn.Text = "开始备份";
startBakBtn.UseVisualStyleBackColor = true;
startBakBtn.Click += startBakBtn_Click;
//
// backExePath
//
backExePath.Enabled = false;
backExePath.Location = new Point(160, 125);
backExePath.Name = "backExePath";
backExePath.Size = new Size(547, 23);
backExePath.TabIndex = 5;
//
// label5
//
label5.AutoSize = true;
label5.Location = new Point(61, 125);
label5.Name = "label5";
label5.Size = new Size(56, 17);
label5.TabIndex = 4;
label5.Text = "程序路径";
//
// bakDbName
//
bakDbName.Location = new Point(160, 28);
bakDbName.Name = "bakDbName";
bakDbName.Size = new Size(547, 23);
bakDbName.TabIndex = 3;
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(85, 28);
label4.Name = "label4";
label4.Size = new Size(68, 17);
label4.TabIndex = 2;
label4.Text = "备份数据库";
//
// backPathTBox
//
backPathTBox.Location = new Point(160, 75);
backPathTBox.Name = "backPathTBox";
backPathTBox.Size = new Size(547, 23);
backPathTBox.TabIndex = 1;
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(6, 79);
label3.Name = "label3";
label3.Size = new Size(152, 17);
label3.TabIndex = 0;
label3.Text = "数据库和发布程序备份路径";
//
// groupBox5
//
groupBox5.Controls.Add(netCorePublishBtn);
groupBox5.Controls.Add(vuePublishBtn);
groupBox5.Location = new Point(10, 24);
groupBox5.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
groupBox5.Location = new Point(10, 9);
groupBox5.Name = "groupBox5";
groupBox5.Size = new Size(798, 129);
groupBox5.Size = new Size(696, 129);
groupBox5.TabIndex = 41;
groupBox5.TabStop = false;
groupBox5.Text = "测试环境基于备份代码重新发布(感觉自动发布未发布成功,重新发布一下)";
@ -615,7 +633,7 @@
//
AutoScaleDimensions = new SizeF(7F, 17F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1488, 1094);
ClientSize = new Size(1353, 1070);
Controls.Add(tabControl1);
Controls.Add(groupBox5);
Controls.Add(groupBox3);
@ -626,15 +644,16 @@
groupBox1.PerformLayout();
groupBox3.ResumeLayout(false);
tabControl1.ResumeLayout(false);
tabPage2.ResumeLayout(false);
groupBox7.ResumeLayout(false);
groupBox7.PerformLayout();
groupBox6.ResumeLayout(false);
groupBox6.PerformLayout();
tabPage1.ResumeLayout(false);
groupBox4.ResumeLayout(false);
groupBox4.PerformLayout();
groupBox2.ResumeLayout(false);
groupBox2.PerformLayout();
tabPage2.ResumeLayout(false);
tabPage2.PerformLayout();
groupBox6.ResumeLayout(false);
groupBox6.PerformLayout();
groupBox5.ResumeLayout(false);
ResumeLayout(false);
}
@ -694,5 +713,6 @@
private Button sshNetCorePublishBtn2;
private OpenFileDialog openPublishFileDialog;
private FolderBrowserDialog folderBrowserDialog1;
private GroupBox groupBox7;
}
}

View File

@ -302,7 +302,7 @@ namespace PublishSite
//备份后端文件
WinformLog($"备份后端文件...");
string archivePath = $"{backupFolderPath}\\NetCore.zip";
string archivePath = $"{backupFolderPath}\\NetCore_{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}.zip";
var compressCommand = client.CreateCommand($"powershell.exe Compress-Archive -Path \"{programFolder}\\*.*\" -DestinationPath \"{archivePath}\" -Force");
compressCommand.Execute();
if (compressCommand.ExitStatus != 0)
@ -326,7 +326,7 @@ namespace PublishSite
WinformLog($"开始备份数据库{dbName}...");
string databaseBackupPath = $"{backupFolderPath}\\db.bak";
string databaseBackupPath = $"{backupFolderPath}\\db_{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}.bak";
var sqlcommand = client.CreateCommand($"sqlcmd -S . -U \"{dbUser}\" -P \"{dbPwd}\" -Q \"BACKUP DATABASE [{dbName}] TO DISK='{databaseBackupPath}' WITH INIT\"");
sqlcommand.Execute();
if (sqlcommand.ExitStatus != 0)
@ -357,8 +357,8 @@ namespace PublishSite
private string ExecuteCommand(string command)
{
ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
procStartInfo.RedirectStandardOutput = true;
procStartInfo.UseShellExecute = false;

View File

@ -7,36 +7,32 @@
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Platforms>AnyCPU;x64</Platforms>
<ApplicationIcon>icons8-publish-100.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.Development.json" />
<None Remove="appsettings.local.json" />
<None Remove="appsettings.Production.json" />
<None Remove="appsettings.Verify.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.Production.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Resource Include="appsettings.Production.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</Resource>
<Content Include="appsettings.Verify.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="appsettings.local.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="icons8-publish-100.ico" />
</ItemGroup>
<ItemGroup>
@ -47,4 +43,12 @@
<PackageReference Include="System.Management.Automation" Version="7.2.10" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.Development.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB