Build and publication update - app will now deploy to remote FTP and generate one click installer.

This commit is contained in:
Szymon Porwolik
2019-02-24 19:28:00 +01:00
parent 58cc8a7b39
commit b96affd4fd
6 changed files with 51 additions and 36 deletions

View File

@@ -36,7 +36,7 @@
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="MYSQL_Port" serializeAs="String"> <setting name="MYSQL_Port" serializeAs="String">
<value /> <value>3306</value>
</setting> </setting>
</Perun_v1.Properties.Settings> </Perun_v1.Properties.Settings>
<Perun.Properties.Settings> <Perun.Properties.Settings>

View File

@@ -12,21 +12,30 @@
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>true</IsWebBootstrapper>
<PublishUrl>C:\Users\simpo\Desktop\Perun\</PublishUrl> <PublishUrl>ftp://s18.mydevil.net/perun/</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Web</InstallFrom>
<UpdateEnabled>false</UpdateEnabled> <UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode> <UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval> <UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically> <UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired> <UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<AutorunEnabled>true</AutorunEnabled> <InstallUrl>http://share.porwolik.com/ftp/perun/</InstallUrl>
<ApplicationRevision>2</ApplicationRevision> <SupportUrl>https://github.com/szporwolik/perun</SupportUrl>
<ErrorReportUrl>https://github.com/szporwolik/perun</ErrorReportUrl>
<TargetCulture>en</TargetCulture>
<ProductName>Perun for DCS World</ProductName>
<PublisherName>szporwolik</PublisherName>
<SuiteName>Perun</SuiteName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>Perun.htm</WebPage>
<ApplicationRevision>8</ApplicationRevision>
<ApplicationVersion>0.3.3.%2a</ApplicationVersion> <ApplicationVersion>0.3.3.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
@@ -73,6 +82,7 @@
<PropertyGroup> <PropertyGroup>
<TargetZone>LocalIntranet</TargetZone> <TargetZone>LocalIntranet</TargetZone>
</PropertyGroup> </PropertyGroup>
<PropertyGroup />
<PropertyGroup> <PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest> <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>

View File

@@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
// Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki // Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki
// przy użyciu symbolu „*”, tak jak pokazano poniżej: // przy użyciu symbolu „*”, tak jak pokazano poniżej:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.3.3.0")] [assembly: AssemblyVersion("0.3.3.3")]
[assembly: AssemblyFileVersion("0.3.3.0")] [assembly: AssemblyFileVersion("0.3.3.3")]
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]

View File

@@ -121,7 +121,7 @@ namespace Perun_v1.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("3306")]
public string MYSQL_Port { public string MYSQL_Port {
get { get {
return ((string)(this["MYSQL_Port"])); return ((string)(this["MYSQL_Port"]));

View File

@@ -27,7 +27,7 @@
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="MYSQL_Port" Type="System.String" Scope="User"> <Setting Name="MYSQL_Port" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">3306</Value>
</Setting> </Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@@ -23,6 +23,7 @@ namespace Perun_v1
public string[] SendBuffer=new string[10]; // Mysql send buffer public string[] SendBuffer=new string[10]; // Mysql send buffer
public bool LetMeOut=false; // Helper to handle system tray public bool LetMeOut=false; // Helper to handle system tray
public string MySql_connStr; // MySQL connection string public string MySql_connStr; // MySQL connection string
string publishVersion = "DEBUG"; // Helper for pulling version definition
public static void LogHistoryAdd(ref string[] LogHistory, string Comment) public static void LogHistoryAdd(ref string[] LogHistory, string Comment)
{ {
@@ -47,10 +48,8 @@ namespace Perun_v1
// Modify specific // Modify specific
if (type == "1") // Inject app version information if (type == "1") // Inject app version information
{ {
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location); udp_frame.payload["v_win"] = "v"+ publishVersion;
string version = fileVersionInfo.ProductVersion;
udp_frame.payload["v_win"] = "v"+version;
} }
// Specific SQL // Specific SQL
@@ -181,9 +180,12 @@ namespace Perun_v1
con_check_3rd_srs.Checked = Properties.Settings.Default.OTHER_SRS_USE; con_check_3rd_srs.Checked = Properties.Settings.Default.OTHER_SRS_USE;
// Version to title header // Version to title header
Assembly assembly = Assembly.GetExecutingAssembly(); if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location); {
this.Text = this.Text + " - v" + fileVersionInfo.ProductVersion; System.Deployment.Application.ApplicationDeployment cd = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
publishVersion = cd.CurrentVersion.ToString();
}
this.Text = this.Text + " - v" + publishVersion;
} }
private void con_Button_Listen_ON_Click(object sender, EventArgs e) private void con_Button_Listen_ON_Click(object sender, EventArgs e)
@@ -386,28 +388,31 @@ namespace Perun_v1
for (int i = 0; i < raw_lotatc.Count; i++) for (int i = 0; i < raw_lotatc.Count; i++)
{ {
int temp = raw_lotatc[i].RadioInfo.radios.Count - 1; if (raw_lotatc[i].RadioInfo != null) {
for (int j = temp; j >= 0; j--)
{
raw_lotatc[i].RadioInfo.radios[j].enc.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].encKey.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].encMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMax.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMin.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].modulation.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].volMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].expansion.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].channel.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].simul.Parent.Remove();
if (raw_lotatc[i].RadioInfo.radios[j].name == "No Radio") int temp = raw_lotatc[i].RadioInfo.radios.Count - 1;
for (int j = temp; j >= 0; j--)
{ {
raw_lotatc[i].RadioInfo.radios[j].Remove(); raw_lotatc[i].RadioInfo.radios[j].enc.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].encKey.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].encMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMax.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMin.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].modulation.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].freqMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].volMode.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].expansion.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].channel.Parent.Remove();
raw_lotatc[i].RadioInfo.radios[j].simul.Parent.Remove();
if (raw_lotatc[i].RadioInfo.radios[j].name == "No Radio")
{
raw_lotatc[i].RadioInfo.radios[j].Remove();
}
} }
raw_lotatc[i].ClientChannelId.Parent.Remove();
raw_lotatc[i].RadioInfo.simultaneousTransmission.Parent.Remove();
} }
raw_lotatc[i].ClientChannelId.Parent.Remove();
raw_lotatc[i].RadioInfo.simultaneousTransmission.Parent.Remove();
} }
strSRSJson = JsonConvert.SerializeObject(raw_lotatc); strSRSJson = JsonConvert.SerializeObject(raw_lotatc);