File: README.txt

package info (click to toggle)
universalindentgui 0.8.1-1.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,992 kB
  • ctags: 955
  • sloc: perl: 17,682; cpp: 3,250; makefile: 56; awk: 23; sh: 15; php: 2
file content (106 lines) | stat: -rw-r--r-- 7,559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
UniversalIndentGUI
==================

This application is released under the GPL version 2. Read the file "LICENSE.GPL" in the same directory as this readme for more information or have a look at http://www.gnu.org/licenses/gpl.html!


1. About UniversalIndentGUI
---------------------------

The UniversalIndentGUI is a universal graphical user interface for source code, respective text, formatters, beautifiers and indenters. This is mainly achieved by a configuration file for each supported indenter.

One of the main features and the reason why this tool was (better is being right now) developed is to see how the indent parameter affects the source code style directly while changing the parameters. It always bothered me to change one option of a tool like GNU Indent or GreatCode and have to run it to see what my code would look like afterward. Often the result was not what I expected from the parameters description. So these times are gone. Toggle a parameter and see what it does.


2. Features
-----------

- Directly see how the code/text is affected by a indenter parameter

- Load a source code file of your choice as test file

- Indenter settings can be saved into the indenters own config file format (in case of GreatCode this is for example the file "gc.cfg")

- Not yet known indenters can be added by creating a ini file for them, that is used by UniversalIndentGUI (this file has the prefix "uigui_" and ends with ".ini"). Have a look at the file "doc/iniFileFormat.html" for explanations about the ini file format. If you want to extend an existing or create a new ini file for a new indenter, you are sincerely invited to do so and I would be thankful for telling me about it.


3. Starting UniversalIndentGUI
------------------------------

UniversalIndentGUI does not need any further libs or dlls if you got one of the binary archives, because it is linked statically. Thats the reason why the binary file is rather big.

These binary archives (I mean the zip and tgz files) contain all supported indenters except for phpCB, because it must be obtained with acceptance of its owners.

Right now the windows version of GreatCode is shipped along with the Linux version of UniversalIndentGUI, because I was unable to compile GreatCode under Linux. UniversalIndentGUI tries to start GreatCode via wine. So wine has to be installed in order to use GreatCode. This applies to any new indenter, where only a windows executable exists, too.

3.1 Portable mode
UniversalIndentGUI can be run in a portable mode, so it won't make any modifications on the system, except for the media it is started from. The things UniversalIndentGUI writes to the for example USB drive are the user settings of the application and the set parameters of the indenters. Further a temporary dir is used, to feed the indenters with input files and grab their output.
The portable mode is being used, if the sub dir "indenters" is found in the same dir as the executable. Thats the case for the before named binary archives.

3.2 Multiuser mode
Especially Unix based systems strictly make use of user restrictments, but also Windows can be used that way, even if many dislike that due to lack of comfort. To be able to run UniversalIndentGUI on multiuser systems the needed files are spread over different directories. On Unix based these are:
/usr/bin  for the binary.
/etc/UniversalIndentGUI  for global configuration and the essential indenter ini files.
/usr/share/man/man1  for the zipped man page.
~/.config/UniversalIndentGUI  for the users application and indenter settings.

Similar on Windows:
%ProgramFiles%\UniversalIndentGUI  for the binary and all other needed files, like global configuration and the essential indenter ini files.
%APPDATA%\UniversalIndentGUI  for the users application and indenter settings.

The multiuser mode is used by default, if no "indenters" sub dir is found in the same dir as the executable.


4. Compile UniversalIndentGUI from source
-----------------------------------------

The latest version of the project can be downloaded via subversion.
Server: https://universalindent.svn.sourceforge.net
Repository: svnroot/universalindent
Directory: trunk
As one path: https://universalindent.svn.sourceforge.net/svnroot/universalindent/trunk

The Qt Framework Version >=4.3.x with source code is needed for compiling. It is available at www.trolltech.com. Please look there for more information. And pay attention, that there exist a commercial and a free GPL version of the Qt framework.

The second needed library comes from the QScintilla project (http://www.riverbankcomputing.co.uk/qscintilla/). Since I am using Qt4 there is also need to use the Qt4 version of QScintilla which is called QScintilla v2. The latest version is allways available at http://www.riverbankcomputing.com/Downloads/Snapshots/QScintilla2/ and most of the time there is no problem using that snapshot.

For the Windows Visual Studio 2005 a solution file is included, named "UniversalIndentGUI.sln". Additional include and lib directories for Qt have to be set in the preferences. Have a look at the homepage "http://wiki.qgis.org/qgiswiki/Building_QT_4_with_Visual_C++_2005", where you will find a good guide how to make Qt's open source edition compileable with Visual Studio. Even though it is written for Qt 4.1.1 it also fits for the current version 4.x.

Instead of using Visual Studio the qmake project file can be used to compile on any platform. Just run "qmake" in the projects main directory (where the file "UniversalIndentGUI.pro" resides). After this run "make debug" or "make release". That should do it.

The make directive to install UniversalIndentGUI is right now only completed for Unix based systems and can be called by "sudo make install".

When compiling has successfully completed you also need to "compile" the existing language translation files in the directory "translations". This is done by calling "lrelease filename.ts -qm filename.qm". "filename" has to be replaced by the real existing filename.


5. How to integrate an indenter written in JavaScript
-----------------------------------------------------
Since version 0.8.0 it is possible to use indenters that are written in JavaScript. These are executed by UniversalIndentGUIs internal JavaScript interpreter.
To write an own indenter in JavaScript that can be executed by UniversalIndentGUI, the indenter must provide two variables, with the names "unformattedCode" and "formattedCode". The exact names are mandatory. The first one must not be defined by the indenter itself, but is created by UniversalIndentGUI and is the input variable for the indenter. When called, it contains the unformatted source code. The second variable must be defined in the indenter and is the variable that returns the formatted source code.
In case of the indenter JsDecoder, that is shipped along with UniversalIndentGUI, the important code lines at its end look like this:
var jsdecoder = new JsDecoder();
var formattedCode;

// Feed the indenter with unformatted code.
jsdecoder.s = unformattedCode;
// Get the formatted code from the indenter.
formattedCode = jsdecoder.decode();

return formattedCode;


6. Some words at the end
------------------------

Feel happily invited to try out and comment UniversalIndentGUI. Good and bad critics are welcome, if they are helpful of course ;-)


7. Disclaimer
-------------

You may use this software on your own risk. I am not responsible for any system damage or loss of data. Respect the GPL!


So long,

   Thomas