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

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

60Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Tue Dec 19, 2023 3:32 pm

feri



I installed Qt 5 on Windows 10.
When I open the simulide1.0.1_2097 project with Qt Cerator it immediately gives me the following errors:
1: error: "bzr" is not recognized as an internal or external command, an executable program, or a batch file.
1: error: "$" is not recognized as an internal or external command,
 an executable program or batch file.

When I try to compile I get the error:
1: error: [Makefile.Debug runLrelease] Error 1

which in the Makefile.Debug file line 1647 corresponds to:
1646 runLrelease:
1647 lrelease ../resources/translations/*.ts; lrelease ../resources/translations/qt/*.ts; $(MOVE) ../resources/translations/*.qm ../resources/qm; $(MOVE) ../resources/translations/qt/*.qm ../resources/qm;

How can I solve it?
Thank you
Greetings

61Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Tue Dec 19, 2023 7:17 pm

acebrian



In order to compile SimulIDE under Windows, you will also need MSYS2 (look at post 1) and a workaround for bzr (look at post 52).

Best regards.

62Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Tue Dec 19, 2023 9:39 pm

feri



It doesn't work in Ubuntu either, previous versions worked, I get the following error:

/home/feri/Qt_Projects/simulide1.0.1_2097/src/microsim/mcu.h:13: error: linker.h: No such file or directory
In file included from ../src/microsim/mcu.cpp:14:
../src/microsim/mcu.h:13:10: fatal error: linker.h: No such file or directory
13 | #include "linker.h"
| ^~~~~~~~~~

Also, could you tell me what the "$" command is that I can't find in Windows 10.
Thank you
Greetings

63Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Wed Dec 20, 2023 11:26 am

arcachofo

arcachofo

/home/feri/Qt_Projects/simulide1.0.1_2097/src/microsim/mcu.h:13: error: linker.h: No such file or directory
In file included from ../src/microsim/mcu.cpp:14:
../src/microsim/mcu.h:13:10: fatal error: linker.h: No such file or directory
13 | #include "linker.h"
| ^~~~~~~~~~
Sorry for the inconvenience.
Missing files added at Rev 2102.

64Compiling SimulIDE under windows - Page 3 Empty Re: Compiling SimulIDE under windows Fri Dec 22, 2023 6:30 pm

feri



the bzr command works now, I followed the advice of "acebrian".
This part of simulide.pro doesn't work:
copy2dest.commands = \
$(COPY_DIR) ../resources/data $$TARGET_PREFIX; \
$(COPY_DIR) ../resources/examples $$TARGET_PREFIX; \

And this part doesn't work either:
runLrelease.commands = lrelease ../resources/translations/*.ts; \
lrelease ../resources/translations/qt/*.ts; \
$(MOVE) ../resources/translations/*.qm ../resources/qm; \
$(MOVE) ../resources/translations/qt/*.qm ../resources/qm;

I copied the ../resources/data and ../resources/examples directories with file explorer.
I ran the commands lrelease ../resources/translations/*.ts and
lrelease ../resources/translations/qt/*.ts from terminal and moved the *.qm files with file explorer.
I compiled from QTcreator without getting any errors and SimulIDE works.
How could you replace the parts of simulide.pro that don't work in Windows 10 with .bat files like for bzr.
Greetings

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