Home › Forum › SOFA › Programming with SOFA › [SOLVED] Generating .exe file out of a scene
Tagged: 64_bits, Linux_ubuntu, SOFA_1806
- This topic has 8 replies, 3 voices, and was last updated 6 years, 3 months ago by
Damien Marchal.
-
AuthorPosts
-
29 July 2019 at 12:16 #14019
shiva
BlockedHello,
I have created the cloth simulation of a circular disc. Now I would like to generate an executable file(eg: .exe). Can you please help me if there ways to generate an executable file from Sofa or Qt
Cheers
Shiva
29 July 2019 at 15:50 #14023Hugo
KeymasterHey @avihs98
Congratulations for your cloth simulation.
Did you write it as an XML scene file? a Python file? a C++ file?Best
Hugo
29 July 2019 at 16:11 #1402629 July 2019 at 16:14 #14027Hugo
KeymasterSeveral solutions then:
– you can open it with runSofa.exe
– or you can create a batch file launching directlyrunSofa path/to/your/file.xml
– or you can change the default scene of runSofa
– or modify the Main.cpp (C++) of runSofa so that it opens directly your xml file.Hugo
29 July 2019 at 16:29 #14029shiva
BlockedNo sir,
I am asking, just like runSofa.exe can we create a .exe for a xml scene like scene.exe, such that i can directly launch the scene.exe .
Cheers
Shiva
29 July 2019 at 17:18 #14031Hugo
KeymasterHey @avihs98
You can simply modify in the source code of runSofa, line 408 (located in applications/projects/runSofa/Main.cpp):
the file path with your own file path. And then recompile. runSofa will afterwards automatically run your scene file by default.Best,
Hugo
30 July 2019 at 12:58 #14044shiva
BlockedNo Sir,
My doubt is that, just like how you have created a option toDownload in your page, is there a way i can create a file.
I am trying to do the cloth simulation as a mini project in my college, so it would be easy for me if i could get the file as in the Download icon is pressed.
Cheers
Shiva
31 July 2019 at 08:54 #140523 August 2019 at 20:44 #14060Damien Marchal
BlockedHi @shiva,
There is no “make an exe” button in the runSofa gui. This would be a nice addendum, not to hard to do, but right now there is none.
To achieve what you want to do you can:
– put the content of the .xml or a .scn or a .py as a big string in a .cpp file and use this string as the source of a scene loader. This would allows to load the scene without extra file in the filesystem.
– to visualize the scene, implement a minimalistic application with glut/freeglut/whatever. A good starting, yet not up-to-date, is the example in application/projects/glutOnePickRegards,
Damien -
AuthorPosts
- You must be logged in to reply to this topic.
