Skip to content

Commit 237c286

Browse files
committed
switching to PowerShell install script
1 parent 1bea1ad commit 237c286

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This program executes four main tasks:
1616

1717
Most users will want to use the applications available in the [release section](https://github.com/QualitativeDataRepository/dvcurator-python//releases/). The release gets built by pushing to a new tag.
1818

19-
*NOTE:* Syracuse University office computers cannot run this program directly. You should download the [SU Lab Install.bat](https://github.com/QualitativeDataRepository/dvcurator-python/blob/master/SU%20Lab%20Install.bat) file (right click "Raw" and the top and Save Link As), and run that instead. This will install the program properly and create a shortcut on your desktop.
19+
*NOTE:* Syracuse University office computers cannot run this program directly because of security policies. You should download the [SU Lab Install.ps1](https://github.com/QualitativeDataRepository/dvcurator-python/blob/master/SU%20Lab%20Install.ps1) file (right click "Raw" and the top and Save Link As), and run that instead by right-clicking and selecting "Run with PowerShell". This will install the program properly and create a shortcut on your desktop.
2020

2121
# Running dvcurator-python
2222

SU Lab Install.bat

Lines changed: 0 additions & 23 deletions
This file was deleted.

SU Lab Install.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Create Apps-SU directory if it doesn't exist
2+
New-Item -Path "C:\Apps-SU" -ItemType Directory -Force | Out-Null
3+
4+
# Set variables
5+
$prog = "dvcurator"
6+
$exe = "C:\Apps-SU\${prog}_win.exe"
7+
$desktop = [Environment]::GetFolderPath("Desktop")
8+
$lnk = "${desktop}\${prog}.url"
9+
10+
Write-Host "Downloading $prog..."
11+
12+
# Get latest release download URL and download the exe
13+
$release = Invoke-RestMethod -Uri "https://api.github.com/repos/QualitativeDataRepository/dvcurator-python/releases/latest"
14+
$downloadUrl = $release.assets | Where-Object { $_.browser_download_url -like "*.exe" } | Select-Object -ExpandProperty browser_download_url
15+
Invoke-WebRequest -Uri $downloadUrl -OutFile $exe -UseBasicParsing
16+
17+
Write-Host "Download complete!"
18+
19+
Write-Host "Making desktop shortcut..."
20+
@"
21+
[InternetShortcut]
22+
URL=$exe
23+
IconFile=$exe
24+
IconIndex=0
25+
"@ | Out-File -FilePath $lnk -Encoding ASCII
26+
27+
Write-Host "Install complete!"
28+
Pause

0 commit comments

Comments
 (0)