Permalink
Browse files

Version 1.1.401

Added backup method of updating should anything happen with github
  • Loading branch information...
1 parent 94d281b commit 99b14f1b3c7599fd873297e10c526931d59d441a @Jays2Kings committed Dec 19, 2015
View
@@ -1,6 +1,156 @@
-*.exe
-*.exe
-*.exe
-*.exe
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+build/
+[Bb]in/
+[Oo]bj/
+
+# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
+!packages/*/build/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
*.pdb
-*.exe
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.scc
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+
+# NuGet Packages Directory
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
+#packages/
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+*.pfx
+*.publishsettings
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+App_Data/*.mdf
+App_Data/*.ldf
+
+
+#LightSwitch generated files
+GeneratedArtifacts/
+_Pvt_Extensions/
+ModelManifest.xml
+
+# =========================
+# Windows detritus
+# =========================
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Mac desktop service store files
+.DS_Store
Binary file not shown.
@@ -39,6 +39,7 @@ public partial class MainWindow : Window
protected string m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Profiles.xml";
private int round = 1;
public bool downloadLang = true;
+ private bool backup;
public bool AdminNeeded()
{
try
@@ -88,7 +89,6 @@ public MainWindow()
if (!downloading && version.Replace(',', '.').CompareTo(newversion) == -1)
{
Uri url = new Uri($"http://github.com/Jays2Kings/DS4Windows/releases/download/v{newversion}/DS4Windows.zip");
- //Uri url = new Uri("http://ds4windows.com/Files/Builds/DS4Windows%20-%20J2K%20(v" + newversion + ").zip");
sw.Start();
try { wc.DownloadFileAsync(url, exepath + "\\Update.zip"); }
catch (Exception e) { label1.Content = e.Message; }
@@ -270,7 +270,7 @@ private void wc_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
if (File.Exists(exepath + "\\Update Files\\DS4Updater NEW.exe"))
File.Move(exepath + "\\Update Files\\DS4Updater NEW.exe", exepath + "\\Update Files\\DS4Updater.exe");
string[] files = Directory.GetFiles(exepath + "\\Update Files");
- for (int i = files.Length -1; i >= 0; i--)
+ for (int i = files.Length - 1; i >= 0; i--)
if (System.IO.Path.GetFileNameWithoutExtension(files[i]) != "DS4Updater")
File.Move(files[i], $"{exepath}\\{System.IO.Path.GetFileName(files[i])}");
string version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
@@ -284,7 +284,7 @@ private void wc_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
FileVersionInfo.GetVersionInfo(exepath + "\\DS4Windows.exe").FileVersion == newversion)
{
File.Delete(exepath + "\\Update.zip");
- File.Delete(exepath + "\\" + lang + ".zip");
+ File.Delete(exepath + "\\" + lang + ".zip");
label1.Content = $"DS4Windows has been updated to v{newversion}";
}
else if (File.Exists(exepath + "\\DS4Windows.exe") || File.Exists(exepath + "\\DS4Tool.exe"))
@@ -297,6 +297,14 @@ private void wc_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None;
btnOpenDS4.IsEnabled = true;
}
+ else if (!backup)
+ {
+ Uri url = new Uri($"http://ds4windows.com/DS4Windows.zip");
+ sw.Start();
+ try { wc.DownloadFileAsync(url, exepath + "\\Update.zip"); }
+ catch (Exception ex) { label1.Content = ex.Message; }
+ backup = true;
+ }
else
{
label1.Content = "Could not download update";
@@ -51,5 +51,5 @@
// 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.1.322")]
-[assembly: AssemblyFileVersion("1.1.322")]
+[assembly: AssemblyVersion("1.1.401")]
+[assembly: AssemblyFileVersion("1.1.401")]
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-1.4.3
Binary file not shown.
Binary file not shown.

0 comments on commit 99b14f1

Please sign in to comment.