Skip to content

Commit

Permalink
2024-10-01T2323Z
Browse files Browse the repository at this point in the history
  • Loading branch information
Windows81 committed Oct 1, 2024
1 parent 353e84e commit 57ad755
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
!Examples/**
Examples/**/AssetCache/

*.exe
**/*.exe

**/*.lock
*.spec
*.sqlite
Expand Down
6 changes: 2 additions & 4 deletions ReleaseNewVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ function CreateBinary() {
--onefile "$root/Source/_main.py" `
-p "$root/Source/" `
--workpath "$root/PyInstallerWork" `
--distpath "$root/Binaries" `
--distpath "$root" `
--icon "$root/Source/Icon.ico" `
--specpath "$root/PyInstallerWork/Spec" `
--hidden-import requests # Allows functions in config to use the `requests` library (1 MiB addition)
foreach ($file in (Get-ChildItem "$root/Binaries/*")) {
$files.Add($file.FullName)
}
$files.Add("$root/RFD.exe")
}

function UpdateZippedReleaseVersion($labels) {
Expand Down
4 changes: 2 additions & 2 deletions Source/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from . import _logic, structure
import data_transfer.transferer
from assets import asseter
import util.resource
import util.versions
import functools
import storage
import assets


class obj_type(structure.config_type, _logic.base_type):
Expand All @@ -31,7 +31,7 @@ def __init__(self, path: str = util.resource.DEFAULT_CONFIG_PATH) -> None:

self.data_transferer = data_transfer.transferer.obj_type()

self.asset_cache = assets.asseter(
self.asset_cache = asseter(
dir_path=self.game_setup.asset_cache.dir_path,
redirect_func=self.remote_data.asset_redirects,
clear_on_start=self.game_setup.asset_cache.clear_on_start,
Expand Down
10 changes: 6 additions & 4 deletions Source/launcher/routines/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ def finalise_user_code(self) -> None:
self.user_code = str(res.read(), encoding='utf-8')

def get_base_url(self) -> str:
return \
f'http{"s" if self.web_port.is_ssl else ""}://' + \
return (
f'http{"s" if self.web_port.is_ssl else ""}://' +
f'{self.web_host}:{self.web_port.port_num}'
)

def get_app_base_url(self) -> str:
return \
f'http{"s" if self.web_port.is_ssl else ""}://' + \
return (
f'http{"s" if self.web_port.is_ssl else ""}://' +
f'{self.app_host}:{self.web_port.port_num}'
)
5 changes: 3 additions & 2 deletions Source/launcher/routines/rcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ class arg_type(logic.bin_ssl_arg_type):
), # type: ignore

def get_base_url(self) -> str:
return \
f'http{"s" if self.web_port.is_ssl else ""}://' + \
return (
f'http{"s" if self.web_port.is_ssl else ""}://' +
f'localhost:{self.web_port.port_num}'
)

def get_app_base_url(self) -> str:
return f'{self.get_base_url()}/'
2 changes: 1 addition & 1 deletion Source/util/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GIT_RELEASE_VERSION = '''0.53.0'''
GIT_RELEASE_VERSION = '''0.53.2'''

ZIPPED_RELEASE_VERSION = '''0.53.0'''
ZIPPED_RELEASE_LINK_FORMAT = 'https://github.com/Windows81/Roblox-Freedom-Distribution/releases/download/%s/%s.%s.7z'
Expand Down
18 changes: 13 additions & 5 deletions Source/util/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
import os

MADE_WITH_PYINSTALLER = hasattr(sys, '_MEIPASS')
# TODO: don't make things depend on parent directories.
TOP_DIR = \
os.path.dirname(sys.executable) \
if MADE_WITH_PYINSTALLER else \
os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
TOP_DIR = (
os.path.dirname(sys.executable)
if MADE_WITH_PYINSTALLER else
os.path.dirname(
# Path for `Source`.
os.path.dirname(
# Path for top-level `_main.py`.
sys.modules['__main__'].__file__ or
# Path for `~/util`
os.path.dirname(__file__)
)
)
)


class dir_type(enum.Enum):
Expand Down
5 changes: 3 additions & 2 deletions Source/web_server/_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ def parse_request(self) -> bool:
else:
self.ip_addr = host_part

self.hostname = \
f'http{"s" if isinstance(self.server, web_server_ssl) else ""}://' + \
self.hostname = (
f'http{"s" if isinstance(self.server, web_server_ssl) else ""}://' +
f'{self.domain}:{self.sockname[1]}'
)

# Some endpoints should only allow the RCC to do stuff.
# TODO: use a proper allow-listing system.
Expand Down

0 comments on commit 57ad755

Please sign in to comment.