mjishnu / alt-app-installer

A Program To Download And Install Microsoft Store Apps Without Store
https://github.com/mjishnu/alt-app-installer
MIT License
372 stars 34 forks source link

arm64 support #59

Closed xgdgsc closed 1 month ago

xgdgsc commented 3 months ago

https://github.com/mjishnu/alt-app-installer/blob/3619afce0a348b3e197daa5cc667a59631fe7306/app/modules/url_gen.py#L27

I had to change this to return "arm64" to download successfully.

The arm version Python PyQt6 has some installation issues so I have to run the x64 Python version. Maybe adding an arm64 checkbox now can be fine.

And how to do the packaging to exe?

mjishnu commented 3 months ago

hey would you be willing to test this, i do not own an arm pc so was unable to test it

import platform

def os_arc():
    if platform.machine().endswith("64"):
        return "x64"
    if platform.machine().endswith("32") or platform.machine().endswith("86"):
        return "x86"
    if platform.machine().endswith("arm64"):
        return "arm64 endswith success"
    if platform.machine().endswith("arm"):
        return "arm endswith success"
    if platform.machine().startswith("arm64"):
        return "arm64 startswith success"
    if platform.machine().startswith("arm"):
        return "arm startswith success"
    return platform.machine()

print(os_arc())

what does the output shows ?

if this works we dont need a toggle it will automatically figure it out, the packaging is done using pyinstaller

xgdgsc commented 3 months ago

image Left is x64 version of Python running on arm and right is native arm64.

The problem for me is installing pyqt6 on arm64 python. Or provide a cli version could be fine.

mjishnu commented 3 months ago
import platform

def os_arc():
    machine = platform.machine().lower()

    if machine.endswith("arm64"):
        return "arm64"
    if machine().endswith("64"):
        return "x64"
    if machine.endswith("32") or machine.endswith("86"):
        return "x86"
    else:
        return "arm"

print(os_arc())

can you try now, i see that even if i do a logic like this it would be waste since you are not able to run it in arm64 python but still in future it might work so if you can please provide output of this test it would be great.

The problem for me is installing pyqt6 on arm64 python. Or provide a cli version could be fine.

try older version of pyqt, currently i am rewriting the program from scratch to c#, and not doing any major changes. let me see what i can do about cli if it aint too complicated i would implement it.

xgdgsc commented 3 months ago

This is fine.

>>> print(os_arc())
arm64

c# can compile arm version pretty easily.

mjishnu commented 3 months ago

here is a cli version of alt app installer: https://github.com/mjishnu/alt-app-installer-cli

xgdgsc commented 3 months ago

image Guess this is because arm python cannot load the dll?

mjishnu commented 3 months ago

did you install python net

mjishnu commented 3 months ago

image Guess this is because arm python cannot load the dll?

this new release should fix it, no longer using python net using subprocess module instead https://github.com/mjishnu/alt-app-installer-cli/releases/tag/v1.0.1

xgdgsc commented 3 months ago

Great. It works. Might as well adding argument for downloading for other manually specified architecture, rather than relying on the interpreter arch?