Skip to content

Commit

Permalink
fixes #9 - Check if 32 bit Powershell.
Browse files Browse the repository at this point in the history
bcdedit does not work in 32 bit powershell on a 64 bit OS.
Also fixed path issue with logo.
  • Loading branch information
mikeslattery committed Feb 12, 2020
1 parent fa0c48d commit 9b36221
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tunic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ function checks() {
die( 'Only 64 bit systems supported' )
}

if( [intPtr]::size -eq 4 ) {
die( 'Tunic cannot be run from 32 bit Powershell' )
}

$osversion = [System.Environment]::OSVersion.version
if( $osversion.major -lt 10 ) {
# Windows 7=6.1, 8=6.2, 8.1=6.3 Windows 10=10
Expand Down Expand Up @@ -582,7 +586,7 @@ function gui() {
$Form.text = "Tunic Linux Installer"
$Form.autosize = $true
$pwd = (get-location).path
$form.icon = new-object System.Drawing.Icon("$pwd/file/tunic-logo.ico")
$form.icon = new-object System.Drawing.Icon("$PSScriptRoot\files\tunic-logo.ico")

# Outer layout
$global:outer = New-Object system.Windows.Forms.TableLayoutPanel
Expand Down

0 comments on commit 9b36221

Please sign in to comment.