From e43c3ad76748c099bf742a45dea02637e46809f5 Mon Sep 17 00:00:00 2001 From: Mike Slattery Date: Mon, 3 Feb 2020 20:21:30 -0500 Subject: [PATCH] misc --- README.md | 29 +++++++++++++++++------------ tunic.ps1 | 20 ++++++++++++-------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index df06dc9..5a062de 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,6 @@ Install Linux on an existing Windows system without a Live USB or firmware/BIOS * Internet access * AC Wall Power -### Limitations - -* Currently, Tunic only installs official flavors of Ubuntu and Linux Mint. -* We are working on testing Windows 7 and 8, MBR, and support for other Debian/Ubuntu based Linux distros. -* Error handling needs improvement. - ### What Tunic Does * Validates your system is compatible with Tunic. @@ -35,14 +29,27 @@ Install Linux on an existing Windows system without a Live USB or firmware/BIOS * Installs Grub with Secure Boot support. * Calculates Linux equivalent values for your Windows locale and user account. * Reboots and runs the Ubiquity installer, automated. -* If custom boot, will provide Ubuntu's Ubiquity partiton utility GUI. +* If custom install type choosen, will provide Ubuntu's Ubiquity partiton utility GUI. * Reboots into your final installed Linux! +See the [TODO](doc/TODO.md) for ideas for future versions. + +### Limitations + +* Currently, Tunic only installs official flavors of Ubuntu and Linux Mint. +* We are working on testing Windows 7 and 8, MBR, and support for other Debian/Ubuntu based Linux distros. +* Error handling needs improvement. +* During install the "Quit" button may not work. + +### More information + +See the [doc](doc) directory for more information. + ## Getting Started ### Preparation -Backup your data! +* Backup your data! Before you start, make sure to backup up an image of your entire disk(s). Tunic does not assist with full disk backup. @@ -50,6 +57,8 @@ Read disclaimer for more information. No, really. Backup your data. +* Close all other running applications. + ### Usage 1. Download and run the [latest executable file](/mikeslattery/tunic/releases/download/latest/tunic.exe) from releases. @@ -57,10 +66,6 @@ No, really. Backup your data. 1. Let it run. It may take a long time. 1. Enjoy your new Linux OS! -## More information - -See the [doc](doc) directory for more information. - ## Legal Stuff ### License diff --git a/tunic.ps1 b/tunic.ps1 index df83ea7..73260db 100644 --- a/tunic.ps1 +++ b/tunic.ps1 @@ -180,6 +180,10 @@ function checks() { die( 'It is too risky to use Tunic while on battery.' ) } + if( (New-Object -ComObject 'Microsoft.Update.Installer').isBusy ) { + die('A Windows Update is in progress. Try again later.') + } + $partc = ( get-partition -driveLetter $global:letter ) if( (get-disk -number $partc.diskNumber).partitionStyle -eq 'MBR' ) { mbr2gpt /validate /allowfullos > $null 2> $null @@ -310,7 +314,9 @@ function getLinuxTimeZone() { } # Sloppy match - $ltz = $zones[0].type + if( ! $ltz ) { + $ltz = $zones[0].type + } } else { # Match by GMT and hour difference. @@ -942,9 +948,10 @@ function gui() { $buttonPanel.padding = 5 $buttonPanel.AutoSize = $true - $abortButton = New-Object system.Windows.Forms.Button + $global:abortButton = New-Object system.Windows.Forms.Button $abortButton.text = "Quit" $abortButton.tabStop = $false + $abortButton.dialogResult = [System.Windows.Forms.DialogResult]::Cancel $buttonPanel.controls.add($abortButton) $global:installbutton = New-Object system.Windows.Forms.Button @@ -1035,10 +1042,6 @@ function gui() { installTypeCheck }) - $abortButton.add_click( { - $form.close() - }) - $installButton.add_click({ $global:data.username = $username.text $global:data.fullname = $fullname.text @@ -1074,7 +1077,8 @@ function gui() { $global:dual.visible = $false $installButton.visible = $false $global:progress.visible = $true - #TODO: Run as PSJob, remove doevents + #TODO: Run as PSJob, remove doevents, don't hide abortButton + $global:abortButton.visible = $false if( $global:data.installType -eq $DUALBOOT ) { $global:data.linuxSize = [double]::parse( $global:linuxSize.text ) @@ -1168,7 +1172,7 @@ switch($op) { } default { $global:form = (gui) - $form.showDialog() + [void]$form.showDialog() } }