-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.ps1
34 lines (27 loc) · 819 Bytes
/
run.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# change the directory
cd .\int213-word-hunt-game
# check for pip and install if not found
if (Get-Command pip -ErrorAction SilentlyContinue) {
Write-Host "pip found"
} else {
Write-Host "pip not found, installing pip"
python -m ensurepip --default-pip
}
# install virtualenv if not found
if (Get-Command virtualenv -ErrorAction SilentlyContinue) {
Write-Host "virtualenv found"
} else {
Write-Host "virtualenv not found, installing virtualenv"
pip install virtualenv
}
# create virtual environment
Write-Host "creating virtual environment"
virtualenv .venv
# activate virtual environment
Write-Host "activating virtual environment"
. .venv\Scripts\activate
# install dependencies
Write-Host "installing dependencies"
pip install -r requirements.txt
# run the game
python main.py