Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Compiling SimulIDE under windows

4 posters

Go to page : Previous  1, 2, 3

Go down  Message [Page 3 of 3]

51Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Thu Dec 29, 2022 8:22 am

arcachofo

arcachofo

About instructions to compile current trunk branch under Windows:

- As far a I know libelf is no longer needed, even for 0.4.15.

- If Bazaar is installed, Rev. number should be retrieved automatically.
Is not working??

- Build date also should be retrieved automatically. Not working?

52Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Thu Dec 29, 2022 1:29 pm

acebrian



arcachofo wrote:About instructions to compile current trunk branch under Windows:

- As far a I know libelf is no longer needed, even for 0.4.15.

- If Bazaar is installed, Rev. number should be retrieved automatically.
 Is not working??

- Build date also should be retrieved automatically. Not working?

After some tests:

1) libelf removed and confirmed that it is not needed.


2) This is a CMD/MSYS2 interoperability problem:

C:\simulide>bzr revno
"bzr" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\simulide>C:\msys64\usr\bin\python.exe /usr/bin/bzr revno
1470


I have found a workaround:

C:\simulide>echo @C:\msys64\usr\bin\python.exe /usr/bin/bzr %* > bzr.bat

C:\simulide>bzr revno
1470



3) This is a CMD problem. In CMD, date is a builtin command that has preference over external commands:

C:\simulide>date
La fecha actual es: 29/12/2022
Escriba la nueva fecha: (dd-mm-aa)

C:\simulide>date /t
29/12/2022

C:\simulide>echo %DATE%
29/12/2022


I have found a workaround:

C:\simulide>date +%d-%m-%y
El sistema no puede aceptar la fecha que escribió.
Escriba la nueva fecha: (dd-mm-aa)

C:\simulide>"date" +%d-%m-%y
29-12-22



Updated instructions (including workarounds) to compile current trunk branch under Windows:

----------------------------------------
# MSYS2
pacman -S make bzr patch

cd /c/
bzr branch lp:simulide
cd /c/simulide
bzr bind lp:simulide

cp -a /c/simulide/build_XX/ /c/simulide/build_release/

exit
----------------------------------------
# CMD
path=%PATH%;C:\msys64\usr\bin;C:\Qt\5.15.2\mingw81_64\bin;C:\Qt\Tools\mingw810_64\bin
cd C:\simulide\build_release
echo @C:\msys64\usr\bin\python.exe /usr/bin/bzr %* > ..\bzr.bat
sed -i -e '/^BUILD_DATE =/s/date/\\\"date\\\"/' ..\SimulIDE.pro
qmake
make -j8

cd executables\SimulIDE_
windeployqt --debug --plugindir plugins --no-quick-import --no-translations --no-system-d3d-compiler --no-webkit2 -no-virtualkeyboard -no-angle -no-opengl-sw .
rmdir /s /q plugins\bearer
rmdir /s /q plugins\imageformats
rmdir /s /q plugins\playlistformats
rmdir /s /q plugins\styles

exit
----------------------------------------

53Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Thu Dec 29, 2022 11:18 pm

arcachofo

arcachofo

1) libelf removed and confirmed that it is not needed.
Nice!

2) This is a CMD/MSYS2 interoperability problem:
I see...
And good solution.
I find difficult to integrate this solution in SimulIDE.pro because it depends on where MSYS2 is installed.

3) This is a CMD problem. In CMD, date is a builtin command that has preference over external commands:
Didn't know about that.
Your solution could be integrated in SimulIDE.pro, but not sure which is the valid scope.
It must be specific for MSYS or Cygwin, not Mingw.
Do you have any idea?

Something like this:

cygwin{
   BUILD_DATE = $$system(\\\"date\\\" +\"\\\"%d-%m-%y\\\"\")
}else {
   BUILD_DATE = $$system(date +\"\\\"%d-%m-%y\\\"\")
}

54Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Thu Dec 29, 2022 11:54 pm

acebrian



In my opinion, bzr workaround should not be integrated in SimulIDE.pro because it is a specific issue of CMD/MSYS2 combination. For example, it doesn't happen if Bazaar for Windows (http://wiki.bazaar.canonical.com/WindowsDownloads) is used.

The date workaround can be integrated in SimulIDE.pro with:

win32 {
BUILD_DATE = $$system(\\\"date\\\" +\"\\\"%d-%m-%y\\\"\")
}
linux|macx {
BUILD_DATE = $$system(date +\"\\\"%d-%m-%y\\\"\")
}
DEFINES += BUILDDATE=\\\"$$BUILD_DATE\\\"

The workaround only needs to be applied in Windows platforms (when date is a builtin command of CMD).

55Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 30, 2022 12:23 am

acebrian



acebrian wrote:In my opinion, bzr workaround should not be integrated in SimulIDE.pro because it is a specific issue of CMD/MSYS2 combination. For example, it doesn't happen if Bazaar for Windows (http://wiki.bazaar.canonical.com/WindowsDownloads) is used.

The date workaround can be integrated in SimulIDE.pro with:

win32 {
   BUILD_DATE = $$system(\\\"date\\\" +\"\\\"%d-%m-%y\\\"\")
}
linux|macx {
   BUILD_DATE = $$system(date +\"\\\"%d-%m-%y\\\"\")
}
DEFINES += BUILDDATE=\\\"$$BUILD_DATE\\\"

The workaround only needs to be applied in Windows platforms (when date is a builtin command of CMD).

Another alternative platform independent, is requesting full path of date in invocation:

BUILD_DATE = $$system($(which date) +\"\\\"%d-%m-%y\\\"\")
DEFINES += BUILDDATE=\\\"$$BUILD_DATE\\\"

Tested in both Windows and Linux platforms.

56Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 30, 2022 12:34 am

arcachofo

arcachofo

The date workaround can be integrated in SimulIDE.pro with:

win32 {
BUILD_DATE = $$system(\\\"date\\\" +\"\\\"%d-%m-%y\\\"\")
}
linux|macx {
BUILD_DATE = $$system(date +\"\\\"%d-%m-%y\\\"\")
}
DEFINES += BUILDDATE=\\\"$$BUILD_DATE\\\"

The workaround only needs to be applied in Windows platforms (when date is a builtin command of CMD).
This does not work for me, it should be specific for MSYS or Cygwin, not Windows or even Mingw.
Because win32|linux|macx is about the target platform, not the host platform.
If you crosscompile from Linux it will fail (this is my case).


57Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 30, 2022 12:36 am

arcachofo

arcachofo

Another alternative platform independent, is requesting full path of date in invocation:

BUILD_DATE = $$system($(which date) +\"\\\"%d-%m-%y\\\"\")
DEFINES += BUILDDATE=\\\"$$BUILD_DATE\\\"

Tested in both Windows and Linux platforms.
That sounds good...

58Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 30, 2022 7:43 am

arcachofo

arcachofo

BUILD_DATE = $$system($(which date) +\"\\\"%d-%m-%y\\\"\")
Applied to all versions.

It would be nice if you add the instructions to the first post to make it easier to find.

I made this discussion "sticky", so it is kept in the first places.

59Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 30, 2022 11:21 am

acebrian



arcachofo wrote:
BUILD_DATE = $$system($(which date) +\"\\\"%d-%m-%y\\\"\")
Applied to all versions.

It would be nice if you add the instructions to the first post to make it easier to find.

I made this discussion "sticky", so it is kept in the first places.

First post already edited including latest instructions.

Sponsored content



Back to top  Message [Page 3 of 3]

Go to page : Previous  1, 2, 3

Permissions in this forum:
You cannot reply to topics in this forum