-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude unnecessary files from the lib/OMSimulator folder #952
Conversation
@adeas31 I could only test it on linux and there we copy the lib instead of bin folder. Please test it on Windows if you can and let me know what other files I have to exclude. |
Before: Andreas@DESKTOP-OSJIVA0 MINGW64 /d/workspace/OpenModelica
# ls build/lib/OMSimulator/
__init__.py libhdf5-0.dll libpcre2-posix-2.dll libsundials_sunnonlinsolnewton.dll Qt5OpenGL.dll
assetimporters libiconv-2.dll libpcre32-0.dll libsystre-0.dll Qt5Positioning.dll
audio libicudt67.dll libpcrecpp-0.dll libszip.dll Qt5PrintSupport.dll
bearer libicudtd67.dll libpcreposix-0.dll libtre-5.dll Qt5Qml.dll
blas_win32_MT.dll libicuin67.dll libpng16-16.dll libunistring-2.dll Qt5QmlModels.dll
canbus libicuind67.dll libquadmath-0.dll libwebp-7.dll Qt5Quick.dll
capi.py libicuuc67.dll libsqlite3-0.dll libwinpthread-1.dll Qt5Sensors.dll
designer libicuucd67.dll libstdc++-6.dll libwoff2common.dll Qt5Sql.dll
gamepads libintl-8.dll libsundials_arkode.dll libwoff2dec.dll Qt5Svg.dll
generic libjpeg-8.dll libsundials_cvode.dll libxml2-2.dll Qt5WebChannel.dll
geometryloaders liblzma-5.dll libsundials_cvodes.dll libxslt-1.dll Qt5WebKit.dll
geoservices libnghttp2-14.dll libsundials_ida.dll libzmq.dll Qt5WebKitWidgets.dll
iconengines libomopcua.dll libsundials_idas.dll libzstd.dll Qt5Widgets.dll
imageformats libOMSimulator.dll libsundials_kinsol.dll mediaservice Qt5Xml.dll
lapack_win32_MT.dll libomtlmsimulator.dll libsundials_nvecmanyvector.dll Model.py Qt5XmlPatterns.dll
libbrotlicommon.dll libopenblas.dll libsundials_nvecserial.dll NewAPI.py renderers
libbrotlidec.dll libOpenModelicaCompiler.dll libsundials_sunlinsolband.dll omniORB420_rt.dll renderplugins
libbz2-1.dll libOpenThreads.dll libsundials_sunlinsoldense.dll omnithread40_rt.dll sceneparsers
libdouble-conversion.dll libosg.dll libsundials_sunlinsolklu.dll OMSimulator.py Scope.py
libexpat.dll libosgDB.dll libsundials_sunlinsollapackband.dll platforminputcontexts sensorgestures
libexpat-1.dll libosgGA.dll libsundials_sunlinsollapackdense.dll platforms sensors
libffi-7.dll libosgText.dll libsundials_sunlinsolpcg.dll playlistformats sqldrivers
libfontconfig-1.dll libosgUtil.dll libsundials_sunlinsolspbcgs.dll position styles
libfreetype-6.dll libosgViewer.dll libsundials_sunlinsolspfgmr.dll printsupport texttospeech
libgcc_s_seh-1.dll libp11-kit-0.dll libsundials_sunlinsolspgmr.dll qmltooling Types.py
libgfortran-5.dll libpcre-1.dll libsundials_sunlinsolsptfqmr.dll Qt5Core.dll virtualkeyboard
libglib-2.0-0.dll libpcre16-0.dll libsundials_sunmatrixband.dll Qt5Gui.dll zlib1.dll
libgomp-1.dll libpcre2-16-0.dll libsundials_sunmatrixdense.dll Qt5Multimedia.dll
libgraphite2.dll libpcre2-32-0.dll libsundials_sunmatrixsparse.dll Qt5MultimediaWidgets.dll
libharfbuzz-0.dll libpcre2-8-0.dll libsundials_sunnonlinsolfixedpoint.dll Qt5Network.dll After:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can have a list with every item we want to install for now. There are not that many of them.
@@ -22,14 +22,14 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/Types.py" DESTINATION ${CMAKE_INSTALL | |||
|
|||
IF (WIN32 AND MSVC) | |||
install(FILES OMSimulatorPython3.bat DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) | |||
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/OMSimulator FILES_MATCHING PATTERN "*.dll" PATTERN "OMSimulator" EXCLUDE PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) | |||
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/OMSimulator FILES_MATCHING PATTERN "*imulator*.dll" PATTERN "OMSimulator" EXCLUDE PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a bunch of libsundials_[...].dll
. We actually don't need all of them, but a few are important.
I think for you it worked, because OMSimulator uses (nearly) the same version of SUNDIALS as OpenModelica, which has them as well.
We should come up with a smart way of adding 3rdParty libs OpenModelica and OMSimulator are using, so we only end up with one set of them and not two.
Also I need to change the installation of OMSimulator-3rdParty/cvode to only copy the libs we actually use in OMSimulator to install/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently OMSimualtor.exe works finde without those libs. Strange. Did we compile it statically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately excluding empty directories is not that easy in cmake, but I can exclude them by name. |
Oh, and I have |
I think it is needed in bin |
For Linux I have a similar problem. andreas@DESKTOP-OSJIVA0:~/workspace/OpenModelica$ ls build/lib/x86_64-linux-gnu/omc/
libOMSimulator.a libOMSimulator.so libOMSimulatorLua.a libomtlmsimulator.so
andreas@DESKTOP-OSJIVA0:~/workspace/OpenModelica$ ls build/lib/OMSimulator/
Model.py NewAPI.py OMSimulator.py Scope.py Types.py __init__.py capi.py x86_64-linux-gnu
andreas@DESKTOP-OSJIVA0:~/workspace/OpenModelica$ ls build/lib/OMSimulator/x86_64-linux-gnu/omc/
libOMSimulator.so libomtlmsimulator.so |
I also think is needed in bin. @AnHeuermann you also have |
Ah I see. The files are not that big (3MB), so it doesn't really matter. Otherwise a link could be a better solution. |
I agree with @adeas31 that having those libs in two places is not a big problem and it is certainly not in the scope f this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work.
So you didn't remove the empty qt plugin directories, right? |
No, the empty folders are still there. I don't know how to remove them. Are they problematic? |
Related Issues
Purpose
This should exclude unnecessary files from the lib/OMSimulator folder.