diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 48b19a8566..2935d961a7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -34,7 +34,7 @@ You can of course, as always, ask for help at [#coderbus](irc://irc.rizon.net/co ### Development Environment -You need the .NET 8.0 SDK, node>=v20, and npm>=v5.7 (in your PATH) to compile the server. +You need the .NET 8.0 SDK, node>=v20, and npm>=v5.7 (in your PATH) to compile the server. On Linux, you also need the `libgdiplus` package installed to generate icons. The recommended IDE is Visual Studio 2022 or VSCode. diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 96d5827715..0a6e1929dc 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -318,7 +318,7 @@ jobs: - name: Patch Doxyfile run: | VERSION=$(cat "build/Version.props" | grep -oPm1 "(?<=)[^<]+") - echo -e "\nPROJECT_NUMBER = $VERSION\nINPUT = .\nOUTPUT_DIRECTORY = ./doxout\nPROJECT_LOGO = ./build/tgs.ico\nHAVE_DOT=YES" >> "docs/Doxyfile" + echo -e "\nPROJECT_NUMBER = $VERSION\nINPUT = .\nOUTPUT_DIRECTORY = ./doxout\nPROJECT_LOGO = ./artifacts/tgs.ico\nHAVE_DOT=YES" >> "docs/Doxyfile" - name: Doxygen Build uses: mattnotmitt/doxygen-action@411df0c62acb5b96b8a93d93a7bf4b753c47ea05 # v1.9.5 @@ -385,7 +385,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 + sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 libgdiplus - name: Setup dotnet uses: actions/setup-dotnet@v4 @@ -726,7 +726,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386 + sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386 libgdiplus - name: Setup dotnet uses: actions/setup-dotnet@v4 @@ -1130,7 +1130,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet + sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet libgdiplus - name: Import GPG Key if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')) diff --git a/README.md b/README.md index f535174118..ac54b0fde5 100644 --- a/README.md +++ b/README.md @@ -408,15 +408,15 @@ _NOTE: Your reverse proxy setup may interfere with SSE (Server-Sent Events) whic #### IIS (Reccommended for Windows) 1. Acquire an HTTPS certificate. The easiet free way for Windows is [win-acme](https://github.com/PKISharp/win-acme) (requires you to set up the website first) -2. Install the [Web Platform Installer](https://www.microsoft.com/web/downloads/platform.aspx) -3. Open the web platform installer in the IIS Manager and install the Application Request Routing 3.0 module -4. Create a new website, bind it to HTTPS only with your chosen certificate and exposed port. The physical path won't matter since it won't be used. Use `Require Server Name Indication` if you want to limit requests to a specific URL prefix. Do not use the same port as the one TGS is running on. -5. Close and reopen the IIS Manager -5. Open the site and navigate to the `URL Rewrite` module -6. In the `Actions` Pane on the right click `Add Rule(s)...` -7. For the rule template, select `Reverse Proxy` under `Inbound and Outbound Rules` and click `OK` -8. You may get a prompt about enabling proxy functionality. Click `OK` -9. In the window that appears set the `Inbound Rules` textbox to the URL of your tgstation-server i.e. `http://localhost:5000`. Ensure `Enable SSL Offloading` is checked, then click `OK` +1. Install the [URL Rewrite Module](https://www.iis.net/downloads/microsoft/url-rewrite) +1. Install the [Application Request Routing Module](https://www.iis.net/downloads/microsoft/application-request-routing) +1. Create a new website, bind it to HTTPS only with your chosen certificate and exposed port. The physical path won't matter since it won't be used. Use `Require Server Name Indication` if you want to limit requests to a specific URL prefix. Do not use the same port as the one TGS is running on. +1. Close and reopen the IIS Manager +1. Open the site and navigate to the `URL Rewrite` module +1. In the `Actions` Pane on the right click `Add Rule(s)...` +1. For the rule template, select `Reverse Proxy` under `Inbound and Outbound Rules` and click `OK` +1. You may get a prompt about enabling proxy functionality. Click `OK` +1. In the window that appears set the `Inbound Rules` textbox to the URL of your tgstation-server i.e. `localhost:5000`. Ensure `Enable SSL Offloading` is checked, then click `OK` #### Caddy (Reccommended for Linux, or those unfamilar with configuring NGINX or Apache) diff --git a/build/Dockerfile b/build/Dockerfile index 383df77bfb..cba330156e 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -16,6 +16,7 @@ RUN . $NVM_DIR/nvm.sh \ && apt-get update \ && apt-get install -y \ dos2unix \ + libgdiplus \ && rm -rf /var/lib/apt/lists/* # Build web control panel diff --git a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj index b77bdc4dc1..b23195dfca 100644 --- a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj +++ b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj @@ -15,21 +15,13 @@ - - - - + - + - - - - - diff --git a/src/Tgstation.Server.Common/build_logo.js b/src/Tgstation.Server.Common/build_logo.js deleted file mode 100644 index c79a46903c..0000000000 --- a/src/Tgstation.Server.Common/build_logo.js +++ /dev/null @@ -1,48 +0,0 @@ -// Prereq packages: svg-to-ico@1.0.14 svg2img@1.0.0-beta.2 -// Usage: node ./build_logo.js -// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico - -const svg_to_img = require("svg-to-ico"); -const svg2img = require('svg2img'); -const fs = require('fs'); -const { exit } = require("process"); -if (!fs.existsSync("../../artifacts")) { - fs.mkdirSync("../../artifacts",'0777', true); -} - -const svg_bytes = fs.readFileSync("../../build/logo.svg"); -const svg = svg_bytes.toString(); -const white_bg_svg = svg - .replace("