Skip to content

Commit

Permalink
2024-08-23T0714Z
Browse files Browse the repository at this point in the history
  • Loading branch information
Windows81 committed Aug 23, 2024
1 parent b989a45 commit 9b88261
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"args": [
"server",
"--run_client",
"--verbose",
"--user_code",
"VisualPlugin",
],
Expand All @@ -39,7 +38,6 @@
"args": [
"server",
"--run_client",
"--verbose",
"--debug",
"--user_code",
"VisualPlugin",
Expand All @@ -55,7 +53,6 @@
"cwd": "${workspaceFolder}",
"args": [
"server",
"--verbose",
],
"console": "integratedTerminal",
"justMyCode": true
Expand All @@ -68,7 +65,6 @@
"cwd": "${workspaceFolder}",
"args": [
"server",
"--verbose",
"--debug",
],
"console": "integratedTerminal",
Expand Down
6 changes: 4 additions & 2 deletions ReleaseNewVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ $files = New-Object System.Collections.Generic.List[System.Object]
function RetrieveInput() {
$script:release_name = (Read-Host "Version title?")
# Packs Rōblox executables into GitHub releases that can be downloaded.
$script:commit_name = $args[1] ?? (Get-Date -Format "yyyy-MM-ddTHHmmZ" (curl -I -s http://1.1.1.1 | grep "Date:" | cut -d " " -f 2-))
$script:commit_name = $args[1] ?? (Get-Date -Format "yyyy-MM-ddTHHmmZ" `
(curl -I -s http://1.1.1.1 | grep "Date:" | cut -d " " -f 2-))
}


Expand All @@ -28,7 +29,8 @@ function CreateBinary() {
--workpath "$root/PyInstallerWork" `
--distpath "$root/Binaries" `
--icon "$root/Source/Icon.ico" `
--specpath "$root/PyInstallerWork/Spec"
--specpath "$root/PyInstallerWork/Spec" `
--hidden-import requests
foreach ($file in (Get-ChildItem "$root/Binaries/*")) {
$files.Add($file.FullName)
}
Expand Down
19 changes: 9 additions & 10 deletions Source/launcher/downloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,31 @@ def get_remote_link(rōblox_version: util.versions.rōblox, bin_type: util.resou


def download(link: str) -> io.BytesIO:
with urllib.request.urlopen(link) as response:
if response.status != 200:
with urllib.request.urlopen(link) as request_res:
if request_res.status != 200:
raise Exception(
"Failed to download: HTTP Status %d" %
(response.status),
(request_res.status),
)

total_size = int(response.info().get('Content-Length').strip())
response = io.BytesIO()
total_size = int(request_res.info().get('Content-Length').strip())
downloaded_data = io.BytesIO()

with tqdm.tqdm(
total=total_size,
unit='B',
unit_scale=True,
unit_divisor=1024,
desc="Downloading",
) as bar:
while True:
chunk = response.read(1024)
chunk = request_res.read(1024)
if not chunk:
break
response.write(chunk)
downloaded_data.write(chunk)
bar.update(len(chunk))

response.seek(0)
return response
downloaded_data.seek(0)
return downloaded_data


def bootstrap_binary(rōblox_version: util.versions.rōblox, bin_type: util.resource.bin_subtype) -> None:
Expand Down
2 changes: 1 addition & 1 deletion Source/launcher/routines/_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def maybe_download_binary(self) -> None:
(self.BIN_SUBTYPE.name, self.rōblox_version.get_number())
)
downloader.bootstrap_binary(self.rōblox_version, self.BIN_SUBTYPE)
print('Download completed!')
print('Installation completed!')
else:
raise Exception(
'Zipped file "%s" not found for Rōblox version %s.' %
Expand Down
2 changes: 1 addition & 1 deletion Source/launcher/routines/rcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def make_rcc_popen(self) -> None:
'DevSettingsFile.json',
),

*(('-verbose',) if self.local_args.verbose else ()),
*(() if self.local_args.quiet else ('-verbose',)),
],
stdin=subprocess.PIPE,
cwd=self.get_versioned_path(),
Expand Down

0 comments on commit 9b88261

Please sign in to comment.