Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

WIP NET Standard 2.0 Support #33

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
130f406
Change implementation to a queue and task
Matthiee Nov 1, 2017
054a850
Add IOUtils CachePath
Matthiee Nov 4, 2017
bf99c74
Add Version proxy class that can be serialized to XML
Matthiee Nov 11, 2017
9cd84c9
Marked as obsolete
Matthiee Nov 11, 2017
5f9dbbd
Remove IEncoder we will not need this
Matthiee Nov 11, 2017
99792d8
Change namespace to MatthiWare.UpdateLib.Common
Matthiee Nov 11, 2017
0719bae
Cleaned unused usings
Matthiee Nov 11, 2017
69d1ded
Add UpdateVersion to replace System.Version
Matthiee Nov 11, 2017
bb06d47
Add Unit Tests for UpdateVersion
Matthiee Nov 12, 2017
7958a1c
Change UpdateFile to a catalog style of multitple updates
Matthiee Nov 12, 2017
4fd2ff1
Seperate UpdateInfo From UpdateFile
Matthiee Nov 15, 2017
ebf2a0d
First part of the VCDiffDecoder Import
Matthiee Nov 15, 2017
c000dff
Finished VCDiffDecoder
Matthiee Nov 16, 2017
ec66e2d
Add GZip support
Matthiee Nov 16, 2017
a8652fd
Add GZip
Matthiee Nov 17, 2017
61aa286
Added Deflater/Inflater
Matthiee Nov 18, 2017
52234fd
Add Zip support
Matthiee Nov 18, 2017
7b77c90
Cleanup
Matthiee Nov 19, 2017
120031a
Code cleanup
Matthiee Nov 19, 2017
32aeadb
Add ZipFile
Matthiee Nov 24, 2017
c298bf1
Cleanup
Matthiee Nov 24, 2017
13802b5
Temp commit
Matthiee Dec 6, 2017
7963628
Add progress reporting functionality
Matthiee Dec 17, 2017
208ecae
Change namespace
Matthiee Dec 17, 2017
8878738
Add SharedAssemblyInfo
Matthiee Dec 26, 2017
4dc304d
Rework AsyncTask generic methods
Matthiee Dec 26, 2017
3219a61
update readme
Matthiee Jan 12, 2018
19d48ac
Added CatalogFile + Unit tests
Matthiee Jan 28, 2018
8a389f1
Clearing errors for new feature
Matthiee Feb 15, 2018
f7bbf35
Thread-safety improvements
Matthiee Mar 27, 2018
0a5136f
Small coding improvements
Matthiee Mar 27, 2018
d003df5
Update to .NET Standard 2.0
Matthiee Aug 15, 2018
c45d340
Revert "Update to .NET Standard 2.0"
Matthiee Aug 16, 2018
8f6cd32
real upgrade .NET Standard 2.0
Matthiee Aug 16, 2018
fff6f1d
Add nuget packages
Matthiee Aug 16, 2018
a050b81
Start reworking the structure of UpdateLib
Matthiee Aug 19, 2018
ea09f0e
Setup some ideas in Generator project
Matthiee Aug 20, 2018
3d2784e
Dummy logic on how the patching will work.
Matthiee Aug 22, 2018
f6ad9fb
CommandLineParserTests fixed
Matthiee Aug 31, 2018
33df019
Changes to CommandLineParser
Matthiee Sep 2, 2018
11c1abc
Merge CLI
Matthiee Sep 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p align="center">
<a href="https://travis-ci.org/MatthiWare/UpdateLib"><img src="https://api.travis-ci.org/MatthiWare/UpdateLib.svg?branch=master" alt="Build Status (Travis-CI)"></a>
<a href="https://ci.appveyor.com/project/Matthiee/UpdateLib"><img src="https://ci.appveyor.com/api/projects/status/0fd0o5gwan5dpj9p?svg=true" alt="Buitld Status (AppVeyor)"></a>
<a href="https://ci.appveyor.com/project/Matthiee/UpdateLib"><img src="https://ci.appveyor.com/api/projects/status/0fd0o5gwan5dpj9p?svg=true" alt="Build Status (AppVeyor)"></a>
<a href="https://github.com/MatthiWare/UpdateLib/issues"><img src="https://img.shields.io/github/issues/MatthiWare/UpdateLib.svg" alt="Open Issues"></a>
<a href="https://codecov.io/gh/MatthiWare/UpdateLib"><img src="https://codecov.io/gh/MatthiWare/UpdateLib/branch/master/graph/badge.svg" alt="Codecov" /></a>
<a href="https://tldrlegal.com/license/mit-license"><img src="https://img.shields.io/badge/license-mit-blue.svg" alt="MIT License"></a>
<a href="https://gitter.im/MatthiWare/UpdateLib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://badges.gitter.im/MatthiWare/UpdateLib.svg" alt="Join the chat at https://gitter.im/MatthiWare/UpdateLib"></a>
</p>

# UpdateLib v0.4.4
# UpdateLib v0.5.0-alpha
A .Net auto update library made in C#

### Disclaimer
@@ -16,14 +16,13 @@ UpdateLib should only be used for testing purposes untill the first stable relea
Use UpdateLib at your own risk while it is still in development.

## Features
- Generator for the update file with GUI
- Updating files
- Updating registry
- Fail-safe rollback feature
- Caching system
- FluentAPI to configure the client-side application
- GUI for update generation
- Updating files and registry
- Extensive Fail-safe rollback feature
- FluentAPI to configure the client-side application (minimal configuration needed)
- Minimize network overhead by making use of binary patches

## Future
- Creation of binary patches
- Rework update generator
- Extend rollback feature
- Make UpdateLib more generic and configurable
- Bugfixes
- None planned at the moment
11 changes: 11 additions & 0 deletions UpdateLib/.shared/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyCompany("MatthiWare")]
[assembly: AssemblyProduct("UpdateLib")]
[assembly: AssemblyCopyright("Copyright © MatthiWare 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
369 changes: 4 additions & 365 deletions UpdateLib/TestApp/Form1.Designer.cs

Large diffs are not rendered by default.

107 changes: 8 additions & 99 deletions UpdateLib/TestApp/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
/* UpdateLib - .Net auto update library
* Copyright (C) 2016 - MatthiWare (Matthias Beerens)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

using MatthiWare.UpdateLib;
using MatthiWare.UpdateLib.Tasks;
using System;
using System.IO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestApp
@@ -28,84 +15,6 @@ public partial class Form1 : Form
public Form1()
{
InitializeComponent();

Updater.Instance.CheckForUpdatesCompleted += Instance_CheckForUpdatesCompleted;
}

private void Instance_CheckForUpdatesCompleted(object sender, CheckForUpdatesCompletedEventArgs e)
{
checkForUpdatesToolStripMenuItem.Enabled = true;

//if (e.Cancelled || e.Error != null)
//{
// this.InvokeOnUI(() => MessageDialog.Show(
// this,
// "Updater",
// e.Cancelled ? "Cancelled" : "Error",
// e.Cancelled ? "Update got cancelled" : "Please check the logs for more information.",
// e.Cancelled ? SystemIcons.Warning : SystemIcons.Error,
// MessageBoxButtons.OK));

// return;
//}

//if (!e.UpdateAvailable)
//{
// this.InvokeOnUI(() =>
// MessageDialog.Show(
// this,
// "Updater",
// "No update available!",
// $"You already have the latest version ({e.LatestVersion}).",
// SystemIcons.Information,
// MessageBoxButtons.OK));

// return;
//}
}

private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
{
checkForUpdatesToolStripMenuItem.Enabled = false;

AsyncTask task = Updater.Instance.CheckForUpdatesAsync();
//task.Cancel();
}

private void Form1_Load(object sender, EventArgs e)
{
label1.Text = ReadFile("data/testfile1.txt");
label2.Text = ReadFile("data/testfile2.txt");
label3.Text = ReadFileAndKeepStreamOpen("data/testfile3.txt");
}

private string ReadFile(string file)
{
if (!File.Exists(file))
return "ERROR: File doesn't exist..";

string[] lines = File.ReadAllLines(file);

return string.Join(", ", lines);
}

FileStream fs;
/// <summary>
/// Bad code that keeps the file open & locked
/// Purpose: to demonstrate the updater still works on locked files.
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
private string ReadFileAndKeepStreamOpen(string file)
{
if (!File.Exists(file))
return "ERROR: File doesn't exist..";

fs = new FileStream(file, FileMode.Open, FileAccess.ReadWrite, FileShare.None);
StreamReader sr = new StreamReader(fs);
string text = sr.ReadToEnd();

return text;
}
}
}
Loading