Stable version to be found:
And other formats as well (may be) on the Stable HOWTOs page
If necessary use the Discussion page to give comments.
Discussion Page Content if any
HOWTO
Develop Gnumeric with Anjuta HOWTO, copyright (c) 2009 Vlad Anuchin
Revision History
Revision History is done automatically according to the HOWTO History, so fill the comment line below the edit window accordingly.
Are you the spreadsheet expert that thinks that it can always can be done better? With Gnumeric in Anjuta you can.
Contents
Beginning
Licence
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".GNU Free Documentation License
HOWTO Content
Prospective Audience
- Minimal C experience; Edited/Debugged code before such as VBA
- Minimal Linux experience
- Creation of directories
- extracting from tar
- install software (e.g. Synaptic, apt-get...)
- I'll be using Ubuntu in this Howto
- Some spreadsheet experience; you're familiar with what Gnumeric does
- Possibly
- You'd like to learn to how to program in C
- You'd like to contribute to Open Source...
Setup
- Get Gnumeric Source Code
- Create a Project folder e.g.: /home/yourname/Projects/Gnumeric/
Download source code (tar file) from Source Download Page into the Project directory
- Since you're starting out I'd suggest 'stable release'
- Extract from the tar file
- Get Anjuta
Anjuta is a development environment that can handle Gnumeric project (written in C)
- Install by typing 'sudo apt-get install anjuta'
- Create Gnumeric project in Anjuta
- The most 'difficult' step in the whole process of setup: due to irregularities
- Menu 'File|New|Project From Existing Sources':
- ...Forward:
- if after 'Apply' a message comes up like this:
- Watch out for the line number (e.g.: 42) it could be different for different versions of source
- Edit line 40 (just before 42:) in Makefile.am of the project directory:
delete space before LC_ALL (there should only be a TAB as per Makefile Overview)
save file
and repeat Project import in Anjuta
- First Run
- Build
- Menu 'Build|Build Project':
b. Click 'Execute' - Build takes a bit of time: on my machine 8 mins with 335 warnings)
- Menu 'Build|Build Project':
- Execute
- Menu 'Run|Execute' will brings up dialog:
Put ./src/.libs/gnumeric for 'Program'; then 'Apply'
- The familiar Gnumeric UI comes up:
- And Anjuta looks like this:
- To end gracefully:
- Close Gnumeric by Closing the window or 'File|Quit'
- Press 'Enter' in the Anjuta Terminal
- Menu 'Run|Execute' will brings up dialog:
- Build
Debugging
- Add a break point
- Debug
- Examine Variables
- Change code
- Rebuild
- Run
Add a new function in Gnumeric
Let's create a new simple function pie()
- Open appropriate file
- Select a plugin to code in
Open the right function.c
- Code a Function
Let's just copy/paste from an existing pi()
- Code the Function help
- Don't forget a help function for your function
- Will the function work without it?
- Register the Function in function collection
Add code to array at the bottom of function.c
- Register the Function in Plugin
Edit plugin.xml.in in the plugin directory
- Test
- Build
- Run
- Test function in UI
Create your own Plugin
- Why
- To keep things organised
- With fresh code not to overwrite it
- Save it separatelly
- Submit as a module to Gnumeric project
- How
- Template
- Function list
- Registration
- Test
- Build
- Run
Submit your code to Gnumeric project
- Should it be in the Howto?
Install
- Your project and Gnumeric that you've installed with your distribution can live side by side without interference.
- To install your (improved:) version of Gnumeric
- Execute in the project directory: sudo make install
Related Links
- Anjuta
- Anjuta manual
- Anjuta debugging
- Gnumeric
- Dev mail archive
- C Guide
- Make file Guide
![[LDP]](/moin_static184/ldp/tldp.png)
