35 Commits

Author SHA1 Message Date
mmvanheusden
d0b3889a83 Update screenshot 2022-10-25 12:14:53 +02:00
mmvanheusden
038de51557 2.1.0 2022-10-25 12:03:55 +02:00
mmvanheusden
76c1d3c4c5 Fix typo 2022-10-25 12:03:27 +02:00
Maarten
0b8b6cb9ee Add clarification for softpedia users 2022-10-25 11:23:49 +02:00
Maarten
98235b41c9 Asterisk for required fields & highlight red when input is missing 2022-10-24 14:59:55 +02:00
jakobjakobjakob2
beeec6d3bf highlight missing fields in red 2022-10-24 14:27:50 +02:00
jakobjakobjakob2
05b315e30d add asterisk for required form fields 2022-10-24 08:33:15 +02:00
Maarten
1906722c02 replace tooltips with placeholder when information is needed 2022-10-23 18:17:02 +02:00
jakobjakobjakob2
523418d882 replace tooltips with placeholder when information is needed 2022-10-23 14:16:04 +02:00
mmvanheusden
93e2d4dd3e 2.0.6 2022-10-23 09:14:38 +02:00
mmvanheusden
a4b08e7470 Update dependencies 2022-10-23 09:14:19 +02:00
Maarten
4e44cef80c Size the window with respect to the window's frame size
Size the window with respect to the window's frame size
2022-10-23 09:12:35 +02:00
jakobjakobjakob2
cd817a8b8f size the window with respect to the window frames size 2022-10-22 15:32:06 +02:00
Maarten
11b122d5b7 Add CoC 2022-10-20 19:02:44 +02:00
Maarten
a73053278a Add anonymous login support
Add anonymous login support and update Primer CSS
2022-10-19 15:50:19 +02:00
mmvanheusden
0ef69fa1e9 Add anonymous login support and update Primer CSS 2022-10-19 15:39:45 +02:00
mmvanheusden
c84e86ca54 Update dependencies 2022-10-19 14:49:40 +02:00
Jaspreet Singh Saini
69a1cc9edc code of conduct created (#35) 2022-10-17 09:27:29 +05:30
Maarten
deb9f0b53a Fix build.yml typo 2022-10-14 19:58:39 +02:00
Maarten
e711c7b6c6 Merge pull request #33 from mmvanheusden/dependabot/npm_and_yarn/eslint-8.25.0
Bump eslint from 8.24.0 to 8.25.0
2022-10-14 19:29:25 +02:00
Maarten
2531f88fad Merge pull request #34 from mmvanheusden/dependabot/npm_and_yarn/electron-21.1.1
Bump electron from 21.1.0 to 21.1.1
2022-10-14 19:29:15 +02:00
dependabot[bot]
3c932e69ab Bump electron from 21.1.0 to 21.1.1
Bumps [electron](https://github.com/electron/electron) from 21.1.0 to 21.1.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v21.1.0...v21.1.1)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 21:38:06 +00:00
dependabot[bot]
325d2a2772 Bump eslint from 8.24.0 to 8.25.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.24.0 to 8.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.24.0...v8.25.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 22:31:45 +00:00
Maarten van Heusden
f3155fb174 Update dependencies 2022-10-07 20:38:43 +02:00
Maarten
52b8aad68b Merge pull request #32 from mmvanheusden/dependabot/npm_and_yarn/electron-21.1.0
Bump electron from 21.0.1 to 21.1.0
2022-10-07 19:17:26 +02:00
dependabot[bot]
4cbaa0b01a Bump electron from 21.0.1 to 21.1.0
Bumps [electron](https://github.com/electron/electron) from 21.0.1 to 21.1.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v21.0.1...v21.1.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 22:02:30 +00:00
Maarten
d310dfd238 Merge pull request #31 from mmvanheusden/predownloadcheck
Rewrite the pre download check and add a empty fields check
2022-10-05 09:01:44 +02:00
mmvanheusden
4558e4bc25 Rewrite the pre download check and add a empty fields check
Signed-off-by: mmvanheusden <50550545+mmvanheusden@users.noreply.github.com>
2022-10-05 08:43:41 +02:00
Maarten
37c074780e Merge pull request #30 from mmvanheusden/dependabot/npm_and_yarn/electron-21.0.1
Bump electron from 21.0.0 to 21.0.1
2022-09-30 17:28:38 +02:00
dependabot[bot]
82ea62b6a9 Bump electron from 21.0.0 to 21.0.1
Bumps [electron](https://github.com/electron/electron) from 21.0.0 to 21.0.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v21.0.0...v21.0.1)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-28 22:48:05 +00:00
Maarten
7abe8aeab6 Merge pull request #29 from mmvanheusden/dependabot/npm_and_yarn/electron-21.0.0
Bump electron from 20.2.0 to 21.0.0
2022-09-27 10:48:05 +02:00
Maarten
c1c63152fd Merge pull request #28 from mmvanheusden/dependabot/npm_and_yarn/eslint-8.24.0
Bump eslint from 8.23.1 to 8.24.0
2022-09-27 10:48:00 +02:00
dependabot[bot]
c1715b10f4 Bump electron from 20.2.0 to 21.0.0
Bumps [electron](https://github.com/electron/electron) from 20.2.0 to 21.0.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v20.2.0...v21.0.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 21:40:57 +00:00
dependabot[bot]
07c22285ec Bump eslint from 8.23.1 to 8.24.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.23.1 to 8.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.23.1...v8.24.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 21:40:33 +00:00
Maarten
e224c69931 Create FUNDING.yml 2022-09-23 20:15:46 +02:00
11 changed files with 505 additions and 1291 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
liberapay: barbapapa

View File

@@ -20,7 +20,7 @@ jobs:
- name: Set up npm project
run: npm install
- name: build project
- name: Build project
run: npm run buildall
- name: Move x64 exe
@@ -42,4 +42,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: SteamDepotDownloaderGUI-${{ github.run_number }}
path: SteamDepotDownloaderGUI-${{ github.run_number }}*.*
path: SteamDepotDownloaderGUI-${{ github.run_number }}*.*

194
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,194 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@@ -19,6 +19,11 @@
Download the latest release for your operating system
from [GitHub](https://github.com/mmvanheusden/SteamDepotDownloaderGUI/releases/latest).
## Support
If you need help, please open an issue.
**⚠️ No support will be provided for binaries downloaded from unofficial mirrors like softpedia. ⚠️**
## Usage
Enter everything you normally would in the DepotDownloader console.

View File

@@ -1,5 +1,5 @@
const {
checkDotnet,
preDownloadCheck,
download,
createCommand,
runCommand,
@@ -9,28 +9,35 @@ const {
} = require("./utils")
function submitForm() {
checkDotnet().then(async function (result) {
if (!result) {
console.error("dotnet not found in PATH")
// Check if the form is filled in and if dotnet is installed
preDownloadCheck().then(async function () {
document.getElementById("dotnetwarning").hidden = true
document.getElementById("emptywarning").hidden = true
console.info("dotnet found in PATH")
// Remove the old depotdownloader directory
await removeDir("depotdownloader")
// Download the DepotDownloader binary, so it doesn't have to be included in the source code
await download("https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.4.7/depotdownloader-2.4.7.zip")
// Unzip the DepotDownloader binary
await unzip("depotdownloader-2.4.7.zip", "depotdownloader")
// Clean up the old files
await removeFile("depotdownloader-2.4.7.zip")
// Run the final command
await runCommand(createCommand())
}).catch(function (error) {
if (error === "noDotnet") {
console.error("Dotnet not found in PATH")
document.getElementById("emptywarning").hidden = true
document.getElementById("dotnetwarning").hidden = false
} else {
console.info("dotnet found in PATH")
// Remove the old depotdownloader directory
await removeDir("depotdownloader")
// Download the DepotDownloader binary, so it doesn't have to be included in the source code
await download("https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.4.7/depotdownloader-2.4.7.zip")
// Unzip the DepotDownloader binary
await unzip("depotdownloader-2.4.7.zip", "depotdownloader")
// Clean up the old files
await removeFile("depotdownloader-2.4.7.zip")
// Run the final command
await runCommand(createCommand().toString())
} else if (error === "emptyField") {
console.error("Fill in all required fields")
document.getElementById("dotnetwarning").hidden = true
document.getElementById("emptywarning").hidden = false
}
})
}
@@ -66,8 +73,11 @@ function openSteamDB() {
void electron.shell.openExternal("https://steamdb.info/instantsearch/")
}
/* Everything below this line runs when the page is loaded */
// Add event listeners to the buttons
window.addEventListener("DOMContentLoaded", () => {
document.getElementById("alertbtn").addEventListener("click", submitDotnet)
document.getElementById("dotnetalertbtn").addEventListener("click", submitDotnet)
document.getElementById("downloadbtn").addEventListener("click", submitForm)
document.getElementById("smbtn1").addEventListener("click", openGitHubIssues)
document.getElementById("smbtn2").addEventListener("click", openSteamDB)

View File

@@ -4,20 +4,20 @@
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link href="https://unpkg.com/@primer/css@20.4.5/dist/primer.css" rel="stylesheet"/>
<link href="https://unpkg.com/@primer/css@20.4.7/dist/primer.css" rel="stylesheet"/>
<title>SteamDepotDownloaderGUI</title>
</head>
<body>
<script src="downloader.js"></script>
<div class="mx-auto">
<div hidden id="dotnetwarning">
<div class="flash flash-error mx-2 mt-2 color-shadow-medium" id="alert">
<div class="flash flash-error mx-2 mt-2 color-shadow-medium" id="dotnetalert">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"
fill-rule="evenodd"></path>
</svg>
<code><span class="text-italic">dotnet</span></code> was not found.
<button class="btn btn-sm flash-action" id="alertbtn">
<button class="btn btn-sm flash-action" id="dotnetalertbtn">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5
0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"
@@ -27,6 +27,15 @@
</button>
</div>
</div>
<div hidden id="emptywarning">
<div class="flash flash-warn mx-2 mt-2 color-shadow-medium" id="emptyalert">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"
fill-rule="evenodd"></path>
</svg>Please fill in all required fields.
</div>
</div>
<div class="f0-light text-center">Steam Depot Downloader</div>
<form id="theform">
@@ -34,48 +43,38 @@
<div class="form-group-header">
<label for="username">Username</label>
</div>
<div aria-label="Enter your username here." class="form-group-body tooltipped tooltipped-n">
<input class="form-control input-block" id="username" type="text"/>
</div>
<input class="form-control input-block" id="username" type="text" placeholder="Leave empty for anonymous login"/>
</div>
<div class="form-group mx-3 mt-1">
<div class="form-group-header">
<label for="password">Password</label>
</div>
<div aria-label="Enter your password here." class="form-group-body tooltipped tooltipped-n">
<input class="form-control input-block" id="password" type="password"/>
</div>
<input class="form-control input-block" id="password" type="password" placeholder="Leave empty for anonymous login"/>
</div>
<div class="form-group mx-3 mt-1">
<div class="form-group mx-3 mt-1 required">
<div class="form-group-header">
<label for="appid">App ID</label>
</div>
<div aria-label="Enter the App ID here." class="form-group-body tooltipped tooltipped-n">
<input class="form-control input-block" id="appid" type="number"/>
</div>
<input class="form-control input-block" id="appid" type="number"/>
</div>
<div class="form-group mx-3 mt-1">
<div class="form-group mx-3 mt-1 required">
<div class="form-group-header">
<label for="depotid">Depot ID</label>
</div>
<div aria-label="Enter the Depot ID here." class="form-group-body tooltipped tooltipped-n">
<input class="form-control input-block" id="depotid" type="number"/>
</div>
<input class="form-control input-block" id="depotid" type="number"/>
</div>
<div class="form-group mx-3 mt-1">
<div class="form-group mx-3 mt-1 required">
<div class="form-group-header">
<label for="manifestid">Manifest ID</label>
</div>
<div aria-label="Enter the Manifest ID here." class="form-group-body tooltipped tooltipped-n">
<input class="form-control input-block" id="manifestid" type="number"/>
</div>
<input class="form-control input-block" id="manifestid" type="number"/>
</div>
<div class="form-group mx-3 mt-1">
<div class="form-group mx-3 mt-1 required">
<div class="form-group-header ">
<label for="osdropdown">Operating system</label>
</div>
@@ -97,7 +96,7 @@
</div>
</form>
<div aria-label="Start the download process." class="form-group mt-3 ml-3 mr-3 tooltipped tooltipped-n">
<div class="form-group mt-3 ml-3 mr-3">
<button class="btn btn-block btn-primary" id="downloadbtn">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"

View File

@@ -7,6 +7,7 @@ const createWindow = () => {
resizable: false,
width: 430,
height: 590,
useContentSize: true,
maximizable: false,
webPreferences: {
nodeIntegration: true,

1434
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "steamdepotdownloadergui",
"version": "2.0.5",
"version": "2.1.0",
"description": "DepotDownloader Electron frontend",
"main": "main.js",
"scripts": {
@@ -30,9 +30,9 @@
},
"homepage": "https://github.com/mmvanheusden/SteamDepotDownloaderGUI#readme",
"devDependencies": {
"electron": "^20.2.0",
"electron-builder": "^23.1.0",
"eslint": "^8.18.0"
"electron": "^21.2.0",
"electron-builder": "^23.6.0",
"eslint": "^8.25.0"
},
"dependencies": {
"elecron": "^0.0.1-security",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -2,30 +2,46 @@
* Checks if dotnet is installed in the system path
* @returns {Promise<unknown>} A promise that resolves to true if dotnet is installed, false otherwise
*/
function checkDotnet() {
return new Promise((resolve) => {
function preDownloadCheck() {
return new Promise((resolve, reject) => {
// Check if all fields are filled
const formInputs = document.forms["theform"]
let unfilledFields = 0
for (const input of formInputs) {
const isInvalid = input.value === "" && input.parentElement.classList.contains("required")
input.parentElement.classList.toggle("errored", isInvalid) // toggle the 'errored' class depending on if isInvalid is true or false.
if (isInvalid) unfilledFields++
}
if (unfilledFields > 0) {
reject("emptyField")
return
}
// Check if dotnet is installed, depending on the platform
if (process.platform.toString().includes("win")) {
// Windows
const {exec} = require("child_process")
const command = "dotnet.exe --version"
exec(command, function (error) {
if (error) {
resolve(false)
reject("noDotnet")
} else {
resolve(true)
}
})
} else {
// Linux
const {exec} = require("child_process")
const command = "dotnet --version"
exec(command, function (error) {
if (error) {
resolve(false)
reject("noDotnet")
} else {
resolve(true)
}
})
}
})
}
@@ -137,23 +153,29 @@ const createCommand = () => {
let manifestid = document.forms["theform"]["manifestid"].value
let osdropdown = document.getElementById("osdropdown")
// if either the username or password fields are empty, anonymous login is used
let anonymous = username === "" || password === ""
// build the username and password flags into one string, allowing for anonymous login
let userpass = anonymous ? "" : `-username ${username} -password ${password}`
const finalPath = platformpath() + path.sep + "games" + path.sep + appid
// The final command to run, returned by this function
if (osdropdown.options[osdropdown.selectedIndex].text.includes("Gnome")) {
return `gnome-terminal -e 'bash -c "dotnet ./depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16";bash'`
return `gnome-terminal -e 'bash -c "dotnet ./depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16";bash'`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("Windows")) {
return `start cmd.exe /k dotnet ${platformpath()}${path.sep}depotdownloader${path.sep}DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16`
return `start cmd.exe /k dotnet ${platformpath()}${path.sep}depotdownloader${path.sep}DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("macOS")) {
return `osascript -c 'tell application "Terminal" to do script 'dotnet ./depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16'`
return `osascript -c 'tell application "Terminal" to do script 'dotnet ./depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16'`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("Konsole")) {
return `konsole --hold -e "dotnet ./depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16"`
return `konsole --hold -e "dotnet ./depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16"`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("Xfce")) {
return `xfce4-terminal -H -e "dotnet ./depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16"`
return `xfce4-terminal -H -e "dotnet ./depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16"`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("Terminator")) {
return `terminator -e 'bash -c "dotnet ./depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16";bash'`
return `terminator -e 'bash -c "dotnet ./depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath}/ -max-servers 50 -max-downloads 16";bash'`
} else if (osdropdown.options[osdropdown.selectedIndex].text.includes("Print command")) {
console.log(`COPY-PASTE THE FOLLOWING INTO YOUR TERMINAL OF CHOICE:\n\ndotnet ${platformpath()}/depotdownloader/DepotDownloader.dll -username ${username} -password ${password} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath} -max-servers 50 -max-downloads 16`)
console.log(`COPY-PASTE THE FOLLOWING INTO YOUR TERMINAL OF CHOICE:\n\ndotnet ${platformpath()}/depotdownloader/DepotDownloader.dll ${userpass} -app ${appid} -depot ${depotid} -manifest ${manifestid} -dir ${finalPath} -max-servers 50 -max-downloads 16`)
return "echo hello"
}
}
@@ -193,4 +215,4 @@ const platformpath = () => {
}
}
module.exports = {checkDotnet, download, createCommand, runCommand, removeDir, removeFile, unzip, platformpath}
module.exports = {preDownloadCheck, download, createCommand, runCommand, removeDir, removeFile, unzip, platformpath}