From f2fa4d45146b6e2ea6be53c26082b369a2ad08ea Mon Sep 17 00:00:00 2001
From: Sophia <64176865+Glitch-Witch@users.noreply.github.com>
Date: Wed, 6 Mar 2024 01:27:17 +0200
Subject: [PATCH] Updated the readme files. (#35)
* Updated the readme files.
* Hopefully corrected the eula.txt check
* redirect windows users to README_WINDOWS
* Fix typo that broke everything
---
README.md | 15 ++++++--
serverpack/README.md | 3 +-
serverpack/README_WINDOWS.md | 70 ++++++++++++++++++++++++++++++++++++
serverpack/start.ps1 | 2 +-
4 files changed, 86 insertions(+), 4 deletions(-)
create mode 100644 serverpack/README_WINDOWS.md
diff --git a/README.md b/README.md
index 7a3a3a6..0ded3af 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,19 @@ The modpack is available on [Curseforge](https://legacy.curseforge.com/minecraft
## Building
-todo
+[packwiz](https://packwiz.infra.link/) will allow you to build either a server or client pack.
+Please refer to their tutorials page for more info.
+
+## Server
+
+`serverpack/start.sh` is useful for starting a server on linux, mac or another \*nix flavor. It will also handle procuring the files for you.
+
+`serverpack/start.ps1` is the Powershell 7.4 version and will be the script windows users want to use.
+If your system is missing Powershell version 7.4 (or greater) please refer to the installation instructions provided
+by Microsoft [here](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4).
## Credits
-todo
+[ursamina](https://github.com/ursamina) for modpack creation and maintenance
+[The contributors](https://github.com/GregTechCEu/GregTech-Modern-Community-Pack/graphs/contributors),
+for their useful updates to the pack.
diff --git a/serverpack/README.md b/serverpack/README.md
index 0bbb9cc..8e78fcf 100644
--- a/serverpack/README.md
+++ b/serverpack/README.md
@@ -1,6 +1,7 @@
Included is a serverpack installer for the GregTech Community pack, kindly provided by GlitchWitch on GitHub (https://github.com/Glitch-Witch)
-For Windows users: Run start.ps1 to generate the server pack
+For Windows users: Please refer to the [Windows Specific Readme File](https://github.com/GregTechCEu/GregTech-Modern-Community-Pack/blob/main/serverpack/README_WINDOWS.md)
+
For Mac/Linux/etc users: Run start.sh to generate the server pack
Please report any issues on our GitHub!
diff --git a/serverpack/README_WINDOWS.md b/serverpack/README_WINDOWS.md
new file mode 100644
index 0000000..03c0a1d
--- /dev/null
+++ b/serverpack/README_WINDOWS.md
@@ -0,0 +1,70 @@
+# Windows installation instructions.
+
+## Section 1
+
+First, let's see if your system already has Powershell version 7+ installed.
+
+- Open the start menu or click the searchbox
+- Type `pwsh`
+
+If you see `Powershell 7` appear, you may click it to open it, then please skip to section 3.
+
+## Section 2
+
+If you didn't see the above, please instead search for `powershell`.
+Depending on your version of windows, you may be faced with a few options.
+The only one that matters for this installation is the one simply titled `Windows Powershell`
+After you click on `Windows Powershell` you may run the following command to install the correct version of Powershell.
+
+```
+winget install -e --id Microsoft.PowerShell
+```
+
+Once the installation has finished, repeat the steps in Section 1.
+
+## Section 3
+
+To begin with, please make a note of where you downloaded the `start.ps1` script.
+The most likely location is `C:\Users\YOUR_USERNAME\Downloads\serverpack` where the YOUR_USERNAME section is replaced with your windows username.
+
+Whatever the location, we need to point powershell to it. To do so we'll use the `Set-Location` powershell command.
+
+```ps1
+Set-Location -Path "THE PATH YOU MADE A NOTE OF ABOVE"
+```
+
+Now that we're here, we need to unblock the installer from running.
+This is default windows behavior for downloaded files and its for your own safety.
+If you have reason to believe you cannot trust this script, you may ask a person that's familiar with powershell and that you trust, to look through the source for you. The script can at any time be read through by opening it in your text editor of choice.
+
+To unblock the script through powershell, you may simply run the following command:
+
+```ps1
+Unblock-File -Path "start.ps1"
+```
+
+## Section 4
+
+All that is left to run the server is to type
+
+```ps1
+.\start.ps1
+```
+
+inside of this powershell window.
+
+Depending on your computer specifications and internet speed, the first run will take some time. It will:
+
+- Procure Forge for you.
+- Install Forge in server configuration for you.
+- Procure all the mods for you by making use of the packwiz-installer-bootstrap project [packwiz info here](https://packwiz.infra.link/)
+- Procure the `FindMe` mod from modrinth as it does not allow distribution via CF.
+- Allow you to either agree to or deny the Microsoft Minecraft EULA.
+- If you agree, it will proceed to run the server.
+
+Please note: After the server runs for the first time, you will want to wait for it to finish, then once the server is ready you will want to type `stop` to exit it so you may edit your server configuration files. Instructions on doing so are outside of the scope of this project.
+
+Subsequent runs of `start.ps1` will
+
+- Keep your server up to date by consulting the modpack's github repository for updates.
+- Start the server per your configuration.
diff --git a/serverpack/start.ps1 b/serverpack/start.ps1
index 5eb8551..fa1f961 100644
--- a/serverpack/start.ps1
+++ b/serverpack/start.ps1
@@ -102,7 +102,7 @@ if ($LASTEXITCODE -eq 0) {
# Inform about the EULA and either force agree or exit.
-if (!(Test-Path "eula.txt") -or (Get-Content eula.txt | ConvertFrom-StringData).eula) {
+if (!(Test-Path "eula.txt") -or ((Get-Content eula.txt | ConvertFrom-StringData).eula -eq $false)) {
Write-Host -ForegroundColor Yellow "In order to run a Minecraft server, you need to agree to the Minecraft EULA."
Write-Host -ForegroundColor Yellow "You can read the Minecraft EULA here: https://aka.ms/MinecraftEULA"
Write-Host -ForegroundColor Yellow "For your convenience, this script can automatically agree for you."