Closed circular17 closed 4 years ago
Did you set default extension here:
You may set target file as mytargetfile${EXEEXT}
In MSEide, set default extension ${EXEEXT} = .exe
and in ideU in Global Settings - Other- Set ${EXEEXT} as empty
.
And in ideU project option - make - extension, set for one number for extension:
Ok I understand the trick, though that's kind of complicated.
Ok I understand the trick, though that's kind of complicated.
Yes, maybe but if you use Linux, you will see how nice and easy it is to compile your project for Windows, using a true Windows FPC Windows compiler that you run using Wine emulator.
The bémol, I agree, is to be obliged to use the "Exe extension" ideU trick to do poly-compilation (not cross-compilation).
(If you want to test it with fpc-ootb, just download the Windows version, unzip it somewhere on your Linux system, assign the fpc-ootb.exe compiler for one ideU Pascal compiler and enable Wine checkbox.)
So you may choose to compile your project for Linux or Windows, without any cross-compilation, only true native compilation.
I like the idea of cross-compiling that's definitely valuable.
It is just that it is confusing. Wouldn't it be possible that if you load a project from MSEide, you get the same filename by default? Or at least check if there isn't already ${EXEEXT} in the target file?
MSEide and ideU use the same "Global Settings". But usually, for convenience for poly-compil, it is easier that the ideU user set his default ${EXEEXT} as no extension and tune it with the extended settings in project option of the extension.
Here a project compiled for Linux 64/32, Windows 64/32 completely OOTB, only choose a different number of compilation type:
Linux 64:
Linux 32
Windows 32
Windows 64:
Yep but the problem is that if we work on the same project, and the I have MSEgui and you have ideU or vice versa, we will have to update the target file name each time we share.
we will have to update the target file name each time we share.
If your project uses as target filename myfilename${EXEEXT}
, it can be set in your extended ideU extension option.
But ok, I will test this tonigth maybe I miss something.
OK, I did try and did not find problems is you use myproc${EXEEXT}
as target name.
Just set the macro in ideU ${EXEEXT}
as empty string.
I understand but it is too complicated.
The field "targetfile" has two different meanings:
To keep things compatible, one need to be able to use the target file with extension. Do to do so, one needs to keep the $EXEEXT value to ".exe" on Windows.
In this case, when using the default in Exe extension, that would not add an additional extension. And at the same time, we would like to customize the extension on the build mode.
So I suggest that the Exe extension tab would do the following:
Then the project would be compatible between ideU and MSEgui, it would make sense to have the field $EXEEXT in ideU (if we have to set it to empty then what's the point of it?), and you can have multiple build modes with different extensions.
sense to have the field $EXEEXT in ideU
Huh, did you read my previous post? It does exactly like you explained.
Yes I read your post. I am not saying the same thing.
and with ideU it means targetfile without extension
I agree it could be misunderstood.
I will change the definition where is added Target file (without extension)
.
In fact to be compatible with MSEide, the one should always use in ideU something like:
myfilename${EXEEXT}
(always add the ${EXEEXT}-macro).
Yes, either needing ${EXEEXT} all the time or make it optional.
When I open a project in MSEide, if I compile I get a filename without extension, unless I add it in the "target file" field of the Make tab. But if I do that, then when I compile in ideU I get double extensions.