The following program uses the XPCE internal bitmap image named ‘icon’.
With version 5.9.7, the program also runs as a standalone executable without a problem.
But with version 8.4.2 I get the following error:
I also use XPCE on windows every day for an office system CRM system to make Pdfs and thunderbird emails and to save customer data. I do not use the bitmaps so i do not have this problem.
Swi prolog makes commandline batch files to an Usb-stick which in turn are read by swi-prolog on Linux which calls Thunderbird in the commandline interface with the right data, subject , to-email , email-text, html-body, and also Pdf attachment
Note that xpce-stub.exe no longer exists and you should xpce-win.exe and if all works fine you can use win_window_pos/1 to hide the Prolog console (it will briefly flash). No clue whether all this still works …
Dear Mr,
I have made, with success, an executable file using, on windows = swipl-win.exe -o myapp.exe -c load.pl --goal=main.
But when trying to make an executable for simple application with XPCE /SWI prolog application (simple window application) with the same instructions, nothing happen !!
In your last post, You were talking about xcpe-win.exe application ( which I suppose is for making executable with XPCE /SWI prolog application ?)
But I can’t find it anywhere .
May be could you give me some more information to solve my problem ?
xpce-win.exe no longer exists. Creating an executable including graphics (using xpce) shouldn’t differ too much from a normal executable based on swipl-win.exe. Of course you do need to include the xpce2pl.dll (If I recall correctly) file. First thing to try is probably to dump the exe you created in the bin directory of the installation and check that it works.
Note that if all is working, you can hide the Prolog console window using win_window_pos/1.
It’s working, but my graphic.exe application (simple window) no longer stay on screen.
May be, I forgot something ?
Could you tell me where is the pb ?
here is the code:
:- use_module(library(pce)).
my_first_program :-
% create window
new(D, window('my_first_window')),
% give it the right size
send(D, size, size(250, 100)),
% create text
new(T, text('Hello World !')),
% ask window to position text in the middle
send(D, display, T, point(80, 40)),
% send to window displaying msg.
send(D, open).
% start the demo
:- my_first_program.
This is not going to work as simple :- Goal are only called when the program is loaded. A minimal reasonable example is below. The pce_main_loop/1 predicate keeps the application alive as long as there are open windows.