Skip to content

Commit d61bb67

Browse files
committed
Update paths for windows
1 parent 8043c50 commit d61bb67

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

openandroidinstaller/openandroidinstaller.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# If not, see <https://www.gnu.org/licenses/>."""
1414
# Author: Tobias Sterbak
1515

16+
import os
1617
import sys
1718
import webbrowser
1819
from pathlib import Path
@@ -38,8 +39,8 @@
3839

3940
PLATFORM = sys.platform
4041
# Define asset paths
41-
CONFIG_PATH = Path(__file__).parent.joinpath(Path("assets/configs")).resolve()
42-
IMAGE_PATH = Path(__file__).parent.joinpath(Path("assets/imgs")).resolve()
42+
CONFIG_PATH = Path(__file__).parent.joinpath(Path(os.sep.join(["assets", "configs"]))).resolve()
43+
IMAGE_PATH = Path(__file__).parent.joinpath(Path(os.sep.join(["assets", "imgs"]))).resolve()
4344
BIN_PATH = Path(__file__).parent.joinpath(Path("bin")).resolve()
4445

4546

@@ -115,7 +116,7 @@ def check_bootloader_unlocked(e):
115116
self.state.num_total_steps = len(self.state.steps)
116117

117118
self.bootloader_checkbox = Checkbox(
118-
label="Bootlaoder is already unlocked.", on_change=check_bootloader_unlocked, disabled=True
119+
label="Bootloader is already unlocked.", on_change=check_bootloader_unlocked, disabled=True
119120
)
120121

121122
# build up the main view
@@ -587,7 +588,7 @@ def main(page: Page):
587588
page.horizontal_alignment = "center"
588589

589590
# header
590-
image_path = Path(__file__).parent.joinpath(Path("assets/logo-192x192.png"))
591+
image_path = Path(__file__).parent.joinpath(Path(os.sep.join(["assets", "logo-192x192.png"])))
591592
page.appbar = AppBar(
592593
leading=Image(src=image_path, height=40, width=40, border_radius=40),
593594
leading_width=56,

openandroidinstaller/tool_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def search_device(platform: str, bin_path: Path) -> Optional[str]:
5454
],
5555
stderr=STDOUT,
5656
).decode()
57-
elif platform == "windows":
57+
elif platform in ("windows", "win32"):
5858
output = check_output(
5959
[
60-
str(bin_path.joinpath(Path("adb"))),
60+
str(bin_path.joinpath(Path("adb.exe"))),
6161
"shell",
6262
"getprop",
6363
"|",

0 commit comments

Comments
 (0)