Binary installers for Coin3d and SoQt on MinGW: Difference between revisions
Restored page from Google Cache, uploaded by John Pye *** existing text overwritten *** |
No edit summary |
||
| Line 2: | Line 2: | ||
<div style="padding-top:8px;padding-bottom:12px"><div style="border:solid 2pt gray;background-color:#ffff88;margin-top:0px;margin-bottom:5px;padding:3px;width:25em"> | <div style="padding-top:8px;padding-bottom:12px"><div style="border:solid 2pt gray;background-color:#ffff88;margin-top:0px;margin-bottom:5px;padding:3px;width:25em"> | ||
* | * [[Media:Coin3d-2.5.0.exe|coin3d-2.5.0.exe]] (6M binary installer) | ||
* | * [[Media:Soqt-1.4.1.exe|soqt-1.4.1.exe]] (1.4M binary installer)</div></div> | ||
These installers were created with [http://www.nsis.org NSIS]. I can provide the installer scripts to anyone who's interested. | These installers were created with [http://www.nsis.org NSIS]. I can provide the installer scripts to anyone who's interested. | ||
| Line 9: | Line 10: | ||
To demonstrate the use of the above binaries, you can compile the following simple example: | To demonstrate the use of the above binaries, you can compile the following simple example: | ||
<source lang="cpp">//SoQt example | |||
#include <Inventor/Qt/SoQt.h> | |||
#include <Inventor/Qt/viewers/SoQtExaminerViewer.h> | |||
#include | #include <Inventor/nodes/SoCube.h> | ||
#include | |||
#include | |||
int | int | ||
| Line 31: | Line 31: | ||
SoQtExaminerViewer * eviewer = new SoQtExaminerViewer(mainwin); | SoQtExaminerViewer * eviewer = new SoQtExaminerViewer(mainwin); | ||
eviewer- | eviewer->setSceneGraph(cube); | ||
eviewer- | eviewer->setTitle("SoQt example"); | ||
eviewer- | eviewer->show(); | ||
SoQt::show(mainwin); | SoQt::show(mainwin); | ||
| Line 44: | Line 44: | ||
This may be compiled using the following commands, using the [http://www.mingw.org/msys.shtml MSYS] command-line: | This may be compiled using the following commands, using the [http://www.mingw.org/msys.shtml MSYS] command-line: | ||
<source lang=" | <source lang="sh">export QTDIR=/c/Qt/4.3.3 | ||
export PATH=$PATH/c/PROGRA~1/Coin-2.5.0/bin:/c/Program Files/SoQt-1.4.1/bin:/c/Qt/4.3.3/bin | export PATH=$PATH/c/PROGRA~1/Coin-2.5.0/bin:/c/Program Files/SoQt-1.4.1/bin:/c/Qt/4.3.3/bin | ||
g++ soqtexample.cpp -I/c/Progra~1/SoQt-1.4.1/include -DSOQT_DLL -DCOIN_DLL -I/c/PROGRA~1/Coin-2.5.0/include \ | g++ soqtexample.cpp -I/c/Progra~1/SoQt-1.4.1/include -DSOQT_DLL -DCOIN_DLL -I/c/PROGRA~1/Coin-2.5.0/include \ | ||
| Line 65: | Line 65: | ||
Here is a minimal build script that allows the above program to be build on both Windows and Linux using the [http://www.scons.org/ Scons] build tool. Note that on Linux, we can make use of the 'soqt-config' script to detect compile-time settings for this library. | Here is a minimal build script that allows the above program to be build on both Windows and Linux using the [http://www.scons.org/ Scons] build tool. Note that on Linux, we can make use of the 'soqt-config' script to detect compile-time settings for this library. | ||
<source lang=" | <source lang="py">import platform | ||
if platform.system()== | if platform.system()=="Windows": | ||
t=['mingw'] | t=['mingw'] | ||
| Line 74: | Line 74: | ||
env = Environment(tools=t) | env = Environment(tools=t) | ||
if platform.system()== | if platform.system()=="Windows": | ||
env.Append( | env.Append( | ||
LIBS = ['SoQt','Coin'] | LIBS = ['SoQt','Coin'] | ||
| Line 101: | Line 101: | ||
The following rather more rigorous detection script works on Windows with the above MinGW binaries for SoQt/Coin3D as well as on Linux. Note that on Windows, it will happily detect if you installed SoQt or Coin3D in non-standard locations by using the Windows registry, but that it is hard-wired for the c:\Qt\4.3.3 folder in the case of Qt. | The following rather more rigorous detection script works on Windows with the above MinGW binaries for SoQt/Coin3D as well as on Linux. Note that on Windows, it will happily detect if you installed SoQt or Coin3D in non-standard locations by using the Windows registry, but that it is hard-wired for the c:\Qt\4.3.3 folder in the case of Qt. | ||
<source lang=" | <source lang="py">import os, platform | ||
from SCons.Script import * | from SCons.Script import * | ||
def generate(env): | def generate(env): | ||
""" | |||
Detect SOQT settings and add them to the environment. | Detect SOQT settings and add them to the environment. | ||
""" | |||
try: | try: | ||
if platform.system()== | if platform.system()=="Windows": | ||
import _winreg | import _winreg | ||
x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | ||
y= _winreg.OpenKey(x,r | y= _winreg.OpenKey(x,r"SOFTWARE\soqt") | ||
LIB,t = _winreg.QueryValueEx(y, | LIB,t = _winreg.QueryValueEx(y,"INSTALL_LIB") | ||
BIN,t = _winreg.QueryValueEx(y, | BIN,t = _winreg.QueryValueEx(y,"INSTALL_BIN") | ||
INCLUDE,t = _winreg.QueryValueEx(y, | INCLUDE,t = _winreg.QueryValueEx(y,"INSTALL_INCLUDE") | ||
env['SOQT_CPPPATH'] = [INCLUDE] | env['SOQT_CPPPATH'] = [INCLUDE] | ||
| Line 127: | Line 127: | ||
x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | ||
y= _winreg.OpenKey(x,r | y= _winreg.OpenKey(x,r"SOFTWARE\coin3d") | ||
LIB,t = _winreg.QueryValueEx(y, | LIB,t = _winreg.QueryValueEx(y,"INSTALL_LIB") | ||
BIN,t = _winreg.QueryValueEx(y, | BIN,t = _winreg.QueryValueEx(y,"INSTALL_BIN") | ||
INCLUDE,t = _winreg.QueryValueEx(y, | INCLUDE,t = _winreg.QueryValueEx(y,"INSTALL_INCLUDE") | ||
env.AppendUnique( | env.AppendUnique( | ||
| Line 146: | Line 146: | ||
QT_PREFIX = r'c:/Qt/4.3.3' | QT_PREFIX = r'c:/Qt/4.3.3' | ||
,SOQT_CPPPATH = [ | ,SOQT_CPPPATH = ["$QT_PREFIX/include","$QT_PREFIX/include/Qt"] | ||
,SOQT_LIBPATH = [ | ,SOQT_LIBPATH = ["$QT_PREFIX/lib"] | ||
) | ) | ||
| Line 162: | Line 162: | ||
env['SOQT_LIBS'] = env1.get('LIBS') | env['SOQT_LIBS'] = env1.get('LIBS') | ||
print | print "SOQT_LIBS =",env.get('SOQT_LIBS') | ||
print | print "SOQT_LIBPATH =",env.get('SOQT_LIBPATH') | ||
print | print "SOQT_CPPPATH =",env.get('SOQT_CPPPATH') | ||
except: | except: | ||
print | print "FAILED TO SET UP SOQT" | ||
pass | pass | ||
def exists(env): | def exists(env): | ||
""" | |||
Make sure this tool exists. | Make sure this tool exists. | ||
""" | |||
if platform.system()== | if platform.system()=="Windows": | ||
try: | try: | ||
| Line 182: | Line 182: | ||
x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) | ||
y= _winreg.OpenKey(x,r | y= _winreg.OpenKey(x,r"SOFTWARE\soqt") | ||
INCLUDE,t = _winreg.QueryValueEx(y,'INSTALL_INCLUDE') | INCLUDE,t = _winreg.QueryValueEx(y,'INSTALL_INCLUDE') | ||
| Line 197: | Line 197: | ||
<source lang="a4c">ctools=['default'] | <source lang="a4c">ctools=['default'] | ||
if platform.system()== | if platform.system()=="Windows": | ||
ctools=['mingw'] | ctools=['mingw'] | ||
| Line 219: | Line 219: | ||
env.Program('mysoqtapp',['mysoqtapp.cpp'])</source> | env.Program('mysoqtapp',['mysoqtapp.cpp'])</source> | ||
[[Category:Miscellany]] | |||
[[Category:MinGW]] | [[Category:MinGW]] | ||
Revision as of 09:36, 26 May 2010
Here are some binary installers for Coin (aka Coin3d) and SoQt for use with the MinGW GCC 3.4.5 compiler. In order to use these, you will first need to install the open source version of Qt 4.3.3:
- coin3d-2.5.0.exe (6M binary installer)
- soqt-1.4.1.exe (1.4M binary installer)
These installers were created with NSIS. I can provide the installer scripts to anyone who's interested.
Using SoQt with MinGW
To demonstrate the use of the above binaries, you can compile the following simple example:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
This may be compiled using the following commands, using the MSYS command-line:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
Note that it should be possible to do the above using just g++ soqtexample.cpp `soqt-config --libs --cppflags --ldflags`, however a problem with the presence of spaces in the output from the soqt-config script causes problems.
You can then run the resulting ./a.exe program, which will appear as shown below.
Cross-platform build script
Here is a minimal build script that allows the above program to be build on both Windows and Linux using the Scons build tool. Note that on Linux, we can make use of the 'soqt-config' script to detect compile-time settings for this library.
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
SCons 'tool' for detecting SoQt/Coin
The following rather more rigorous detection script works on Windows with the above MinGW binaries for SoQt/Coin3D as well as on Linux. Note that on Windows, it will happily detect if you installed SoQt or Coin3D in non-standard locations by using the Windows registry, but that it is hard-wired for the c:\Qt\4.3.3 folder in the case of Qt.
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
Here is an example of how to use the 'soqt.py' tool with SCons to build a simple SoQt app:
ctools=['default'] if platform.system()=="Windows": ctools=['mingw'] env = Environment( , toolpath=['.'] , tools=ctools+['soqt'] ) env.AppendUnique( LIBS = env.get('SOQT_LIBS') ,CPPPATH = env.get('SOQT_CPPPATH') ,LIBPATH = env.get('SOQT_LIBPATH') ,CPPDEFINES = env.get('SOQT_CPPDEFINES') ) env.Program('mysoqtapp',['mysoqtapp.cpp'])
