From 70774c343130096956f0cec3ab683c6aafb9f4ad Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Fri, 19 Jun 2020 20:18:03 -0700 Subject: [PATCH] - More updates to the Windows based installer --- setup.ps1 | 1 - setup.py | 7 +++---- windows/autohotkey.ps1 | 7 +++++++ 3 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 setup.ps1 diff --git a/setup.ps1 b/setup.ps1 deleted file mode 100644 index 07d5c51..0000000 --- a/setup.ps1 +++ /dev/null @@ -1 +0,0 @@ -Add-AppxPackage -register "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2241.0_x64__qbz5n2kfra8p0\AppxManifest.xml" -DisableDevelopmentMode \ No newline at end of file diff --git a/setup.py b/setup.py index a88afcc..1e48951 100755 --- a/setup.py +++ b/setup.py @@ -17,6 +17,9 @@ def windows_setup(): # Short DOS path notation path= cmdline('echo %cd%')[:-1] if default > 0 and default < 3: + print("Will now install chocolatey and autohotkey with elevated privileges...") + print("This install will fail if you are not running with elevated privileges") + os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"') print("Copying autohotkey combinations for Terminals & Editors...") os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk") if default == 1: @@ -39,10 +42,6 @@ def windows_setup(): print("Uninstall of Kinto is Complete.") if default > 0 and default < 3: stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC) - print("Will now install chocolatey and autohotkey with elevated privileges...") - print("This install will fail if you are not running with elevated privileges") - os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"') - os.system('refreshenv') print("\nWill now install Ubuntu Termimnal Theme as default...") os.system("regedit " + path + "\\windows\\theme_ubuntu.reg") os.system('robocopy '+ path + '\\assets "%userprofile%\\.kinto\\assets" /E') diff --git a/windows/autohotkey.ps1 b/windows/autohotkey.ps1 index 419b6b4..4293f3a 100644 --- a/windows/autohotkey.ps1 +++ b/windows/autohotkey.ps1 @@ -9,6 +9,13 @@ else{ if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){ choco install autohotkey.install } +else{ + Write-Output "Autohotkey is already installed" +} if(-not(test-path "C:\Strawberry\")){ choco install strawberryperl + refreshenv +} +else{ + Write-Output "Perl is already installed" }