Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Tree [c497bc] /
History



File Date Author Commit
cmake 2012-01-20 zoltanp zoltanp [ba975f] fix the building of ktechlab on ubuntu 11.10
doc 2011-12-08 Zoltan P Zoltan P [c497bc] Merge branch 'master' of git@github.com:ktechla...
examples 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
icons 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
microbe 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
po 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
src 2012-05-27 Zoltan Padrah Zoltan Padrah [8f1f7c] Merge branch 'simple-deploy' into simulator-int...
tests 2011-12-08 Zoltan P Zoltan P [c497bc] Merge branch 'master' of git@github.com:ktechla...
.gitignore 2012-05-27 Zoltan Padrah Zoltan Padrah [8f1f7c] Merge branch 'simple-deploy' into simulator-int...
AUTHORS 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
CMakeLists.txt 2011-07-15 johnyb johnyb [812dd5] Merge pull request #2 from ktechlab/no-qt3suppo...
COPYING 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
ChangeLog 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
Doxyfile 2011-08-10 Zoltan P Zoltan P [556cea] remove trailing whitespace from doxyfile
INSTALL 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
NEWS 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
README 2011-12-08 Zoltan P Zoltan P [c497bc] Merge branch 'master' of git@github.com:ktechla...
TODO 2011-05-18 Zoltan P Zoltan P [19ebe3] merge the minimal_simulator branch to the maste...
config.h.cmake 2011-07-15 johnyb johnyb [812dd5] Merge pull request #2 from ktechlab/no-qt3suppo...

Read Me

KTechLab
=============

KTechLab is an IDE for microcontrollers and electronics.
It supports circuit simulation,
program development for microcontrollers and
simulating the programmed microcontroller together with its application circuit.

Introduction
-------------

Resources
-------------
- KTechLab on github:
    https://github.com/ktechlab

- KTechLab on sourceforge
    - wiki:
        http://ktechlab.sourceforge.net
    - project page:
        http://sourceforge.net/projects/ktechlab
    - project page for developers:
        http://sourceforge.net/projects/ktechlab/develop

- the official communucation channel is hosted on sourceforge,
        it is called ktechlab-devel
    - link to archives of the list:
        http://sourceforge.net/mailarchive/forum.php?forum_name=ktechlab-devel

- on IRC, KTechLab developers regularly join the channel
    #ktechlab, on FreeNode

- source code repositories: see Getting the source section, below


Getting the source
------------------

KTechLab's source code is located in GIT repositories.

The official repository is located on github:

- https://github.com/ktechlab/ktechlab

- the master branch contains the latest tested development code,
    while other branches might contain untested/unstable code

Other notable GIT repositories are located on sourceforge:

- main KTechLab repository:
    - `git://ktechlab.git.sourceforge.net/gitroot/ktechlab/ktechlab`
    - contains the contents of the previously used SVN repository

- developers' own repositories:
    - git://ktechlab.git.sourceforge.net/gitroot/ktechlab/ktl-alonzotg
    - git://ktechlab.git.sourceforge.net/gitroot/ktechlab/ktl-j_ohny_b
    - git://ktechlab.git.sourceforge.net/gitroot/ktechlab/ktl-zoltan_p
        - the master branch should have the same content as the
            official master branch from github
    - these repositories contain work-in-progress code,
        which is supposed to be merged in the master branch on github

Checking out from GIT can be performed with the following commands:

    git clone git://github.com/ktechlab/ktechlab.git
    cd ktechlab
    git checkout -b master --track origin/master


Building and Installing
-----------------------

Required dependencies

- Qt4 -dev
- cmake
- glib -dev

Optional dependencies

- KDE4 libraries -dev
- KDevPlatform libraries -dev
    - NOTE: without the following two components, only the unit tests
        will be built; those are not useful for end-users
- GPSim -dev, for microcontroller support
- Eigen2 -dev, for unit tests; generally it is not needed for builds
    targeted to end-users, but it is useful for development



Since KDE4, all Makefiles in KDE projects are generated using CMake.
After checking out the source (see Getting the source),
here is how to compile and install KTechLab.

1. By using a terminal, navigate to the top-level source-directory

2. Create and enter a build directory:

        mkdir build && cd build

3. Run cmake to generate the Makefiles:

        cmake .. -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/usr/

    This command enables debug-symbols to be built
    and installs all files into a `usr` sub-directory in your home-directory.
    If cmake complains about any missing libraries,
    you need to install development versions for those.
    Make sure cmake finishes with no error until you proceed.

3. Compile and install the source:

        make install

4. If you installed into a non-standard prefix
    (like suggested in the cmake-command-line above),
    you need to make sure that some environment variables are set:

        export PATH=~/usr/bin:$PATH

        export LD_LIBRARY_PATH=~/usr/lib/kde4:~/usr/lib:$LD_LIBRARY_PATH

        export XDG_DATA_DIRS=~/usr/share:$XDG_DATA_DIRS

        export QT_PLUGIN_PATH=~/usr/lib/kde4:$QT_PLUGIN_PATH

        export KDEDIRS=~/usr:$KDEDIRS

5. After installing new versions of .desktop files or other
    freedesktop.org-related files, you need to run:

        kbuildsycoca4

    to update all caches to use these files.
    This is especially important when creating new plugins.
    They won't be loadable by (or even visible to) the KDE's plugin-system,
    until you ran kbuildsycoca4.
    Note that you need to have the environment variables from step 5 set.

6. On fresh builds, it's necessary to update the mime database.
    This will be done by the following command:

        update-mime-database /path/to/mime

    Where /path/to/mime is the path, where the ktechlab.xml gets installed to.
    For example:

        update-mime-database ~/usr/share/mime

    (there should be ~/usr/share/mime/packages/ktechlab.xml in this case)


Running/Testing
-----------------------

If building and installing has been successfully completed, the command

    ktechlab

Should launch KTechLab. Note that in some cases the KTechLab plugins
might be disabled, so they need to be enabled from the menu:
Setting -> Configure KTechLab -> Plugins,
and enable all the KTechLab-related plugins.

Sometimes it's easier to launch KTechLab from a script,
mostly for debugging purposes.
The script presented below sets the environment-variables and
installs all the mime-types before launching the KTechLab
executable located in the current directory:

    #!/bin/bash

    export PATH=~/usr/bin:$PATH
    export LD_LIBRARY_PATH=~/usr/lib/kde4:~/usr/lib:$LD_LIBRARY_PATH
    # export XDG_DATA_DIRS=~/usr/share:$XDG_DATA_DIRS
    export XDG_DATA_DIRS=$HOME/usr/share:$XDG_DATA_DIRS
    export QT_PLUGIN_PATH=~/usr/lib/kde4:$QT_PLUGIN_PATH
    export KDEDIRS=~/usr:$KDEDIRS

    kbuildsycoca4  &> /dev/null

    update-mime-database $HOME/usr/share/mime

    ./ktechlab