mse-org / mseide-msegui

MSEide is a Rapid Application Development IDE for platform independent rich GUI applications in the Pascal language. It comes with its own GUI toolkit called MSEgui. Binaries: https://github.com/mse-org/mseide-msegui/releases
GNU General Public License v2.0
121 stars 15 forks source link

Extension of EXE file not consistent with ideU #9

Closed circular17 closed 4 years ago

circular17 commented 4 years ago

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.

fredvs commented 4 years ago

Did you set default extension here:

Capture d’écran_2020-04-18_19-07-56

fredvs commented 4 years ago

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:

Capture d’écran_2020-04-18_19-21-34

circular17 commented 4 years ago

Ok I understand the trick, though that's kind of complicated.

fredvs commented 4 years ago

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.

circular17 commented 4 years ago

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?

fredvs commented 4 years ago

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:

ideulin64

Linux 32

ideulin32

Windows 32

ideuwin32

Windows 64:

ideuwin64

circular17 commented 4 years ago

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.

fredvs commented 4 years ago

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.

fredvs commented 4 years ago

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.

Capture d’écran_2020-04-21_03-13-37

Capture d’écran_2020-04-21_03-25-30

Capture d’écran_2020-04-21_03-15-27

circular17 commented 4 years ago

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.

fredvs commented 4 years ago

sense to have the field $EXEEXT in ideU

Huh, did you read my previous post? It does exactly like you explained.

circular17 commented 4 years ago

Yes I read your post. I am not saying the same thing.

fredvs commented 4 years ago

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).

circular17 commented 4 years ago

Yes, either needing ${EXEEXT} all the time or make it optional.

fredvs commented 4 years ago

Fixed with https://github.com/fredvs/ideU/commit/73bae4f7e5a119ba72f158c53ad1b081756d307e