Skip to content

Commit

Permalink
Merge pull request #36 from SibTiger/PSCAT-Version-1.1.0
Browse files Browse the repository at this point in the history
- Project Name will no longer be displayed when running 'Clean Mode'.
- Revised the 'Uninstall' operations to 'Deep Clean'.
- Removed the PSCAT Program Mode scripts, the launcher and the Batch scripts provide this functionality in a seamless way already.
- Beta worthy!
  • Loading branch information
SibTiger authored Oct 23, 2022
2 parents a8ec9b6 + f6ea06d commit 0426b03
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 934 deletions.
8 changes: 0 additions & 8 deletions Installer/Scripts/Installation Files/Files.iss
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ Source: "Scripts\Launcher\Launcher.ps1"; \
DestDir: "{app}\Bin\"; \
Flags: confirmoverwrite touch;

Source: "Scripts\Program Modes\Clean.ps1"; \
DestDir: "{app}\Bin\"; \
Flags: confirmoverwrite touch;

Source: "Scripts\Program Modes\Uninstall.ps1"; \
DestDir: "{app}\Bin\"; \
Flags: confirmoverwrite touch;

Source: "Installer\Product Assets\Bootstrap\Bootstrap Loader.bat"; \
DestDir: "{app}\Bootstrap\"; \
Flags: confirmoverwrite touch;
Expand Down
4 changes: 2 additions & 2 deletions Installer/Scripts/Project Information.iss
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#define public _PRODUCT_NAME_FULL_ "PowerShell Compact-Archive Tool"
#define public _PRODUCT_NAME_SHORT_ "PSCAT"
#define public _PRODUCT_VERSION_ "1.1.0"
#define public _PRODUCT_VERSION_CODENAME_ "Cordis"
#define public _PRODUCT_VERSION_DATE_ "2022.05.22"
#define public _PRODUCT_VERSION_CODENAME_ "Cordis [Beta Version]"
#define public _PRODUCT_VERSION_DATE_ "23.05.2022"
#define public _PRODUCT_WEBSITE_HOMEPAGE_ "https://github.com/SibTiger/PowerShell-Compact-Archive-Tool"
#define public _PRODUCT_WEBSITE_SUPPORT_ "https://github.com/SibTiger/PowerShell-Compact-Archive-Tool/wiki"
#define public _PRODUCT_WEBSITE_UPDATES_ "https://github.com/SibTiger/PowerShell-Compact-Archive-Tool/releases"
Expand Down
46 changes: 10 additions & 36 deletions Scripts/Clean.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# - Compiled Builds
# - Log files
# - Report files
# - Uninstall
# - Deep Cleanup
# - Compiled Builds
# - Log files
# - Report files
Expand Down Expand Up @@ -93,7 +93,7 @@ function clean()


# Provide a new Window Title
[CommonIO]::SetTerminalWindowTitle("$($Global:_PROGRAMNAME_) (Version $($Global:_VERSION_)) for $([ProjectInformation]::projectName) - $([ProjectInformation]::codeName)");
[CommonIO]::SetTerminalWindowTitle("$($Global:_PROGRAMNAME_) (Version $($Global:_VERSION_)) - Clean Mode");


# Load the user's configurations, if available.
Expand All @@ -119,14 +119,14 @@ function clean()
} # Clean Up Mode


# Uninstall Mode
{($_ -eq [CleanUpModeType]::Uninstall)}
# Deep Clean Up Mode
{($_ -eq [CleanUpModeType]::DeepCleanUp)}
{
# Let the user know that the application is uninstalling itself.
[CommonIO]::WriteToBuffer("Uninstalling`r`n`r`n", + `
# Let the user know that the application is performing a deep cleanup.
[CommonIO]::WriteToBuffer("Deep Clean Up`r`n`r`n", + `
[LogMessageLevel]::Warning, + `
$false);
} # Uninstall Mode
} # Deep Clean Up Mode
} # switch : Program Mode


Expand Down Expand Up @@ -195,7 +195,7 @@ function clean()


# Delete the user configuration file
if ($programMode -eq [CleanUpModeType]::Uninstall)
if ($programMode -eq [CleanUpModeType]::DeepCleanUp)
{
[CommonIO]::WriteToBuffer("`tUser Configuration`r`n`t`t$GLOBAL:_PROGRAMDATA_ROOT_ROAMING_PATH_", + `
[LogMessageLevel]::Warning, + `
Expand All @@ -215,7 +215,7 @@ function clean()
[LogMessageLevel]::Error, + `
$false);
} # if : Failed to Delete Directory - Logs\Reports
} # if : Uninstall
} # if : Deep Clean Up



Expand Down Expand Up @@ -246,32 +246,6 @@ function clean()



# Program Files
# -----------
# -----------


# Let the user know that they will need to expunge the program files manually, but if and only if the Uninstall flag is raised.
if ($programMode -eq [CleanUpModeType]::Uninstall)
{
[CommonIO]::WriteToBuffer("`tProgram Files", + `
[LogMessageLevel]::Warning, + `
$false);


# Because it is going to take large amounts of time to make this functionality work, it is best to have the user to delete the directory themselves.
# NOTE: This approach is mainly for Power Users; others will benefit from the Installer packages.
[CommonIO]::WriteToBuffer("`t`tIn order to delete the $($GLOBAL:_PROGRAMNAME_) Program Files, you will have to delete following directory:", + `
[LogMessageLevel]::Attention, + `
$false);


[CommonIO]::WriteToBuffer("`t`t$GLOBAL:_SCRIPTPATH_", + `
[LogMessageLevel]::Warning, + `
$false);
} # if : Uninstall



# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Expand Down Expand Up @@ -329,5 +303,5 @@ enum CleanUpModeType
{
Nothing = 0; # No cleaning is required
CleanUp = 1; # Standard Cleanup Operation
Uninstall = 2; # Uninstall the Application
DeepCleanUp = 2; # Deep Cleanup Operation
} # CleanUpModeType
4 changes: 2 additions & 2 deletions Scripts/Initializations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function InitializationProgramIdentity()
-Description "The short name of the application";

# Version
Set-Variable -Name "_VERSION_" -Value "1.1.0 - Alpha" `
Set-Variable -Name "_VERSION_" -Value "1.1.0 - Beta" `
-Option ReadOnly -Scope Global -ErrorAction SilentlyContinue `
-Visibility Public `
-Description "The version of the application";
Expand All @@ -87,7 +87,7 @@ function InitializationProgramIdentity()

# Release Date
# Date Format: DD.MM.YYYY with leading zeros
Set-Variable -Name "_RELEASEDATE_" -Value "xx.03.2022" `
Set-Variable -Name "_RELEASEDATE_" -Value "23.10.2022" `
-Option ReadOnly -Scope Global -ErrorAction SilentlyContinue `
-Visibility Public `
-Description "The date in which the version of the application was released.";
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Launcher/Launcher.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
Program Mode [integer value]
0 = Normal mode; compile projects (Default)
1 = Clean up mode; remove some generated data
2 = Uninstall mode; removes all generated data
2 = Deep clean up mode; removes all generated data
.OUTPUTS
Operation Return Code
Expand Down Expand Up @@ -111,7 +111,7 @@ param(
# Software runs normally, no changes.
# 1 = Clean Up Mode
# Deletes all builds, logs, and report files.
# 2 = Uninstall Mode
# 2 = Deep Clean Up Mode
# Deletes all builds, logs, report files, and user configuration.
[Parameter(Mandatory=$false)]
[ValidateRange(0, 2)]
Expand Down
Loading

0 comments on commit 0426b03

Please sign in to comment.