diff --git a/IOB-WIN/IOB-WIN/App.config b/IOB-WIN/IOB-WIN/App.config index 5289ae4..4f7c4fc 100644 --- a/IOB-WIN/IOB-WIN/App.config +++ b/IOB-WIN/IOB-WIN/App.config @@ -5,6 +5,7 @@ + @@ -33,9 +34,6 @@ - @@ -55,10 +53,23 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN/IOB-WIN/IOB-WIN.csproj b/IOB-WIN/IOB-WIN/IOB-WIN.csproj index 0a5a495..3ca5eb9 100644 --- a/IOB-WIN/IOB-WIN/IOB-WIN.csproj +++ b/IOB-WIN/IOB-WIN/IOB-WIN.csproj @@ -111,6 +111,7 @@ Designer + SettingsSingleFileGenerator Settings.Designer.cs @@ -120,6 +121,7 @@ Settings.settings True + @@ -141,10 +143,16 @@ + + "$(ProjectDir)setupTgt.bat" "$(ConfigurationName)" "$(ProjectDir)" + + + "$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)" + \ No newline at end of file diff --git a/IOB-WIN/IOB-WIN/MainForm.Designer.cs b/IOB-WIN/IOB-WIN/MainForm.Designer.cs index e77a7fe..cb40f0a 100644 --- a/IOB-WIN/IOB-WIN/MainForm.Designer.cs +++ b/IOB-WIN/IOB-WIN/MainForm.Designer.cs @@ -66,15 +66,16 @@ this.label4 = new System.Windows.Forms.Label(); this.lblOutMessage2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.lblRawData = new System.Windows.Forms.Label(); + this.lblOutMessage3 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.lQueueLen = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.nLines = new System.Windows.Forms.TextBox(); this.displTimer = new System.Windows.Forms.Timer(this.components); - this.label7 = new System.Windows.Forms.Label(); - this.lblRawData = new System.Windows.Forms.Label(); - this.lblOutMessage3 = new System.Windows.Forms.Label(); + this.mCheckUpdates = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); @@ -188,7 +189,8 @@ // FileTSMI // this.FileTSMI.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.mLoadConf}); + this.mLoadConf, + this.mCheckUpdates}); this.FileTSMI.Name = "FileTSMI"; this.FileTSMI.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F))); this.FileTSMI.Size = new System.Drawing.Size(47, 24); @@ -472,6 +474,40 @@ this.label2.TabIndex = 65; this.label2.Text = "SIGNAL"; // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(3, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(21, 17); + this.label7.TabIndex = 66; + this.label7.Text = "IN"; + // + // lblRawData + // + this.lblRawData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblRawData.AutoSize = true; + this.lblRawData.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblRawData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.lblRawData.Location = new System.Drawing.Point(3, 20); + this.lblRawData.Name = "lblRawData"; + this.lblRawData.Size = new System.Drawing.Size(21, 15); + this.lblRawData.TabIndex = 67; + this.lblRawData.Text = "..."; + // + // lblOutMessage3 + // + this.lblOutMessage3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblOutMessage3.AutoSize = true; + this.lblOutMessage3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.lblOutMessage3.Location = new System.Drawing.Point(193, 20); + this.lblOutMessage3.Name = "lblOutMessage3"; + this.lblOutMessage3.Size = new System.Drawing.Size(655, 17); + this.lblOutMessage3.TabIndex = 68; + this.lblOutMessage3.Text = "..."; + // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -526,39 +562,12 @@ // this.displTimer.Tick += new System.EventHandler(this.displTimer_Tick); // - // label7 + // mCheckUpdates // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(3, 0); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(21, 17); - this.label7.TabIndex = 66; - this.label7.Text = "IN"; - // - // lblRawData - // - this.lblRawData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblRawData.AutoSize = true; - this.lblRawData.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblRawData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); - this.lblRawData.Location = new System.Drawing.Point(3, 20); - this.lblRawData.Name = "lblRawData"; - this.lblRawData.Size = new System.Drawing.Size(21, 15); - this.lblRawData.TabIndex = 67; - this.lblRawData.Text = "..."; - // - // lblOutMessage3 - // - this.lblOutMessage3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblOutMessage3.AutoSize = true; - this.lblOutMessage3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.lblOutMessage3.Location = new System.Drawing.Point(193, 20); - this.lblOutMessage3.Name = "lblOutMessage3"; - this.lblOutMessage3.Size = new System.Drawing.Size(655, 17); - this.lblOutMessage3.TabIndex = 68; - this.lblOutMessage3.Text = "..."; + this.mCheckUpdates.Name = "mCheckUpdates"; + this.mCheckUpdates.Size = new System.Drawing.Size(214, 26); + this.mCheckUpdates.Text = "CHECK &UPDATES"; + this.mCheckUpdates.Click += new System.EventHandler(this.mCheckUpdates_Click); // // MainForm // @@ -643,5 +652,6 @@ private System.Windows.Forms.Label label7; private System.Windows.Forms.Label lblRawData; private System.Windows.Forms.Label lblOutMessage3; + private System.Windows.Forms.ToolStripMenuItem mCheckUpdates; } } \ No newline at end of file diff --git a/IOB-WIN/IOB-WIN/MainForm.cs b/IOB-WIN/IOB-WIN/MainForm.cs index b9f8764..e82d7b6 100644 --- a/IOB-WIN/IOB-WIN/MainForm.cs +++ b/IOB-WIN/IOB-WIN/MainForm.cs @@ -75,6 +75,16 @@ namespace IOB_WIN /// tipo di adapter prescelto... /// public tipoAdapter tipoScelto = tipoAdapter.DEMO; + /// + /// URLK stringa di UPDATE... + /// + protected string updateUrl + { + get + { + return string.Format("http://seriate.steamware.net:8083/SWS/IOB-WIN/{0}/manifest.xml", utils.CRS("appVers")); + } + } #endregion @@ -139,7 +149,7 @@ namespace IOB_WIN public MainForm() { // avvio autoupdater... - AutoUpdater.Start("http://seriate.steamware.net:8083/SWS/IOB-WIN/manifest.xml"); + AutoUpdater.Start(updateUrl); // continuo avvio... InitializeComponent(); @@ -937,5 +947,10 @@ namespace IOB_WIN TimeSpan uptime = DateTime.Now.Subtract(firstStart); tslUptime.Text = string.Format("Uptime: {0}gg {1:00}:{2:00}:{3:00}", uptime.Days, uptime.Hours, uptime.Minutes, uptime.Seconds); } + + private void mCheckUpdates_Click(object sender, EventArgs e) + { + AutoUpdater.Start(updateUrl); + } } } diff --git a/IOB-WIN/IOB-WIN/packages.config b/IOB-WIN/IOB-WIN/packages.config index dfb9513..9210810 100644 --- a/IOB-WIN/IOB-WIN/packages.config +++ b/IOB-WIN/IOB-WIN/packages.config @@ -4,5 +4,4 @@ - \ No newline at end of file diff --git a/IOB-WIN/IOB-WIN/postBuildTgt.bat b/IOB-WIN/IOB-WIN/postBuildTgt.bat new file mode 100644 index 0000000..4db8914 --- /dev/null +++ b/IOB-WIN/IOB-WIN/postBuildTgt.bat @@ -0,0 +1,77 @@ +@echo off +echo Effettua pulizia post build: configurazione %1. directory %2 + +REM RD /S /Q %2"\lib\da" +REM RD /S /Q %2"\lib\de" +REM RD /S /Q %2"\lib\es" +REM RD /S /Q %2"\lib\fr" +REM RD /S /Q %2"\lib\it" +REM RD /S /Q %2"\lib\ko" +REM RD /S /Q %2"\lib\nl" +REM RD /S /Q %2"\lib\pl" +REM RD /S /Q %2"\lib\pt" +REM RD /S /Q %2"\lib\ru" +REM RD /S /Q %2"\lib\sv" +REM RD /S /Q %2"\lib\tr" +REM RD /S /Q %2"\lib\zh" +REM +REM move /Y %2"da" %2"lib\" +REM move /Y %2"de" %2"lib\" +REM move /Y %2"es" %2"lib\" +REM move /Y %2"fr" %2"lib\" +REM move /Y %2"it" %2"lib\" +REM move /Y %2"ko" %2"lib\" +REM move /Y %2"nl" %2"lib\" +REM move /Y %2"pl" %2"lib\" +REM move /Y %2"pt" %2"lib\" +REM move /Y %2"ru" %2"lib\" +REM move /Y %2"sv" %2"lib\" +REM move /Y %2"tr" %2"lib\" +REM move /Y %2"zh" %2"lib\" + + + + + + + +if %1 == "Release" goto Release +if %1 == "Debug" goto Debug +REM if %1 == "FANUC" goto FANUC +REM if %1 == "SIEMENS" goto SIEMENS + +:Release +REM INIZIO eliminando i files pdb +del /S %2"*.pdb"" +del /S %2"lib/*.pdb"" +echo Release: eliminato pdb!!! +goto END + +:Debug +echo Debug: nulla da eliminare +goto END + +REM :CMS +REM echo CMS: Elimino files IOT di SCM +REM REM INIZIO eliminando i files pdb +REM del /S %2"*.pdb"" +REM del %2"DATA\CONF\IOT_ByteList.map" +REM del %2"DATA\CONF\IOT_WordList.map" +REM del %2"DATA\CONF\IOT_DWordList.map" +REM del %2"DATA\CONF\IOT_StringList.map" +REM del %2"DATA\CONF\EsaKvara.ini" +REM del /S %2"SCMCncLib.dll" +REM del /S %2"SCMCncLib.xml" +REM ora verifico tipo controllo esatto... +REM if %1 == "CMS-FANUC" goto FANUC +REM if %1 == "CMS-SIEMENS" goto SIEMENS +REM if %1 == "CMS-OSAI" goto OSAI +REM +REM :FANUC +REM goto END +REM +REM :SIEMENS +REM goto END + +:END +echo Fatto! \ No newline at end of file diff --git a/IOB-WIN/IOB-WIN/setupTgt.bat b/IOB-WIN/IOB-WIN/setupTgt.bat new file mode 100644 index 0000000..3bf5e83 --- /dev/null +++ b/IOB-WIN/IOB-WIN/setupTgt.bat @@ -0,0 +1,84 @@ +@echo off +echo Effettua setup dei file specifici per i vari ambienti pre build installer: verifica da nome configurazione %1 + + +REM if %1 == "Release" goto Release +REM if %1 == "Debug" goto Debug +REM if %1 == "FANUC" goto CMS +REM if %1 == "SIEMENS" goto CMS +REM +REM :Release +REM echo Release: nulla da copiare +REM goto END +REM +REM :Debug +REM echo Debug: copia file ini x simulazione ESA +REM del %2"DATA\CONF\EsaKvara.ini" +REM copy %2"Resources\SCM\EsaKvara_SIM.ini" %2"DATA\CONF\EsaKvara.ini" +REM goto END +REM +REM :CMS +REM echo CMS: copio files CMS - Zogno +REM del %2"Resources\MTCA.ico" +REM del %2"DATA\CONF\Adapter_ItemList.xml" +REM del %2"DATA\CONF\AlarmList.map" +REM del %2"DATA\CONF\AlarmListCNC.map" +REM del %2"DATA\CONF\AnalogData.map" +REM del %2"DATA\CONF\CounterList.map" +REM del %2"DATA\CONF\StatusList.map" +REM REM del /F /Q %2"DATA\CONF\*.*" +REM copy %2"Resources\CMS\CMS.ico" %2"Resources\MTCA.ico" +REM copy %2"Resources\CMS\AlarmListEmpty.map" %2"DATA\CONF\AlarmListCNC.map" +REM REM ora verifico tipo controllo esatto... +REM if %1 == "CMS-FANUC" goto FANUC +REM if %1 == "CMS-SIEMENS" goto SIEMENS +REM if %1 == "CMS-OSAI" goto OSAI +REM +REM :SCM +REM echo SCM: copio files SCM - Rimini +REM del %2"Resources\MTCA.ico" +REM del %2"DATA\CONF\Adapter_ItemList.xml" +REM del %2"DATA\CONF\AlarmList.map" +REM REM del %2"DATA\CONF\EsaKvara.ini" +REM del %2"DATA\CONF\IOT_ByteList.map" +REM del %2"DATA\CONF\IOT_WordList.map" +REM del %2"DATA\CONF\IOT_DWordList.map" +REM del %2"DATA\CONF\IOT_StringList.map" +REM REM del /F /Q %2"DATA\CONF\*.*" +REM copy %2"Resources\SCM\SCM.ico" %2"Resources\MTCA.ico" +REM copy %2"Resources\SCM\SCM_ESA.xml" %2"DATA\CONF\Adapter_ItemList.xml" +REM copy %2"Resources\SCM\AlarmListEsaGv.map" %2"DATA\CONF\AlarmList.map" +REM copy %2"Resources\SCM\AlarmListEsaGvCNC.map" %2"DATA\CONF\AlarmListCNC.map" +REM copy %2"Resources\SCM\EsaKvara_PROD.ini" %2"DATA\CONF\EsaKvara.ini" +REM copy %2"Resources\SCM\IOT_ByteList.map" %2"DATA\CONF\IOT_ByteList.map" +REM copy %2"Resources\SCM\IOT_WordList.map" %2"DATA\CONF\IOT_WordList.map" +REM copy %2"Resources\SCM\IOT_DWordList.map" %2"DATA\CONF\IOT_DWordList.map" +REM copy %2"Resources\SCM\IOT_StringList.map" %2"DATA\CONF\IOT_StringList.map" +REM goto END +REM +REM :FANUC +REM copy %2"Resources\CMS\FANUC.xml" %2"DATA\CONF\Adapter_ItemList.xml" +REM copy %2"Resources\CMS\AlarmListFANUC.map" %2"DATA\CONF\AlarmList.map" +REM copy %2"Resources\CMS\AnalogDataFANUC.map" %2"DATA\CONF\AnalogData.map" +REM copy %2"Resources\CMS\CounterListFANUC.map" %2"DATA\CONF\CounterList.map" +REM copy %2"Resources\CMS\StatusListFANUC.map" %2"DATA\CONF\StatusList.map" +REM goto END +REM +REM :SIEMENS +REM copy %2"Resources\CMS\SIEMENS.xml" %2"DATA\CONF\Adapter_ItemList.xml" +REM copy %2"Resources\CMS\AlarmListSIEMENS.map" %2"DATA\CONF\AlarmList.map" +REM copy %2"Resources\CMS\AnalogDataSIEMENS.map" %2"DATA\CONF\AnalogData.map" +REM copy %2"Resources\CMS\CounterListSIEMENS.map" %2"DATA\CONF\CounterList.map" +REM copy %2"Resources\CMS\StatusListSIEMENS.map" %2"DATA\CONF\StatusList.map" +REM goto END +REM +REM :OSAI +REM copy %2"Resources\CMS\OSAI.xml" %2"DATA\CONF\Adapter_ItemList.xml" +REM copy %2"Resources\CMS\AlarmListOSAI.map" %2"DATA\CONF\AlarmList.map" +REM copy %2"Resources\CMS\AnalogDataOSAI.map" %2"DATA\CONF\AnalogData.map" +REM copy %2"Resources\CMS\CounterListOSAI.map" %2"DATA\CONF\CounterList.map" +REM copy %2"Resources\CMS\StatusListOSAI.map" %2"DATA\CONF\StatusList.map" +REM goto END + +:END +echo Fatto! \ No newline at end of file