Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows on ARM #1887

Open
rmartin16 opened this issue Jun 25, 2024 · 4 comments
Open

Add support for Windows on ARM #1887

rmartin16 opened this issue Jun 25, 2024 · 4 comments
Labels
enhancement New features, or improvements to existing features. windows The issue relates to Microsoft Windows support.

Comments

@rmartin16
Copy link
Member

What is the problem or limitation you are having?

Briefcase can currently only target Windows on x86. With the growing support for Windows on ARM, Briefcase should support targeting ARM.

Describe the solution you'd like

The current stub should be built for ARM and the Visual Studio template should support targeting ARM.

The embedded Python should be the arm64 version. Although, this is only available back to Python 3.11.

Describe alternatives you've considered

Similar to macOS on Apple Silicon, Windows can run x86 binaries on ARM. I still need to actually try it but this may allow a Briefcase app built for x86 to run on ARM.

Additional context

No response

@rmartin16 rmartin16 added enhancement New features, or improvements to existing features. windows The issue relates to Microsoft Windows support. labels Jun 25, 2024
@freakboy3742
Copy link
Member

Also worth note: Github has introduced native Windows ARM runners; they're not available on free tier yet, but if the experience with macOS ARM runners is indicative, they might be available on free tier later this year/early next year.

@rmartin16
Copy link
Member Author

rmartin16 commented Jun 26, 2024

To confirm, after installing the MSI for an app packaged for x86, the app does run on ARM (albeit virtualized):
image

However, the zip package logs an error; perhaps unrelated to x86 on ARM since the same thing happens when I try to run the zip on another x86 install...maybe #1881 is related...

ZIP Traceback
Traceback (most recent call last):
  File "\app\helloworld\__main__.py", line 4, in <module>
    main().main_loop()
    ^^^^^^
  File "\app\helloworld\app.py", line 26, in main
    return HelloWorld()
           ^^^^^^^^^^^^
  File "\app_packages\toga\app.py", line 464, in __init__
    self.factory = get_platform_factory()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "\app_packages\toga\platform.py", line 114, in get_platform_factory
    factory = importlib.import_module(f"{backend.value}.factory")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "importlib\__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "\app_packages\toga_winforms\__init__.py", line 1, in <module>
    import clr
  File "\app_packages\clr.py", line 6, in <module>
    load()
  File "\app_packages\pythonnet\__init__.py", line 143, in load
    func = assembly.get_function("Python.Runtime.Loader.Initialize")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\app_packages\clr_loader\types.py", line 94, in get_function
    return ClrFunction(self._runtime, self._path, name, func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\app_packages\clr_loader\types.py", line 58, in __init__
    self._callable = runtime._get_callable(assembly, typename, func_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\app_packages\clr_loader\netfx.py", line 47, in _get_callable
    raise RuntimeError(
RuntimeError: Failed to resolve Python.Runtime.Loader.Initialize from \app_packages\pythonnet\runtime\Python.Runtime.dll

Hello World-0.0.1.zip

@Deepak6546kumar

This comment was marked as spam.

@mhsmith
Copy link
Member

mhsmith commented Aug 12, 2024

I expect the performance penalty for HeidiSQL will be about the same as any other emulated code, but since we haven't tested this, we can't say how bad it would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features. windows The issue relates to Microsoft Windows support.
Projects
None yet
Development

No branches or pull requests

4 participants