From cc968ff38531991828fc48bf73571ebe95457051 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 11 Aug 2020 20:00:31 +0100 Subject: [PATCH 01/13] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 41 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 22 ++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..ced01b4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,41 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[Bug] ..." +labels: bug +assignees: '' + +--- + +**UI or Mechanical Bug?** +Is this a user Interface bug or a mechanical/operational bug? + +**Describe the bug** +A clear and concise description of what the bug is. + +**Was there an error dialogue for this bug? If so please provide a screenshot/its contents here** +[Error dialog if applicable] + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Launcher Logs** +Please upload the logs from your launcher either here, or on a site such as pastebin. +You can find the logs in the "logs" folder in the "Config/Log Folder". Use the button in the Settings menu in launcher to find the folder. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..0aaccfc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Enhancement] ..." +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Is your feature request graphical or mechanical in nature?** +Please describe if this request is related to the UI, or to the inner workings of the application. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Would you like to work on this yourself, or leave it to the team and the community?** +Yes or no. + +**Extra Information** From dec6cb4e6c16a86c73f2fdf2174728ccd187bf23 Mon Sep 17 00:00:00 2001 From: rob5300 Date: Wed, 12 Aug 2020 23:27:50 +0100 Subject: [PATCH 02/13] Changed checks and added linux specific check to prevent incorrect validation failures (cherry picked from commit 947d22456634d6ca6757c8147edaeb80ddf16e64) --- modules/mod_manager.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/mod_manager.js b/modules/mod_manager.js index 41dcd92..462798b 100644 --- a/modules/mod_manager.js +++ b/modules/mod_manager.js @@ -954,20 +954,25 @@ function ValidateTF2Dir(){ } //Check if the directory contains an hl2 win32 executable if we are on windows. - if(os.platform() == "win32"){ + const plat = os.platform(); + if(plat == "win32"){ if(fs.existsSync(path.join(global.config.tf2_directory, "hl2.exe"))){ return true; } } - else{ - //Check if the directory has the app id txt and it has 440 in it. - let appid_path = path.join(global.config.tf2_directory, "steam_appid.txt"); - if(fs.existsSync(appid_path)){ - let content = fs.readFileSync(appid_path, "utf-8"); - let appid = content.split("\n")[0]; - if(appid != null && appid == "440"){ - return true; - } + else if (plat == "linux" || plat == "freebsd" || plat == "openbsd"){ + if(fs.existsSync(path.join(global.config.tf2_directory, "hl2_linux"))){ + return true; + } + } + + //Check if the directory has the app id txt and it has 440 in it. + let appid_path = path.join(global.config.tf2_directory, "steam_appid.txt"); + if(fs.existsSync(appid_path)){ + let content = fs.readFileSync(appid_path, "utf-8"); + let appid = content.split("\n")[0]; + if(appid != null && appid == "440"){ + return true; } } From b09ac5a25435e6148886e94f2f8ad9488b23186b Mon Sep 17 00:00:00 2001 From: jota11 Date: Wed, 12 Aug 2020 21:22:50 -0300 Subject: [PATCH 03/13] Changes. - Small layout changes. [WINDOWS INSTALLER USERS ONLY] - Fixed a rare case where the launcher wouldn't return update status. (Launcher update, not mod-related) --- README.md | 5 +- .../{creatorstf_circle.png => creatorstf.png} | Bin .../{creatorstf_full.png => creatorstf.png} | Bin images/logos/tf2logo.svg | 44 ------------------ images/logos/tf2logo_dark.svg | 19 ++++++++ images/logos/tf2logo_dark_fade.svg | 19 ++++++++ images/logos/tf2logo_light.svg | 19 ++++++++ images/logos/tf2logowhite.png | Bin 14443 -> 0 bytes index.html | 2 +- internal/mods.json | 4 +- main.js | 17 ++++--- renderer.js | 4 +- style.css | 19 ++++++-- 13 files changed, 90 insertions(+), 62 deletions(-) rename images/logos/modcirclelogos/{creatorstf_circle.png => creatorstf.png} (100%) rename images/logos/modlogos/{creatorstf_full.png => creatorstf.png} (100%) delete mode 100644 images/logos/tf2logo.svg create mode 100644 images/logos/tf2logo_dark.svg create mode 100644 images/logos/tf2logo_dark_fade.svg create mode 100644 images/logos/tf2logo_light.svg delete mode 100644 images/logos/tf2logowhite.png diff --git a/README.md b/README.md index 0aeb218..76adcf7 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,8 @@ * [License](https://github.com/ampersoftware/Creators.TF-Community-Launcher/blob/master/LICENSE) * [Code of conduct](https://github.com/ampersoftware/Creators.TF-Community-Launcher/blob/master/CODE_OF_CONDUCT.md) (TL;DR; common sense) - ### Maintainers -* [Jota](https://github.com/jota11) -* [rob5300](https://github.com/rob5300) +* [Jota](https://github.com/jota11) - jota@creators.tf +* [rob5300](https://github.com/rob5300) - rob5300@creators.tf ### Feel free to make pull requests and contribute to this repository. The launcher is currently in an alpha state so any help is appreciated. diff --git a/images/logos/modcirclelogos/creatorstf_circle.png b/images/logos/modcirclelogos/creatorstf.png similarity index 100% rename from images/logos/modcirclelogos/creatorstf_circle.png rename to images/logos/modcirclelogos/creatorstf.png diff --git a/images/logos/modlogos/creatorstf_full.png b/images/logos/modlogos/creatorstf.png similarity index 100% rename from images/logos/modlogos/creatorstf_full.png rename to images/logos/modlogos/creatorstf.png diff --git a/images/logos/tf2logo.svg b/images/logos/tf2logo.svg deleted file mode 100644 index ab7257f..0000000 --- a/images/logos/tf2logo.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/logos/tf2logo_dark.svg b/images/logos/tf2logo_dark.svg new file mode 100644 index 0000000..bc23f23 --- /dev/null +++ b/images/logos/tf2logo_dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/images/logos/tf2logo_dark_fade.svg b/images/logos/tf2logo_dark_fade.svg new file mode 100644 index 0000000..c154d51 --- /dev/null +++ b/images/logos/tf2logo_dark_fade.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/images/logos/tf2logo_light.svg b/images/logos/tf2logo_light.svg new file mode 100644 index 0000000..85eacb7 --- /dev/null +++ b/images/logos/tf2logo_light.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/images/logos/tf2logowhite.png b/images/logos/tf2logowhite.png deleted file mode 100644 index 7b7641bfe4042e8ae1213ce1a0e0618c8a9a788c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14443 zcmW+-cRX9)`;Q0`Gh(lb)NZ7rHL3#@a2hgh|% z)GGRss;Z)@Ls9E@zrR23>n8Wy^W1ZubDrls=Xt+RvgKuCK5j{F5D3I)YJ#@{f!L`3 zyP%xF6Gy{vMc@VtGO-T@fp~=ecd>zr?~4Nuk)9@2mq4Hh1rUf74+8BT0rzhpP?$Oh zwCV-|=@x=OVmEVKdoO}O+CNS41~zwQ*B^vOd4&}nEwp_r8kWyBEd=w*_!^#!1JjgI z1xA))1gE*0wR-xA6Ejn4EA3O0W%VCLPN-68ail6`lu^Ww?st`sM=TU`OBZBEL$!Q1 zuI0>^L~fj42-W*Bz4mhBQX!?}hf3Lx_x_4XN`g43+^_2Q2&#TR+a>*`4y_%3rAEkg z_Su7Iu10Yp1pUX8?cJiD>kqw!l@2jC=pDUHFE@)JH3|gxIMpHc&h%c3#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diff --git a/internal/mods.json b/internal/mods.json index f652b4d..9e90b97 100644 --- a/internal/mods.json +++ b/internal/mods.json @@ -4,8 +4,8 @@ { "name": "Creators.TF", "blurb": "A TF2 celebration project", - "icon": "images/logos/modcirclelogos/creatorstf_circle.png", - "titleimage": "images/logos/modlogos/creatorstf_full.png", + "icon": "images/logos/modcirclelogos/creatorstf.png", + "titleimage": "images/logos/modlogos/creatorstf.png", "backgroundimage": "images/backgrounds/creatorstf.png", "bordercolor": "orange", "backgroundpos": "left", diff --git a/main.js b/main.js index 667c07c..2f1bb14 100644 --- a/main.js +++ b/main.js @@ -97,16 +97,21 @@ function createWindow() { } } -app.whenReady().then(createWindow); - -autoUpdater.checkForUpdatesAndNotify(); -log.info("The launcher was opened and is currently checking for updates"); +// app.whenReady().then(createWindow); +app.on("ready", () => { + createWindow(); + autoUpdater.checkForUpdatesAndNotify(); + log.info("Launcher was opened and is currently checking for updates."); +}); app.on("window-all-closed", function() { // On macOS it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q - if (process.platform !== 'darwin') app.quit() -}) + if (process.platform !== "darwin") { + app.quit(); + log.info("Launcher was closed"); + } +}); app.on("activate", function() { // On macOS it's common to re-create a window in the app when the diff --git a/renderer.js b/renderer.js index 05332e9..ebdaa7e 100644 --- a/renderer.js +++ b/renderer.js @@ -46,7 +46,7 @@ function OnClick_Mod(data) { installButton.style.background = ""; installButton.style.backgroundColor = "grey"; installButton.style.color = "black"; - installButton.innerText = "... LOADING ..."; + installButton.innerText = "LOADING..."; installButton.disabled = true; website.style.display = data.website != "" ? "block" : "none"; @@ -110,7 +110,7 @@ document.getElementById("patchnotes-button").addEventListener("click", (a,b) => }); installButton.addEventListener("click", (e) => { - installButton.innerText = "... STARTING ..."; + installButton.innerText = "STARTING..."; installButton.disabled = true; ipcRenderer.send("install-play-click", e); }); diff --git a/style.css b/style.css index dc1741e..700c998 100644 --- a/style.css +++ b/style.css @@ -5,8 +5,7 @@ body { margin: 0; padding: 0; display: flex; - background: rgb(0,0,0); - background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(40,40,40,1) 100%); + background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(35,35,35,1) 100%); user-select: none; } @@ -167,7 +166,12 @@ body { } #contentdummy { + background-image: url(images/logos/tf2logo_dark_fade.svg); + background-repeat: no-repeat; + background-position: center; + background-size: 115%; width: 78.5%; + opacity: 0.2; } #content { @@ -300,8 +304,8 @@ body { text-transform: uppercase; font-family: Roboto Light, Arial, sans-serif; border: none; - color: black; - text-shadow: 1px 1px 25px #000; + color: #000; + text-shadow: 1px 1px 20px #000; position: relative; bottom: 235px; left: 0; @@ -310,6 +314,13 @@ body { z-index: 1; } +#remove-mod:hover { + background-color: #CC4747; + color: #FFF; + cursor: pointer; + filter: brightness(0.8); +} + /* #version { display: block; From 15b1d1efc44b4941e0254deeadfde971ba269aec Mon Sep 17 00:00:00 2001 From: jota11 Date: Thu, 13 Aug 2020 00:34:27 -0300 Subject: [PATCH 04/13] Changes - two - Small tooltip changes. --- index.html | 4 ++-- main.js | 10 +++++----- settings-page/settingspage.js | 4 +--- style.css | 5 +++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index fdbfa0a..8919a92 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@ diff --git a/patchnotes-page/patchnotespage.js b/patchnotes-page/patchnotespage.js index 5c2551a..1c225a5 100644 --- a/patchnotes-page/patchnotespage.js +++ b/patchnotes-page/patchnotespage.js @@ -24,7 +24,6 @@ function OpenWindow() { width: 700, height: 550 }); - patchNotesWindow.removeMenu(); patchNotesWindow.loadFile(path.resolve(__dirname, "patchnotes.html")); patchNotesWindow.once("ready-to-show", () => { diff --git a/settings-page/settingspage.js b/settings-page/settingspage.js index 7eb5096..228566d 100644 --- a/settings-page/settingspage.js +++ b/settings-page/settingspage.js @@ -28,7 +28,7 @@ function OpenWindow() { }); settingsWindow.removeMenu(); settingsWindow.loadFile("./settings-page/settings.html"); - + settingsWindow.once("ready-to-show", () => { settingsWindow.show(); diff --git a/style.css b/style.css index f824d50..d0b4231 100644 --- a/style.css +++ b/style.css @@ -345,22 +345,23 @@ body { } [tooltip]:after { - width: 200%; content: attr(tooltip); background-color: #111; border-radius: 5px; color: #CCC; + display: block; font-family: Roboto Thin, Arial, sans-serif; font-size: 16px; position: absolute; padding: 5px; - bottom: -3.3em; left: 0; - /* white-space: nowrap; */ + top: 37px; + white-space: nowrap; box-shadow: 0px 0px 20px rgba(50,50,50,0.5); z-index: 9999999; visibility: hidden; pointer-events: none; + user-select: none; opacity: 0; transition: 0.25s; } From 7f7c202fa949aae20579d1d7c51e5cdcaa33c4bc Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 15 Aug 2020 18:25:55 +0100 Subject: [PATCH 07/13] Removed pointless blank mod version entry from default config. --- modules/config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/config.js b/modules/config.js index e1acf20..bc3c1da 100644 --- a/modules/config.js +++ b/modules/config.js @@ -35,9 +35,7 @@ module.exports = { this.config = { steam_directory: "", tf2_directory: "", - current_mod_versions: [ - {name: "_blank", version: 0.1} - ] + current_mod_versions: [] } //Try to populate the default values of the steam directory and tf2 directory automatically. From 58715b872c03df5d46b420159877bae335a9bbfa Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 15 Aug 2020 18:43:21 +0100 Subject: [PATCH 08/13] Added build instructions to readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 9a4b51b..df49e4c 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,11 @@ If you have something to contribute then please open a pull request! Make sure y If you have a bug or a suggestion, open and issue! Try to use the templates and give good information. The launcher is currently in an alpha state so any help is appreciated. + +## Launching and Building from Source +If you want to build the launcher yourself, you need to have [Node.JS](https://nodejs.org/en/download/) installed, which should also include npm. +Clone the repository using git (or download from this page) and then do `npm install` in the main repository directory to download the required packages. + +You can start the launcher without building via `npm run start`. +You can build for Windows or Linux via the included build scripts using `npm run buildwindows` and `npm run buildlinux`. +If you need you can edit these in [*package.json*](https://github.com/ampersoftware/Creators.TF-Community-Launcher/blob/7f7c202fa949aae20579d1d7c51e5cdcaa33c4bc/package.json#L8) to build to your liking, but changes made to these shold not be committed if you plan to make a pr. From 84625878beb93f0e98bc3d58e71af8c8be344b7d Mon Sep 17 00:00:00 2001 From: jota11 Date: Sat, 15 Aug 2020 15:55:29 -0300 Subject: [PATCH 09/13] Patch notes window now uses markdown. --- changelog.md | 3 +- images/thatarrowfromthetfblog.svg | 68 +++++++++++++++++++++++++++++++ package.json | 3 +- patchnotes-page/patch.js | 16 ++++++++ patchnotes-page/patchnotes.html | 19 ++------- patchnotes-page/patchnotespage.js | 8 ++-- patchnotes-page/style.css | 55 +++++++++++++++++-------- 7 files changed, 133 insertions(+), 39 deletions(-) create mode 100644 images/thatarrowfromthetfblog.svg create mode 100644 patchnotes-page/patch.js diff --git a/changelog.md b/changelog.md index 6647661..ab22144 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,3 @@ -# Changelog - ## Version 0.0.5 (ALPHA) +### 08/08/2020 - 00:28:00 (GMT) - Released launcher's alpha version diff --git a/images/thatarrowfromthetfblog.svg b/images/thatarrowfromthetfblog.svg new file mode 100644 index 0000000..0a23348 --- /dev/null +++ b/images/thatarrowfromthetfblog.svg @@ -0,0 +1,68 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/package.json b/package.json index f0859dc..e2fdc2d 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "electron-log": "^4.2.2", "electron-progressbar": "^1.2.0", "electron-updater": "^4.3.4", - "jszip": "^3.5.0" + "jszip": "^3.5.0", + "marked": "^1.1.1" } } diff --git a/patchnotes-page/patch.js b/patchnotes-page/patch.js new file mode 100644 index 0000000..e56831d --- /dev/null +++ b/patchnotes-page/patch.js @@ -0,0 +1,16 @@ +const marked = require("marked"); +marked.setOptions({ + breaks: true, + gfm: true, + headerIds: false +}); +var request = new XMLHttpRequest(); +request.open("GET", "https://raw.githubusercontent.com/ampersoftware/Creators.TF-Community-Launcher/master/changelog.md"); +request.send(); +request.onload = function lol() { + if (request.status === 200) { + document.getElementById("patchnotes").innerHTML = marked(request.responseText); + } else { + document.getElementById("patchnotes").innerHTML = marked("## If you are reading this, there are two options:\n- Github is down (You can check their status page at githubstatus.com)\n- Your internet is down"); + } +} diff --git a/patchnotes-page/patchnotes.html b/patchnotes-page/patchnotes.html index c9fb969..f1c59e6 100644 --- a/patchnotes-page/patchnotes.html +++ b/patchnotes-page/patchnotes.html @@ -2,29 +2,18 @@ - + Patch Notes +

Launcher Changelogs

-

Creators.TF Launcher

-
-
Changelogs — 23/06/2020
-
-
    -
  • Moved something
  • -
  • Really long note to see how it goes Moved somethingMoved something
  • -
  • Moved somethingMoved somethingMoved somethingMoved somethingMoved somethingMoved somethingMoved something
  • -
      -
    • Moved somethingMoved somethingMoved somethingMoved somethingMoved something
    • -
    -
-
-
+
+ diff --git a/patchnotes-page/patchnotespage.js b/patchnotes-page/patchnotespage.js index 1c225a5..5694498 100644 --- a/patchnotes-page/patchnotespage.js +++ b/patchnotes-page/patchnotespage.js @@ -19,12 +19,12 @@ function OpenWindow() { maximizable: true, resizable: true, autoHideMenuBar: true, - minWidth: 640, + minWidth: 700, minHeight: 500, - width: 700, - height: 550 + width: 960, + height: 540 }); - patchNotesWindow.removeMenu(); + // patchNotesWindow.removeMenu(); patchNotesWindow.loadFile(path.resolve(__dirname, "patchnotes.html")); patchNotesWindow.once("ready-to-show", () => { patchNotesWindow.show(); diff --git a/patchnotes-page/style.css b/patchnotes-page/style.css index eb9a55f..fb5c8dd 100644 --- a/patchnotes-page/style.css +++ b/patchnotes-page/style.css @@ -29,34 +29,55 @@ body { ::-webkit-scrollbar-thumb { background: #555; border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: #888; } -#wrapper { - margin: 25px auto; - width: 90%; - color: #FFF; -} - #modname { - margin: 0; - font-size: 60px; + margin: 25px auto; font-family: Roboto Bold, Arial, sans-serif; + font-size: 60px; text-align: center; + color: #EEE; } -.patch { - margin: 20px 0px 0px 0px; - background-color: rgba(0,0,0,0.8); - padding: 20px; +#wrapper { + margin: 0px auto; + width: 75%; + color: #FFF; +} + +#patchnotes { + margin: 20px auto 0px auto; + background-color: rgba(0,0,0,0.65); + padding: 25px 25px 10px 25px; border-radius: 5px; } -.patchTitle { - font-size: 35px; +h2 { + margin: 0; + padding-top: 25px; + font-size: 42px; font-family: Roboto Medium, Arial, sans-serif; + border-top: 1px solid rgba(255,255,255,0.5); +} +h3 { + margin: 0; + font-size: 15px; + font-family: Roboto Thin, Arial, sans-serif; } -.patchNotes { +h2:first-of-type { + border-top: 0px; + padding-top: 0px; +} + +ul { + list-style-image: url(../images/thatarrowfromthetfblog.svg); font-size: 22px; - font-family: Roboto Thin, Arial, sans-serif; + font-family: Roboto Light, Arial, sans-serif; } -ul { list-style-image: url(../images/thatarrowfromthetfblog.png); } +code { + background-color: rgba(25,25,25,0.9); + padding: 0px 5px; + border-radius: 5px; + font-family: Roboto Thin, Arial, sans-serif; + font-size: 20px; +} From 21cd48c831634b5e37a114c18c7b622f43172dfb Mon Sep 17 00:00:00 2001 From: Bruce Lay <33815726+brucelay@users.noreply.github.com> Date: Sun, 16 Aug 2020 15:27:12 +0100 Subject: [PATCH 10/13] Modify config.js to use async/await & bug fixes Functions return a Promise by default. Bug fix. GetConfig() and GetTF2Directory() now return a Promise by default rather than the previous handwritten Promise. A bug in GetTF2Directory() causing the TF2 directory to not be found was fixed by using path.join instead of string concatenation, as currently it checks for '...x86)/Steamsteamapps/Tea...'. Reduced code repetition in GetConfig() via finally block of try ... catch. --- modules/config.js | 160 +++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 86 deletions(-) diff --git a/modules/config.js b/modules/config.js index bc3c1da..7993984 100644 --- a/modules/config.js +++ b/modules/config.js @@ -17,103 +17,91 @@ module.exports = { }, //Get the config from disk. - GetConfig() { - return new Promise((resolvec, rejectc) => { - try{ - //If config is null, load it. - let filepathfull = this.GetConfigFullPath(); - - //If the config file exists, read and parse it. - if(fs.existsSync(filepathfull)){ - this.config = JSON.parse(fs.readFileSync(filepathfull, 'utf8')); - global.log.log("Loaded pre existing config"); - resolvec(this.config); - } - else{ - global.log.log("User does not have a config file, creating one"); - //Create default config - this.config = { - steam_directory: "", - tf2_directory: "", - current_mod_versions: [] - } + GetConfig: async function GetConfig() { + //If config is null, load it. + let filepathfull = this.GetConfigFullPath(); - //Try to populate the default values of the steam directory and tf2 directory automatically. - this.config.steam_directory = GetSteamDirectory(); - - global.log.log(`Auto locater for the users steam directory returned '${this.config.steam_directory}'`); - - if(this.config.steam_directory != "") { - //Try to find the users tf2 directory automatically. - this.GetTF2Directory(this.config.steam_directory). - then((result) => { - global.log.log("TF2 directory was found successfully at: " + result); - this.config.tf2_directory = result; - this.SaveConfig(this.config); - resolvec(this.config); - }).catch((e) => { - //We failed to get the tf2 dir. Finish anyway. - //The user is notified later if it is left blank. - global.log.error("TF2 directory was not found automatically"); - this.SaveConfig(this.config); - resolvec(this.config); - }); - } - else { - //Resolve now without the steam dir or a tf2 dir. - //User is told later anyway. - this.SaveConfig(this.config); - resolvec(this.config); - } - } + //If the config file exists, read and parse it. + if(fs.existsSync(filepathfull)){ + this.config = JSON.parse(fs.readFileSync(filepathfull, 'utf8')); + global.log.log("Loaded pre existing config"); + return this.config; + } else { + global.log.log("User does not have a config file, creating one"); + //Create default config + this.config = { + steam_directory: "", + tf2_directory: "", + current_mod_versions: [] } - catch (e){ - rejectc(e); + + //Try to populate the default values of the steam directory and tf2 directory automatically. + this.config.steam_directory = GetSteamDirectory(); + + global.log.log(`Auto locater for the users steam directory returned '${this.config.steam_directory}'`); + + if(this.config.steam_directory != "") { + //Try to find the users tf2 directory automatically. + try { + let result = await this.GetTF2Directory(this.config.steam_directory) + .catch((e) => { + //We failed to get the tf2 dir. Finish anyway. + //The user is notified later if it is left blank. + global.log.error("TF2 directory was not found automatically"); + }); + + global.log.log("TF2 directory was found successfully at: " + result); + this.config.tf2_directory = result; + } finally { + this.SaveConfig(this.config); + return this.config; + } + } else { + //Resolve now without the steam dir or a tf2 dir. + //User is told later anyway. + this.SaveConfig(this.config); + return this.config; } - }); + } }, //This attempts to find the users tf2 directory automatically. - GetTF2Directory(steamdir) { + GetTF2Directory: async function GetTF2Directory(steamdir) { let tf2path = "steamapps/common/Team Fortress 2/"; - - let p = new Promise((resolvet, rejectt) => { - //Check if tf2 is installed in the steam installation steamapps. - if (fs.existsSync(steamdir + tf2path)) { - let tf2path = steamdir + tf2path; - resolve(tf2path); - } - else { - //Check the library folders file and check all those for the tf2 directory. - let libraryfolders = `${steamdir}/steamapps/libraryfolders.vdf`; - if (fs.existsSync(libraryfolders)) { - //How this works: - //Read the lines of the libraryfolders - //If we find a match with the regular expression, we have a possible other library folder. - //We check this library folder to see if it has a tf2 install folder. - //If yes, we use this! - //If no, we just fail. - - let data = fs.readFileSync(libraryfolders, 'utf8'); - let lines = data.split("\n"); - for (let i = 0; i < lines.length; i++) { - let result = pathStringRegex.exec(lines[i]); - if (result) { - if (result[2]) { - let potentialPath = path.join(result[2], "/", tf2path); - if(fs.existsSync(potentialPath)){ - resolvet(potentialPath); - } + + //Check if tf2 is installed in the steam installation steamapps. + if (fs.existsSync(path.join(steamdir, tf2path))) { + tf2path = path.join(steamdir, tf2path); + return tf2path; + } else { + //Check the library folders file and check all those for the tf2 directory. + let libraryfolders = `${steamdir}/steamapps/libraryfolders.vdf`; + if (fs.existsSync(libraryfolders)) { + //How this works: + //Read the lines of the libraryfolders + //If we find a match with the regular expression, we have a possible other library folder. + //We check this library folder to see if it has a tf2 install folder. + //If yes, we use this! + //If no, we just fail. + + let data = fs.readFileSync(libraryfolders, 'utf8'); + let lines = data.split("\n"); + for (let i = 0; i < lines.length; i++) { + let result = pathStringRegex.exec(lines[i]); + if (result) { + if (result[2]) { + let potentialPath = path.join(result[2], "/", tf2path); + if(fs.existsSync(potentialPath)){ + return potentialPath; } } } - rejectt("No other tf2 libraries had TF2"); } - rejectt("TF2 not found in base install location, no other libraries found."); + throw new Error("No other tf2 libraries had TF2"); + } else { + throw new Error("TF2 not found in base install location, no other libraries found."); } - }); - - return p; + } }, GetConfigFullPath(){ @@ -153,4 +141,4 @@ function GetSteamDirectory() { if(!fs.existsSync(basedir)) basedir = ""; } return basedir; -} \ No newline at end of file +} From 201de30d302c66066e972aca9a284ade397494a4 Mon Sep 17 00:00:00 2001 From: Bruce Lay <33815726+brucelay@users.noreply.github.com> Date: Sun, 16 Aug 2020 15:44:15 +0100 Subject: [PATCH 11/13] Reduced code repetition in config.js. Bug fixes. Removed SaveConfig() duplicates and corrected error handling. --- modules/config.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/modules/config.js b/modules/config.js index 7993984..4a119d4 100644 --- a/modules/config.js +++ b/modules/config.js @@ -44,24 +44,17 @@ module.exports = { //Try to find the users tf2 directory automatically. try { let result = await this.GetTF2Directory(this.config.steam_directory) - .catch((e) => { - //We failed to get the tf2 dir. Finish anyway. - //The user is notified later if it is left blank. - global.log.error("TF2 directory was not found automatically"); - }); global.log.log("TF2 directory was found successfully at: " + result); this.config.tf2_directory = result; - } finally { - this.SaveConfig(this.config); - return this.config; + } catch { + global.log.error("TF2 directory was not found automatically"); } - } else { - //Resolve now without the steam dir or a tf2 dir. - //User is told later anyway. - this.SaveConfig(this.config); - return this.config; } + //Return whether or not the TF2/Steam directory was found + //User is told later anyway. + this.SaveConfig(this.config); + return this.config; } }, From f3a0db2ea54fcdf3b0a4bb0c0be9bd4b676d7546 Mon Sep 17 00:00:00 2001 From: jota11 Date: Sun, 16 Aug 2020 20:04:42 -0300 Subject: [PATCH 12/13] Better patch notes implementation --- changelog.md | 2 +- images/thatarrowfromthetfblog.svg | 21 +++++++++++---------- patchnotes-page/patch.js | 10 +++++----- patchnotes-page/style.css | 7 ++++--- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/changelog.md b/changelog.md index ab22144..1a3fb55 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,3 @@ ## Version 0.0.5 (ALPHA) -### 08/08/2020 - 00:28:00 (GMT) +### 08/08/2020 - 00:28 (GMT) - Released launcher's alpha version diff --git a/images/thatarrowfromthetfblog.svg b/images/thatarrowfromthetfblog.svg index 0a23348..c93882d 100644 --- a/images/thatarrowfromthetfblog.svg +++ b/images/thatarrowfromthetfblog.svg @@ -9,9 +9,9 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="11" - height="11" - viewBox="0 0 2.9104169 2.9104169" + width="7.3800001" + height="10.1" + viewBox="0 0 1.9526251 2.6722919" version="1.1" id="svg49" inkscape:version="0.92.4 (5da689c313, 2019-01-14)" @@ -26,8 +26,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="45.254834" - inkscape:cx="11.641455" - inkscape:cy="4.9792751" + inkscape:cx="8.5361949" + inkscape:cy="5.5139345" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" @@ -36,7 +36,8 @@ inkscape:window-height="705" inkscape:window-x="-8" inkscape:window-y="-8" - inkscape:window-maximized="1" /> + inkscape:window-maximized="1" + showguides="false" /> @@ -45,7 +46,7 @@ image/svg+xml - + @@ -53,15 +54,15 @@ inkscape:label="Camada 1" inkscape:groupmode="layer" id="layer1" - transform="translate(0,-294.08945)"> + transform="translate(0,-294.32757)"> diff --git a/patchnotes-page/patch.js b/patchnotes-page/patch.js index e56831d..9d17c9c 100644 --- a/patchnotes-page/patch.js +++ b/patchnotes-page/patch.js @@ -1,16 +1,16 @@ const marked = require("marked"); marked.setOptions({ - breaks: true, - gfm: true, - headerIds: false + breaks: true, + gfm: true, + headerIds: false }); var request = new XMLHttpRequest(); request.open("GET", "https://raw.githubusercontent.com/ampersoftware/Creators.TF-Community-Launcher/master/changelog.md"); request.send(); -request.onload = function lol() { +request.onload = () => { if (request.status === 200) { document.getElementById("patchnotes").innerHTML = marked(request.responseText); } else { - document.getElementById("patchnotes").innerHTML = marked("## If you are reading this, there are two options:\n- Github is down (You can check their status page at githubstatus.com)\n- Your internet is down"); + document.getElementById("patchnotes").innerHTML = marked("## If you are reading this, there are two options:\n- Github is down (You can check their status page at `githubstatus.com`)\n- Your internet is down"); } } diff --git a/patchnotes-page/style.css b/patchnotes-page/style.css index fb5c8dd..2437138 100644 --- a/patchnotes-page/style.css +++ b/patchnotes-page/style.css @@ -34,6 +34,7 @@ body { font-family: Roboto Bold, Arial, sans-serif; font-size: 60px; text-align: center; + text-shadow: 0px 0px 20px #000; color: #EEE; } @@ -53,7 +54,7 @@ body { h2 { margin: 0; padding-top: 25px; - font-size: 42px; + font-size: 39px; font-family: Roboto Medium, Arial, sans-serif; border-top: 1px solid rgba(255,255,255,0.5); } @@ -70,7 +71,7 @@ h2:first-of-type { ul { list-style-image: url(../images/thatarrowfromthetfblog.svg); - font-size: 22px; + font-size: 20px; font-family: Roboto Light, Arial, sans-serif; } @@ -79,5 +80,5 @@ code { padding: 0px 5px; border-radius: 5px; font-family: Roboto Thin, Arial, sans-serif; - font-size: 20px; + font-size: 19px; } From 16b5b0ca6734740325be038b44dfde0e665c3294 Mon Sep 17 00:00:00 2001 From: jota11 Date: Sun, 16 Aug 2020 20:14:38 -0300 Subject: [PATCH 13/13] Reverted unwanted change on patch notes window --- patchnotes-page/patchnotespage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchnotes-page/patchnotespage.js b/patchnotes-page/patchnotespage.js index 5694498..a8cb949 100644 --- a/patchnotes-page/patchnotespage.js +++ b/patchnotes-page/patchnotespage.js @@ -24,7 +24,7 @@ function OpenWindow() { width: 960, height: 540 }); - // patchNotesWindow.removeMenu(); + patchNotesWindow.removeMenu(); patchNotesWindow.loadFile(path.resolve(__dirname, "patchnotes.html")); patchNotesWindow.once("ready-to-show", () => { patchNotesWindow.show();