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

Exe problem #94

Open
limelect opened this issue Dec 18, 2023 · 19 comments
Open

Exe problem #94

limelect opened this issue Dec 18, 2023 · 19 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@limelect
Copy link

Plz see
https://en.delphipraxis.net/topic/10675-d4p_export_demo/
Either VCL or FMX cannot make an EXE with pyinstaller.exe
On GUIPY the script runs with no problem

@lmbelo lmbelo self-assigned this Dec 19, 2023
@lmbelo lmbelo added the help wanted Extra attention is needed label Dec 19, 2023
@lmbelo
Copy link
Member

lmbelo commented Dec 19, 2023

@limelect you will find further instructions here.
Let me know if this works for you.

@limelect
Copy link
Author

limelect commented Dec 19, 2023

No, However in GUIPY it workes
G:\Delphi Projects\Embarcadero\Delphi4PythonExporter-main\installer>pyinstaller delphifmxexecutable.spec

The 'pathlib' package is an obsolete backport of a standard library package and
is incompatible with PyInstaller. Please remove this package (located in c:\user
s\limelect\anaconda3\lib\site-packages) using
conda remove
then try again.

Am I to delete and install again? with pip install?
I do not remember how I installed

delphifmxexecutable.py.txt
delphifmxexecutable.spec.txt
it did not work

@limelect
Copy link
Author

I am missing some ting where is the source name and location is it the delphifmx?

@lmbelo
Copy link
Member

lmbelo commented Dec 19, 2023

Simplify your test case... Install Python3.11, PyInstaller and DelphiFMX out of Conda and try again.

@limelect
Copy link
Author

limelect commented Dec 19, 2023

Is it supposed to be like that?
still same mistak

delphifmxexecutable.spec.txt

?

@limelect
Copy link
Author

limelect commented Dec 19, 2023

I see on the net an answer

https://stackoverflow.com/questions/75476135/how-to-convert-python-file-to-exe-the-pathlib-package-is-an-obsolete-backport

I've experienced the same problem. I managed to solve it by downgrading pyInstaller to 5.1 (from 5.8) without touching pathlib. An additional possibility to consider.

from the net
pip install pyinstaller==5.1 do I do that

@lmbelo
Copy link
Member

lmbelo commented Dec 19, 2023

Try it on Python3.11 as I said.

@limelect
Copy link
Author

someting happened tp PyInstaller

@limelect
Copy link
Author

limelect commented Dec 19, 2023

First i deleted the dir problem
pyinstaller workers now it compile
BUt

  1. where is the name of my program? in the spec?
  2. or I do not understand. i need an execute of my program

@limelect
Copy link
Author

Ok I found the program name
BUt
G:\Delphi Projects\Embarcadero\Delphi4PythonExporter-main\installer\dist\delphif
mxexecutable>delphifmxexecutable.exe
Traceback (most recent call last):
File "D4P_export_demo.py", line 13, in
File "D4P_export_demo.py", line 7, in main
File "parent_window.py", line 12, in init
SystemError: <built-in method LoadProps of Parent_Form object at 0x02A4A070> ret
urned NULL without setting an error
[16136] Failed to execute script 'D4P_export_demo' due to unhandled exception!

I will check it with VCL

@limelect
Copy link
Author

Finaly it workes on VCL

@limelect
Copy link
Author

But on FMX Error this is the project
Delphi4PythonExporter-main\Samples\Simple_Demo

@limelect
Copy link
Author

limelect commented Dec 19, 2023

Pythone.zip
Still something very wrong on vcl
I get an empty form
Screenshot - 19_12_2023 , 19_58_36

delphivclexecutable.spec.txt

Screenshot - 19_12_2023 , 19_52_38

@lmbelo
Copy link
Member

lmbelo commented Dec 19, 2023

Make sure your script is getting the right path to the .pydfm file.

@limelect
Copy link
Author

I made sure as I am a professional
I do not have any (on my 3 vcl demo) just an empty screen
P.S My site www.limelect.com with Delphi since Delphi #1

@lmbelo
Copy link
Member

lmbelo commented Dec 19, 2023

Hmm... I didn't get the point.

Anyway, I quick fixed your project and shared it here again.

Pythone.zip

@limelect
Copy link
Author

limelect commented Dec 20, 2023

Finally, it works great thanks
can you only explain to me the datas= fields?
For the first 2, I understand the path to the library and the library name
of the others.
if I have more forms will this be included I guess
each form has this structure r"Unit1.pydfm".
and lastly the point what does it mean?

As for FMX, I will try to play with it as it has a problem too

I could not find any good information on data here
https://pyinstaller.org/en/stable/man/pyi-makespec.html

And lastly, why do I have to give the package path and name? it does not know
where the Pythone packages are?

@limelect
Copy link
Author

why the last comment go into our discussion?

@limelect
Copy link
Author

First Thanks for your kind help
But unfortunately, I have some bad comments which do not concern you

  1. I did not get any action with the exe button pressed edit>label
  2. If so Delphivcl has no preference over QT designer which does the same
  3. with my https://limelect.com/downloads/compile-ui-to-py-files/ compile UI>py
    PYinstaler is used very simply and does the same job
  4. I hope Embarcadero will read this and take some action with their PY output
  5. I have added a test program
  6. if I am wrong about the output plz notify me

my_vcl_test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants