From e59521035a7247b130484a801bfc5ddee6c5b64c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 24 Oct 2011 14:35:01 -0400 Subject: [PATCH] First pass at autoupdate nuggets. --- AppUpdaterSetup/AppStart.config | 4 +++ .../d20SRDSpellLists.Tests.csproj | 2 +- d20 SRD Spell Lists/AppUpdate.log | 0 d20 SRD Spell Lists/FrmMain.Designer.cs | 34 ++++++++++++------ d20 SRD Spell Lists/FrmMain.resx | 28 +++------------ d20 SRD Spell Lists/d20SRDSpellLists.csproj | 8 +++++ fabfile.py | 19 ++++++++++ fabfile.pyc | Bin 0 -> 1111 bytes 8 files changed, 60 insertions(+), 35 deletions(-) create mode 100644 AppUpdaterSetup/AppStart.config create mode 100644 d20 SRD Spell Lists/AppUpdate.log create mode 100644 fabfile.py create mode 100644 fabfile.pyc diff --git a/AppUpdaterSetup/AppStart.config b/AppUpdaterSetup/AppStart.config new file mode 100644 index 0000000..ae7a09a --- /dev/null +++ b/AppUpdaterSetup/AppStart.config @@ -0,0 +1,4 @@ + + 1.0.0.0 + d20 SRD Spell Lists.exe + \ No newline at end of file diff --git a/d20 SRD Spell Lists Tests/d20SRDSpellLists.Tests.csproj b/d20 SRD Spell Lists Tests/d20SRDSpellLists.Tests.csproj index 2bdd315..f088364 100644 --- a/d20 SRD Spell Lists Tests/d20SRDSpellLists.Tests.csproj +++ b/d20 SRD Spell Lists Tests/d20SRDSpellLists.Tests.csproj @@ -39,7 +39,7 @@ - ..\..\xunit.net\xunit.dll + G:\xunit.net\xunit.dll diff --git a/d20 SRD Spell Lists/AppUpdate.log b/d20 SRD Spell Lists/AppUpdate.log new file mode 100644 index 0000000..e69de29 diff --git a/d20 SRD Spell Lists/FrmMain.Designer.cs b/d20 SRD Spell Lists/FrmMain.Designer.cs index 47dde41..3ab227c 100644 --- a/d20 SRD Spell Lists/FrmMain.Designer.cs +++ b/d20 SRD Spell Lists/FrmMain.Designer.cs @@ -24,9 +24,10 @@ namespace d20_SRD_Spell_Lists { /// the contents of this method with the code editor. /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.lblExtra9 = new System.Windows.Forms.Label(); this.lblExtra8 = new System.Windows.Forms.Label(); @@ -96,6 +97,7 @@ namespace d20_SRD_Spell_Lists { this.printDoc = new System.Drawing.Printing.PrintDocument(); this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn(); + this.mainAppUpdater = new Microsoft.Samples.AppUpdater.AppUpdater(this.components); this.tableLayoutPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.mainToolStrip.SuspendLayout(); @@ -104,6 +106,7 @@ namespace d20_SRD_Spell_Lists { this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mainAppUpdater)).BeginInit(); this.SuspendLayout(); // // tableLayoutPanel1 @@ -782,10 +785,10 @@ namespace d20_SRD_Spell_Lists { // editColumn // this.editColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle3.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle3.NullValue"))); - this.editColumn.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle1.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle1.NullValue"))); + this.editColumn.DefaultCellStyle = dataGridViewCellStyle1; this.editColumn.HeaderText = ""; this.editColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.pencil; this.editColumn.Name = "editColumn"; @@ -848,10 +851,10 @@ namespace d20_SRD_Spell_Lists { // dataGridViewImageColumn1 // this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.Gray; - dataGridViewCellStyle4.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle4.NullValue"))); - this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.Gray; + dataGridViewCellStyle2.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle2.NullValue"))); + this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle2; this.dataGridViewImageColumn1.HeaderText = ""; this.dataGridViewImageColumn1.Image = global::d20_SRD_Spell_Lists.Properties.Resources.edit_16; this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; @@ -868,6 +871,13 @@ namespace d20_SRD_Spell_Lists { this.dataGridViewImageColumn2.ReadOnly = true; this.dataGridViewImageColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True; // + // mainAppUpdater + // + this.mainAppUpdater.AutoFileLoad = true; + this.mainAppUpdater.ChangeDetectionMode = Microsoft.Samples.AppUpdater.ChangeDetectionModes.ServerManifestCheck; + this.mainAppUpdater.ShowDefaultUI = true; + this.mainAppUpdater.UpdateUrl = "http://downloads.thecharonsheet.com/d20-srd-spell-lists/manifest.xml"; + // // FrmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -877,7 +887,7 @@ namespace d20_SRD_Spell_Lists { this.Controls.Add(this.mainToolStrip); this.Name = "FrmMain"; this.Text = "D&D 3.5 SRD Spell Lists"; - this.Closing += new CancelEventHandler(this.FrmMain_Closing); + this.Closing += new System.ComponentModel.CancelEventHandler(this.FrmMain_Closing); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.groupBox1.ResumeLayout(false); @@ -890,6 +900,7 @@ namespace d20_SRD_Spell_Lists { this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.mainAppUpdater)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -966,6 +977,7 @@ namespace d20_SRD_Spell_Lists { private System.Windows.Forms.DataGridViewTextBoxColumn descColumn; private System.Windows.Forms.DataGridViewImageColumn editColumn; private System.Windows.Forms.DataGridViewImageColumn deleteColumn; + private Microsoft.Samples.AppUpdater.AppUpdater mainAppUpdater; } } diff --git a/d20 SRD Spell Lists/FrmMain.resx b/d20 SRD Spell Lists/FrmMain.resx index c8c716b..2c30120 100644 --- a/d20 SRD Spell Lists/FrmMain.resx +++ b/d20 SRD Spell Lists/FrmMain.resx @@ -138,29 +138,8 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - + Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEgoTGw8bGw8bGw8bGw8bGw8bGw8bG @@ -183,7 +162,7 @@ 130, 17 - + Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEgoTGw8bGw8bGw8bGw8bGw8bGw8bG @@ -200,4 +179,7 @@ hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAAA= + + 223, 17 + \ No newline at end of file diff --git a/d20 SRD Spell Lists/d20SRDSpellLists.csproj b/d20 SRD Spell Lists/d20SRDSpellLists.csproj index d8e03cf..c33bbc9 100644 --- a/d20 SRD Spell Lists/d20SRDSpellLists.csproj +++ b/d20 SRD Spell Lists/d20SRDSpellLists.csproj @@ -48,13 +48,18 @@ prompt 4 false + true + + G:\dotnetupdater\AppUpdater\bin\Release\AppUpdater.dll + + @@ -63,6 +68,9 @@ + + G:\xunit.net\xunit.dll + diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..e1dd2d9 --- /dev/null +++ b/fabfile.py @@ -0,0 +1,19 @@ +# See http://docs.fabfile.org/en/1.0.1/tutorial.html +from __future__ import with_statement +from fabric.api import * +from fabric.contrib.console import prompt,confirm +from lxml import etree + +def commit(): + local("git add . && git commit") + +def prepare_deploy(version): + commit() + local("mkdir 'd20 SRD Spell Lists/bin/Release/%s'" % (version)) + local("mv 'd20 SRD Spell Lists/bin/Release/*' 'd20 SRD Spell Lists/bin/Release/%s/'" % (version)) + local("cp AppUpdaterSetup/*.* 'd20 SRD Spell Lists/bin/Release/'") + doc = etree.parse('d20 SRD Spell Lists/bin/Release/AppStart.config') + folder = doc.find('AppFolderName') + folder.text = version + doc.write('d20 SRD Spell Lists/bin/Release/AppStart.config', True) + \ No newline at end of file diff --git a/fabfile.pyc b/fabfile.pyc new file mode 100644 index 0000000000000000000000000000000000000000..abd1bf7b6d0a07a2352eff3bd85f9046e829dfb6 GIT binary patch literal 1111 zcma)4&2G~`5T14ZBenDtIQr7Y${|7AK&S$NI8`~=g+o*+a=e>%m36$@o%Ba4Ql;=J zoOu>_6kY&k))5sKf*nuho0*;c=I8s*gZ__iU#A7^o;Llzc>wUANRjjtumUgwW&#A` z2v!lCv(|uB156WUO)xE(wQ7G8R&6jHm~{xZ;0wU43$h)Q9>@-4NtaUVU-Tq`G(046 zqw#9)F-KLZHP&`^j*^H&n3Z)^X%Rc57S(#GU0H{<$e_?E^`{0t^6r6Z;LI3m*w*Z` zkZ$UqlH*cioJ$#xXct#%PcJVwo?N+NiO; z3pDF2%+fOt5CzxK*nNT46#=5PB_|5*@IAnQ88V9gLJbJ^2y_Evlfh>S7oeL!&1D$k z?<1JEg1yaQ)TC_`#*ro5x~U(LELT#ycqm^ykF)fBoN)>98P_mb==CI3M&({jj{VS| zarpKA*wJu*%(0&g{Yy$%*!ZorAFZS*yG-H6PDbO={scomq0{?lQ|b(JhvTpumv}&D z$o8Q!Qn_hfs<3t`w-tECcg|<{qL^uZd#}4ay6IAn(D4k7JoznL`NLb+ZRvh?TKl^E@UyEFE_ZMBlDC4 zgN+u@>0+E)jRUgnAhiLVUT`~nWmL+`m