Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Windows Installer initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiiks committed Dec 5, 2015
1 parent 074288f commit 8b8a4de
Show file tree
Hide file tree
Showing 32 changed files with 53,236 additions and 145 deletions.
20 changes: 20 additions & 0 deletions WindowsInstaller/BetterDiscordWI/BetterDiscordWI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="asardotnet">
<HintPath>..\..\..\..\VSProjects\asardotnet\asardotnet\bin\Release\asardotnet.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
Expand Down Expand Up @@ -106,6 +113,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -119,6 +127,18 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bd_logo2.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bd_logo_64x64.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bd_logo_64x64_nobg.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bd_logo_large_nobg.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
21 changes: 19 additions & 2 deletions WindowsInstaller/BetterDiscordWI/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 11 additions & 24 deletions WindowsInstaller/BetterDiscordWI/FormMain.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using BetterDiscordWI.panels;

namespace BetterDiscordWI
Expand All @@ -19,6 +14,7 @@ public partial class FormMain : Form

public String DiscordPath;
public String Sha;
public Boolean finished = false;

public XmlNodeList ResourceList;

Expand All @@ -34,21 +30,6 @@ public FormMain()
Environment.Exit(0);
}


/* ZipArchive archive = ZipFile.OpenRead(@"C:\Users\Jiiks\AppData\Roaming\BetterDiscord\temp\asar.zip");
archive.ExtractToDirectory("C:/Users/Jiiks/AppData/Roaming/BetterDiscord/temp/");*/



//Load installer config
XmlDocument doc = new XmlDocument();

doc.Load(@"G:\Git\BetterDiscordApp\BetterDiscordApp\WindowsInstaller\config.xml");

String latestVersion = doc.GetElementsByTagName("latestversion")[0].InnerText;
ResourceList = doc.GetElementsByTagName("resource");

foreach (IPanel ipanel in _panels)
{
panelContainer.Controls.Add((UserControl)ipanel);
Expand All @@ -75,11 +56,17 @@ public void SwitchPanel(int index)

protected override void OnFormClosing(FormClosingEventArgs e)
{
DialogResult dr = MessageBox.Show("Setup is not complete. If you exit now, BetterDiscord will not be installed.\n\nExit Setup?", "Exit Setup?", MessageBoxButtons.YesNo);

if (dr == DialogResult.No)
if (!finished)
{
e.Cancel = true;
DialogResult dr =
MessageBox.Show(
"Setup is not complete. If you exit now, BetterDiscord will not be installed.\n\nExit Setup?",
"Exit Setup?", MessageBoxButtons.YesNo);

if (dr == DialogResult.No)
{
e.Cancel = true;
}
}
}

Expand Down
Loading

0 comments on commit 8b8a4de

Please sign in to comment.