Commit febb15ff by Tapio Haapala

autoupdate

1 parent af057217
......@@ -22,6 +22,9 @@
<setting name="ApiPass" serializeAs="String">
<value />
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value />
</setting>
</MoyaAdminUI.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file
......@@ -15,20 +15,29 @@ namespace MoyaAdminUI
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (!Debugger.IsAttached)
{
if (args.Length == 0 || args[0] != "-noautoupdate")
{
/*
if (AutoUpdateLib.AutoUpdateCore.CheckForUpdates(null))
return; //program is required to close by autoupdate (probably updated)
* */
}
}
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
Version appVersion = a.GetName().Version;
string appVersionString = appVersion.ToString();
if (Properties.Settings.Default.ApplicationVersion != appVersion.ToString())
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.ApplicationVersion = appVersionString;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
......
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.7")]
[assembly: AssemblyFileVersion("1.0.7")]
[assembly: AssemblyVersion("1.0.8")]
[assembly: AssemblyFileVersion("1.0.8")]
......@@ -70,5 +70,17 @@ namespace MoyaAdminUI.Properties {
this["ApiPass"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ApplicationVersion {
get {
return ((string)(this["ApplicationVersion"]));
}
set {
this["ApplicationVersion"] = value;
}
}
}
}
......@@ -14,5 +14,8 @@
<Setting Name="ApiPass" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ApplicationVersion" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
......@@ -22,7 +22,7 @@
Name "MoyaAdminUI moya v1_00_07"
Name "MoyaAdminUI moya v1_00_08"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!MoyaAdminUI moya stable v1_00_07" SecMain
Section "!MoyaAdminUI moya stable v1_00_08" SecMain
SetShellVarContext current
......@@ -224,8 +224,10 @@ Section "!MoyaAdminUI moya stable v1_00_07" SecMain
; that is referenced to the main project.
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......@@ -313,8 +315,10 @@ Section "Uninstall"
; that is referenced to the main project.
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!