README.TXT 14.4 KB
Newer Older
mse1's avatar
mse1 committed
1
MSEide+MSEgui Pascal Cross Platform GUI Development System.
2

Martin Schreiber's avatar
Martin Schreiber committed
3
2017-11-23 Version 4.6
4
Copyright (c) 1999-2017 by Martin Schreiber
5

Martin Schreiber's avatar
Martin Schreiber committed
6
- Compiles with FPC 3.0.2 or 3.0.4
Martin Schreiber's avatar
Martin Schreiber committed
7 8
- For FreeBSD-x86_64, Linux-i386, Linux-x86_64, Linux-arm(Raspberry Pi),
  Windows-i386, Windows-x86_64.
mse1's avatar
mse1 committed
9
- Links to xlib and gdi32, no external widget library needed.
10
- Internal character encoding is utf-16.
mse1's avatar
mse1 committed
11 12
- Uses anti aliased fonts on Linux (Xft).
- All screen drawing is double buffered.
mse1's avatar
mse1 committed
13
- Has docking forms and MDI.
mse1's avatar
mse1 committed
14
- Has embedded forms (similar to TFrame).
15
- Has sophisticated database access components and data edit widgets.
mse1's avatar
mse1 committed
16
- Internationalization functionality with resource modules.
mse1's avatar
mse1 committed
17
- Report generator.
mse1's avatar
mse1 committed
18 19 20 21 22 23 24

IDE:
- Integrated debugging.
- Source code highlighting.
- Source code navigation with support for include files.
- Code completion for classes.
- Integrated visual form designer with source code update for components and 
25
  events.
mse1's avatar
mse1 committed
26
- Flexible and handy build system with switchable macros.
mse1's avatar
mse1 committed
27 28
- Visual form inheritance.
- Integrated report designer.
mse1's avatar
mse1 committed
29 30

License:
31
IDE and tools are under GPL, library under modified LGPL like FPC-RTL.
32 33
Package maintainers may delete the files "apps/ide/COPYING.GPL", 
"lib/common/COPYING.LGPL" and "lib/common/COPYING.MSE".
mse1's avatar
mse1 committed
34 35 36

Installation:
*************
Martin Schreiber's avatar
Martin Schreiber committed
37
1. Download and install FPC 3.0.2 or 3.0.4, you can get it from 
mse1's avatar
mse1 committed
38
   http://www.freepascal.org/download.var
Martin Schreiber's avatar
Martin Schreiber committed
39
2. Download mseide_msegui_src_4_6.zip and the mseide_* archive
Martin Schreiber's avatar
Martin Schreiber committed
40
   for your system.
Martin Schreiber's avatar
Martin Schreiber committed
41
   http://sourceforge.net/projects/mseide-msegui/files/mseide-msegui/4.6/
mse1's avatar
mse1 committed
42
3. Extract them to a directory of your choice ('yourdirectory') .
Martin Schreiber's avatar
Martin Schreiber committed
43
4. Run 'yourdirectory/bin/mseide' on linux and freebsed or 
mse1's avatar
mse1 committed
44
   'yourdirectory\bin\mseide.exe' on windows.
mse1's avatar
mse1 committed
45 46 47 48
5. In 'Settings'-'Configure MSEide'-'${MSEDIR}' select 'yourdirectory/msegui'.
6. In 'Project'-'Open' select 'yourdirectory/msegui/apps/demo/demo.prj'.
7. 'Target'-'Continue'.

49 50 51 52
If you get the error "/usr/bin/ld: cannot find -lX11" install the 
libX11-devel or libX11-dev package or make a symbolic link
/usr/lib/libX11.so -> /usr/lib/libX11.so.6

mse1's avatar
mse1 committed
53 54 55 56 57
If you wish to to compile the IDE:

1. In 'Project'-'Open' select 'yourdirectory/msegui/apps/ide/mseide.prj'.
2. 'Target'-'Continue'.

Martin Schreiber's avatar
Martin Schreiber committed
58
Compiling MSEide from commandline on Linux and FreeBSD:
59
fpc -Fulib/common/* -Fulib/common/kernel/linux apps/ide/mseide.pas
Martin Schreiber's avatar
Martin Schreiber committed
60
On Windows:
61
fpc -Fulib\common\* -Fulib\common\kernel\windows apps\ide\mseide.pas
62

63 64 65 66
If FPC crashes while compiling try on Linux and FreeBSD:
fpc -B -Fulib/common/* -Fulib/common/kernel/linux apps/ide/mseide.pas
On Windows:
fpc -B -Fulib\common\* -Fulib\common\kernel\windows apps\ide\mseide.pas
67

68 69 70 71 72 73 74 75
Creating a new GUI project
**************************
'Project'-'New'-'From Template', select "default.prj"

Creating a new console project
******************************
'Project'-'New'-'From Template', select "console.prj"

76 77
MSEgui command line parameters
******************************
78 79 80 81 82
--FONTALIAS=<alias>,<fontname>[,<fontheight>[,<fontwidth>[,<options>[,<xscale>]
                              [,<ancestor>]]]]
 Change the used fonts. Example for a 16 pixel height default font:
 --FONTALIAS=stf_default,,16

83 84
--NOZEROLINES
 Use 1-width lines instead of 0-width lines. X11 only. Workaround for buggy HW-accelerated
Martin Schreiber's avatar
Martin Schreiber committed
85 86
 X-servers which don't draw lineends exactly. Can degrade performance, see
 https://bugzilla.opensuse.org/show_bug.cgi?id=1021803
87

88 89
--NOZORDERHANDLING
 Do not touch Z-order of the windows.
90

91 92
--NORESTACKWINDOW
 Do not use the NET_RESTACK_WINDOW protocol.
93

94 95
--RESTACKWINDOW
 Use the NET_RESTACK_WINDOW protocol.
96

97
--NORECONFIGUREWMWINDOW
98
 Do not use xreconfigurewmwindow() for window stacking operation.
99

100 101
--RECONFIGUREWMWINDOW
 Use xreconfigurewmwindow() for window stacking operation.
102

103
--STACKMODEBELOWWORKAROUND
104
 Necessary for windowmanagers with buggy xreconfigurewmwindow() handling.
105

106 107
--NOSTACKMODEBELOWWORKAROUND
 No workaround.
108

109
--TOPLEVELRAISE
110
 Use the top level frame window id instead of the application client window id
111
 for window raise operation. Implies --NORESTACKWINDOW and
112
 --NORECONFIGUREWMWINDOW.
113

114 115
--NOSTATICGRAVITY
 Simulates staticgravity for buggy window managers.
116
 
117 118 119 120
MSEide command line parameters
******************************
-np
 Do not load a project.
121

122 123
-ns
 Do not use a skin, no fades.
124

Martin Schreiber's avatar
Martin Schreiber committed
125 126 127
--globstatfile=<filepath> 
 Use <filepath> instead the default global MSEide status file.

128 129
--macrogroup=<n>
 Use 'Project'-'Options'-'Macros'-'Active group' number <n>, <n> = 1..6.
130

131 132 133 134
--macrodef=<name>,<value>{,<name>,<value>}
 Macro definition, will be overridden by 'Project'-'Options'-'Macros'. Example:
 --macrodef=MAC1,abc,MAC2,def
 defines ${MAC1} with value 'abc' and ${MAC2} with value 'def'.
135 136 137 138
--storeglobalmacros
 Store --macrodef defines as global 'Settings'-'Configure MSEide' macros and
 terminate MSEide.
   
139 140 141 142 143 144
MSEide environment variables
****************************
Macros in 'Settings'-'Configure MSEide' can be overridden by environment
variables. They will be overriden by --macrodef and 'Project'-'Options'-'Macros'.
Possible names: 
FPCDIR, FPCLIBDIR, MSEDIR, MSELIBDIR, SYNTAXDEFDIR, TEMPLATEDIR,
Martin Schreiber's avatar
Martin Schreiber committed
145
COMPSTOREDIR, COMPILER, DEBUGGER, EXEEXT, TARGET, TARGETOSDIR.
146

mse1's avatar
mse1 committed
147 148
MSEide project macros
*********************
149
Predefined project macros:
150 151 152
PROJECTNAME, PROJECTDIR, MAINFILE, TARGETFILE,
TARGETENV (in format for "env" unix command), TARGETPARAMS,
they can be overridden by 'Project'-'Options'-'Macros'.
mse1's avatar
mse1 committed
153

Martin Schreiber's avatar
Martin Schreiber committed
154 155 156 157 158 159 160 161
MSEide macro functions
**********************
${MAC_IFDEF(macroname)} returns the macro value if defined.
${MAC_IFDEF(macroname,notdefinedvalue)} returns the macro value if defined,
 notdefinedvalue otherwise.
${MAC_IFDEF(macroname,notdefinedvalue,definedvalue)}
 returns definedvalue if macroname is defined, notdefinedvalue otherwise.

Martin Schreiber's avatar
Martin Schreiber committed
162 163
MSEide environment macros
*************************
Martin Schreiber's avatar
Martin Schreiber committed
164
${ENV_VAR(variablename)} returns the variable value if defined.
Martin Schreiber's avatar
Martin Schreiber committed
165 166 167 168
${ENV_VAR(variablename,notdefinedvalue)} returns the variable value if defined,
 notdefinedvalue otherwise.
${ENV_VAR(variablename,notdefinedvalue,definedvalue)}
 returns definedvalue if variablename is defined, notdefinedvalue otherwise.
Martin Schreiber's avatar
Martin Schreiber committed
169

Martin Schreiber's avatar
Martin Schreiber committed
170 171 172 173 174 175 176 177 178 179
MSEide string macros
********************
Macro format is ${STR_*(text)}.
STR_TRIM
 Trim whitespace from the ends of text.
STR_TRIMLEFT
 Trim whitespace from the beginning of text.
STR_TRIMRIGHT
 Trim whitespace from the end of text.

180 181 182 183 184
STR_COALESCE
 Return first not empty value. Format is
 ${STR_COALESCE(text[,text...])} or
 ${STR_COALESCE("text"[,"text"...])}

185 186 187
MSEide file macros
******************
Macro format is ${FILE_*(fileparameter)} or ${FILE_*("fileparameter")}.
188 189 190 191 192 193 194 195 196 197
FILE_MSE       convert to MSE format.
FILE_SYS       convert to sys format.
FILE_PATH      absolute path.
FILE_FILE      no trailing path delimiter.
FILE_DIR       trailing path delimiter.
FILE_NAME      no directory part.
FILE_NAMEBASE  no directory and no name extension part.
FILE_EXT       file name extension.
FILE_NONAME    directory part only.
FILE_NOEXT     no file name extension.
198

Martin Schreiber's avatar
Martin Schreiber committed
199 200
MSEide exec macros
******************
Martin Schreiber's avatar
Martin Schreiber committed
201 202 203
${EXEC_OUT(commandline[,timeoutms])} 
 Executes commandline, returns the process output. Timeout in
 milli seconds, default = 1000, -1 = infinite.
Martin Schreiber's avatar
Martin Schreiber committed
204

205 206
MSEide macros in 'Project'-'Options'-'Debugger'-'xterm Command'
***************************************************************
207 208 209
${PTS} expands to tty pts path.
${PTSN} expands to tty pts number.
${PTSH} expands to tty pts handle.
210 211
Entering an empty string restores the default.

212 213 214 215 216 217 218 219 220 221 222 223 224
MSEide external tools parameters macros
***************************************
Predefined macros in 'Project'-'Options'-'Tools'-'Parameters':
CURSOURCEFILE current source file.
CURMODULEFILE current *.mfm file.
CURSSELECTION selected text in source editor.
CURSWORD word at cursor in source editor
CURSDEFINITION} definition of the current token at cursor 
 (Ctrl+LClick destination), needs activated P-column
 (Parse source before call) to be current.
CURCOMPONENTCLASS current selected component class in form editor.
CURPROPERTY current selected property in object inspector.

225 226 227 228 229
Antialiased text with MSEgui 32 bit on 64 bit Linux
****************************************************
MSEgui uses Xft for antialiased fonts on Linux. Please install lib32-libxft
package if necessary.

mse1's avatar
mse1 committed
230 231
Popup widgets behind the forms
******************************
mse1's avatar
mse1 committed
232
If the popup widgets are showed behind the forms, try to start the 
mse1's avatar
mse1 committed
233
MSEgui program with the option '--TOPLEVELRAISE'. Do *not* use this option
mse1's avatar
mse1 committed
234 235
if is not necessary (KDE, Gnome... work well without).

236 237
Display problems with Linux radeon and other EXA drivers
********************************************************
238 239 240 241 242
If the display is distorted or slow add 
Option "EXAPixmaps" "off"
to 
Section "Device"
of xorg.conf, see
243
https://bugs.freedesktop.org/show_bug.cgi?id=69543
244
https://bugs.freedesktop.org/show_bug.cgi?id=84253
245
or use the proprietary video driver for your video chip.
246

mse1's avatar
mse1 committed
247
Flashing taskbar widgets in IceWM
mse1's avatar
mse1 committed
248
*********************************
mse1's avatar
mse1 committed
249
Newer revisions of IceWM let the taskbar icons of MSEgui applications flash.
mse1's avatar
mse1 committed
250
Start the MSEgui application with the option '--TOPLEVELRAISE'.
mse1's avatar
mse1 committed
251 252 253 254 255 256 257 258 259

Invalid inputmanager for Ubuntu
*******************************
The utf-8 setup in Ubuntu seems to be incomplete. If you get the exception
"egui : Invalid inputmanager tinternalapplication ." at program start, try to
replace your language locale in /usr/share/X11/locale/locale.dir
by en_US as a workaround. Example for ru_RU.UTF-8:
replace 
ru_RU.UTF-8/XLC_LOCALE ru_RU.UTF-8
mse1's avatar
mse1 committed
260
by
mse1's avatar
mse1 committed
261
en_US.UTF-8/XLC_LOCALE ru_RU.UTF-8
mse1's avatar
mse1 committed
262

263 264 265 266 267 268
Wrong window positions for Ubuntu 14.04
***************************************
Window positions in Unity are wrong because the Ubuntu windowmanager
does not support static_gravity:
http://askubuntu.com/questions/451903/wingravity-static-gravity-not-suppo
https://bugs.launchpad.net/ubuntu/+bug/1312044
269
http://askubuntu.com/questions/457456/wingravity-static-gravity-not-supported-in-14-04
270

mse1's avatar
mse1 committed
271 272 273
How to add custom components to MSEide
**************************************
There is a project 'apps/myide/mymseide.prj' as a demo.
274 275
Start MSEide, open project 'apps/myide/mymseide.prj', 'Project'-'Build',
'Target'-'Continue',
mse1's avatar
mse1 committed
276 277
the IDE with the new component 'tmybutton' will be compiled and
started in the the debugger.
278
Binary name is 'mymseide' (linux) or 'mymseide.exe' (win32).
mse1's avatar
mse1 committed
279 280 281 282 283 284 285 286

If you wish to do it from scratch:

- Create a register unit for your components 
  (see 'apps/myide/regmycomps.pas' for an example).
- Enter the unitname followed by a comma 
  ('myregunit,' if your regunitfile is 'myregunit.pas') in 
  a file named 'regcomponents.inc'.
mse1's avatar
mse1 committed
287
- Build the IDE with -dmorecomponents as option.
mse1's avatar
mse1 committed
288

289 290 291
Component units integrated by this mechanism don't need to be GPL, see 
apps/ide/COPYING.IDE

Martin Schreiber's avatar
Martin Schreiber committed
292
If you want to add custom icons to your components:
mse1's avatar
mse1 committed
293

294
- Convert 24*24 pixel BMP or PNG files with tools/bmp2pas to
mse1's avatar
mse1 committed
295 296
  an icon unit ('*_bmp.pas').
- Add the name of the icon unit to 'uses' in your register unit.
mse1's avatar
mse1 committed
297 298 299
 
How to run i18ndemo
*******************
mse1's avatar
mse1 committed
300
- Start MSEide.
301
- 'Project'-'Open'-'yourdirectory/msegui/apps/i18ndemo/i18ndemo.prj'.
Martin Schreiber's avatar
Martin Schreiber committed
302
- 'Project'-'Make' to create the rsj files.
mse1's avatar
mse1 committed
303 304 305 306 307 308 309 310 311 312 313 314 315
- 'Project'-'Open'-'yourdirectory/msegui/tools/i18n/msei18n.prj'.
- 'Target'-'Continue'.
In MSEi18n:
 - Adjust 'Settings'-'Configure MSEi18n'-'${MSEDIR}' and ${COMPILER}.
 - 'Open'-'yourdirectory/msegui/apps/i18ndemo/i18ndemo.trp'
 - 'Make'.
 - Close message window.
 - Close MSEi18n.
- 'Project'-'Open'-'yourdirectory/msegui/apps/i18ndemo/i18ndemo.prj'.
- 'Target'-'Continue'.

SQLite
******
Martin Schreiber's avatar
Martin Schreiber committed
316
tsqlite3connection field type mapping:
mse1's avatar
mse1 committed
317 318 319 320 321

      Type name        SQLite storage class  Field type    Data type
+--------------------+---------------------+-------------+-------------+
| INTEGER or INT     | INTEGER 4           | ftinteger   | integer     |
| LARGEINT           | INTEGER 8           | ftlargeint  | largeint    |
mse1's avatar
mse1 committed
322
| BIGINT             | INTEGER 8           | ftlargeint  | largeint    |
mse1's avatar
mse1 committed
323 324 325 326 327 328
| WORD               | INTEGER 2           | ftword      | word        |
| SMALLINT           | INTEGER 2           | ftsmallint  | smallint    |
| BOOLEAN            | INTEGER 2           | ftboolean   | wordbool    |
| FLOAT[...] or REAL | REAL                | ftfloat     | double      |
| or DOUBLE[...]     |                     |             |             |
| CURRENCY           | REAL                | ftcurrency  | double!     |
329 330
| DATETIME or        | REAL                | ftdatetime  | tdatetime   |
|  TIMESTAMP         |                     |             |             |
331 332
| DATE               | REAL                | ftdate      | tdatetime   |
| TIME               | REAL                | fttime      | tdatetime   |
333
| NUMERIC[...]       | INTEGER 8 (*10'000) | ftbcd       | currency    |
mse1's avatar
mse1 committed
334 335
| VARCHAR[(n)]       | TEXT                | ftstring    | msestring   |
| TEXT               | TEXT                | ftmemo      | utf8 string |
mse1's avatar
mse1 committed
336
| TEXT               | TEXT dso_stringmemo | ftstring    | msestring   |
mse1's avatar
mse1 committed
337 338 339
| BLOB               | BLOB                | ftblob      | string      |
+--------------------+---------------------+-------------+-------------+

340 341
ZeosLib
*******
Martin Schreiber's avatar
Martin Schreiber committed
342 343 344
In order to install the Zeos components add the path to the Zeos source to 
'Project'-'Options'-'Make'-'Directories' and compile the IDE with
-dmse_with_zeoslib -dMSEgui.
345 346 347
There is a predefined IDE project apps/ide/mseide_zeos.prj, update 'Project'-
'Options'-'Macros' according to your installation.

348
Crosscompiling and remote debugging i386/x84_64-linux -> arm-linux
Martin Schreiber's avatar
Martin Schreiber committed
349 350
***********************************************************
For Raspberry Pi:
351
- Establish a ssh login without password (public key authentication).
Martin Schreiber's avatar
Martin Schreiber committed
352

Martin Schreiber's avatar
Martin Schreiber committed
353 354
On the i386/x84_64-linux host:
- install the scp program
Martin Schreiber's avatar
Martin Schreiber committed
355
- download and extract 
356
  https://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/crossfpc-i386_linux_eabihf_3_0_5.tar.gz
357
  (or crossfpc-x86_64_linux_eabihf_3_0_5.tar.gz)
Martin Schreiber's avatar
Martin Schreiber committed
358
  to <your crossfpc directory>.
Martin Schreiber's avatar
Martin Schreiber committed
359 360

- Start MSEide, in 'Settings'-'Configure MSEide'-'Global Macros' add:
361

362 363 364 365
Name            Value

CROSSMSEDIR     <MSEide+MSEgui directory>
CROSSFPCDIR     <your crossfpc directory>
366
CROSSFPCVERSION 3.0.5
367 368
HOSTIP          <the IP address of the host>
REMOTEIP        <the IP address of the remote target>
369 370
REMOTEPORT      <the remote port, ex: 2345>
REMOTEUSER      pi
Martin Schreiber's avatar
Martin Schreiber committed
371

372 373
- 'Project'-'New'-'From Template', select "crossarmdefault.prj" or
  "crossarmconsole.prj".
Martin Schreiber's avatar
Martin Schreiber committed
374 375
- Create the new project.
- 'Project'-'Options'-'Macros', set the TARGETPROJECTDIR value to the project
376 377
  path in remote target, ex: "/home/pi/proj/testcase".
- Check the TARGETENV macro.
Martin Schreiber's avatar
Martin Schreiber committed
378
- If your application needs additional libraries copy them from Raspberry Pi
Martin Schreiber's avatar
Martin Schreiber committed
379
  /lib/arm-linux-gnueabihf or /usr/lib/arm-linux-gnueabihf to
380
  <your crossfpc directory>/eabihf/lib
Martin Schreiber's avatar
Martin Schreiber committed
381 382

Press F9 and hope the best. ;-)
Martin Schreiber's avatar
Martin Schreiber committed
383
If there is a debugger timeout at startup enlarge the 
384
'Project'-'Options'-'Target'-'Wait before connect' value.
Martin Schreiber's avatar
Martin Schreiber committed
385

mse1's avatar
mse1 committed
386 387
Have a lot of fun!

388
Martin