Merge branch 'IobMan' into MTC
This commit is contained in:
+3
-1
@@ -9,9 +9,11 @@
|
||||
<add key="watchDogMult" value="500"/>
|
||||
<add key="autoRestartTimeoutMin" value="15"/>
|
||||
<add key="autoStartProc" value="true"/>
|
||||
<add key="AUpdAsAdm" value="true"/>
|
||||
<add key="closeOnChildUpdate" value="true"/>
|
||||
<add key="targetExe" value="C:\Steamware\IOB-WIN\IOB-WIN.exe" />
|
||||
<add key="BaseArg" value="MODE=MAN IOB=" />
|
||||
<add key="ArgsList" value="SIMUL_01,SIMUL_02,SIMUL_03,SIMUL_04" />
|
||||
<add key="ArgsList" value="SIMUL_00,SIMUL_00" />
|
||||
<add key="ArgsConfFile" value="/CONF/process.json" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
[ "SIMUL_01", "SIMUL_02", "SIMUL_03", "SIMUL_04" ]
|
||||
@@ -38,9 +38,15 @@
|
||||
<ApplicationIcon>IobManIcon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoUpdater.NET, Version=1.5.8.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autoupdater.NET.Official.1.5.8\lib\net40\AutoUpdater.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -91,6 +97,10 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="CONF\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="CONF\process.json" />
|
||||
<None Include="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
Generated
+25
-15
@@ -44,13 +44,14 @@
|
||||
this.btnMinimizeAll = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnMoreTOut = new System.Windows.Forms.Button();
|
||||
this.txtTOutAutoCheck = new System.Windows.Forms.TextBox();
|
||||
this.chkAutoRestart = new System.Windows.Forms.CheckBox();
|
||||
this.btnOpenAll = new System.Windows.Forms.Button();
|
||||
this.btnRestartAll = new System.Windows.Forms.Button();
|
||||
this.btnCloseAll = new System.Windows.Forms.Button();
|
||||
this.dgvManagedItems = new System.Windows.Forms.DataGridView();
|
||||
this.btnMoreTOut = new System.Windows.Forms.Button();
|
||||
this.forceCloseALLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
@@ -128,22 +129,23 @@
|
||||
//
|
||||
this.processManagerToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.updateIOBMANToolStripMenuItem,
|
||||
this.updateIOBWINToolStripMenuItem});
|
||||
this.updateIOBWINToolStripMenuItem,
|
||||
this.forceCloseALLToolStripMenuItem});
|
||||
this.processManagerToolStripMenuItem.Name = "processManagerToolStripMenuItem";
|
||||
this.processManagerToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
|
||||
this.processManagerToolStripMenuItem.Text = "&Update";
|
||||
this.processManagerToolStripMenuItem.Size = new System.Drawing.Size(62, 20);
|
||||
this.processManagerToolStripMenuItem.Text = "&Manage";
|
||||
//
|
||||
// updateIOBMANToolStripMenuItem
|
||||
//
|
||||
this.updateIOBMANToolStripMenuItem.Name = "updateIOBMANToolStripMenuItem";
|
||||
this.updateIOBMANToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
|
||||
this.updateIOBMANToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.updateIOBMANToolStripMenuItem.Text = "Update IOB-&MAN";
|
||||
this.updateIOBMANToolStripMenuItem.Click += new System.EventHandler(this.updateIOBMANToolStripMenuItem_Click);
|
||||
//
|
||||
// updateIOBWINToolStripMenuItem
|
||||
//
|
||||
this.updateIOBWINToolStripMenuItem.Name = "updateIOBWINToolStripMenuItem";
|
||||
this.updateIOBWINToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
|
||||
this.updateIOBWINToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.updateIOBWINToolStripMenuItem.Text = "Update IOB-&WIN";
|
||||
this.updateIOBWINToolStripMenuItem.Click += new System.EventHandler(this.updateIOBWINToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -208,6 +210,17 @@
|
||||
this.panel2.Size = new System.Drawing.Size(116, 341);
|
||||
this.panel2.TabIndex = 85;
|
||||
//
|
||||
// btnMoreTOut
|
||||
//
|
||||
this.btnMoreTOut.Location = new System.Drawing.Point(81, 306);
|
||||
this.btnMoreTOut.Name = "btnMoreTOut";
|
||||
this.btnMoreTOut.Size = new System.Drawing.Size(25, 23);
|
||||
this.btnMoreTOut.TabIndex = 87;
|
||||
this.btnMoreTOut.Text = "+";
|
||||
this.btnMoreTOut.UseVisualStyleBackColor = true;
|
||||
this.btnMoreTOut.Visible = false;
|
||||
this.btnMoreTOut.Click += new System.EventHandler(this.btnMoreTOut_Click);
|
||||
//
|
||||
// txtTOutAutoCheck
|
||||
//
|
||||
this.txtTOutAutoCheck.Location = new System.Drawing.Point(11, 306);
|
||||
@@ -286,16 +299,12 @@
|
||||
this.dgvManagedItems.TabIndex = 76;
|
||||
this.dgvManagedItems.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvManagedItems_CellDoubleClick);
|
||||
//
|
||||
// btnMoreTOut
|
||||
// forceCloseALLToolStripMenuItem
|
||||
//
|
||||
this.btnMoreTOut.Location = new System.Drawing.Point(81, 306);
|
||||
this.btnMoreTOut.Name = "btnMoreTOut";
|
||||
this.btnMoreTOut.Size = new System.Drawing.Size(25, 23);
|
||||
this.btnMoreTOut.TabIndex = 87;
|
||||
this.btnMoreTOut.Text = "+";
|
||||
this.btnMoreTOut.UseVisualStyleBackColor = true;
|
||||
this.btnMoreTOut.Visible = false;
|
||||
this.btnMoreTOut.Click += new System.EventHandler(this.btnMoreTOut_Click);
|
||||
this.forceCloseALLToolStripMenuItem.Name = "forceCloseALLToolStripMenuItem";
|
||||
this.forceCloseALLToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.forceCloseALLToolStripMenuItem.Text = "&Force Close ALL";
|
||||
this.forceCloseALLToolStripMenuItem.Click += new System.EventHandler(this.forceCloseALLToolStripMenuItem_Click);
|
||||
//
|
||||
// IOBManPanel
|
||||
//
|
||||
@@ -350,6 +359,7 @@
|
||||
private System.Windows.Forms.CheckBox chkAutoRestart;
|
||||
private System.Windows.Forms.TextBox txtTOutAutoCheck;
|
||||
private System.Windows.Forms.Button btnMoreTOut;
|
||||
private System.Windows.Forms.ToolStripMenuItem forceCloseALLToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+93
-13
@@ -1,3 +1,5 @@
|
||||
using AutoUpdaterDotNET;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -88,7 +90,9 @@ namespace IOB_MAN
|
||||
utils.lgInfo("Start processi effettuato");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Caricamento configurazione
|
||||
/// </summary>
|
||||
private void loadConfig()
|
||||
{
|
||||
ArgsList.Clear();
|
||||
@@ -98,25 +102,53 @@ namespace IOB_MAN
|
||||
TargetExe = string.Format(@"{0}\Resources\Test.bat", Application.StartupPath);
|
||||
}
|
||||
utils.lgInfo($"Target exe: {TargetExe}");
|
||||
string ArgsString = utils.CRS("ArgsList");
|
||||
utils.lgInfo($"Args found: {ArgsString}");
|
||||
if (string.IsNullOrEmpty(ArgsString))
|
||||
// caricamento configurazione argomenti di avvio processi
|
||||
loadArgList();
|
||||
}
|
||||
|
||||
private void loadArgList()
|
||||
{
|
||||
// in primis cerco SE ESISTA il file json di configuraizone parametri avvio
|
||||
string fileName = utils.CRS("ArgsConfFile");
|
||||
string jsonFileName = $"{Application.StartupPath}{fileName}";
|
||||
// verifico se esista il file richeisto
|
||||
if (File.Exists(jsonFileName))
|
||||
{
|
||||
var rand = new Random();
|
||||
// ne creo rand (5-15) di default...
|
||||
for (int i = 0; i < rand.Next(5, 10); i++)
|
||||
// leggo il file json
|
||||
StreamReader reader = new StreamReader(jsonFileName);
|
||||
string jsonData = reader.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(jsonData))
|
||||
{
|
||||
ArgsList.Add("127.0.0.1");
|
||||
ArgsList = JsonConvert.DeserializeObject<List<string>>(jsonData);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var elenco = ArgsString.Split(',');
|
||||
foreach (var item in elenco)
|
||||
// se non lo trovassi --> uso la chaive in web.config e GENERO un nuovo file x prox avvio...
|
||||
string ArgsString = utils.CRS("ArgsList");
|
||||
utils.lgInfo($"Args found: {ArgsString}");
|
||||
if (string.IsNullOrEmpty(ArgsString))
|
||||
{
|
||||
ArgsList.Add(item);
|
||||
var rand = new Random();
|
||||
// ne creo rand (5-15) di default...
|
||||
for (int i = 0; i < rand.Next(5, 10); i++)
|
||||
{
|
||||
ArgsList.Add("127.0.0.1");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var elenco = ArgsString.Split(',');
|
||||
foreach (var item in elenco)
|
||||
{
|
||||
ArgsList.Add(item);
|
||||
}
|
||||
}
|
||||
// serializzo e salvo file!
|
||||
string jsonData = JsonConvert.SerializeObject(ArgsList);
|
||||
File.WriteAllText(jsonFileName, jsonData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ElencoIOB_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
|
||||
@@ -177,6 +209,10 @@ namespace IOB_MAN
|
||||
/// </summary>
|
||||
private void apriChild()
|
||||
{
|
||||
// preventivamente CHIUDO TUTTO
|
||||
closeAllChild(true);
|
||||
Thread.Sleep(250);
|
||||
// avvio i child
|
||||
foreach (var item in ArgsList)
|
||||
{
|
||||
startChildProc(item);
|
||||
@@ -429,6 +465,8 @@ namespace IOB_MAN
|
||||
private void IOBManPanel_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
closeAllChild(true);
|
||||
Thread.Sleep(500);
|
||||
closeAllChild(true);
|
||||
}
|
||||
/// <summary>
|
||||
/// Chiude tutti i child
|
||||
@@ -665,12 +703,46 @@ namespace IOB_MAN
|
||||
apriChild();
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ramo applicazione (x update)
|
||||
/// </summary>
|
||||
protected string branchName = "master";
|
||||
/// <summary>
|
||||
/// URL stringa di UPDATE...
|
||||
/// </summary>
|
||||
protected string updateUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("http://seriate.steamware.net:8083/SWS/MAPO/IOB-MAN/{0}/manifest.xml", branchName);
|
||||
}
|
||||
}
|
||||
private void updateIOBMANToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// FIXME fare come IOB-WIN!
|
||||
utils.lgInfo($"Avvio procedura controllo update: url: {updateUrl}");
|
||||
// avvio controllo
|
||||
AutoUpdater.ShowSkipButton = false;
|
||||
AutoUpdater.ShowRemindLaterButton = false;
|
||||
AutoUpdater.RunUpdateAsAdmin = utils.CRB("AUpdAsAdm");
|
||||
AutoUpdater.ReportErrors = false;
|
||||
AutoUpdater.DownloadPath = @"C:\Steawmare\src\";
|
||||
AutoUpdater.ApplicationExitEvent += AutoUpdater_ApplicationExitEvent;
|
||||
AutoUpdater.Start(updateUrl);
|
||||
}
|
||||
|
||||
private void AutoUpdater_ApplicationExitEvent()
|
||||
{
|
||||
utils.lgInfo("Chiusura IOB-WIN");
|
||||
Thread.Sleep(100);
|
||||
// chiudo tutto
|
||||
closeAllChild(true);
|
||||
Thread.Sleep(1000);
|
||||
utils.lgInfo("Chiusura Applicazione");
|
||||
// attendo 1 sec...
|
||||
Thread.Sleep(1000);
|
||||
// ESCO!
|
||||
Application.Exit();
|
||||
}
|
||||
private void updateIOBWINToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiude tutte
|
||||
@@ -698,6 +770,14 @@ namespace IOB_MAN
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void forceCloseALLToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// per iscurezza chiudo tutto
|
||||
closeAllChild(true);
|
||||
Thread.Sleep(1000);
|
||||
updateStatus();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autoupdater.NET.Official" version="1.5.8" targetFramework="net461" />
|
||||
<package id="Costura.Fody" version="4.1.0" targetFramework="net461" />
|
||||
<package id="Fody" version="6.0.5" targetFramework="net461" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
||||
<package id="NLog" version="4.6.8" targetFramework="net461" />
|
||||
<package id="NLog.Config" version="4.6.8" targetFramework="net461" />
|
||||
<package id="NLog.Schema" version="4.6.8" targetFramework="net461" />
|
||||
|
||||
Vendored
+45
-6
@@ -12,11 +12,11 @@ pipeline {
|
||||
/* copio le libs...*/
|
||||
// step([$class: 'CopyArtifact', fingerprintArtifacts: true, projectName: 'Steamware/SteamWareLib', selector: [$class: 'WorkspaceSelector'], target: '../Steamware/SteamWareLib'])
|
||||
// mirroring directory x SteamWare Libs
|
||||
bat "robocopy /MIR ..\\..\\SteamWare\\SteamWareLib ..\\SteamWare\\SteamWareLib || EXIT /B 0"
|
||||
//bat "robocopy /MIR ..\\..\\SteamWare\\SteamWareLib ..\\SteamWare\\SteamWareLib || EXIT /B 0"
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=619']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=627']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO-IOB-WIN'
|
||||
@@ -40,8 +40,16 @@ pipeline {
|
||||
agent any
|
||||
steps {
|
||||
script {
|
||||
// compilo installers in base al BRANCH del cliente...
|
||||
if (env.BRANCH_NAME == "develop") {
|
||||
// compilo installers in base al BRANCH ...
|
||||
if(env.BRANCH_NAME == "IobMan") {
|
||||
// CAMBIO numero versione in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
fixNuget("${WORKSPACE}\\IOB-WIN.sln")
|
||||
// BUILD!
|
||||
bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m"
|
||||
}
|
||||
else if (env.BRANCH_NAME == "develop") {
|
||||
// CAMBIO numero versione in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
@@ -65,8 +73,16 @@ pipeline {
|
||||
steps {
|
||||
// in primis compilo a seconda del branch... TUTTO tranne develop...
|
||||
script {
|
||||
if(env.BRANCH_NAME == "IobMan") {
|
||||
// CAMBIO numero versione in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
fixNuget("${WORKSPACE}\\IOB-WIN.sln")
|
||||
// BUILD!
|
||||
bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m"
|
||||
}
|
||||
// procedo solo se NON si tratta di commit in ramo DOCUMentazione...
|
||||
if (env.BRANCH_NAME != "docum") {
|
||||
else if (env.BRANCH_NAME != "docum") {
|
||||
// CAMBIO numero versione in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
@@ -81,8 +97,31 @@ pipeline {
|
||||
}
|
||||
// ora mi occupo delle operazioni di compressione e copia...
|
||||
script {
|
||||
// se è ramo IobMan compilo SOLO IOB-MAN...
|
||||
if(env.BRANCH_NAME == "IobMan") {
|
||||
env.classifier = ""
|
||||
// Compressione in .zip dell'installer...
|
||||
bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip ${WORKSPACE}\\IOB-MAN\\bin\\*"
|
||||
// ora mi occupo delle operazioni di invio a NEXUS...
|
||||
nexusArtifactUploader(
|
||||
nexusVersion: 'nexus3',
|
||||
protocol: 'http',
|
||||
nexusUrl: 'nexus.steamware.net',
|
||||
groupId: 'MAPO',
|
||||
//version: "${env.versionNumber}",
|
||||
repository: 'utility',
|
||||
// repository: 'SWS',
|
||||
credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5',
|
||||
artifacts: [
|
||||
[artifactId: 'IOB-MAN',
|
||||
classifier: "${env.classifier}",
|
||||
file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip",
|
||||
type: 'zip']
|
||||
]
|
||||
)
|
||||
}
|
||||
// procedo solo se NON si tratta di commit in ramo DOCUMentazione...
|
||||
if (env.BRANCH_NAME != "docum") {
|
||||
else if (env.BRANCH_NAME != "docum") {
|
||||
def now = new Date()
|
||||
def anno = now.format("yyyy", TimeZone.getTimeZone('UTC'))
|
||||
// elimino files conf personalizzata per ogni install...
|
||||
|
||||
Reference in New Issue
Block a user