beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.16k stars 109 forks source link

[windows] Windows installer improved #411

Closed jjfumero closed 2 months ago

jjfumero commented 2 months ago

Description

Windows installer improved. With this patch, there is no need to invoke Python explicitly on Windows.

Problem description

n/a.

Backend/s tested

Mark the backends affected by this PR.

OS tested

Mark the OS where this PR is tested.

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

How to test the new patch?

From the terminal within IntelliJ

> .\bin\windowsMicrosoftStudioTools2022.cmd
> pip install pyinstaller  
> python bin\tornadovm-installer --jdk jdk21 --backend=opencl 
> setvars.cmd

Testing:

> tornado-test -V 
## Run NBODY
> tornado -m tornado.examples/uk.ac.manchester.tornado.examples.compute.NBody
stratika commented 2 months ago

I had the problem of pyinstaller being an unrecognized command from the terminal that was opened from IntelliJ. I got this output:

creating tornado binary ....
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
ok
creating tornado-test binary ....
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
ok
creating tornado-benchmarks.py binary ....
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.

To resolve that problem I had to go to the "Edit the system environment variables" menu, click the "Environment Variables", and add in the PATH variable this path: "C:\Users\nasos\AppData\Local\Programs\Python\Python312\Scripts".

I had first installed pyinstaller using pip3 from a terminal:

pip install pyinstaller

Once doing those steps, I had to restart IntelliJ. Did you do something different? This should be documented, because someone who does not have pyinstaller in the system, will get the same error.