0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 11:52:39 +00:00

Merge pull request #2625 from G-Ambatte/experimentalWinChocolateyInstall

Windows install script using Chocolatey
This commit is contained in:
Trevor Buckner
2023-03-23 14:24:39 -04:00
committed by GitHub
2 changed files with 94 additions and 0 deletions

43
install/README.WINDOWS.md Normal file
View File

@@ -0,0 +1,43 @@
# Windows Installation Instructions
## Before Installing
These instructions assume that you are installing to a completely new, fresh Windows 10 installation. As such, some steps may not be necessary if you are installing to an existing Windows 10 instance.
## Installation instructions
1. Download the installation script from https://raw.githubusercontent.com/naturalcrit/homebrewery/master/install/windows/install.ps1.
2. Run Powershell as an Administrator.
a. Click the Start menu or press the Windows key.
b. Type `powershell` into the Search box.
c. Right click on the Powershell app and select "Run As Administrator".
d. Click YES in the prompt that appears.
3. Change the script execution policy.
a. Run the Powershell command `Set-ExecutionPolicy Bypass -Scope Process`.
b. Allow the change to be made - press Y at the prompt that appears.
4. Run the installation script.
a. Navigate to the location of the script, e.g. `cd C:\Users\ExampleUser\Downloads`.
b. Start the script - `.\install.ps1`
5. Once the script has completed, it will start the Homebrewery server. This will normally cause a Network Access prompt for NodeJS - if this appears, click "Allow".
**NOTE:** At this time, the script **ONLY** installs HomeBrewery. It does **NOT** install the NaturalCrit login system, as that is currently a completely separate project.
---
### Testing
These installation instructions have been tested on the following Ubuntu releases:
- *Windows 10 Home - OS Build 19045.2546*
## Final Notes
While this installation process works successfully at the time of writing (January 23, 2023), it relies on all of the Node.JS packages used in the HomeBrewery project retaining their cross-platform capabilities to continue to function. This is one of the inherent advantages of Node.JS, but it is by no means guaranteed and as such, functionality or even installation may fail without warning at some point in the future.
Regards,
G
January 23, 2023

View File

@@ -0,0 +1,51 @@
Write-Host Homebrewery Install -BackgroundColor Black -ForegroundColor Yellow
Write-Host =================== -BackgroundColor Black -ForegroundColor Yellow
Write-Host Install Chocolatey -BackgroundColor Black -ForegroundColor Yellow
Write-Host Instructions from https://chocolate.org/install -BackgroundColor Black -ForegroundColor Yellow
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Write-Host Install Node JS v16.11.1 -BackgroundColor Black -ForegroundColor Yellow
choco install nodejs --version=16.11.1 -y
Write-Host Install MongoDB v 4.4.4 -BackgroundColor Black -ForegroundColor Yellow
choco install mongodb --version=4.4.4 -y
Write-Host Install GIT -BackgroundColor Black -ForegroundColor Yellow
choco install git -y
Write-Host Refresh Environment -BackgroundColor Black -ForegroundColor Yellow
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
Update-SessionEnvironment
Write-Host Create Homebrewery directory - C:\Homebrewery -BackgroundColor Black -ForegroundColor Yellow
mkdir C:\Hombrewery
cd C:\Hombrewery
Write-Host Download Homebrewery project files -BackgroundColor Black -ForegroundColor Yellow
git clone https://github.com/naturalcrit/homebrewery.git
Write-Host Install Homebrewery files -BackgroundColor Black -ForegroundColor Yellow
cd homebrewery
npm install
npm audit fix
Write-Host Set install type to 'local' -BackgroundColor Black -ForegroundColor Yellow
[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local')
Write-Host INSTALL COMPLETE -BackgroundColor Black -ForegroundColor Yellow
Write-Host To start Homebrewery in the future, open a terminal in the Homebrewery directory and run npm start -BackgroundColor Black -ForegroundColor Yellow
Write-Host ================================================================================================== -BackgroundColor Black -ForegroundColor Yellow
Write-Host Start Homebrewery -BackgroundColor Black -ForegroundColor Yellow
npm start