Plugin Development

(Difference between revisions)
Jump to: navigation, search
m (Windows)
(Windows)
Line 16: Line 16:
  
 
===Windows===
 
===Windows===
 +
*To get the full suite of external modules source code enter this line in the SVN check out from your development root directory as you did for the stellarium source.
 +
https://stellarium.svn.sourceforge.net/svnroot/stellarium/trunk/extmodules extmodules
 
*Build the core Stellarium code according to the [[Windows Build Instructions]] page.  Make sure the build sub-directory is called ''builds/msys''.
 
*Build the core Stellarium code according to the [[Windows Build Instructions]] page.  Make sure the build sub-directory is called ''builds/msys''.
 
*Set the environment variable STELROOT to be the path of the stellarium source tree, for example:
 
*Set the environment variable STELROOT to be the path of the stellarium source tree, for example:

Revision as of 00:53, 18 September 2009

Contents

Building and installing

Linux

  • Build the core Stellarium code according to the Compilation on Linux page. Make sure the build sub-directory is called builds/unix.
  • Set the environment variable STELROOT to be the path of the stellarium source tree, for example:
export STELROOT=/home/bob/stellarium
  • Change to where you have the plugin source code installed, make a sub-directory builds/unix and change into it.
cd /home/bob/stel-plugins/PluginName
mkdir -p builds/unix
cd builds/unix
  • Run cmake, specifying the build type to be the same as that which was used to build the core code (Debug or Release). Then run make
cmake -DCMAKE_BUILD_TYPE=Debug ../..
make
  • To install, just do:
make install

This will put the files for the plugin in ~/.stellarium/modules/PluginName

Windows

  • To get the full suite of external modules source code enter this line in the SVN check out from your development root directory as you did for the stellarium source.

https://stellarium.svn.sourceforge.net/svnroot/stellarium/trunk/extmodules extmodules

  • Build the core Stellarium code according to the Windows Build Instructions page. Make sure the build sub-directory is called builds/msys.
  • Set the environment variable STELROOT to be the path of the stellarium source tree, for example:
export STELROOT=/c/msys/1.0/home/bob/stellarium
  • Change to where you have the plugin source code installed, make a sub-directory builds/msys and change into it.
cd /c/msys/1.0/home/bob/stel-plugins
mkdir -p builds/msys
cd builds/msys
  • Run cmake, specifying the build type to be the same as that which was used to build the core code (Debug or Release). Then run make
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug ../..
make
  • Several of the plugins have a file called "installer.iss" in the main plugin directory. This can be used with the INNO installer generator to generate a windows installer for the plugin.
  • NOTE: If the plugin source has been loaded into a clean folder the first call on Cmake -G "MSYS Makefiles" ../.. will generate a basic cmakecache.txt file. This may need to be edited to provide some more information. Some need to be directed to the boost files and the location of the path to qmake Qt/4.5.2/bin/qmake.exe. There is now a requirement to nominate whether to build the static or dynamic module. Also the generated lib??????.a file name will need to be the same as the file called in the stellarium//cmakecache.txt file

Writing Plugins

If you are a developer, and would like to have a go at writing your own Stellarium plugin, the following resources might be helpful:

Windows dynamic linking error

If a plugin uses a class that inherits a Stellarium class that contains the Q_OBJECT macro (for example, a dialog windows that inherits StelDialog), Stellarium will refuse to load it on Windows, returning an "Invalid access to memory location" error. The workaround is to copy the parent class (for example, StelDialog) to the plugin's sources and rename it appropriately.

Advice on how to solve this issue in another way will be much appreciated.

Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox