From 029230e07509464d1bdefa32528135adad4f4096 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 15:33:00 +1300 Subject: [PATCH 01/11] Initial commit --- install/windows/install.ps1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 install/windows/install.ps1 diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 new file mode 100644 index 000000000..b32d4e0f6 --- /dev/null +++ b/install/windows/install.ps1 @@ -0,0 +1,26 @@ +Write-Host Install Chocolatey +Write-Host Instructions from https://chocolate.org/install + +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')) + +choco install nodejs --version=16.11.1 -y + +choco install mongodb --version=4.4.4 -y + +choco install git -y + +refreshenv + +mkdir C:\Hombrewery +cd C:\Hombrewery + +git clone https://github.com/naturalcrit/homebrewery.github + +cd homebrewery + +npm install +npm audit fix + +[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') + +npm start \ No newline at end of file From 458d10486607f4c69c7db8c588901cd40cc76be0 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 18:13:55 +1300 Subject: [PATCH 02/11] Fix typo --- install/windows/install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 index b32d4e0f6..b30a3cd5a 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install.ps1 @@ -14,7 +14,7 @@ refreshenv mkdir C:\Hombrewery cd C:\Hombrewery -git clone https://github.com/naturalcrit/homebrewery.github +git clone https://github.com/naturalcrit/homebrewery.git cd homebrewery From c956100416f27ee7af8dc8028f4e0f6b0dab9e01 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 18:16:06 +1300 Subject: [PATCH 03/11] Improve commenting in script --- install/windows/install.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 index b30a3cd5a..359933ce5 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install.ps1 @@ -3,24 +3,42 @@ Write-Host Instructions from https://chocolate.org/install 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 + choco install nodejs --version=16.11.1 -y +Write-Host Install MongoDB v 4.4.4 + choco install mongodb --version=4.4.4 -y +Write-Host Install GIT + choco install git -y +Write-Host Refresh Environment + refreshenv +Write-Host Create directory + mkdir C:\Hombrewery cd C:\Hombrewery +Write-Host Download Homebrewery project files + git clone https://github.com/naturalcrit/homebrewery.git +Write-Host Install Homebrewery files + cd homebrewery npm install npm audit fix +Write-Host Set install type to 'local' + [System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') +Write-Host Start Homebrewery + npm start \ No newline at end of file From 4bb64a535f34e71e354f3716190f0233f7588fd4 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 21:00:00 +1300 Subject: [PATCH 04/11] Split install script into two parts --- .../windows/{install.ps1 => install-pt1.ps1} | 31 +++---------------- install/windows/install-pt2.ps1 | 25 +++++++++++++++ 2 files changed, 29 insertions(+), 27 deletions(-) rename install/windows/{install.ps1 => install-pt1.ps1} (55%) create mode 100644 install/windows/install-pt2.ps1 diff --git a/install/windows/install.ps1 b/install/windows/install-pt1.ps1 similarity index 55% rename from install/windows/install.ps1 rename to install/windows/install-pt1.ps1 index 359933ce5..3d6247163 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install-pt1.ps1 @@ -1,3 +1,5 @@ +Write-Host Part One Install +Write-Host ================ Write-Host Install Chocolatey Write-Host Instructions from https://chocolate.org/install @@ -15,30 +17,5 @@ Write-Host Install GIT choco install git -y -Write-Host Refresh Environment - -refreshenv - -Write-Host Create directory - -mkdir C:\Hombrewery -cd C:\Hombrewery - -Write-Host Download Homebrewery project files - -git clone https://github.com/naturalcrit/homebrewery.git - -Write-Host Install Homebrewery files - -cd homebrewery - -npm install -npm audit fix - -Write-Host Set install type to 'local' - -[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') - -Write-Host Start Homebrewery - -npm start \ No newline at end of file +Write-Host PART ONE INSTALL +Write-Host Close Powershell completely, open a new window, and then run Part Two diff --git a/install/windows/install-pt2.ps1 b/install/windows/install-pt2.ps1 new file mode 100644 index 000000000..7d7d8b8bc --- /dev/null +++ b/install/windows/install-pt2.ps1 @@ -0,0 +1,25 @@ +Write-Host Part Two Install +Write-Host ================ +Write-Host Create Homebrewery directory + +mkdir C:\Hombrewery +cd C:\Hombrewery + +Write-Host Download Homebrewery project files + +git clone https://github.com/naturalcrit/homebrewery.git + +Write-Host Install Homebrewery files + +cd homebrewery + +npm install +npm audit fix + +Write-Host Set install type to 'local' + +[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') + +Write-Host Start Homebrewery + +npm start \ No newline at end of file From d11508886be2bddf960520f8c4fc640e4e65cfd5 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 21:13:40 +1300 Subject: [PATCH 05/11] Add final notes to each install part --- install/windows/install-pt1.ps1 | 4 ++-- install/windows/install-pt2.ps1 | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/install/windows/install-pt1.ps1 b/install/windows/install-pt1.ps1 index 3d6247163..02530a20d 100644 --- a/install/windows/install-pt1.ps1 +++ b/install/windows/install-pt1.ps1 @@ -17,5 +17,5 @@ Write-Host Install GIT choco install git -y -Write-Host PART ONE INSTALL -Write-Host Close Powershell completely, open a new window, and then run Part Two +Write-Host PART ONE INSTALL COMPLETE +Write-Host Close Powershell completely, open a new shell, and then run Part Two diff --git a/install/windows/install-pt2.ps1 b/install/windows/install-pt2.ps1 index 7d7d8b8bc..29dd67d97 100644 --- a/install/windows/install-pt2.ps1 +++ b/install/windows/install-pt2.ps1 @@ -20,6 +20,10 @@ Write-Host Set install type to 'local' [System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') +Write-Host PART TWO INSTALL COMPLETE +Write-Host To start Homebrewery in the future, open a terminal in the Homebrewery directory and run npm start +Write-Hose ================================================================================================== + Write-Host Start Homebrewery npm start \ No newline at end of file From 3d5a8b5627fe8eb7b54119e26e667ed3b9bde95b Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 21:46:08 +1300 Subject: [PATCH 06/11] Reduced to a single install file --- install/windows/install-pt1.ps1 | 21 -------------- install/windows/install-pt2.ps1 | 29 ------------------- install/windows/install.ps1 | 51 +++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 50 deletions(-) delete mode 100644 install/windows/install-pt1.ps1 delete mode 100644 install/windows/install-pt2.ps1 create mode 100644 install/windows/install.ps1 diff --git a/install/windows/install-pt1.ps1 b/install/windows/install-pt1.ps1 deleted file mode 100644 index 02530a20d..000000000 --- a/install/windows/install-pt1.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Write-Host Part One Install -Write-Host ================ -Write-Host Install Chocolatey -Write-Host Instructions from https://chocolate.org/install - -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 - -choco install nodejs --version=16.11.1 -y - -Write-Host Install MongoDB v 4.4.4 - -choco install mongodb --version=4.4.4 -y - -Write-Host Install GIT - -choco install git -y - -Write-Host PART ONE INSTALL COMPLETE -Write-Host Close Powershell completely, open a new shell, and then run Part Two diff --git a/install/windows/install-pt2.ps1 b/install/windows/install-pt2.ps1 deleted file mode 100644 index 29dd67d97..000000000 --- a/install/windows/install-pt2.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -Write-Host Part Two Install -Write-Host ================ -Write-Host Create Homebrewery directory - -mkdir C:\Hombrewery -cd C:\Hombrewery - -Write-Host Download Homebrewery project files - -git clone https://github.com/naturalcrit/homebrewery.git - -Write-Host Install Homebrewery files - -cd homebrewery - -npm install -npm audit fix - -Write-Host Set install type to 'local' - -[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') - -Write-Host PART TWO INSTALL COMPLETE -Write-Host To start Homebrewery in the future, open a terminal in the Homebrewery directory and run npm start -Write-Hose ================================================================================================== - -Write-Host Start Homebrewery - -npm start \ No newline at end of file diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 new file mode 100644 index 000000000..9dd0d3f5f --- /dev/null +++ b/install/windows/install.ps1 @@ -0,0 +1,51 @@ +Write-Host Part One Install +Write-Host ================ +Write-Host Install Chocolatey +Write-Host Instructions from https://chocolate.org/install + +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 + +choco install nodejs --version=16.11.1 -y + +Write-Host Install MongoDB v 4.4.4 + +choco install mongodb --version=4.4.4 -y + +Write-Host Install GIT + +choco install git -y + +Write-Hose Refresh Environment + +Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" +Update-SessionEnvironment + +Write-Host Create Homebrewery directory - C:\Homebrewery + +mkdir C:\Hombrewery +cd C:\Hombrewery + +Write-Host Download Homebrewery project files + +git clone https://github.com/naturalcrit/homebrewery.git + +Write-Host Install Homebrewery files + +cd homebrewery + +npm install +npm audit fix + +Write-Host Set install type to 'local' + +[System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') + +Write-Host INSTALL COMPLETE +Write-Host To start Homebrewery in the future, open a terminal in the Homebrewery directory and run npm start +Write-Hose ================================================================================================== + +Write-Host Start Homebrewery + +npm start \ No newline at end of file From c60be5d24b0166932189b5fb8b8eb404bc6ff1e8 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 22:14:03 +1300 Subject: [PATCH 07/11] Add colors to Script titles --- install/windows/install.ps1 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 index 9dd0d3f5f..67655b7d5 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install.ps1 @@ -1,51 +1,51 @@ -Write-Host Part One Install -Write-Host ================ -Write-Host Install Chocolatey -Write-Host Instructions from https://chocolate.org/install +Write-Host Part One 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 +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 +Write-Host Install MongoDB v 4.4.4 -BackgroundColor Black -ForegroundColor Yellow choco install mongodb --version=4.4.4 -y -Write-Host Install GIT +Write-Host Install GIT -BackgroundColor Black -ForegroundColor Yellow choco install git -y -Write-Hose Refresh Environment +Write-Host Refresh -BackgroundColor Black -ForegroundColor Yellow Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" Update-SessionEnvironment -Write-Host Create Homebrewery directory - C:\Homebrewery +Write-Host Create Homebrewery directory - C:\Homebrewery -BackgroundColor Black -ForegroundColor Yellow mkdir C:\Hombrewery cd C:\Hombrewery -Write-Host Download Homebrewery project files +Write-Host Download Homebrewery project files -BackgroundColor Black -ForegroundColor Yellow git clone https://github.com/naturalcrit/homebrewery.git -Write-Host Install Homebrewery files +Write-Host Install Homebrewery files -BackgroundColor Black -ForegroundColor Yellow cd homebrewery npm install npm audit fix -Write-Host Set install type to 'local' +Write-Host Set install type to 'local' -BackgroundColor Black -ForegroundColor Yellow [System.Environment]::SetEnvironmentVariable('NODE_ENV', 'local') -Write-Host INSTALL COMPLETE -Write-Host To start Homebrewery in the future, open a terminal in the Homebrewery directory and run npm start -Write-Hose ================================================================================================== +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-Hose ================================================================================================== -BackgroundColor Black -ForegroundColor Yellow -Write-Host Start Homebrewery +Write-Host Start Homebrewery -BackgroundColor Black -ForegroundColor Yellow npm start \ No newline at end of file From 658aee8806ccedc3af659f9ba3788572d4c36b48 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 22:31:04 +1300 Subject: [PATCH 08/11] Fix titles --- install/windows/install.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 index 67655b7d5..eb364621e 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install.ps1 @@ -1,5 +1,5 @@ -Write-Host Part One Install -BackgroundColor Black -ForegroundColor Yellow -Write-Host ================ -BackgroundColor Black -ForegroundColor Yellow +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 @@ -17,7 +17,7 @@ Write-Host Install GIT -BackgroundColor Black -ForegroundColor Yellow choco install git -y -Write-Host Refresh -BackgroundColor Black -ForegroundColor Yellow +Write-Host Refresh Environment -BackgroundColor Black -ForegroundColor Yellow Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" Update-SessionEnvironment From 607a66a8f0f949eff62569fefb1ed71889391221 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 22:35:35 +1300 Subject: [PATCH 09/11] Fix typo --- install/windows/install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/windows/install.ps1 b/install/windows/install.ps1 index eb364621e..37bb6365e 100644 --- a/install/windows/install.ps1 +++ b/install/windows/install.ps1 @@ -44,7 +44,7 @@ Write-Host Set install type to 'local' -BackgroundColor Black -ForegroundColor Y 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-Hose ================================================================================================== -BackgroundColor Black -ForegroundColor Yellow +Write-Host ================================================================================================== -BackgroundColor Black -ForegroundColor Yellow Write-Host Start Homebrewery -BackgroundColor Black -ForegroundColor Yellow From c3936d28d9d7aebfb3cf0e87684edfaefd928929 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 23 Jan 2023 22:50:01 +1300 Subject: [PATCH 10/11] Add README.WINDOWS.md --- install/README.WINDOWS.md | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 install/README.WINDOWS.md diff --git a/install/README.WINDOWS.md b/install/README.WINDOWS.md new file mode 100644 index 000000000..02b92fe57 --- /dev/null +++ b/install/README.WINDOWS.md @@ -0,0 +1,43 @@ +# Ubuntu 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 From cf9dbffe49a49cf68983c73d06dd2205890a5718 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 2 Mar 2023 10:30:13 +1300 Subject: [PATCH 11/11] Fix title in README --- install/README.WINDOWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/README.WINDOWS.md b/install/README.WINDOWS.md index 02b92fe57..c1a7b41cc 100644 --- a/install/README.WINDOWS.md +++ b/install/README.WINDOWS.md @@ -1,4 +1,4 @@ -# Ubuntu Installation Instructions +# Windows Installation Instructions ## Before Installing