Skip to content

Commit

Permalink
Merge branch 'Dev20240207' of https://github.com/rpakishore/ak_sap in…
Browse files Browse the repository at this point in the history
…to Dev20240207
  • Loading branch information
rpakishore committed Feb 22, 2024
2 parents 4e6c32e + bff1ad3 commit 5db36a0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
- [2.1. Prerequisites](#21-prerequisites)
- [2.2. Installation](#22-installation)
- [2.2.1. Production](#221-production)
- [2.2.1.1. Install directly from repo](#2211-install-directly-from-repo)
- [2.2.1.2. Install from Pypi release](#2212-install-from-pypi-release)
- [2.2.1.1. One line command](#2211-one-line-command)
- [2.2.1.2. Install directly from repo](#2212-install-directly-from-repo)
- [2.2.1.3. Install from Pypi release](#2213-install-from-pypi-release)
- [2.2.2. Development](#222-development)
- [3. Usage](#3-usage)
- [3.1. GUI](#31-gui)
Expand All @@ -58,7 +59,25 @@

#### 2.2.1. Production

##### 2.2.1.1. Install directly from repo
##### 2.2.1.1. One line command

1. Press `Win` + `R` to open the Run console
2. Type "powershell" and press enter
3. change directory to the desired install folder using the cd command.

Example:

```powershell
cd "C:\Users\test-user\Desktop\Temp"
```

4. Type the following and press `Enter`

```powershell
irm https://links.struct.work/SAP2000 | iex
```

##### 2.2.1.2. Install directly from repo

Clone repo and Install with flit

Expand All @@ -69,7 +88,7 @@ pip install flit
flit install --deps production
```

##### 2.2.1.2. Install from Pypi release
##### 2.2.1.3. Install from Pypi release

```bash
pip install ak_sap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd /d %~dp0
cd ../..
cd ..
RD /S /Q .venv

python -m venv .venv
Expand Down
33 changes: 33 additions & 0 deletions scripts/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
setlocal

:: Step 1: Check if Python is installed
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo Python is not installed. Please install Python and run this script again.
exit /b 1
)

cd /d %~dp0

:: Step 2: Download and unzip the GitHub repository
echo Downloading and extracting the GitHub repository...
curl -LJO https://github.com/rpakishore/ak_sap/archive/main.zip
tar -xf ak_sap-main.zip
del ak_sap-main.zip

:: Step 3: Navigate into the ak_sap directory
cd ak_sap-main

:: Step 4: Set up virtual environment and install dependencies
echo Setting up virtual environment and installing dependencies...
python -m venv .venv
call .venv\Scripts\activate
python -m pip install --upgrade pip
pip install flit && flit install --deps production

:: Step 5: Display success message
echo Installation completed successfully.

:: End
exit /b 0
2 changes: 1 addition & 1 deletion scripts/win/run.bat → scripts/run.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

cd /d %~dp0
cd ..\..
cd ..

rem Check if Python is installed
python --version > nul 2>&1
Expand Down

0 comments on commit 5db36a0

Please sign in to comment.