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

Concurrent Downloads #22

Merged
merged 80 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f608fd5
Instancing RxPatcher + Added UpdateServerHandler for URLs
Jan 12, 2018
f2803fa
Should be checking if an object is of a class type, not checking for …
Jan 12, 2018
12812a9
More work towards Friendly Names
Jan 12, 2018
edd9cc9
Added Latency testing for patch mirrors
Jan 15, 2018
e25fd6c
Added a file & console logger project
Jan 16, 2018
cf4d7c0
Added some basic logging, much more to come soon
Jan 16, 2018
6296faf
Oops, was not using append...
Jan 16, 2018
6da4afb
Added more logging, update xdelta to new version
Jan 16, 2018
cb473a0
Included xdelta3.1.0 in project file
Jan 16, 2018
bded0fc
Updated logger to be thread-safe
Jan 17, 2018
219ed39
Applying xdelta stage is now multi-threaded
Jan 17, 2018
3ff7f57
Phase Two progress now shown to user
Jan 17, 2018
345218b
Removed UpdateServerSelector as it's no longer required
Jan 17, 2018
bb28c25
Changed UpdateServerHandler to have async latency testing
Jan 17, 2018
e44db00
Made UpdateServerHandler public
Jan 17, 2018
52ab2cc
Disposing of unused objects
Jan 17, 2018
9a94dc1
Commented out the Close and Pause buttons
Jan 17, 2018
0eab94c
Reverted back to Queue for server selection
Jan 17, 2018
2c172e2
New GitIgnore, this is wonderful
Jan 17, 2018
d5fb9ad
Renamed FriendlyName to Name
Jan 17, 2018
b07d85c
Missed these files for Name rename
Jan 17, 2018
9fd2eb6
Removed old xdelta versions
Jan 17, 2018
f7ca6c3
Added logging to the UpdateServerSelector
Jan 18, 2018
0eec46e
All variable names have been standardised as it's good practice.
Jan 18, 2018
b34295b
First pass of multi-threaded downloading
Jan 18, 2018
c750a6c
Concurrent Downloading actually working
Jan 19, 2018
beda8b9
Updated logging, added a new catch statement
Jan 19, 2018
a697252
Fixes & Added active threads to download window
Jan 19, 2018
f829d55
Fixed download window showing invalid statuses
Jan 20, 2018
a5f1246
Added debug window for downloads
Jan 20, 2018
6783c90
Upped the .NET HTTP Connection limit to 50
Jan 20, 2018
1237fe1
Built libraries again.
Jan 20, 2018
b843860
Downloading Debug shows with --log now
Jan 20, 2018
300ec2a
Work towards the Cancel button actually working & DLL again
Jan 20, 2018
8517eae
Added Installer background back in.
Jan 20, 2018
3181c46
More comments
Jan 20, 2018
27beb75
Fixed index out of array issue when first installing
Jan 20, 2018
da0c8a3
Fixes VisualStudio seeing these files as Components
Jan 20, 2018
f092558
Added variable for MaxDownloadThreads
Jan 24, 2018
b2e3041
Added Logging / Threaded xDelta / Friendly Server Names (#21)
Jan 24, 2018
be43688
Removed binary files that are not wanted here.
Jan 27, 2018
f42d3a3
Instancing RxPatcher + Added UpdateServerHandler for URLs
Jan 12, 2018
954bfcf
Merge Conflicts done
Jan 27, 2018
b6a9944
More work towards Friendly Names
Jan 12, 2018
a821b00
Added Latency testing for patch mirrors
Jan 15, 2018
8391d6f
Added some basic logging, much more to come soon
Jan 16, 2018
392e4f3
Added more logging, update xdelta to new version
Jan 16, 2018
cc38bdb
Included xdelta3.1.0 in project file
Jan 16, 2018
ba9efa8
Applying xdelta stage is now multi-threaded
Jan 17, 2018
3b5cc51
Changed UpdateServerHandler to have async latency testing
Jan 17, 2018
4493e35
Made UpdateServerHandler public
Jan 17, 2018
c5ac6c1
Commented out the Close and Pause buttons
Jan 17, 2018
970e44a
Reverted back to Queue for server selection
Jan 17, 2018
0f76d24
New GitIgnore, this is wonderful
Jan 17, 2018
71ecbf3
Missed these files for Name rename
Jan 17, 2018
aa60638
Removed old xdelta versions
Jan 17, 2018
d1231ff
All variable names have been standardised as it's good practice.
Jan 18, 2018
c1295fc
First pass of multi-threaded downloading
Jan 18, 2018
b673f92
Concurrent Downloading actually working
Jan 19, 2018
7de3ba5
Fixes & Added active threads to download window
Jan 19, 2018
722d4de
Fixed download window showing invalid statuses
Jan 20, 2018
28326b6
Added debug window for downloads
Jan 20, 2018
3a79fb9
Upped the .NET HTTP Connection limit to 50
Jan 20, 2018
7027b1c
Built libraries again.
Jan 20, 2018
6ceaca3
Downloading Debug shows with --log now
Jan 20, 2018
269b42c
Work towards the Cancel button actually working & DLL again
Jan 20, 2018
3f3b079
Added Installer background back in.
Jan 20, 2018
a9671d3
More comments
Jan 20, 2018
57e88d2
Fixed index out of array issue when first installing
Jan 20, 2018
a804d7a
Fixes VisualStudio seeing these files as Components
Jan 20, 2018
71edc8d
Added variable for MaxDownloadThreads
Jan 24, 2018
4a5b81b
Removed binary files that are not wanted here.
Jan 27, 2018
d3a00b4
Merge branch 'concurrent_downloads' of https://github.com/TotemArts/R…
Jan 27, 2018
029dbb8
Deleing the .user file
Jan 27, 2018
28bb3bb
Fixed an incorrect merge - Null exception
Jan 27, 2018
9ba88dd
Fixed Join Game button fading when clicking on a server
Jan 28, 2018
ab4c3da
Updated installer, urls, and fixed a small bug with --log
Jan 28, 2018
9b89d80
Deleted files not needed
Jan 28, 2018
750fef3
Updated release.json URL again...
Jan 28, 2018
8493dce
Version number updating
Jan 28, 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
329 changes: 329 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,332 @@
/Renegade X Launcher/bin
/Renegade X Launcher/obj

# RxLogger
/RxLogger/bin/
/RxLogger/Obj

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# Cache files
*.cache

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug\
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in\
[Oo]bj\
[Ll]og\

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# 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
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# 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
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# TypeScript v1 declaration files
typings/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog
2 changes: 1 addition & 1 deletion RXPatch/ApplyFromFilesystemCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private async Task<int> RunAsync(string[] remainingArguments)
}

await ProgressReporter.AwaitWithProgressReporting<DirectoryPatcherProgressReport>(
(progress) => new RXPatcher().ApplyPatchFromFilesystem(patchDir, destinationDir, applicationDir, progress, new CancellationToken(), null)
(progress) => new RxPatcher().ApplyPatchFromFilesystem(patchDir, destinationDir, applicationDir, progress, new CancellationToken(), null)
);

return 0;
Expand Down
4 changes: 3 additions & 1 deletion RXPatch/ApplyFromWebCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ private async Task<int> RunAsync(string[] remainingArguments)
return 1;
}

RxPatcher.Instance.AddNewUpdateServer(remainingArguments[0], "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patchUrl would be more descriptive than remainingArguments[0]


await ProgressReporter.AwaitWithProgressReporting<DirectoryPatcherProgressReport>(
(progress) => new RXPatcher().ApplyPatchFromWeb(patchUrl, targetDir, applicationDir, progress, new CancellationToken(), null) // intentionally skipping instructions.json verification
(progress) => RxPatcher.Instance.ApplyPatchFromWebDownloadTask(RxPatcher.Instance.GetNextUpdateServerEntry(), targetDir, applicationDir, progress, new CancellationToken(), null) // intentionally skipping instructions.json verification
);

return 0;
Expand Down
8 changes: 4 additions & 4 deletions RXPatch/CreateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace RXPatch
{
class CreateCommand : ConsoleCommand
{
bool RemoveOutput = false;
bool _removeOutput = false;

public CreateCommand()
{
IsCommand("create", "Create patch");
HasOption("removeoutput", "Remove contents of output directory on startup.", value => RemoveOutput = value != null);
HasOption("removeoutput", "Remove contents of output directory on startup.", value => _removeOutput = value != null);
HasAdditionalArguments(1, "<config file path>");
}

Expand Down Expand Up @@ -81,7 +81,7 @@ private async Task<int> RunAsync(string[] remainingArguments)
return 1;
}

if (RemoveOutput)
if (_removeOutput)
{
DirectoryEx.DeleteContents(patchInfo.PatchPath);
}
Expand All @@ -90,7 +90,7 @@ private async Task<int> RunAsync(string[] remainingArguments)
Console.Error.WriteLine("Warning: Output path already exists. Use --removeoutput to erase its contents.");
}

await new RXPatchBuilder().CreatePatchAsync(patchInfo);
await new RxPatchBuilder().CreatePatchAsync(patchInfo);
return 0;
}
}
Expand Down
Loading