Skip to content

Commit

Permalink
Source code maintenance + bug fixes + features (#25)
Browse files Browse the repository at this point in the history
* Minor update to DatabaseView designer.

* Fixed #15

Cause for app hang was due to a deadlock while creating connections (ex: waiting for Initialization when called by the Init func).

Added new CreateInitialConnection which does not check if the database was initialized and InsertDefaultTables uses the connection instead of null.

* Fixed #16 first point - release image handle when done

* Clear DPFiles at start & fix file handle leak

Fixed the issue where the zip archive file handle was not released even when done; call ReleaseArchiveHandles() at the end of ProcessArchive.

Updated 7zArchive to kill the 7z process tree if it still exists.

* try..catch..me...if..you..can for all archives

try catch ReadMetaFiles, ReadContentFiles and others.

* Added sorting combo & functionality.

* Order by product name not case sensitive, update limit offset for library queries.

* added some remove right click action for library items.

* updated remove actions for product record form

remove now ask for confirmation
remove product is implemented and more advanced than the one on library item.

* fix compiler error

* fixed noImageFound replaced with random image

* Changed logo & app appearance and implemented minor UI perf increase.

* Update nuget packages

* Added new UpdateProductRecord() & UpdateExtractionRecord() along with helper funcs and proprogating changes across DPDatabase

* added delegate w/ 5 args

* Added functionality to modify product records in the product record form.

Note: Doesn't successfully save.

* i have no idea what this is.

* added new RestoreTriggers() and TempDeleteTriggers()

* fixed RemoveValuesWithCondition(), removed transaction?.Dispose() from finally, typo fixes

* removed additional update invocations

TableUpdated and ProductRecordModified() already invokes the event, no need for it twice.

* Updated UpdateRecordQ()

* Fixed #19 - explictly unregister form when closed

* Added new properties for DPAbstractFile

Also removed FileName for DPAbstractArchive since it will be covered by DPAbstractFile.

* Addressed #18, still needs work as content folders are being targetted to DAZ directory root folder.

Added new CalculateChildRelativePath() and CalculateChildRelativeTargetPath() funcs for DPFolder.

Added GetTargetPath() and propogated changes from DPFolder onto here for DPProcessor.

* Remove Queue tab temporarily; still in designer.

* fixed missing mutex for app

* Minor UI adjustment to DB viewer

Anchored button and combobox to the right.

* Removed tool strip and other unused UI elements.

* Added about form, logo links to about form

* slight fix for out of bounds exception thrown here

* Added new settings

* Settings is now using JSON.Net & using serialization

* fixed NoImageFound property returning null

* Addresses #21 - tags, etc now have char limits

Tags, Product Name, Author, SKU, Folders, Files, errored files, now have char limits.

* minor ui change - modified text anchor

* fixed settings invalid messasge always showing up

* fixed length of n + 1 instead of n

* Prevent >70 char limit for tags

* Disable thumbnail strip if no image is shown.

* update version

* remove invalid folder

* Split up project into multiple

NOTE: You will not be able to build at this commit.

* rename namespaces, setup dependencies, and more

NOTE: You will not be able to build at this commit.

* Split up UsefulFuncs.cs, removed ArrayHelper, Up in PathHelper

* moved namespace to DAZ_Installer.Core

* moved namespace to DAZ_Installer.Core.External

* added some vars from DPCommon into Program

* prepared for removal of associations from DPAbstractFile

- Flipped dictionary keys and valeus
- Now use nodes and listviewitem tags.
- Added additional condition for 'Select in hierachy' visibility for list view.
- Added select in file list view action.

* Added new DPProcessSettings

* fuck it just upload everything

* Addressed destination not enough space infinite loop when cancelled.

* Added new properties to MockedDPIOContext due to some weird NSubstitute errors

* Updated ProcessArchiveTest_OutOfStorage to now pass.

* Replace NSubstitute with Moq and proprogate changes.

Moved Fakes to Test projects instead.

* Splitting up DPProcessor - added tag provider module

Created new AbstractTagProvider and it's default implementation DPTagProvider.
Propogated changes to DPProcessor.

* Splitting up DPProcessor - added destination determiner

Created an abstract destination determiner to determine which files get extracted and to where.
Created it's default implentation at DPDestinationDeterminer.
Propogated changes.

* got rid of some ugly try-catch blocks

* Minor logging update to DPProcessor.

* Update SetupProcessor to provide fake DestinationDeterminer and TagProvider

* Try-Catch everything in processArchievInternal.

* add documentation to (Destination/Temp)HasEnoguhSpace functions

* Relay extractor extract progress event

* Add testing for processing archive after process.

* ._.

* Create dotnet-test.yml

* delete extra iotests.

* cancellation token update (not working atm)

* Remove unused variables.

* Made adjustments to DPProcessorErrorArgs for clarity.

* Clarity for DPArchiveEnterArgs

* Added func to skip archives

* Update to make extractors cancelable.

* Removed redundant CancellationToken.

* Process archives iteratively (vs recursively)

* Add support for cancelling archive and processing entirely.

* Remove skip variable

* Add CancellationToken

* Make interface for DPDatabase.

* Update database to be more async friendly.

* Remove unnecessary parameter for ProductRecordAdded

* Added locks to DPTaskManager

* Return task for RemoveProductRecord.

* Update IDPDatabase documentation

* Add task execute sequentially helper method.

* Add DPDatabase tests.

* Fix compile errors.

* Fix StringWriter import error.

* Update app name to Product Manager for DAZ Studio

to avoid trademark and other legal issues :)

* fix unintentional hiding for Scope

* Search for normalized path of current rar file.

* Add test subjects for integration testing.

* Fix RAR not extracting files split in multi-volume.

* Update test subjects

* Skip testing files that are directories.

* Always copy test subjects to output directory.

* Upload integration tests for RAR Extractor

* Check for cancellation at start of readheader loop.

This is needed to pass the "PeekTest_CancelledDuringOp" test. But also, it's just better to check for cancellation first thing.

* Delete src.rar

* Add support for Git LFS in dotnet-test.yml

* Cache Nuget Packages, change dotnet version, cd to dir

* Cache Nuget Packages, cd to dir before test run

* figure out this github action weirdness

* Remove action, remove warnings, and update verbosity.

* Add logging to figure out github actions weridness

* fix dotnet cmd

* fix dotnet cmd

* add logging to solve this mystery

* change verbosity again.

* update dotnet-test

* Add support for Git LFS in dotnet-test.yml

* Update to copy always

* Addresses #24 - NormalizePath doesnt trim drive letters

* Fix #24 - updated path calculation logic.

* Remove duplicate WinApp project.

* Update README.md

* Rename app

* get rid of comment

* Fix creating incorrect directory

* Implement 7z extractor integration tests

* Remove unnecessary test.

* Implement zip archive integration tests

* More reliable Peek, Extract, and Move events.

* Moved stream test helpers

* Added new GetRootDirectory()

* Fixed relative path issues

* fixed destination determiner + add tests

* Remove DPIDManager class

* Make streams more customizable

* Fix bug, add content type as tag, add tests

* make helper methods private

* Fix this.

* Fix logic bugs

* change security for constants

* Remove extracted check + add comment

* Add integration testing for DPProcessor

* Add testing for DPDazFile

* Add testing for DPDSXFile

* Downgrading NuGet packages

* Make TargetPath setter public.

* Fixed rar extractor extracting incorrectly for select files

Fixed DPRarExtractor from extracting other files instead of the selected files if not all of the files were being extracted.

* Added tests for partial extraction

* Fixed subarchive duplication in destination determiner.

* Fixed RAR extractor throwing archive corrupt errors

Fixed the RAR extractor throwing archive corrupt errors and added tests and updated FakeRAR based on new findings.

If the current mode is Extract, then a Test, Extract, or Skip must be called after calling ReadHeader(), otherwise "Archive is corrupt" will be the exception thrown.

* Extract DSX Files instead of DazFiles

* Fix path is null exception in ExtractedToTarget

* Fix subarchives not being processed + scope fix

Moved adding the subarchives to process at the end instead of beginning.
Removed combining the destination path with the content folder and redirects since the manifest can skip this behavior since the content folders are for when a manifest does not exist.

* fixed subarchives having empty TargetPath + typo

If Automatic was an InstallOption, the filePathPart would always be empty since no overridePath is being provided and RelativeTargetPath is empty since the archive is not in a content folder, but is targeted by the algorithm. The subarchives would have an incorrect path only returning the temp path.

Additionally, in the DetermineViaFileSense the parent archive's TargetPath was accidentially being set to the child's TargetPath which was incomplete. This resulted in the subarchive having an empty TargetPath.

* Created new Testing Suite tool

* Target x64 only

* Setup real data testing for DPProcessor

* Remove logging

* Complete real data testing

* addressed handling encrypted 7z archives

* implement cancel + updated ui responsiveness

* fixed not handling encrypted headers correctly

* adjust xcopy parameters

* fixed success percentage.

* Make processor more responsive to cancellations.

* update dpprocessor logging

* update success method, emit error for bad archive

* add more default redirects

* update documentation

* fix anchor for tabcontrol & cancel not working

* added hopefully a working PostPublish target

* fix issue with xcopy

* remove source files subject to delete action

* update archive names after the extract job finished

* extract ui optimizations + documentation

* use SetProgressBarValue instead

* Invoke on CreateProgressCombo.

* use calc instead of ref.

* remove check if marque is already set

* better RecursivelyGetControls func (might remove)

* remove useless func

* add cancellation support

Replaced DPProgressCombo with an actual UserConrtol ProgressCombo.

* auto switch page on file drag

* ref app info in assembly
  • Loading branch information
siblount authored Jan 14, 2024
1 parent b350824 commit e9d8a7c
Show file tree
Hide file tree
Showing 275 changed files with 22,110 additions and 7,179 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.7z.003 filter=lfs diff=lfs merge=lfs -text
*.7z.004 filter=lfs diff=lfs merge=lfs -text
*.7z.005 filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
*.7z.001 filter=lfs diff=lfs merge=lfs -text
*.7z.002 filter=lfs diff=lfs merge=lfs -text
6 changes: 4 additions & 2 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: .NET Test

on:
push:
branches: [ "pending-main" ]
branches: [ "pending-main", "main" ]
pull_request:
branches: [ "pending-main" ]
branches: [ "pending-main", "main" ]

jobs:
build:
Expand All @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,7 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Testing for Daz Product Manager
src/DAZ_Installer.CoreTests/RealData/Archives/*
src/DAZ_Installer.CoreTests/RealData/Manifests/*
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dotnet.defaultSolution": "src/DAZ_Installer.sln"
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DAZ Product Installer
# Product Manager for DAZ Studio
[![.NET Test](https://github.com/siblount/DazProductInstaller/actions/workflows/dotnet-test.yml/badge.svg?branch=pending-main)](https://github.com/siblount/DazProductInstaller/actions/workflows/dotnet-test.yml)

This is an application currently only for Windows users to install their products regardless of the vendor's format; it accepts common file structures and archive formats.

### Watch a preview here (click on image):
[![Daz Product Installer Alpha Preview Video](https://i.postimg.cc/VL7qpd4B/image.png)](https://www.youtube.com/watch?v=FwLc-dcl8W0)
[![Product Manager for DAZ Studio Alpha Preview Video](https://i.postimg.cc/VL7qpd4B/image.png)](https://www.youtube.com/watch?v=FwLc-dcl8W0)

## What does this project aim to do?
Firstly, it aims to be a **free** and **open-source*** application to gain trust of users, allow others to contribute, and release a product that is useful for all.
Expand Down
77 changes: 55 additions & 22 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_throw_expression = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
Expand All @@ -32,6 +32,23 @@ csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_conditional_delegate_call = true:suggestion
csharp_space_around_binary_operators = before_and_after
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = false:silent
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion

[*.{cs,vb}]
#### Naming styles ####
Expand All @@ -54,46 +71,54 @@ dotnet_naming_rule.private_members_should_be_private_camel.severity = warning
dotnet_naming_rule.private_members_should_be_private_camel.symbols = private_members
dotnet_naming_rule.private_members_should_be_private_camel.style = private_camel

dotnet_naming_rule.private_non_class_should_be_private_camel.severity = warning
dotnet_naming_rule.private_non_class_should_be_private_camel.symbols = private_non_class
dotnet_naming_rule.private_non_class_should_be_private_camel.style = private_camel


# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =


dotnet_naming_symbols.private_members.applicable_kinds = property
dotnet_naming_symbols.private_members.applicable_accessibilities = private, private_protected
dotnet_naming_symbols.private_members.required_modifers =
dotnet_naming_symbols.private_members.required_modifers =

dotnet_naming_symbols.private_non_class.applicable_kinds = property, event, method, enum, delegate
dotnet_naming_symbols.private_non_class.applicable_accessibilities = private, private_protected
dotnet_naming_symbols.private_non_class.required_modifers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.private_camel.required_prefix = _
dotnet_naming_style.private_camel.required_suffix =
dotnet_naming_style.private_camel.word_separator =
dotnet_naming_style.private_camel.required_prefix =
dotnet_naming_style.private_camel.required_suffix =
dotnet_naming_style.private_camel.word_separator =
dotnet_naming_style.private_camel.capitalization = camel_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
Expand Down Expand Up @@ -121,3 +146,11 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
Loading

0 comments on commit e9d8a7c

Please sign in to comment.