Compare commits

..

445 Commits
0.32 ... 0.37

Author SHA1 Message Date
Paul Kulchenko
71b4f47159 Added support for absolute filenames in Markdown links. 2013-05-09 16:22:49 -07:00
Paul Kulchenko
347b53659c Updated CHANGELOG for 0.37. 2013-05-09 13:54:45 -07:00
Paul Kulchenko
16f32e0df5 Updated interpreters and tests after API changes. 2013-05-09 12:41:04 -07:00
Paul Kulchenko
171287fac6 Added Russian translation for Find/Replace dialog (ref #70). 2013-05-08 21:46:10 -07:00
Paul Kulchenko
9d05cd6931 Added Russian translation for the Preferences menu (ref #70). 2013-05-07 21:57:48 -07:00
Paul Kulchenko
a9e847372a Added Preferences menu to simplify access to system/user settings. 2013-05-06 10:05:13 -07:00
Paul Kulchenko
1eba53cc0e Fixed loading a non-existing file. 2013-05-05 22:02:07 -07:00
Paul Kulchenko
c5a0077a01 Fixed filtering out directories when spec is specified. 2013-05-05 22:01:04 -07:00
Paul Kulchenko
2b07dd1db4 Separated settings for function dropdown and project tree fonts (fixes #148). 2013-05-04 16:03:18 -07:00
Paul Kulchenko
28b3380a45 Fixed hiding all panels when switching to Full Screen mode. 2013-05-04 10:40:39 -07:00
Paul Kulchenko
564338656d Updated CHANGELOG with recent changes. 2013-05-04 10:39:57 -07:00
Paul Kulchenko
29b2e4f5ec Fixed activation of non-existing files/folders in the Project tree. 2013-05-04 10:06:35 -07:00
Paul Kulchenko
c7ab3aeb32 Refactored and optimized directory scanning when loading IDE files. 2013-05-02 16:24:25 -07:00
Paul Kulchenko
4b771dafe4 Added 'wlua' to the list of recognized Lua extensions. 2013-05-02 13:13:27 -07:00
Paul Kulchenko
71393bd35a Fixed search results for lines without newline. 2013-05-01 15:10:17 -07:00
Paul Kulchenko
f7e2697e56 Fixed Find/Replace in folders with Unicode names (fixes #147); improved performance. 2013-05-01 15:03:59 -07:00
Paul Kulchenko
608644bd83 Added 'shaking' Find/Replace window when text is not found (closes #146). 2013-05-01 11:20:49 -07:00
Paul Kulchenko
7563e52aba Fixed Un/Comment commands executed for empty lines. 2013-05-01 09:10:08 -07:00
Paul Kulchenko
039dde0ccb Fixed fold/unfold for files starting with block/comment. 2013-04-30 22:26:47 -07:00
Paul Kulchenko
abbde79ab0 Fixed history after activating non-existing file in Recent Files. 2013-04-30 18:09:09 -07:00
Paul Kulchenko
ead958e603 Added disabling Recent Files menu if the list is empty. 2013-04-29 22:00:33 -07:00
Paul Kulchenko
6b7f310cd7 Added TomorrowContrast color scheme (thanks to Sergey Lerg). 2013-04-28 17:49:41 -07:00
Paul Kulchenko
451186ac4e Fixed scrolling to restored cursor position on OSX (when usewrap = false). 2013-04-27 14:58:42 -07:00
Paul Kulchenko
b8b3b7f0af Fixed Find/Replace dialog to take Enter on OSX (fixes #140). 2013-04-26 11:01:45 -07:00
Paul Kulchenko
5ee71feac4 Updated CHANGELOG with recent changes. 2013-04-26 10:58:51 -07:00
Paul Kulchenko
a2e65e2bbd Updated Marmalade interpreter with Quick 1.1 path changes. 2013-04-26 10:48:35 -07:00
Paul Kulchenko
e8ad508021 Updated Watch/Stack panels min size to make them dockable with other panels. 2013-04-26 09:05:20 -07:00
Paul Kulchenko
aa2a4fac2b Added detaching a child process to avoid crash when exiting during debugging. 2013-04-24 22:53:56 -07:00
Paul Kulchenko
d5fda558c1 Fixed loading an empty recent file history. 2013-04-24 21:55:23 -07:00
Paul Kulchenko
171b98717a Fixed 'breaking' after executing OUT command that never reaches the target level. 2013-04-24 21:40:01 -07:00
Paul Kulchenko
da07ef0e2c Added a check to fix assertions in debug build. 2013-04-24 21:36:22 -07:00
Paul Kulchenko
6c9e226d67 Added Recent File history navigation (closes #66). 2013-04-24 14:02:17 -07:00
Paul Kulchenko
d3884358be Fixed stopping at a breakpoint at the initial line when startwith option is specified. 2013-04-24 12:30:58 -07:00
Paul Kulchenko
0ebeee3641 Fixed activation of a file loaded into active tab. 2013-04-23 19:58:10 -07:00
Paul Kulchenko
bd190d5a4e Added Marmalade auto-complete support and API documentation. 2013-04-23 15:49:19 -07:00
Paul Kulchenko
b1f09b9ef0 Fixed an occasional crash on OSX introduced by a duplicate line fix. 2013-04-23 10:34:52 -07:00
Paul Kulchenko
ac556aea34 Updated documentation about default EOL on OSX (ref #102). 2013-04-22 21:37:02 -07:00
Paul Kulchenko
87ab3702fe Fixed incorrect tab activation on OSX after using 'Open File'. 2013-04-22 18:24:08 -07:00
Paul Kulchenko
83556f9ab2 Improved file activation when debugging is started (closes #137). 2013-04-21 22:35:03 -07:00
Paul Kulchenko
43c18552c1 Added processing of runonstart when using remote debugging (closes #138). 2013-04-21 19:04:26 -07:00
Paul Kulchenko
dc54c76435 Updated highlighting in Watch windows to not use editor styles.
This is to avoid color conflicts with dark color schemes.
2013-04-21 18:47:14 -07:00
Paul Kulchenko
9a16cd026f Fixed editor activation when file is loaded into an existing tab. 2013-04-21 18:43:51 -07:00
Paul Kulchenko
e4710a16b0 Refactored Recent Files history to make it faster and simpler. 2013-04-21 17:33:47 -07:00
Paul Kulchenko
ae2e99f6d3 Fixed an error after opening non-existing file from 'Recent Files'. 2013-04-20 15:38:32 -07:00
Paul Kulchenko
c182a19fa5 Added suggesting proper extension after 'Save/Save As' based on current spec. 2013-04-19 15:09:22 -07:00
Paul Kulchenko
2ddeaf4eb8 Updated Russian 'watch' translation for consistency. 2013-04-19 09:24:59 -07:00
Paul Kulchenko
b4fd071efb Fixed blocking on reading app output without processing other events. 2013-04-18 17:24:30 -07:00
Paul Kulchenko
9344280d5b Fixed an issue with duplicate lines shown in the editor.
This can happen when the line is too long for one line and can wrap; if it
also includes hidden markup (Markdown in comments), this markup can change
the length of the line, but it's not adjusted by Scintilla after the
markup is applied. Force adjustment when this situation is detected.
2013-04-18 12:42:43 -07:00
Paul Kulchenko
ad037536cd Updated documentation for user settings (ref #113, #55). 2013-04-17 21:08:32 -07:00
Paul Kulchenko
d8e8af00b6 Added translation setup for Find/Replace dialog (closes #133). 2013-04-17 18:07:45 -07:00
Paul Kulchenko
1e651a97b7 Fixed 'Replace All' to take 'Wrap Around' into account (fixes #132). 2013-04-17 16:45:19 -07:00
Paul Kulchenko
c2e49e169f Added tests. 2013-04-17 12:26:47 -07:00
Paul Kulchenko
6662cb0f5e Fixed off-by-one error in searching consecutive matches. 2013-04-17 12:18:19 -07:00
Paul Kulchenko
c00d85890a Fixed 'Quick Find' not working without current selection (fixes #131). 2013-04-17 12:01:51 -07:00
Paul Kulchenko
c42c9ffb3d Reduced the minimum size of the Output/Console panel. 2013-04-16 17:31:16 -07:00
Paul Kulchenko
b5661976eb Fixed looping in auto-complete on mistyped class (fixes #130). 2013-04-16 10:22:02 -07:00
Paul Kulchenko
c1e66f8fc2 Fixed compatibility with wx2.8 (thanks to Samuel Dionne-Riel; closes #128). 2013-04-15 18:14:12 -07:00
Paul Kulchenko
c2715040fe Added nomousezoom option to disable zoom with mouse wheel in the editor. 2013-04-15 18:12:15 -07:00
Paul Kulchenko
fc17dac2a5 Added selecting text and Cmd-F shortcut in Find dialog on OSX (ref #127). 2013-04-15 18:10:16 -07:00
Paul Kulchenko
0dfd8e3ba1 Fixed replacement logic in Find/Replace that could replace selected fragment (ref #127). 2013-04-15 18:06:59 -07:00
Paul Kulchenko
acbfd6d81d Fixed an error caused by allowing multiple Search/Replace windows (fixes #127). 2013-04-15 10:23:17 -07:00
Paul Kulchenko
0d268a01e1 Updated Monokai color scheme to fix current line color. 2013-04-13 09:46:08 -07:00
Paul Kulchenko
1e9cbb4633 Updated CHANGELOG with recent changes. 2013-04-12 12:25:34 -07:00
Paul Kulchenko
7d3683df98 Updated About screen to be more configurable and flexible. 2013-04-12 12:22:17 -07:00
Paul Kulchenko
3b10bbbcd2 Fixed launch command for Corona debugging on Windows. 2013-04-11 09:23:52 -07:00
Paul Kulchenko
3ea40683c9 Added handling of Ctrl-Home and Ctrl-End on OSX (ref #89). 2013-04-10 21:55:03 -07:00
Paul Kulchenko
e6b789131a Added line copy/cut for Ctrl-C/Ctrl-X with no selection. 2013-04-10 21:53:16 -07:00
Paul Kulchenko
613dec0571 Fixed 'control' check on OSX that changed with wx2.9.2+ (ref #89). 2013-04-10 18:23:10 -07:00
Paul Kulchenko
36b3692e9e Fixed wrong tab activated on OSX after using New file in some cases.
This is caused by two PAGE_CHANGED event for the notebook triggered
when the current tab is not the last one (in wx2.9.5+). This could lead to
a crash if the incorrect tab is closed (ref #89).
2013-04-10 18:18:35 -07:00
Paul Kulchenko
59cde2fc8c Fixed cursor not being visible in some cases after file is loaded (ref #116). 2013-04-10 15:32:31 -07:00
Paul Kulchenko
e8027b3b95 Updated Russian translation (thanks to toiffel). 2013-04-09 22:12:22 -07:00
Paul Kulchenko
579ab4c831 Updated CHANGELOG for 0.36. 2013-04-08 11:39:17 -07:00
Paul Kulchenko
f54322c1f7 Fixed the current editor not being fully activated when closing a tab. 2013-04-08 11:37:46 -07:00
Paul Kulchenko
a5b85c533a Fixed activating files in the project tree on a case insensitive system. 2013-04-08 09:33:16 -07:00
Paul Kulchenko
149340669a Fixed the Stack view being partially hidden when the root item is too wide (ref #110). 2013-04-08 09:16:11 -07:00
Paul Kulchenko
5165bf5b29 Fixed left side of the project panel being hidden when a file is activated (fixes #122). 2013-04-08 09:14:04 -07:00
Paul Kulchenko
fbc04ba199 Updated Linux launch script and MANIFEST. 2013-04-07 23:53:54 -07:00
Paul Kulchenko
e33f2d40dd Removed build files no longer needed. 2013-04-07 23:52:34 -07:00
Paul Kulchenko
bad62f0a16 Updated CHANGELOG with recent changes. 2013-04-06 21:30:20 -07:00
Paul Kulchenko
b393b58cc1 Fixed breakpoint not firing on the first executable line in debugging (helps #121). 2013-04-06 13:57:49 -07:00
Paul Kulchenko
4480825408 Fixed activating of the first line in the script during debugging. 2013-04-06 13:53:24 -07:00
Paul Kulchenko
10fb31f1e5 Disabled showing 'value' in auto-complete after 'a:' (helps #101). 2013-04-06 13:44:14 -07:00
Paul Kulchenko
789a2d8a88 Upgraded Mobdebug (v0.525) for performance improvements (also closes #121).
Other changes in the same version:
  Added handling of case-insensitive filenames on OSX.
  Improved debugging performance.
  Fixed terminating debugging of an empty script.
  Fixed resetting cached source as it may change when basedir changes.
  Replaced socket.select with non-blocking .receive as it is faster.
2013-04-05 08:46:41 -07:00
Paul Kulchenko
b9ebd44c30 Simplified lua interpreter launch/debug command. 2013-04-04 21:48:05 -07:00
Paul Kulchenko
a65edf8fd5 Fixed reporting of initial line during debugging. 2013-04-03 23:23:53 -07:00
crazybutcher
89f33160bc GLSL compilation checker frontend https://github.com/CrazyButcher/glslc 2013-04-03 16:09:20 +02:00
crazybutcher
e96a7657cd disable cpp preprocessor based "greying" out, due to lack of proper styles 2013-04-03 12:02:52 +02:00
Paul Kulchenko
492270a3bf Added universal binaries for luasocket on OSX (closes #120).
This allows debugging of 64bit applications (for example, LuaJIT) on OSX.
2013-04-02 22:29:54 -07:00
Paul Kulchenko
1cd34e3853 Fixed incorrect type guessing from assignments in auto-complete. 2013-04-02 18:31:40 -07:00
Paul Kulchenko
3ad7b389da Updated references to configuration files in documentation. 2013-04-02 10:17:24 -07:00
Leo Bartoloni
bc58913272 Update it.lua
Added new italian translations
2013-04-02 10:03:04 +03:00
Paul Kulchenko
415ba2bd17 Fixed editor tab activation after closing another tab on Linux (ref #89). 2013-04-01 20:15:10 -07:00
Paul Kulchenko
a338f4c436 Fixed 'Show tooltip' shortcut not working on Linux (fixes #118; ref #89). 2013-04-01 20:14:21 -07:00
Paul Kulchenko
24507e22bb Fixed cursor position being incorrectly restored (fixes #116; ref #89). 2013-04-01 16:07:34 -07:00
Paul Kulchenko
8e208b7dd3 Fixed lag on Windows when using brackets and backspace (fixes #117; ref #89). 2013-04-01 09:23:12 -07:00
Paul Kulchenko
d5c585b118 Updated 'method' type in auto-complete to only allow a:b syntax (closes #101). 2013-04-01 09:16:52 -07:00
Paul Kulchenko
56b63b3b4c Merge branch 'master' of git://estrelaeditor.git.sourceforge.net/gitroot/estrelaeditor/estrelaeditor into auto-complete 2013-03-31 19:20:33 -07:00
Paul Kulchenko
8c64d77276 Added update of Stack and Watch windows after 'Debugging suspended' message. 2013-03-31 18:17:40 -07:00
Paul Kulchenko
406056bf52 Updated language files (es, it, ru) with new messages (ref #70). 2013-03-30 20:17:20 -07:00
Fringale
f960d65e08 Updated French translation with latest string changes, fixed a few typos. 2013-03-31 00:01:19 +01:00
Paul Kulchenko
a3fc62a7c0 Added toggling for View menu items. 2013-03-30 13:13:03 -07:00
Paul Kulchenko
5a4e996b37 Updated Stack and Watch window to not refresh when not visible. 2013-03-30 13:12:57 -07:00
Paul Kulchenko
200647f0c5 Fixed a warning about empty project directory in local console. 2013-03-29 16:25:25 -07:00
Paul Kulchenko
99d6395845 Fixed an issue with default layout on the very first start. 2013-03-29 16:18:28 -07:00
Paul Kulchenko
fc0d5083e6 Updated CHANGELOG and README with current features. 2013-03-29 14:44:01 -07:00
Paul Kulchenko
478a87c8d0 Merge branch 'wxwidgets' (closes #89; closes #111).
Conflicts:
	src/editor/filetree.lua
2013-03-29 11:20:27 -07:00
Paul Kulchenko
d3a8b37cf3 Disabled closing Stack and Watch tabs. 2013-03-29 09:09:24 -07:00
Paul Kulchenko
0f99cb20b0 Forced floating of Stack and Watch windows by default (ref #89). 2013-03-28 22:40:41 -07:00
Paul Kulchenko
df54864e43 Made application name an optional parameter; reorganized on-exit workarounds. 2013-03-28 21:37:48 -07:00
Paul Kulchenko
9beae1f9c4 Updated error messages from loading configuration files. 2013-03-28 21:37:48 -07:00
Paul Kulchenko
0761ee2f4a Reduced flicker in the project tree when a file is opened (ref #89). 2013-03-28 21:37:47 -07:00
Paul Kulchenko
314dc5ba9e Added migration of configuration file on Windows (helps #89). 2013-03-28 21:37:46 -07:00
Paul Kulchenko
02a086e083 Revert "Updated editor handlers to improve performance on OSX with wx2.9.5".
The revert is needed as wx2.9.5 doesn't properly refresh status bar with
this change (on OSX, which the original improvement targeted).
2013-03-28 21:37:45 -07:00
Paul Kulchenko
3a616f5e37 Added hiding floating windows and removed excessive manager updates to reduce flicker. 2013-03-28 21:37:44 -07:00
Paul Kulchenko
3f12ce28d8 Optimized project switching and added notebook freezing where possible (ref #89). 2013-03-28 21:37:44 -07:00
Paul Kulchenko
a913c1fa55 Changed auto-recovery mark to be only applied after text changes. 2013-03-28 21:37:43 -07:00
Paul Kulchenko
363803ea9b Fixed an issue with Enter used to select an item in project dropdown (ref #89).
On Windows multiple COMBOBOX_SELECTED events are sent when Enter is used,
which may lead to run-time errors. Disabled processing of multiple copies
of the same event.
2013-03-28 21:37:35 -07:00
Paul Kulchenko
1bbb9f432c Rearranged saving settings to properly save on OSX (helps #89). 2013-03-27 13:02:15 -07:00
Paul Kulchenko
4854afeb32 Fixed default perspective to include Stack and Watch windows (ref #103). 2013-03-27 12:56:45 -07:00
Paul Kulchenko
507832ac2b Updated project tree workaround on OSX as it's not needed with wx 2.9.5+ (ref #89). 2013-03-27 12:54:54 -07:00
Paul Kulchenko
146b36d9ce Fixed an issue with the Project tree when project and app directories are the same. 2013-03-27 12:53:45 -07:00
Paul Kulchenko
77276d48ae Added auto-show/hide Stack and Watch windows during debugging (closes #110). 2013-03-26 15:25:02 -07:00
Paul Kulchenko
c3f253ef64 Added ignoring -psn... parameter on OSX when reading file names from command line. 2013-03-26 09:18:26 -07:00
Paul Kulchenko
93e51a6d43 Made stack and watch windows dockable (closes #103). 2013-03-24 15:04:27 -07:00
Paul Kulchenko
a26d72f99d Added exit call to avoid crash on Linux when closing the IDE.
The crash appears to happen in Unlink when debugging is in progress or
after an external process is executed. In some cases it also happens in
wxluaO_deletegcobject after simply closing the app on 64bit Linux.

1 0x0000... in wxEvtHandler::Unlink()
2 0x0000... in wxEvtHandler::~wxEvtHandler()
3 0x0000... in wxProcess::~wxProcess()
4 0x0000... in wxluaO_deletegcobject(lua_State*, int, int)
5 0x0000... in wxlua_wxLuaBindClass__gc(lua_State*)
2013-03-22 15:08:04 -07:00
Paul Kulchenko
cd8b714ea6 Upgraded Mobdebug (0.5222) to add serialization with metamethods and notification on incomplete output (closes #109). 2013-03-22 15:05:27 -07:00
Paul Kulchenko
909e9b3ee9 Updated Linux binaries to use libpng 1.6 with wxwidgets (helps #89).
The builtin library is now using separate symbols to avoid conflicts with
system libpng.
2013-03-22 14:45:22 -07:00
Paul Kulchenko
d10bcda693 Added scripts to install build prerequisites on Linux (helps #89). 2013-03-21 22:52:19 -07:00
Paul Kulchenko
7ddb673624 Updated Windows/OSX build files to only build components needed (helps #89). 2013-03-21 19:15:07 -07:00
Paul Kulchenko
bbd11b90eb Added check for different spellings of the same folder in the project tree. 2013-03-21 17:51:03 -07:00
Paul Kulchenko
4fee737981 Improved performance of tab switching and project tree population. 2013-03-21 17:49:35 -07:00
Paul Kulchenko
14143bf0ce Fixed function list in toolbar on Linux (helps #89). 2013-03-21 17:46:50 -07:00
Paul Kulchenko
0e8a9b078c Updated linux binaries to fix libpng support (helps #89).
Binaries have been updated to use whatever system libpng library is
available (without being linked against a particular version).

This also includes fix for 64bit systems to allow for these binaries to
work with "older" versions of libpng (for example, v1.2).

The binaries include wxwidgets fix for lsb_release messages, so the
workaround for this issue has been removed.
2013-03-20 12:22:28 -07:00
Paul Kulchenko
c2ca459882 Updated Linux binaries to work with different libpng versions (helps #89).
The compiled binary always has version of libpng as 1.2.0 (even though
wxwidgets may come with a different version) and is compiled with libpng
set to use system library. The warnings from libpng about different
versions are suppressed when bitmaps are loaded. This has been tested to
work with libpng 1.2.x and 1.5.x.

This update also adds a workaround for "lsb_release: command not found"
message reported on some Linux systems.
2013-03-18 12:48:16 -07:00
Paul Kulchenko
f80a11a982 Replaced deprecated arch with uname -m in Linux components (ref #89). 2013-03-14 09:50:11 -07:00
Paul Kulchenko
29650cef8c Updated executable status on linux files (ref #89). 2013-03-13 22:23:33 -07:00
Paul Kulchenko
4cf8017d7b Fixed debugger output not being suppressed on Linux and using wlua. 2013-03-13 17:16:38 -07:00
Paul Kulchenko
f807b1f48c Set 'Courier New' as the default font on Linux (ref #89). 2013-03-13 17:02:32 -07:00
Paul Kulchenko
dc7e040087 Added linux binaries with support for x86 and x64 (helps #89). 2013-03-13 16:59:38 -07:00
Paul Kulchenko
4262716043 Removed unused code. 2013-03-13 16:51:30 -07:00
Paul Kulchenko
5f25238ba6 Updated function list dropdown to fit toolbar on Linux (helps #89). 2013-03-13 16:47:08 -07:00
Paul Kulchenko
cf95129fc6 Fixed About screen to fit on Linux (helps #89). 2013-03-13 16:46:38 -07:00
Paul Kulchenko
f8b6654cd6 Fixed a warning when setting empty working directory. 2013-03-13 16:45:00 -07:00
Paul Kulchenko
cf001082e2 Removed reference to a dll no longer used. 2013-03-13 13:58:31 -07:00
Paul Kulchenko
c8e2890f60 Enabled full debugging for Corona on OSX. 2013-03-12 16:01:13 -07:00
Paul Kulchenko
9075736cf1 Set 'Courier New' as the default font on Windows.
It turned out that some Windows systems (like XP), don't use 'Courier New'
as the default, and rather use some proportional font, even when
wxFONTFAMILY_MODERN is used, which should pick a fixed pitch font.
2013-03-12 12:17:14 -07:00
Paul Kulchenko
e1cba702f7 Updated windows executable to show properly scaled icons in the Explorer. 2013-03-12 12:04:40 -07:00
Paul Kulchenko
9ffc4cf9dd Fixed wxwidgets issue with wrong cursor shape over editor (ref #89). 2013-03-11 10:35:17 -07:00
Paul Kulchenko
94647152fc Fixed a static analyzer issue with anonymous functions defined in expressions (fixes #3). 2013-03-10 15:59:45 -07:00
Paul Kulchenko
e4a69a63c0 Added a workaround for a crash on OSX when the app is closed while
debugging is in progress (ref #89).

The crash appears to be in wxEvtHandler::Unlink, but I couldn't find the
cause for it:
0   libwx.dylib	0x014d2bd9 wxEvtHandler::Unlink() + 51
1   libwx.dylib	0x014d4023 wxEvtHandler::~wxEvtHandler() + 37
2   libwx.dylib	0x0146d7fa wxProcess::~wxProcess() + 84
3   libwx.dylib	0x01074af9 wxLua_wxProcess_delete_function(void**) + 23
4   libwx.dylib	0x0113300d wxluaO_deletegcobject(lua_State*, int, int) + 425
5   libwx.dylib	0x0111f6f2 wxlua_wxLuaBindClass__gc(lua_State*) + 101
2013-03-09 18:49:35 -08:00
Paul Kulchenko
05e2b483a8 Added window list button to the notepad with editor tabs. 2013-03-09 18:48:40 -08:00
Paul Kulchenko
f2e8c0c213 Updated status bar to use no border around fields. 2013-03-09 18:46:44 -08:00
Paul Kulchenko
43c6be0859 Added centering of current line during debugging. 2013-03-07 20:01:37 -08:00
Paul Kulchenko
fb5ef928fd Improved handling of upvalues with __tostring method in the Stack window. 2013-03-07 19:59:18 -08:00
Paul Kulchenko
3f9be575fd Updated check for wxwidgets version on OSX (helps #89). 2013-03-07 17:11:06 -08:00
Paul Kulchenko
9985cfc50a Fixed OSX crash when tooltips/auto-complete is used (helps #89). 2013-03-07 17:10:19 -08:00
Paul Kulchenko
be018b39fc Updated build scripts to include wxlua patch to fix live coding (helps #89). 2013-03-07 17:09:40 -08:00
Paul Kulchenko
da15c46429 Fixed OSX issues with 2.9.5: numpad keys, switching tabs, and cursor shape when using scratchpad (helps #89). 2013-03-06 22:17:26 -08:00
Paul Kulchenko
0eb71f44d4 Updated indicator description for wx2.9.5; removed license that doesn't apply (helps #89). 2013-03-03 20:03:29 -08:00
Paul Kulchenko
aa6618f002 Updated translation script to work with wxwidgets 2.9.5+ (helps #89). 2013-03-03 19:46:12 -08:00
Paul Kulchenko
e55e28e852 Fixed multi-line paste into console with wxwidgets 2.9.5 (helps #89). 2013-03-03 19:01:05 -08:00
Paul Kulchenko
0e1c937892 Increased default font size for OSX; set 'Monaco' as default font (helps #89). 2013-03-01 20:46:34 -08:00
Paul Kulchenko
65a112a4e9 Removed checks for Windows in font setup; now uses default font. 2013-03-01 20:46:33 -08:00
Paul Kulchenko
0448ebb0e0 Updated function call indicator to use round box with wxwidgets upgrade (helps #89). 2013-03-01 20:46:32 -08:00
Paul Kulchenko
fec7d21ca4 Updated binaries with a patched version of wxlua (helps #89).
The patch is needed to fix live coding issue with wxlua applications. Also
uses a more recent version of wxwidgets, that fixes menu hint on OSX.
2013-03-01 20:46:26 -08:00
Paul Kulchenko
2d29aa3666 Updated large icons for "native" toolbar on OSX (helps #89). 2013-03-01 20:46:06 -08:00
Paul Kulchenko
23a4f5fa04 Reorganized code to allow references to wxver from default style generation. 2013-02-28 00:01:13 -08:00
Paul Kulchenko
80bcc21562 Fixed rearranging editor tabs with drag and drop (helps #89). 2013-02-28 00:00:04 -08:00
Paul Kulchenko
5dcf0a6622 Updated keywords to be re-applied after SaveAs only when needed. 2013-02-25 21:51:50 -08:00
Paul Kulchenko
99c1be49a6 Updated handling of markdown styles to make it more robust (fixes #59). 2013-02-25 21:45:33 -08:00
Paul Kulchenko
2a46b4ece7 Updated file loading logic for a small performance improvement. 2013-02-24 22:17:43 -08:00
Paul Kulchenko
1d77bbdf5a Added multiple selection and multi-cursor editing (wx2.9.5+). 2013-02-24 22:16:05 -08:00
Paul Kulchenko
943517f07e Updated editor handlers to improve performance on OSX with wx2.9.5 (helps #89). 2013-02-24 21:43:21 -08:00
Paul Kulchenko
93b664de45 Fixed an issue with full screen mode on OSX with wx 2.9.5 (helps #89). 2013-02-24 21:43:21 -08:00
Paul Kulchenko
695fed709e Switched to 'native' menu on OSX and added 24x24 icons required (helps #89).
Removed Cut/Copy/Paste/Undo/Redo icons from the toolbar as these are
rarely used and were taking too much space.
2013-02-24 21:43:05 -08:00
Paul Kulchenko
51735ac89d Updated MANIFEST for OSX dylib changes (helps #89). 2013-02-24 21:28:53 -08:00
Paul Kulchenko
5a49699098 Added a check to only activate the Output window if it's not activated.
This reduces flicker by redrawing the project tree only when needed.
2013-02-24 17:53:03 -08:00
Paul Kulchenko
b2b6e82735 Added a check for project tree refresh to only execute on OSX. 2013-02-24 17:53:02 -08:00
Paul Kulchenko
fd3ed2b7da Added a property to store wxwidgets version. 2013-02-24 17:46:59 -08:00
Paul Kulchenko
4da018b8ce Removed files for handling preferences that are no longer used. 2013-02-24 17:46:31 -08:00
Paul Kulchenko
99ad315832 Added dll proxy to make LfW libraries to work with the IDE. 2013-02-23 14:49:40 -08:00
Paul Kulchenko
4bd20406a2 Removed binary libraries not currently used. 2013-02-23 14:33:28 -08:00
Paul Kulchenko
48b51c549a Updated launcher manifest and resource file; resigned windows executable (helps #89). 2013-02-23 14:31:24 -08:00
toiffel
af0a95ddb8 Added wxWidgets 2.9.5 binaries and build scripts 2013-02-22 14:10:02 +07:00
Paul Kulchenko
5db9b6b9b5 Updated applying fold properties to get folds working with wxwidgets 2.9.5+ (helps #89). 2013-02-18 14:08:37 -08:00
toiffel
e1bee48834 Fixed a segfault when closing the application on OS X and Linux 2013-02-18 14:02:02 -08:00
Paul Kulchenko
704f6fed89 Fixed formatting in the About screen for wxwidgets 2.9.x (helps #89). 2013-02-13 13:53:58 -08:00
Paul Kulchenko
c05962c6a6 Updated README with Marmalade Quick support and Corona tutorial. 2013-02-13 13:50:41 -08:00
Paul Kulchenko
7111494545 Updated logic to request user attention for robustness and consistency between platforms. 2013-02-11 11:12:00 -08:00
Paul Kulchenko
2833a6cfb1 Disabled not implemented options for Marmalade. 2013-02-10 20:58:57 -08:00
Paul Kulchenko
e9dc3ff867 Updated CHANGELOG and configuration documentation for 0.35. 2013-02-10 20:10:35 -08:00
Paul Kulchenko
ca8856d77c Updated Marmalade interpreter to run debugging immediately after start. 2013-02-10 20:05:13 -08:00
crazybutcher
17948e06d8 introduce method handling for autocomplete and api resolving 2013-02-10 20:45:38 +01:00
crazybutcher
51777d47c9 Merge remote-tracking branch 'zbstudio/master' 2013-02-10 12:48:25 +01:00
crazybutcher
1714cf6109 improved type guessing: always keep full assignment string, do multiple runs on resolve, strip closed scopes 2013-02-10 12:48:05 +01:00
Paul Kulchenko
2a4cc75f0a Updated Gideros interpreter to run debugging immediately after starting.
Use `debugger.runonstart = false` to disable.
2013-02-09 20:22:16 -08:00
Paul Kulchenko
486cccd1da Added debugger.runonstart option to configure if debugging should run immediately after starting. 2013-02-09 20:21:58 -08:00
Paul Kulchenko
4a93f3e147 Added editor.checkeol option to configure checking for eol encoding in loaded files. 2013-02-09 16:10:14 -08:00
Paul Kulchenko
64871efe6d Added Marmalade Quick support. 2013-02-09 14:38:30 -08:00
Paul Kulchenko
3e382a42e1 Added support for starting Gideros on-device debugging. 2013-02-09 14:34:16 -08:00
Paul Kulchenko
ff973beb32 Added requesting user attention when stopped during debugging. 2013-02-08 23:19:52 -08:00
Paul Kulchenko
ced9908da5 Fixed a rare crash on OSX when closing IDE with an application running under debugger. 2013-02-05 23:54:08 -08:00
Paul Kulchenko
ea52f821c5 Updated Linux startup script to use online versions of wxlua packages (deb files). 2013-02-04 18:03:15 -08:00
Paul Kulchenko
cf2b32c66d Fixed path handling for metalua to avoid conflicts with other modules that may include lexer.lua file. 2013-02-03 23:03:29 -08:00
Paul Kulchenko
462da5b99b Fixed executing commands in the Remote console immediately after
`mobdebug.start()` (closes #100).
2013-02-02 22:14:03 -08:00
Paul Kulchenko
9b481ba8ef Added example for defaulteol configuration option. 2013-01-27 10:12:28 -08:00
Fringale
557bb9cc6a Enhance line-endings handling (CRLF / LF).
Fix auto-indent not working in Linux (and presumably Mac OS X).
Add config option to choose default EOL for new files.
Add EOL auto-detection for existing files.
2013-01-27 17:58:05 +01:00
Paul Kulchenko
2cc06be317 Added skipping binary files when checking for malformed UTF8. 2013-01-25 14:48:07 -08:00
Paul Kulchenko
0afd2b4b8c Updated handling of file: prefix as it's different on Windows and OSX (helps #89). 2013-01-25 14:47:54 -08:00
Paul Kulchenko
818e5cf255 Added configuration option for compact folding. 2013-01-21 11:32:33 -08:00
Paul Kulchenko
1978274686 Updated messages in the starter script. 2013-01-20 18:04:08 -08:00
Paul Kulchenko
9c95e154c1 Fixed case-sensitivity on Windows caused by cross-platform debugging changes. 2013-01-20 17:57:53 -08:00
Paul Kulchenko
4f912a7063 Updated function call parsing to recognize "func{}" and "func''" syntax. 2013-01-19 18:20:09 -08:00
Paul Kulchenko
45cc57058c Fixed invalid escape sequence that fails under LuaJIT. 2013-01-19 18:18:45 -08:00
Paul Kulchenko
d222ed2dd1 Added support for cross-platform remote debugging. 2013-01-18 14:43:01 -08:00
Paul Kulchenko
fba53984eb Added support for script reloading and coroutine debugging under LuaJIT (MobDebug 0.514). 2013-01-18 12:41:50 -08:00
Paul Kulchenko
b810c4b0bf Merge branch 'i18n-fr-updates' of https://github.com/Fringale/ZeroBraneStudio into Fringale-i18n-fr-updates 2013-01-15 21:34:03 -08:00
Paul Kulchenko
6d5a4ad759 Updated os.exit() call in local console to exit gracefully. 2013-01-15 21:31:48 -08:00
Paul Kulchenko
802521b364 Improved reporting of stack and serialization run-time errors.
These errors can be triggered by __tostring methods that may be failing at
run-time. As those are called from the serializer used in the debugger,
any errors from these calls need to be reported back to the application.
2013-01-15 12:21:30 -08:00
Paul Kulchenko
466aecb4b8 Fixed an issue with spec files when a separator (sep) is not specified. 2013-01-15 10:58:01 -08:00
Fringale
c34f31c869 Update French translation with various fixes and tweaks. 2013-01-15 10:38:36 +01:00
Paul Kulchenko
5a1348868e Added Russian translation for new messages. 2013-01-11 22:42:09 -08:00
Paul Kulchenko
45e244f10c Added handling of malformed UTF8 characters in files (fixes #97). 2013-01-11 14:56:36 -08:00
Paul Kulchenko
9b38dd7d74 Enabled live-coding for Corona interpreter. 2013-01-07 09:56:40 -08:00
Paul Kulchenko
7d1098740b Updated MANIFEST to include all configuration files. 2013-01-07 09:37:16 -08:00
Paul Kulchenko
b3ff824806 Added support for debugging Lua 5.2 scripts. 2013-01-07 09:36:40 -08:00
Fringale
db889f217d Update French translation with newly added strings 2013-01-06 12:45:20 +01:00
crazybutcher
e60ca05e64 bugfix in glsl style spec 2013-01-05 18:40:05 +01:00
Paul Kulchenko
1831a9b286 Added workaround for Moai require path issue (fixes #96; fixes #87). 2013-01-04 11:48:06 -08:00
Paul Kulchenko
f3939938b4 Added editor tab popup menu with 'Close All', 'Close Other', and other items. 2013-01-02 22:47:48 -08:00
Paul Kulchenko
2c8b07b1cb Added C/CPP specification file and a configuration example. 2013-01-02 22:39:33 -08:00
Paul Kulchenko
2ef11d5eea Added XCode-like key mapping. 2013-01-02 22:38:13 -08:00
Paul Kulchenko
5d2c618553 Updated 'Close page' and its translations. 2012-12-27 17:32:35 -08:00
Paul Kulchenko
917c2d82c7 Updated configuration examples and documentation (helps #55). 2012-12-20 22:22:07 -08:00
Roland Yonaba
8590d8243c Typos fixes, small changes in French translation 2012-12-14 12:09:30 +00:00
Paul Kulchenko
bc1ddca4f0 Updated the size of the function list dropdown on Windows (helps #89). 2012-12-13 21:16:23 -08:00
Paul Kulchenko
d4bda0a45d Added removing of file: prefix and url decoding of filepaths (helps #89). 2012-12-13 21:09:16 -08:00
Paul Kulchenko
6a49176c0e Added a workaround for returning incorrect project folder (helps #89).
wxwidgets 2.9.x in some cases returns the last segment of the path twice
(at least on Windows), which makes the entire path invalid.
2012-12-13 21:06:59 -08:00
Paul Kulchenko
bfd44ada12 Adjusted handling of filepath to work with relative and absolute paths (helps #89). 2012-12-13 21:04:30 -08:00
Paul Kulchenko
5172135014 Updated MANIFEST to remove unused files. 2012-12-13 14:27:29 -08:00
Paul Kulchenko
1881493b56 Updated README and CHANGELOG for 0.34. 2012-12-12 20:52:56 -08:00
Paul Kulchenko
04599ea184 Removed love2d API calls with spaces in names. 2012-12-12 17:47:18 -08:00
Paul Kulchenko
067ae87dc6 Fixed an issue with overlapping auto-complete suggestions. 2012-12-12 16:24:39 -08:00
Paul Kulchenko
622db1313b Disabled showing auto-complete when the only option is already typed. 2012-12-12 16:21:18 -08:00
Paul Kulchenko
89bb289c6a Fixed auto-complete not working after closed brackets. 2012-12-12 16:18:29 -08:00
Paul Kulchenko
465ed72d51 Added an option to specify the width of the calltip. 2012-12-11 23:47:15 -08:00
Paul Kulchenko
62530ba937 Disabled showing a calltip on mouse over when it's already active. 2012-12-11 23:41:27 -08:00
Paul Kulchenko
1e4be39c29 Updated descriptions for io.* functions; moved file:* functions to a pseudo library (f); helps #84. 2012-12-11 23:35:22 -08:00
Paul Kulchenko
bc69e56e07 Updated LICENSE to add remdebug license information. 2012-12-10 22:53:12 -08:00
Paul Kulchenko
8f7aa92de6 Added showing short descriptions in tooltip for functions without lib/package. 2012-12-09 22:36:45 -08:00
Paul Kulchenko
6b1407f8b3 Switched to showing short tooltips by default as some of the updated Lua API descriptions are very long. 2012-12-09 22:35:00 -08:00
Paul Kulchenko
78bd7c6b79 Fixed tooltip being shown when mouse moving outside of the editor area. 2012-12-09 22:33:59 -08:00
Paul Kulchenko
0890179044 Updated tooltip to show shortened descriptions on mouse-over. 2012-12-09 22:32:20 -08:00
Paul Kulchenko
57af369b66 Added 'Project Directory' menu. 2012-12-09 21:38:15 -08:00
Paul Kulchenko
ca758c03d1 Removed window types from config as they are no longer needed to be listed. 2012-12-07 15:24:03 -08:00
Paul Kulchenko
77602703be Updated CHANGELOG in preparation for v0.34. 2012-12-06 13:42:40 -08:00
Paul Kulchenko
097740d0ef Updated Lua api descriptions (closes #84). 2012-12-06 13:29:38 -08:00
Fringale
585177f79f Lua API: refactor code, add Lua 5.2 functions/values, add or complete desc/args/returns, add debug library. 2012-12-06 12:39:59 -08:00
Fringale
6aa3683823 Add missing Lua 5.2 keywords to Lua spec 2012-12-06 12:39:36 -08:00
Paul Kulchenko
cf272ca733 Added ability to pause scratchpad when the script is completed (closes #83). 2012-12-06 12:06:32 -08:00
Paul Kulchenko
35199d5d98 Added ability to pause and resume scratchpad. 2012-12-06 11:44:34 -08:00
Paul Kulchenko
c394cb7dec Fixed a font zooming bug with Ctrl+MouseWheel.
Backported fix from wxwidgets 2.9.x (http://trac.wxwidgets.org/ticket/14031).
2012-12-06 11:15:56 -08:00
Paul Kulchenko
28490b1c78 Fixed file marking in the project tree after opening a new file. 2012-12-06 11:11:55 -08:00
Paul Kulchenko
4f30271665 Fixed GSL-shell interpreter to use correct folder structure (helps #72). 2012-12-02 09:35:38 -08:00
Paul Kulchenko
3abddc50a1 Fixed using project folders with GSL-shell (helps #72). 2012-12-01 14:01:02 -08:00
Paul Kulchenko
614c43795a Added GSL-shell support (closes #72). 2012-11-29 20:45:39 -08:00
Paul Kulchenko
b734e8d34e Updated CHANGELOG, MANIFEST, and README. 2012-11-29 16:24:23 -08:00
Paul Kulchenko
01aa5d39b7 Added more color schemes (Solarized and Monokai). 2012-11-28 21:12:59 -08:00
Paul Kulchenko
ed30948f7f Added customized yield function for debugging (MobDebug v0.508; closes #81). 2012-11-28 21:06:34 -08:00
Paul Kulchenko
ac8c5bbe53 Fixed an issue with breakpoints not available after aborting tracing on Linux/OSX. 2012-11-27 11:24:23 -08:00
Paul Kulchenko
67ac18af04 Disabled editor autoactivation during debugging when tracing is on. 2012-11-27 11:15:45 -08:00
Paul Kulchenko
6dbf56f984 Added proper hiding of current line marker during debugging (except when tracing). 2012-11-27 10:41:51 -08:00
Paul Kulchenko
c7a66bb68b Fixed an issue with running scratchpad when entry points are configured. 2012-11-27 10:38:45 -08:00
Paul Kulchenko
08d8630147 Extended list of default folders for interpreters where executables are searched for. 2012-11-25 17:05:59 -08:00
Paul Kulchenko
93abd740d8 Added Corona auto-complete support (thanks to Srdjan Markovic). 2012-11-25 16:56:53 -08:00
Paul Kulchenko
8780a3b656 Limited auto-showing windows to Lua interpreter only (related to #80). 2012-11-25 16:54:36 -08:00
Paul Kulchenko
780d23f111 Added logic to show application windows without explicitly listing their class (closes #80); Windows only. 2012-11-24 23:15:54 -08:00
Paul Kulchenko
78736a94e5 Added Moai scratchpad support. 2012-11-20 22:21:20 -08:00
Paul Kulchenko
249554a77c Added missing constants to Moai API. 2012-11-20 14:11:23 -08:00
Paul Kulchenko
bc55f6a72d Added setting focus on the window when a file is loaded in the existing
instance.

Unfortunately doesn't work consistenly across platforms: (1) Linux works
best activating and raising the application window. (2) OSX checks for the
application running and doesn't even get to the "single instance" check;
when started with "bin/lua src/main.lua zbstudio <file>" it correctly
loads the file, but doesn't switch to the app. (3) Windows doesn't
activate the app window all the time (it activates it the first time, but
not subsequent times).
2012-11-18 20:24:19 -08:00
Paul Kulchenko
5af9d4d487 Added two more wxwindow window classes to the list of windows to show (Windows). 2012-11-18 20:16:07 -08:00
Paul Kulchenko
31e21d2e6a Fixed Linux launcher to pass filename parameter to the IDE. 2012-11-18 20:14:46 -08:00
Paul Kulchenko
74e8021306 Fixed 'messages' script to make it run on OSX (helps #70). 2012-11-17 16:57:26 -08:00
Paul Kulchenko
01a48dcfcc Updated MobDebug to v0.507 to fix serialization issues (closes #77).
Added handling of metatables with __tostring method.
Fixed an issue with serializing shared functions also used as keys in
tables.
2012-11-16 21:33:14 -08:00
Paul Kulchenko
18005ea0c2 Added scheme picker script to test color schemes from the IDE. 2012-11-16 14:54:04 -08:00
Paul Kulchenko
dce5f99130 Added Zenburn as a color scheme. 2012-11-16 14:49:53 -08:00
Paul Kulchenko
af9d01727f Updated style processing to support styling of markup and allow dynamic switching of color schemes. 2012-11-16 14:44:32 -08:00
Paul Kulchenko
8d09cc9c09 Added styling for markers and Output/Console windows. 2012-11-14 23:33:20 -08:00
Paul Kulchenko
1bc9b287df Updated Lua keyword definitions to improve grouping for styling (closes #79). 2012-11-14 11:50:52 -08:00
Paul Kulchenko
1cc2fc1bf2 Updated love2d api to an updated version as of 11/1/2012 (fixes #78). 2012-11-13 16:52:48 -08:00
Paul Kulchenko
5c7beb0079 Added Italian translation (thanks to Leo Bartoloni). 2012-11-13 16:11:35 -08:00
Paul Kulchenko
71d1ea13a8 Disabled functions that are not available under Corona on OSX (helps #73). 2012-11-13 15:59:55 -08:00
Paul Kulchenko
9879660522 Fixed support for Corona SDK on OSX (helps #73).
The debugging is limited on OSX comparing to the Windows version (appears
to be a limitation of Corona SDK with no known workaround): remote console
and watches are not working.
2012-11-12 15:15:45 -08:00
Paul Kulchenko
ae75c9823f Fixed 'Edit | Paste' shortcut. 2012-11-12 10:31:39 -08:00
Paul Kulchenko
bfbc5d2000 Fixed typos in French translation. 2012-11-11 22:39:52 -08:00
Paul Kulchenko
841beb31ce Added Spanish translation (thanks to Inigo Sola). 2012-11-11 22:38:52 -08:00
Paul Kulchenko
119a5eb2ae Added reporting of run-time errors from remote processes (helps #73). 2012-11-10 21:06:26 -08:00
Paul Kulchenko
0729da3403 Added 'tomorrow' color theme. 2012-11-10 19:54:49 -08:00
Paul Kulchenko
29e56be459 Fixed fold style to properly set background color. 2012-11-10 18:14:20 -08:00
Paul Kulchenko
17bdb480c9 Added redirect of remote 'print' commands for Gideros applications. 2012-11-08 16:57:08 -08:00
Paul Kulchenko
4da3dde68d Added check for 'main.lua' in Corona projects. 2012-11-08 16:56:19 -08:00
Paul Kulchenko
9b330c26ca Added ability to suspend a running application even when there is no editor tab or file to activate. 2012-11-08 16:24:52 -08:00
Paul Kulchenko
9bdb1d016b Added serialization of remote 'print' results and an output filter for debugging (helps #73). 2012-11-08 13:42:21 -08:00
Paul Kulchenko
4a881cf855 Added redirect of remote 'print' commands to the Output window in the IDE (helps #73). 2012-11-07 19:05:54 -08:00
toiffel
411eb2d338 Finished Russian translation 2012-11-07 09:06:30 -08:00
Paul Kulchenko
7fea9b4ec7 Added Corona SDK support (closes #73). 2012-11-06 22:35:14 -08:00
Paul Kulchenko
f0f9a37c7d Fixed an issue with a config file being loaded into the editor when specified in the command line. 2012-11-04 16:37:51 -08:00
Paul Kulchenko
e7c374c39f Fixed an issue with markdown formatting not working after setting styles from a config file (fixes #74). 2012-11-04 16:26:58 -08:00
crazybutcher
ba7a7c470d fixup luxinia interpreters for new load order of config 2012-11-04 18:39:34 +01:00
Paul Kulchenko
67b3e3fe5b Added French translation (thanks to Roland Yonaba). 2012-11-04 08:48:20 -08:00
Paul Kulchenko
32299a29b2 Fixed capitalization in Russian translation. 2012-11-04 00:01:03 -07:00
Paul Kulchenko
896e9f7c75 Fixed spacing in console messages. 2012-11-04 00:00:23 -07:00
Paul Kulchenko
ab3caee258 Added (more) verbose output to debugger to assist in troubleshooting. 2012-11-03 23:59:53 -07:00
crazybutcher
3f1d617c8f Merge remote-tracking branch 'zbstudio/master'
Conflicts:
	cfg/estrela.lua
2012-11-03 16:07:41 +01:00
crazybutcher
b549f807bb support for luxinia1debug variant 2012-11-03 16:04:21 +01:00
crazybutcher
d36dbc005c old estrela behavior for openend files 2012-11-03 16:00:57 +01:00
crazybutcher
95fce2cdc8 removed luaapi wrappers for cg/cuda (outdated) 2012-11-03 15:59:12 +01:00
Paul Kulchenko
a897472f05 Completed reorganization of front-end processing (closes #67 and #5).
Moved specs/interpreters/tools to be loaded before configuration files are processed.
2012-10-29 22:48:02 -07:00
Paul Kulchenko
23decac1de Merge branch 'master' of git://estrelaeditor.git.sourceforge.net/gitroot/estrelaeditor/estrelaeditor 2012-10-29 17:47:58 -07:00
Paul Kulchenko
60994d0da8 Added handling of LUA_DEV to make loading Lua for Windows libraries working out of the box (fixes #71). 2012-10-29 17:42:35 -07:00
Paul Kulchenko
af02cb2c24 Added internationalization support (closes #70). 2012-10-29 11:59:54 -07:00
crazybutcher
c7d6f9726a minor changes to tools' settings and clcc requring an environment variable 2012-10-27 17:43:02 +02:00
crazybutcher
655f3811de notes about estrela being gone and compatibility 2012-10-27 17:42:15 +02:00
crazybutcher
22f1540a5c Merge remote-tracking branch 'zbstudio/master' 2012-10-27 17:06:00 +02:00
Paul Kulchenko
f576e9000d Added multi-tab support for scratchpad. 2012-10-26 22:22:39 -07:00
Paul Kulchenko
589f7d94d2 Added documentation on accelerator/shortcut syntax. 2012-10-26 22:04:00 -07:00
Paul Kulchenko
16bb3cb6cb Added key map to change key binding for menu and toolbar items from a config file (closes #64). 2012-10-25 13:30:12 -07:00
Paul Kulchenko
6da6153053 Added hiding IDE while closing and saving configuration. 2012-10-24 22:06:41 -07:00
Paul Kulchenko
a7797f9d9a Updated CHANGELOG and MANIFEST for v0.33. 2012-10-22 17:52:36 -07:00
Paul Kulchenko
78e1f176a5 Updated OSX build script to include 'myprograms' folder if exists. 2012-10-22 17:44:36 -07:00
Paul Kulchenko
a592893b4d Updated Gideros interpreter to extend wait time for Gideros player to start. 2012-10-22 15:59:01 -07:00
Paul Kulchenko
1a1f25c135 Added configuration option to specify hostname when the default one is not reachable (fixes #68). 2012-10-21 13:53:42 -07:00
Paul Kulchenko
00692634a8 Updated text and added timestamp to auto-recover message. 2012-10-20 21:24:13 -07:00
Paul Kulchenko
1037389ce0 Added search for Moai and Love2d executables in default locations on OSX and Windows. 2012-10-20 21:17:34 -07:00
Paul Kulchenko
cc645ebb69 Added values from package.path to LUA_PATH that is used for processes started from the IDE. 2012-10-20 20:29:34 -07:00
Paul Kulchenko
544ada09e2 Restored animation of closing tabs when switching projects.
Using Freeze/Thaw to disable animation didn't work well as it was
interfering with popup messages (for example, when a file is modified) and
was not consistent with the behavior of opening files.
2012-10-20 20:18:36 -07:00
Paul Kulchenko
85d14ca6fd Added conversion of relative filenames to absolute when used in command line. 2012-10-20 11:37:15 -07:00
Paul Kulchenko
1d33dd6482 Added handling of command line parameters on OSX and Linux; updated documentation. 2012-10-20 10:42:04 -07:00
Paul Kulchenko
faa0e0e16d Added auto-recovery to save/restore editor content (fixes #23). 2012-10-19 13:59:55 -07:00
Paul Kulchenko
bb60b9421c Updated configuration example to avoid using ide.spec that is not available (fixes #67). 2012-10-19 12:43:11 -07:00
Paul Kulchenko
ab44438859 Updated CMake build script to handle wildcards in the MANIFEST. 2012-10-17 12:37:54 -07:00
Paul Kulchenko
a463b5fd28 Moved all Estrela features into a separate bundle that can be loaded using cfg/estrela.lua config. 2012-10-17 12:37:26 -07:00
Paul Kulchenko
d021bfa986 Fixed an issue with the current file name not showing in the title bar after startup. 2012-10-17 11:43:49 -07:00
Paul Kulchenko
beeee9e32f Removed multiple file types offered in Save As dialog.
All known types have been listed previously, which created problems
with different extensions assigned by default on different platforms.
Only the current extension is now being offered.
If the current file has no extension, then "*.*" is used as a mask.
2012-10-17 11:39:15 -07:00
Paul Kulchenko
dd682791e1 Updated changelog and documentation on configuration options. 2012-10-17 11:07:50 -07:00
Paul Kulchenko
dddcd96755 Fixed opening a non-existing file from the Recent Files list. 2012-10-16 15:09:57 -07:00
Paul Kulchenko
cb56311090 Fixed Find/Replace checkboxes on OSX (closes #63).
Fixed formatting/alignment of fields in Find/Replace dialog on OSX.
2012-10-16 15:08:14 -07:00
Paul Kulchenko
952f8325c0 Fixed Find/Replace dialog checkboxes that didn't react to clicks on OSX
(fixes #63).

It turned out that StaticBox(Sizer) needs to be created before checkboxes,
otherwise checkboxes don't get any clicks on OSX as the z-order for event
traversal appears to be incorrect.
2012-10-16 12:58:10 -07:00
crazybutcher
238a407a2c compute support for cgc, removed automatic keybindings for tools 2012-10-16 14:09:04 +02:00
Paul Kulchenko
0526fd4069 Improved reporting of compilation and run-time errors when running as scratchpad. 2012-10-14 13:54:09 -07:00
Paul Kulchenko
c0e369b175 Fixed an issue with restoring sessions with more than 9 files.
The indexes were sorted alphabetically, instead of numerically, which
caused files with indexes 1x to appear after index 1, instead of 9.
2012-10-14 09:59:01 -07:00
Paul Kulchenko
8e1d823eea Fixed an error when switching to a new project folder. 2012-10-12 17:34:24 -07:00
Paul Kulchenko
b73ef167bc Disabled closing files when switching projects if they are present in both projects. 2012-10-11 15:15:41 -07:00
Paul Kulchenko
7c889880d8 Updated autoindent rules to minimize de-indenting on already indented lines. 2012-10-11 15:13:32 -07:00
Paul Kulchenko
0387e32072 Made debugger strict.lua and LuaJIT friendly (upgraded to MobDebug v0.502). 2012-10-11 11:38:16 -07:00
Paul Kulchenko
e0c18c189a Disabled auto-complete in comments and strings. 2012-10-09 13:13:08 -07:00
Paul Kulchenko
489aaa3e8e Fixed transparency on toolbar search buttons. 2012-10-09 13:10:18 -07:00
Paul Kulchenko
fd92861998 Updated configuration examples to add editor settings and fix user.lua path. 2012-10-09 12:57:36 -07:00
Paul Kulchenko
bba9790a2a Added syntax aware indentation. 2012-10-09 12:04:44 -07:00
Paul Kulchenko
d68985c4a9 Added re/storing open files and interpreter when switching project folders. 2012-10-09 11:02:56 -07:00
Paul Kulchenko
4463cbd327 Updated changelog. 2012-10-07 21:24:46 -07:00
Paul Kulchenko
0d619b1326 Enable scratchpad support in the debugger when interpreter is capable of providing it. 2012-10-03 14:33:12 -07:00
Paul Kulchenko
8c2a4792f6 Added Gideros auto-complete and live coding support (closes #62). 2012-10-03 13:29:50 -07:00
Paul Kulchenko
0f71d4b9a0 Updated MANIFEST to add new debugger buttons. 2012-10-03 12:44:22 -07:00
Paul Kulchenko
30863a3dcc Added stopping gideros player when no connection can be made. 2012-10-02 23:32:17 -07:00
Paul Kulchenko
f74f56b917 Fixed an auto-complete issue with mixed case dynamic words (fixes #60). 2012-10-02 14:22:38 -07:00
Paul Kulchenko
a236d299de Added debugging-related buttons to the toolbar. 2012-10-02 11:57:11 -07:00
Paul Kulchenko
be54763f7e Disabled toggling breakpoints while debugger is running (as they wouldn't be changed anyway). 2012-10-02 11:52:57 -07:00
Paul Kulchenko
663b7cab8b Fixed 'Trying to solve a NULL hostname' warning message. 2012-10-02 11:51:41 -07:00
Paul Kulchenko
c68d45d697 Changed path for user.lua from .ZeroBraneStudio to .zbstudio to avoid name conflict on Linux (helps #44). 2012-10-02 11:49:37 -07:00
Paul Kulchenko
8b7407c3f2 Updated gideros integration to avoid blocking the IDE when the bridge does not respond; enabled debug output on OSX. 2012-10-02 11:46:13 -07:00
Paul Kulchenko
1b29f2e05f Added Gideros integration on OSX; added search for gideros in default locations on Windows and OSX. 2012-10-01 10:40:52 -07:00
Paul Kulchenko
8d4ce56619 Added Gideros integration and debugging support. 2012-09-30 21:49:52 -07:00
Paul Kulchenko
67da97f32f Disabled 'Run as Scratchpad' in the menu for those intepreters that don't support scratchpad. 2012-09-30 21:47:39 -07:00
Paul Kulchenko
46aa3575cf Merge branch 'linux' of https://github.com/toiffel/ZeroBraneStudio 2012-09-29 17:20:43 -07:00
Paul Kulchenko
acc635b9b5 Updated readme with screenshot and changelog with recent changes. 2012-09-29 16:47:02 -07:00
toiffel
99e64f51cd Sort files by name in project filetree only on Linux 2012-09-29 11:39:03 +07:00
toiffel
9002286bcf Fixed mouse cursor behavior in scratchpad mode on Linux (for real this time) 2012-09-29 11:39:03 +07:00
Paul Kulchenko
72b5690689 Added zbstudio.sh script to run on OSX/Linux; updated permissions (closes #15). 2012-09-28 15:13:41 -07:00
Paul Kulchenko
e488ed095c Disabled 'not activated file for debugging' message when auto-activation is disabled. 2012-09-28 14:32:07 -07:00
Paul Kulchenko
9c54fb6507 Fixed a typo that prevented a corner case in autocomplete from working. 2012-09-28 14:16:25 -07:00
Paul Kulchenko
065422fa2d Fixed inconsistent error messages about various config files. Changed searching for user config in '$HOME/.ZeroBraneStudio' from '$HOME/.zbs'. 2012-09-28 10:32:20 -07:00
Paul Kulchenko
0c2d6b6d48 Added variable ratio for sliders in scratchpad.
The ratio depends on the number being adjusted. 1 will change to 2, but
1.1 will change to 1.2 and 1.01 will change to 1.02. 0.99 will change to
1.00 to preserve the ratio.
2012-09-27 10:59:19 -07:00
Paul Kulchenko
89cc631a58 Added editor.autoactivate parameter (false by default) to specify if files should be opened by the debugger. 2012-09-27 09:18:01 -07:00
Paul Kulchenko
83e725ef97 Fixed an issue with auto-complete when dot or colon is used (fixes #56). 2012-09-27 09:15:16 -07:00
Paul Kulchenko
76ec0de7ab Reorganized files and removed those that are no longer needed. 2012-09-26 20:00:58 -07:00
Paul Kulchenko
38a176d84f Updated a warning message about single instance communication. 2012-09-25 22:15:49 -07:00
Paul Kulchenko
3bb22f4c48 Added auto-activation of files requested during debugging. 2012-09-25 22:15:07 -07:00
Paul Kulchenko
7b60461787 Fixed an issue with debugging scripts started using absolute file path. 2012-09-25 22:02:28 -07:00
Paul Kulchenko
843024ec1d Fixed setting working directory for interpreters to the file path when the project directory is not set. 2012-09-25 10:22:24 -07:00
Paul Kulchenko
b4e1dda0d9 Fixed an issue with Backspace not closing auto-complete suggestions. 2012-09-25 10:20:29 -07:00
Paul Kulchenko
394c93e9e6 Merge branch 'linux' of https://github.com/toiffel/ZeroBraneStudio 2012-09-24 22:43:25 -07:00
toiffel
ded66391ac CMakeLists.txt moved to build folder 2012-09-25 11:22:35 +07:00
Paul Kulchenko
d81de133a9 Updated MobDebug to v0.497 to fix issues and improve performance.
Performance improvements.
Added conversion of file names on windows to lower case to make
breakpoints work.
Added reporting errors in deserializing stack data.
Fixed an issue with returning stack values with circular references.
Fixed an issue with wx IDLE event on Linux.
2012-09-24 17:03:56 -07:00
Paul Kulchenko
0f6316619f Added configuration parameter for the number of characters typed before displaying auto-complete suggestions for dynamic words. 2012-09-24 17:01:23 -07:00
Paul Kulchenko
ab8a38fd79 Added proper closing of the application after Shutdown/Logoff events (fixes #57). 2012-09-23 21:37:29 -07:00
Paul Kulchenko
c91d287025 Fixed enabling items in the Edit menu (fixes #56). 2012-09-23 20:30:18 -07:00
toiffel
9fa8c7a972 Small regex fixes 2012-09-24 07:53:18 +07:00
toiffel
ce90e7898f Support for MANIFEST files 2012-09-24 07:10:53 +07:00
toiffel
4cafb3c201 Removed estrela frontend, disabled system mobdebug 2012-09-24 01:29:54 +07:00
toiffel
60bc64283d OS X port of CMakeLists.txt 2012-09-22 22:42:37 +07:00
toiffel
83dc1c5065 unix_starter.cpp replaced with shell script 2012-09-22 01:24:16 +07:00
toiffel
124f70d342 Windows port of CMakeLists.txt 2012-09-22 01:24:16 +07:00
toiffel
1400bf6b3d Added icons of different sizes for Linux hicolor theme 2012-09-22 01:24:16 +07:00
toiffel
8f26e2df17 Added Linux .desktop file 2012-09-22 01:24:16 +07:00
toiffel
49b9b66394 Support for install in CMakeLists.txt 2012-09-22 01:24:16 +07:00
toiffel
ee9fe71657 Added system introspection to CMakeLists.txt 2012-09-22 01:24:16 +07:00
toiffel
ba0efe224a Implemented unix_starter.cpp 2012-09-22 01:24:16 +07:00
toiffel
96516c9454 Added initial CMakeLists.txt and unix_starter.cpp stub 2012-09-22 01:24:16 +07:00
toiffel
e6b8533cf9 - Fixed small UI issues with toolbar buttons
- Sort items by name in file tree
2012-09-22 01:24:15 +07:00
Paul Kulchenko
185ebb5bbf Added Moai auto-complete (closes #52). 2012-09-20 17:26:19 -07:00
Paul Kulchenko
f8b447425e Fixed function list in the toolbar on Mac (helps #14). 2012-09-20 11:12:57 -07:00
Paul Kulchenko
7330ac21ad Disabled tooltip when scratchpad is on (fixes #51). 2012-09-19 15:56:43 -07:00
Paul Kulchenko
e6bd7af1d7 Fixed deleting of comment blocks with hidden markup (fixes #40). 2012-09-19 15:54:28 -07:00
Paul Kulchenko
979b318647 Added hiding auto-complete suggestions on losing focus in the editor. 2012-09-18 17:57:29 -07:00
Paul Kulchenko
16a5934c52 Fixed an issue with function list when all editor tabs are closed. 2012-09-18 17:52:05 -07:00
Paul Kulchenko
2d22060e2c Disabled showing calltip when the editor is not in focus. 2012-09-14 21:59:41 -07:00
Paul Kulchenko
82071e6ce1 Added proper reporting of errors in the stack window. 2012-09-13 16:34:55 -07:00
Paul Kulchenko
6a23d09821 Fixed multiple calltips shown on Linux (helps #15).
On Linux DWELLSTART event seems to be generated even for those editor
windows that are not active. What's worse, when generated the event
seems to report "old" position when retrieved using event:GetX and
event:GetY, so instead we use wxGetMousePosition.
2012-09-12 18:04:48 -07:00
Paul Kulchenko
c4b9d3e31c Disabled showing calltip over markup in comments. 2012-09-12 17:45:13 -07:00
Paul Kulchenko
9b50cb3525 Fixed an issue with mouse cursor in scratchpad not properly updated on Linux (fixes #49; helps #15). 2012-09-11 20:06:15 -07:00
Paul Kulchenko
49e56f8f3c Fixed an issue with static analyzer that failes on function names like a.b.c (fixes #50). 2012-09-11 20:03:29 -07:00
Paul Kulchenko
a84f362c1f Fixed disabling Paste menu on Linux when needed (fixes #46; helps #15). 2012-09-11 11:23:29 -07:00
Paul Kulchenko
cfe5b37041 Fixed an issue with context menu on Linux (fixes #47; helps #15). 2012-09-11 11:21:25 -07:00
Paul Kulchenko
e9351c7fde Resolved conflict between lua executable names on Windows and Mac. 2012-09-11 11:17:32 -07:00
Paul Kulchenko
305f48ef6f Added wxlua.deb file and install script that pull and build all required dependencies on Linux (covers most of #15). 2012-09-10 22:27:08 -07:00
Paul Kulchenko
5ccafe93a8 Added osx executables and build files. 2012-09-10 22:20:46 -07:00
Paul Kulchenko
0f14a54843 Updated configuring toolbar size to improve Linux compatibility. 2012-09-10 21:04:42 -07:00
Paul Kulchenko
ac4a2598a3 Fixed debugger failure when debugging is initiated externally and there is an unsaved file in one of editor tabs. 2012-09-10 21:03:37 -07:00
Paul Kulchenko
66fdef6088 Fixed stopping the debugger when an editor tab where debugging happens is closed.
Closing tab didn't work when the debugging session was initiated
externally and not by the IDE.
2012-09-08 23:33:56 -07:00
Paul Kulchenko
4685fed4bb Updated cpath processing to allow Linux version to run side-by-side with Windows and Mac. 2012-09-07 23:36:02 -07:00
Paul Kulchenko
c4a3036794 Added disabling full screen mode when the last editor tab is closed. 2012-09-07 23:13:39 -07:00
Paul Kulchenko
fa5c31a7ec Fixed enabling of several menu items with no editor tab (fixes #42).
Fixed saveAll to allow saving of untitled.lua files;
  Disabled show tooltip if there is no editor tab;
  Disabled save if there is no editor tab;
  Disabled show prev/next in search if there is no editor tab;
  Enabled search/replace in files even if there is no editor tab;
  Disabled switching to fullscreen if there is no editor tab.
2012-09-07 22:34:24 -07:00
Paul Kulchenko
985b2c288b Fixed an issue with loading stock icons on Linux. 2012-09-07 12:15:35 -07:00
Paul Kulchenko
722378debb Added proper reporting of errors in config files. 2012-09-07 12:14:22 -07:00
Paul Kulchenko
4c37b51ae1 Added toggling folders in project pane by single click (fixes #41). 2012-09-07 12:13:12 -07:00
Paul Kulchenko
3e5f0ebf4d Added examples for configuring tabs and moai entry points. 2012-09-07 09:11:01 -07:00
Paul Kulchenko
fa522ae36b Added reporting compilation success rate (fixes #39) 2012-09-06 13:22:36 -07:00
Paul Kulchenko
6b85e36fd6 Updated licensing information. 2012-09-06 11:58:22 -07:00
Paul Kulchenko
fc420943b2 Added shortcuts for adding and removing watches. 2012-09-05 16:21:13 -07:00
Paul Kulchenko
989603655a Added highlighting rows with updated values in the Watch window. 2012-09-05 15:21:38 -07:00
Paul Kulchenko
543c0d7fad Added 'Add Watch Expression' and 'Evaluate in Console' context menu items in the editor. 2012-09-05 15:19:30 -07:00
Paul Kulchenko
cfd0d98270 Added handling of canceling editing in adding a watch. 2012-09-05 15:15:45 -07:00
Paul Kulchenko
e802e38dc2 Fixed Cut/Copy menu items to reflect proper status in the editor. 2012-09-05 11:34:28 -07:00
Paul Kulchenko
ac566de0ba Fixed typo in the static analyzer output 2012-09-04 16:31:17 -07:00
190 changed files with 23501 additions and 10487 deletions

View File

@@ -1,5 +1,427 @@
# ZeroBrane Studio Changelog
## v0.37 (May 09 2013)
### Special thanks
- To Samuel Dionne-Riel for wxwidgets 2.8 compatibility updates.
- To Mat Hopwood for assistance with Marmalade Quick integration.
### Highlights
- Added Marmalade Quick auto-complete support and API documentation.
- Added full Marmalade Quick debugging support (requires Quick 1.1+).
- Improved Find/Replace behavior and functionality.
- Added Recent File history navigation.
- Added Preferences menu to simplify access to system/user settings.
### Improvements
- Added Preferences menu to simplify access to system/user settings.
- Added Russian translation for Find/Replace dialog and (ref #70).
- Added Russian translation for the Preferences menu (ref #70).
- Added 'shaking' Find/Replace window when text is not found (closes #146).
- Added 'wlua' to the list of recognized Lua extensions.
- Added disabling Recent Files menu if the list is empty.
- Added TomorrowContrast color scheme (thanks to Sergey Lerg).
- Added detaching a child process to avoid crash when exiting during debugging.
- Added Recent File history navigation (closes #66).
- Added Marmalade auto-complete support and API documentation.
- Added processing of `runonstart` when using remote debugging (closes #138).
- Added suggesting proper extension after 'Save/Save As' based on current spec.
- Added translation setup for Find/Replace dialog (closes #133).
- Added `nomousezoom` option to disable zoom with mouse wheel in the editor.
- Added selecting text and Cmd-F shortcut in Find dialog on OSX (ref #127).
- Improved file activation when debugging is started (closes #137).
- Reduced the minimum size of the Output/Console panel.
- Refactored Recent Files history to make it faster and simpler.
- Refactored and optimized directory scanning when loading IDE files.
- Separated settings for function dropdown and project tree fonts (fixes #148).
- Updated documentation about default EOL on OSX (ref #102).
- Updated highlighting in Watch windows to not use editor styles.
- Updated documentation for user settings (ref #113, #55).
- Updated Monokai color scheme to fix current line color.
### Incompatibilities
- (dev) `FileSysGet` has been replaced with `FileSysGetRecursive` with a different signature.
### Fixes
- Fixed hiding all panels when switching to Full Screen mode.
- Fixed loading a non-existing file.
- Fixed activation of non-existing files/folders in the Project tree.
- Fixed search results for lines without newline.
- Fixed Find/Replace in folders with Unicode names (fixes #147); improved performance.
- Fixed Un/Comment commands executed for empty lines.
- Fixed fold/unfold for files starting with block/comment.
- Fixed history after activating non-existing file in Recent Files.
- Fixed scrolling to restored cursor position on OSX (when `usewrap` = false).
- Fixed Find/Replace dialog to take Enter on OSX (fixes #140).
- Fixed 'breaking' after executing OUT command that never reaches the target level.
- Fixed stopping at a breakpoint at the initial line when `startwith` option is specified.
- Fixed activation of a file loaded into active tab.
- Fixed incorrect tab activation on OSX after using 'Open File'.
- Fixed editor activation when file is loaded into an existing tab.
- Fixed an error after opening non-existing file from 'Recent Files'.
- Fixed blocking on reading app output without processing other events.
- Fixed an issue with duplicate lines shown in the editor.
- Fixed 'Replace All' to take 'Wrap Around' into account (fixes #132).
- Fixed off-by-one error in searching consecutive matches.
- Fixed 'Quick Find' not working without current selection (fixes #131).
- Fixed looping in auto-complete on mistyped class (fixes #130).
- Fixed compatibility with wx2.8 (thanks to Samuel Dionne-Riel; closes #128).
- Fixed replacement logic in Find/Replace that could replace selected fragment (ref #127).
- Fixed an error caused by allowing multiple Search/Replace windows (fixes #127).
## v0.361 (Apr 12 2013)
### Improvements
- Added handling of Ctrl-Home and Ctrl-End on OSX (ref #89).
- Added line copy/cut for Ctrl-C/Ctrl-X with no selection.
- Updated About screen to be more configurable and flexible.
- Updated Russian translation (thanks to toiffel).
### Fixes
- Fixed launch command for Corona debugging on Windows.
- Fixed 'control' check on OSX that changed with wx2.9.2+ (ref #89).
- Fixed wrong tab activated on OSX after using New file in some cases.
- Fixed cursor not being visible in some cases after file is loaded (ref #116).
## v0.36 (Apr 08 2013)
### Highlights
- Added 32bit and 64bit **Linux binaries**.
- Enabled **full debugging for Corona on OSX**.
- Improved **debugger performance**.
- Improved **performance of tab and project switching**.
- Added **multiple selection and multi-cursor editing**.
- Made Stack and Watch windows dockable and toggleable.
### Special thanks
- To toiffel for build improvements and continuous work on wxwidgets 2.9 and Linux support.
- To Marcel van Herk for testing and feedback on Stack and Watch windows behavior.
- To Leo Bartoloni for Italian translation update.
- To Fringale for updated French translation.
- To neomantra for adding cdata processing in the serializer.
### Improvements
- Added handling of case-insensitive filenames on OSX.
- Added cdata processing (thanks to neomantra).
- Added universal binaries for luasocket on OSX to allow debugging of 64bit applications (for example, LuaJIT) on OSX.
- Added update of Stack and Watch windows after 'Debugging suspended' message.
- Added toggling for View menu items.
- Added auto-show/hide Stack and Watch windows during debugging (closes #110).
- Added ignoring `-psn...` parameter on OSX when reading file names from command line.
- Added migration of configuration file on Windows (helps #89).
- Added check for different spellings of the same folder in the project tree.
- Added scripts to install build prerequisites on Linux (helps #89).
- Added linux binaries with support for x86 and x64 (helps #89).
- Added window list button to the notepad with editor tabs.
- Added centering of current line during debugging.
- Added multiple selection and multi-cursor editing (wx2.9.5+).
- Added dll proxy to make LfW libraries to work with the IDE.
- Disabled showing 'value' in auto-complete after 'a:' (helps #101).
- Enabled full debugging for Corona on OSX.
- Improved debugging performance.
- Improved performance of tab switching and project tree population.
- Improved handling of upvalues with __tostring method in the Stack window.
- Increased default font size for OSX; set 'Monaco' as default font (helps #89).
- Made stack and watch windows dockable (closes #103).
- Optimized project switching and added notebook freezing where possible (ref #89).
- Reduced flicker in the project tree when a file is opened (ref #89).
- Removed binary libraries not currently used.
- Set 'Courier New' as the default font on Linux (ref #89).
- Switched to 'native' menu on OSX and added 24x24 icons required (helps #89).
- Updated Italian translation (thanks to Leo Bartoloni)
- Updated 'method' type in auto-complete to only allow a:b syntax (closes #101).
- Updated language files (es, it, ru) with new messages (ref #70).
- Updated French translation with latest string changes, fixed a few typos (thanks to Fringale).
- Updated Stack and Watch window to not refresh when not visible.
- Upgraded Mobdebug (0.5222) to add serialization with metamethods and notification on incomplete output (closes #109).
- Updated error messages from loading configuration files.
- Updated Linux binaries to use libpng 1.6 with wxwidgets (helps #89).
- Updated Windows/OSX build files to only build components needed (helps #89).
- Updated windows executable to show properly scaled icons in the Explorer.
- Updated status bar to use no border around fields.
- Updated large icons for "native" toolbar on OSX (helps #89).
- Updated function call indicator to use round box with wxwidgets upgrade (helps #89).
- Updated handling of markdown styles to make it more robust (fixes #59).
- Updated README with Marmalade Quick support and Corona tutorial.
### Incompatibilities
- Configuration file (.ini) location has changed on Windows. The current file will be copied to the new location.
- The debugger now stops on the next executable line after `.start()` call.
### Fixes
- Fixed activating files in the project tree on a case insensitive system.
- Fixed the Stack view being partially hidden when the root item is too wide (ref #110).
- Fixed left side of the project panel being hidden when a file is activated (fixes #122).
- Fixed breakpoint not firing on the first executable line in debugging (helps #121).
- Fixed terminating debugging of an empty script.
- Fixed reporting of initial line during debugging.
- Fixed editor tab activation after closing another tab on Linux (ref #89).
- Fixed 'Show tooltip' shortcut not working on Linux (fixes #118; ref #89).
- Fixed cursor position being incorrectly restored (fixes #116; ref #89).
- Fixed a warning about empty project directory in local console.
- Fixed an issue with Enter used to select an item in project dropdown (ref #89).
- Fixed an issue with the Project tree when project and app directories are the same.
- Fixed debugger output not being suppressed on Linux and using wlua.
- Fixed a static analyzer issue with anonymous functions defined in expressions (fixes #3).
## v0.35 (Feb 10 2013)
### Highlights
- Added support for **debugging Lua 5.2 scripts**.
- Added support for **cross-platform remote debugging**.
- Added support for starting Gideros **on-device debugging**.
- Added support for live coding, script reloading, and coroutine debugging under LuaJIT.
- Added **Marmalade Quick** support.
- Added **live-coding for Corona** interpreter.
- Added editor tab popup menu with 'Close All', 'Close Other', and other items.
### Special thanks
- To Roland Yonaba and Fringale for updates to French translation.
- To Fringale for enhanced line-endings handling.
- To toiffel for build improvements, continuous work on wxwidgets 2.9 support, and several patches.
- To Andy Bower for the stream of feedback on live coding and on-device debugging.
### Improvements
- Added `debugger.runonstart` option to configure if debugging should run immediately after starting.
- Added `editor.checkeol` option to configure checking for eol encoding in loaded files.
- Added Marmalade Quick support.
- Added support for starting Gideros on-device debugging.
- Added requesting user attention when stopped during debugging.
- Added example for `defaulteol` configuration option.
- Added configuration option for compact folding (`editor.`).
- Added support for cross-platform remote debugging.
- Added support for script reloading and coroutine debugging under LuaJIT (MobDebug 0.514).
- Added Russian translation for new messages.
- Added handling of malformed UTF8 characters in files (fixes #97).
- Added support for debugging Lua 5.2 scripts.
- Added workaround for Moai require path issue (fixes #96; fixes #87).
- Added editor tab popup menu with 'Close All', 'Close Other', and other items.
- Added C/CPP specification file and a configuration example.
- Added XCode-like key mapping.
- Added removing of file: prefix and url decoding of filepaths (helps #89).
- Added a workaround for returning incorrect project folder (helps #89).
- Adjusted handling of filepath to work with relative and absolute paths (helps #89).
- Enabled live-coding for Corona interpreter.
- Improved line-endings handling (Fringale).
- Improved reporting of stack and serialization run-time errors.
- Updated Gideros interpreter to run debugging immediately after starting; Use `debugger.runonstart = false` to disable.
- Updated Linux startup script to use online versions of wxlua packages (deb files).
- Updated handling of file: prefix as it's different on Windows and OSX (helps #89).
- Updated messages in the starter script.
- Updated function call parsing to recognize "func{}" and "func''" syntax.
- Updated os.exit() call in local console to exit gracefully.
- Updated French translation with various fixes and tweaks (Fringale).
- Updated French translation with newly added strings (Fringale).
- Updated 'Close page' and its translations.
- Updated configuration examples and documentation (helps #55).
- Updated the size of the function list dropdown on Windows (helps #89).
- Typos fixes, small changes in French translation (Roland Yonaba).
### Incompatibilities
- Gideros debugging is changed to start immediately; use `debugger.runonstart = false` to disable.
- Removed mosync support from the debugger into a separate module.
- Added mixed end-of-line reporting; use `editor.checkeol = false` to disable.
- Added reporting of malformed UTF-8.
### Fixes
- Fixed a rare crash on OSX when closing IDE with an application running under debugger.
- Fixed path handling for metalua to avoid conflicts with other modules that may include lexer.lua file.
- Fixed executing commands in the Remote console immediately after `mobdebug.start()` (closes #100).
- Fixed invalid escape sequence that fails under LuaJIT.
- Fixed an issue with spec files when a separator (sep) is not specified.
## v0.34 (Dec 12 2012)
### Highlights
- Added **internationalization** support (with Russian, Italian, Spanish, and French translations).
- Added **key binding** configuration for menu and toolbar items.
- Added **Corona SDK integration** with debugging and auto-complete.
- Added **Moai scratchpad support**.
- Added **color scheme support** with several schemes included.
- Added **GSL-shell support**.
- Added ability to pause and resume scratchpad.
### Special thanks
- To Srdjan Markovic for Corona auto-complete support and Zenburn color scheme.
- To Roland Yonaba for French translation.
- To Leo Bartoloni for Italian translation.
- To Inigo Sola for Spanish translation.
- To toiffel for Russian translation and several patches.
- To Fringale for spec and API files cleanup and update for Lua 5.2.
- To Marcel van Herk for assistance with scratchpad break/resume functionality.
### Improvements
- Added an option to specify the width of the calltip.
- Added showing short descriptions in tooltip for functions without lib/package.
- Added 'Project Directory' menu.
- Added ability to pause scratchpad when the script is completed (closes #83).
- Added ability to pause and resume scratchpad.
- Added GSL-shell support (closes #72).
- Added more color schemes (Solarized and Monokai).
- Added customized yield function for debugging (MobDebug v0.508; closes #81).
- Added proper hiding of current line marker during debugging (except when tracing).
- Added Corona auto-complete support (thanks to Srdjan Markovic).
- Added logic to show application windows without explicitly listing their class (closes #80); Windows only.
- Added Moai scratchpad support.
- Added missing constants to Moai API.
- Added setting focus on the window when a file is loaded in the existing instance.
- Added two more wxwindow window classes to the list of windows to show (Windows).
- Added scheme picker script to test color schemes from the IDE.
- Added Zenburn as a color scheme.
- Added styling for markers and Output/Console windows.
- Added Italian translation (thanks to Leo Bartoloni).
- Added Spanish translation (thanks to Inigo Sola).
- Added reporting of run-time errors from remote processes (helps #73).
- Added 'tomorrow' color theme.
- Added redirect of remote 'print' commands for Gideros applications.
- Added check for 'main.lua' in Corona projects.
- Added ability to suspend a running application even when there is no editor tab or file to activate.
- Added serialization of remote 'print' results and an output filter for debugging (helps #73).
- Added redirect of remote 'print' commands to the Output window in the IDE (helps #73).
- Added Corona SDK support (closes #73).
- Added French translation (thanks to Roland Yonaba).
- Added (more) verbose output to debugger to assist in troubleshooting.
- Added handling of LUA_DEV to make loading Lua for Windows libraries working out of the box (fixes #71).
- Added internationalization support (closes #70).
- Added notes about estrela being gone and compatibility.
- Added multi-tab support for scratchpad.
- Added documentation on accelerator/shortcut syntax.
- Added key map to change key binding for menu and toolbar items from a config file (closes #64).
- Added hiding IDE while closing and saving configuration.
- Completed reorganization of front-end processing (closes #67 and #5).
- Disabled editor autoactivation during debugging when tracing is on.
- Disabled functions that are not available under Corona on OSX (helps #73).
- Disabled showing auto-complete when the only option is already typed.
- Disabled showing a calltip on mouse over when it's already active.
- Extended list of default folders for interpreters where executables are searched for.
- Finished Russian translation.
- Limited auto-showing windows to Lua interpreter only (related to #80).
- Removed window types from config as they are no longer needed to be listed.
- Switched to showing short tooltips by default as some of the updated Lua API descriptions are very long.
- Updated descriptions for io.* functions; moved file:* functions to a pseudo library (f); helps #84.
- Updated LICENSE to add remdebug license information.
- Updated tooltip to show shortened descriptions on mouse-over.
- Updated spec and API files for Lua 5.2 (thanks to Fringale).
- Updated MobDebug to v0.507 to fix serialization issues (closes #77).
- Updated style processing to support styling of markup and allow dynamic switching of color schemes.
- Updated Lua keyword definitions to improve grouping for styling (closes #79).
- Updated love2d api to an updated version as of 11/1/2012 (fixes #78).
### Incompatibilities
- The default port in the debugger has been changed from 8171 to 8172 to avoid conflicts with existing RemDebug implementations.
### Fixes
- Fixed an issue with overlapping auto-complete suggestions.
- Fixed auto-complete not working after closed brackets.
- Fixed tooltip being shown when mouse moving outside of the editor area.
- Fixed a font zooming bug with Ctrl+MouseWheel.
- Fixed file marking in the project tree after opening a new file.
- Fixed an issue with breakpoints not available after aborting tracing on Linux/OSX.
- Fixed an issue with running scratchpad when entry points are configured.
- Fixed Linux launcher to pass filename parameter to the IDE.
- Fixed fold style to properly set background color.
- Fixed an issue with a config file being loaded into the editor when specified in the command line.
- Fixed an issue with markdown formatting not working after setting styles from a config file (fixes #74).
## v0.33 (Oct 22 2012)
### Highlights
- Added **Linux support**.
- Added **Moai auto-complete**.
- Added **Gideros debugging, auto-complete, and live coding**.
- Added **syntax aware indentation**.
- Added **re/storing open files and interpreter** when switching project folders.
### Special thanks
- To Andy Bower and Atilim Cetin for their assistance with Gideros integration and live coding.
- To toiffel for Linux/OSX/Windows CMake-based launcher build.
- To Christoph Kubisch for help with Estrela merge.
### Improvements
- Added configuration option to specify hostname when the default one is not reachable (fixes #68).
- Added search for Moai and Love2d executables in default locations on OSX and Windows.
- Added handling of command line parameters on OSX and Linux; updated documentation.
- Added auto-recovery to save/restore editor content (fixes #23).
- Added syntax aware indentation.
- Added re/storing open files and interpreter when switching project folders.
- Added auto-activation of files requested during debugging.
- Added editor.autoactivate parameter (false by default) to enable activation.
- Added zbstudio.sh script to run on OSX/Linux; updated permissions (closes #15).
- Added variable ratio for sliders in scratchpad.
- Added Linux/OSX/Windows CMake-based launcher build (thanks to toiffel).
- Added configuration parameter for the number of characters typed before displaying auto-complete suggestions for dynamic words.
- Added proper closing of the application after Shutdown/Logoff events (fixes #57).
- Added Moai auto-complete (closes #52).
- Added hiding auto-complete suggestions on losing focus in the editor.
- Added proper reporting of errors in the stack window.
- Added wxlua.deb file and install script that pull and build all required dependencies on Linux (covers most of #15).
- Added osx executables and build files.
- Added disabling full screen mode when the last editor tab is closed.
- Added proper reporting of errors in config files.
- Added toggling folders in project pane by single click (fixes #41).
- Added examples for configuring tabs and moai entry points.
- Added reporting compilation success rate (fixes #39)
- Added shortcuts for adding and removing watches.
- Added highlighting rows with updated values in the Watch window.
- Added 'Add Watch Expression' and 'Evaluate in Console' context menu items in the editor.
- Added handling of canceling editing in adding a watch.
- Added Gideros auto-complete and live coding support (closes #62).
- Added Gideros integration on OSX; added search for gideros in default locations on Windows and OSX.
- Added Gideros integration and debugging support.
- Added debugging-related buttons to the toolbar.
- Improved reporting of compilation and run-time errors when running as scratchpad.
- Made debugger strict.lua and LuaJIT friendly (upgraded to MobDebug v0.502).
- Updated configuration example to avoid using ide.spec that is not available (fixes #67).
- Updated CMake build script to handle wildcards in the MANIFEST.
- Updated configuring toolbar size to improve Linux compatibility.
- Updated MobDebug to v0.497 to fix issues and improve performance.
- Updated a warning message about single instance communication.
- Updated cpath processing to allow Linux version to run side-by-side with Windows and Mac.
- Updated licensing information.
- Enabled scratchpad support in the debugger when interpreter is capable of providing it.
- Disabled auto-complete in comments and strings.
- Disabled toggling breakpoints while debugger is running (as they wouldn't be changed anyway).
- Disabled 'not activated file for debugging' message when auto-activation is disabled.
- Disabled tooltip when scratchpad is on (fixes #51).
- Disabled showing calltip when the editor is not in focus.
- Disabled showing calltip over markup in comments.
- Disabled 'Run as Scratchpad' in the menu for those intepreters that don't support scratchpad.
- Updated configuration examples to add editor settings and fix user.lua path.
- Moved all Estrela features into a separate bundle that can be loaded using cfg/estrela.lua config.
- Removed multiple file types offered in Save As dialog.
### Incompatibilities
- Changed searching for user config in '$HOME/.zbstudio' from '$HOME/.zbs'.
- Temporarily removed the ability to modify spec-related configuration parameters from configuration files.
### Fixes
- Fixed opening a non-existing file from the Recent Files list.
- Fixed Find/Replace dialog checkboxes that didn't react to clicks on OSX (fixes #63).
- Fixed an auto-complete issue with mixed case dynamic words (fixes #60).
- Fixed 'Trying to solve a NULL hostname' warning message.
- Fixed a typo that prevented a corner case in autocomplete from working.
- Fixed inconsistent error messages about various config files.
- Fixed an issue with auto-complete when dot or colon is used (fixes #56).
- Fixed an issue with debugging scripts started using absolute file path.
- Fixed setting working directory for interpreters to the file path when the project directory is not set.
- Fixed an issue with Backspace not closing auto-complete suggestions.
- Fixed enabling items in the Edit menu (fixes #56).
- Fixed function list in the toolbar on Mac (helps #14).
- Fixed deleting of comment blocks with hidden markup (fixes #40).
- Fixed an issue with function list when all editor tabs are closed.
- Fixed multiple calltips shown on Linux (helps #15).
- Fixed an issue with mouse cursor in scratchpad not properly updated on Linux (fixes #49; helps #15).
- Fixed an issue with static analyzer that failes on function names like a.b.c (fixes #50).
- Fixed disabling Paste menu on Linux when needed (fixes #46; helps #15).
- Fixed an issue with context menu on Linux (fixes #47; helps #15).
- Fixed debugger failure when debugging is initiated externally and there is an unsaved file in one of editor tabs.
- Fixed stopping the debugger when an editor tab where debugging happens is closed.
- Fixed enabling of several menu items with no editor tab (fixes #42).
- Fixed an issue with loading stock icons on Linux.
- Fixed Cut/Copy menu items to reflect proper status in the editor.
- Fixed typo in the static analyzer output.
- Resolved conflict between lua executable names on Windows and Mac.
## v0.32 (Sep 03 2012)
### Highlights

28
LICENSE
View File

@@ -49,7 +49,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--[[ wxLua License License ]]----------------------------------------------
--[[ wxLua License ]]------------------------------------------------------
http://wxlua.sourceforge.net/
@@ -61,7 +61,7 @@ Original wxLua Lua sample IDE:
luascript at thersgb.net
wxLua is based on
wxWindows Library Licence, Version 3
wxWindows Library License, Version 3
Copyright (c) 1998 Julian Smart, Robert Roebling et al
@@ -178,7 +178,29 @@ output file generation.
MobDebug sources are released under the MIT License
Copyright (c) 2011 Paul Kulchenko (paul@kulchenko.com)
Copyright (c) 2011-2012 Paul Kulchenko (paul@kulchenko.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--[[ RemDebug License ]]---------------------------------------------------
Copyright (c) 2006 The Kepler Project.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,70 +1,64 @@
# Project Description
A simple and extensible Lua IDE and debugger. It supports multiple file
formats, "api" for autocompletion and tooltips, and custom command-line
tools. Its main focus is extensibility for target applications using Lua.
[ZeroBrane Studio](http://studio.zerobrane.com/) is a lightweight Lua IDE with code completion, syntax
highlighting, remote debugger, code analyzer, live coding, and debugging
support for several Lua engines (LuaJIT, Löve 2D, Moai, Gideros, Corona, Marmalade Quick,
MobileLua, GSL-shell, and others). It originated from the [Estrela Editor](http://www.luxinia.de/index.php/Estrela/).
## Features
* Written in Lua, so easily customizable
* Automatically loads several 'plugin' like classes
- applications: overall control of applications settings
- specs (spec/): file syntax, lexer, keywords
- apis (api/): for code-completion and tool-tips
- interpreters (interpreters/): how a project is run
- config (cfg/): contains style and basic editor settings
- tools (tools/): additional tools, e.g. cg compiler, dx fxc compiler
* Auto-completion for functions, keywords...
* Function tips
* Function list in file (quick jump to)
* Function call highlighting
* Bracket matching/highlighting
* Project file browser
* Experimental type/class guessing for auto-completion
* Support for different editor styles
* Console to directly test code snippets with local and remote execution
* Integrated debugger (with support for local and remote debugging)
* Written in Lua, so easily customizable.
* Small, portable, and cross-platform (Windows, Mac OSX, and Linux).
* Auto-completion for functions, keywords, and custom APIs.
* Interactive console to directly test code snippets with local and remote execution.
* Integrated debugger (with support for local and remote debugging).
* Live coding with Lua ([demo](http://notebook.kulchenko.com/zerobrane/live-coding-in-lua-bret-victor-style)), Löve 2D ([demo](http://notebook.kulchenko.com/zerobrane/live-coding-with-love)), Gideros ([demo](http://notebook.kulchenko.com/zerobrane/gideros-live-coding-with-zerobrane-studio-ide)), Moai ([demo](http://notebook.kulchenko.com/zerobrane/live-coding-with-moai-and-zerobrane-studio)), and Corona SDK ([demo](http://notebook.kulchenko.com/zerobrane/debugging-and-live-coding-with-corona-sdk-applications-and-zerobrane-studio)).
* Support for plugin-like components:
- specs (spec/): file syntax, lexer, keywords (e.g. glsl);
- apis (api/): for code-completion and tool-tips;
- interpreters (interpreters/): how a project is run;
- config (cfg/): contains style and basic editor settings;
- tools (tools/): additional tools (e.g. DirectX/Cg shader compiler...).
## Frontends
## Screenshot
There is currently two front-ends using the same editor engine. The original
one is `Estrela`, which has a focus on 3d graphics related usage of Lua,
especially in combination with the luxinia engine or luxinia2 framework.
The second front-end is `ZeroBrane Studio` (zbstudio) which has a focus
on using Lua in education, mobile development, and robotics.
Both are part of the standard distribution.
## Installation
```bash
$ git clone git://github.com/pkulchenko/ZeroBraneStudio.git zbstudio
or
$ git clone git://estrelaeditor.git.sourceforge.net/gitroot/estrelaeditor/estrelaeditor estrelaeditor
```
![ZeroBrane Studio debugger screenshot](http://studio.zerobrane.com/images/debugging.png)
## Usage
```
Open File(s):
<exe> <filename> [<filename>...]
Open file(s):
zbstudio <filename> [<filename>...]
any non-option will be treated as filename
Overriding Config:
<exe> [...] -cfg "<luacode overriding config>" [...]
e.g.: zbstudio.exe -cfg "singleinstance=false;" somefile.lua
Overriding default configuration:
zbstudio -cfg "<luacode overriding config>" [<filename>]
e.g.: zbstudio -cfg "editor.fontsize=12" somefile.lua
Loading custom configuration:
zbstudio -cfg config/file.lua [<filename>]
e.g.: zbstudio -cfg cfg/estrela.lua
```
## Author
### Estrela Editor
**Luxinia Dev:** Christoph Kubisch (crazybutcher@luxinia.de)
### ZeroBrane Studio and MobDebug
**ZeroBrane LLC:** Paul Kulchenko (paul@kulchenko.com)
### Estrela Editor
**Luxinia Dev:** Christoph Kubisch (crazybutcher@luxinia.de)
## Where is Estrela?
The projects have been merged and zbstudio will lead the future.
Please reassociate files with zbstudio. To keep your history of files and
projects copy the contents of the `EstrelaEditor.ini` in your HOME directory
to `ZeroBraneStudio.ini`. If you have used Estrela for graphics shader
authoring or luxinia, create/modify the `cfg/user.lua` to include the content
of `cfg/estrela.lua` to load all tools and specifications by default again.
## License
See LICENSE file.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,572 +0,0 @@
--[[// cggl cgGL | Cg OpenGL runtime
typedef unsigned int GLuint;
typedef unsigned int GLenum;
typedef void GLvoid;
typedef int GLsizei;
typedef int GLint;
typedef enum
{
CG_GL_MATRIX_IDENTITY = 0,
CG_GL_MATRIX_TRANSPOSE = 1,
CG_GL_MATRIX_INVERSE = 2,
CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
CG_GL_MODELVIEW_MATRIX = 4,
CG_GL_PROJECTION_MATRIX = 5,
CG_GL_TEXTURE_MATRIX = 6,
CG_GL_MODELVIEW_PROJECTION_MATRIX = 7,
CG_GL_VERTEX = 8,
CG_GL_FRAGMENT = 9,
CG_GL_GEOMETRY = 10,
CG_GL_TESSELLATION_CONTROL = 11,
CG_GL_TESSELLATION_EVALUATION = 12
} CGGLenum;
CGbool cgGLIsProfileSupported(CGprofile profile);
void cgGLEnableProfile(CGprofile profile);
void cgGLDisableProfile(CGprofile profile);
CGprofile cgGLGetLatestProfile(CGGLenum profile_type);
void cgGLSetOptimalOptions(CGprofile profile);
char const ** cgGLGetOptimalOptions(CGprofile profile);
void cgGLLoadProgram(CGprogram program);
void cgGLUnloadProgram(CGprogram program);
CGbool cgGLIsProgramLoaded(CGprogram program);
void cgGLBindProgram(CGprogram program);
void cgGLUnbindProgram(CGprofile profile);
GLuint cgGLGetProgramID(CGprogram program);
void cgGLSetParameter1f(CGparameter param, float x);
void cgGLSetParameter2f(CGparameter param, float x, float y);
void cgGLSetParameter3f(CGparameter param, float x, float y, float z);
void cgGLSetParameter4f(CGparameter param, float x, float y, float z, float w);
void cgGLSetParameter1fv(CGparameter param, const float *v);
void cgGLSetParameter2fv(CGparameter param, const float *v);
void cgGLSetParameter3fv(CGparameter param, const float *v);
void cgGLSetParameter4fv(CGparameter param, const float *v);
void cgGLSetParameter1d(CGparameter param, double x);
void cgGLSetParameter2d(CGparameter param, double x, double y);
void cgGLSetParameter3d(CGparameter param, double x, double y, double z);
void cgGLSetParameter4d(CGparameter param, double x, double y, double z, double w);
void cgGLSetParameter1dv(CGparameter param, const double *v);
void cgGLSetParameter2dv(CGparameter param, const double *v);
void cgGLSetParameter3dv(CGparameter param, const double *v);
void cgGLSetParameter4dv(CGparameter param, const double *v);
void cgGLGetParameter1f(CGparameter param, float *v);
void cgGLGetParameter2f(CGparameter param, float *v);
void cgGLGetParameter3f(CGparameter param, float *v);
void cgGLGetParameter4f(CGparameter param, float *v);
void cgGLGetParameter1d(CGparameter param, double *v);
void cgGLGetParameter2d(CGparameter param, double *v);
void cgGLGetParameter3d(CGparameter param, double *v);
void cgGLGetParameter4d(CGparameter param, double *v);
void cgGLSetParameterArray1f(CGparameter param, long offset, long nelements, const float *v);
void cgGLSetParameterArray2f(CGparameter param, long offset, long nelements, const float *v);
void cgGLSetParameterArray3f(CGparameter param, long offset, long nelements, const float *v);
void cgGLSetParameterArray4f(CGparameter param, long offset, long nelements, const float *v);
void cgGLSetParameterArray1d(CGparameter param, long offset, long nelements, const double *v);
void cgGLSetParameterArray2d(CGparameter param, long offset, long nelements, const double *v);
void cgGLSetParameterArray3d(CGparameter param, long offset, long nelements, const double *v);
void cgGLSetParameterArray4d(CGparameter param, long offset, long nelements, const double *v);
void cgGLGetParameterArray1f(CGparameter param, long offset, long nelements, float *v);
void cgGLGetParameterArray2f(CGparameter param, long offset, long nelements, float *v);
void cgGLGetParameterArray3f(CGparameter param, long offset, long nelements, float *v);
void cgGLGetParameterArray4f(CGparameter param, long offset, long nelements, float *v);
void cgGLGetParameterArray1d(CGparameter param, long offset, long nelements, double *v);
void cgGLGetParameterArray2d(CGparameter param, long offset, long nelements, double *v);
void cgGLGetParameterArray3d(CGparameter param, long offset, long nelements, double *v);
void cgGLGetParameterArray4d(CGparameter param, long offset, long nelements, double *v);
void cgGLSetParameterPointer(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
void cgGLEnableClientState(CGparameter param);
void cgGLDisableClientState(CGparameter param);
void cgGLSetMatrixParameterdr(CGparameter param, const double *matrix);
void cgGLSetMatrixParameterfr(CGparameter param, const float *matrix);
void cgGLSetMatrixParameterdc(CGparameter param, const double *matrix);
void cgGLSetMatrixParameterfc(CGparameter param, const float *matrix);
void cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
void cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
void cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
void cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
void cgGLSetStateMatrixParameter(CGparameter param, CGGLenum matrix, CGGLenum transform);
void cgGLSetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, const float *matrices);
void cgGLSetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, const float *matrices);
void cgGLSetMatrixParameterArraydc(CGparameter param, long offset, long nelements, const double *matrices);
void cgGLSetMatrixParameterArraydr(CGparameter param, long offset, long nelements, const double *matrices);
void cgGLGetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, float *matrices);
void cgGLGetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, float *matrices);
void cgGLGetMatrixParameterArraydc(CGparameter param, long offset, long nelements, double *matrices);
void cgGLGetMatrixParameterArraydr(CGparameter param, long offset, long nelements, double *matrices);
void cgGLSetTextureParameter(CGparameter param, GLuint texobj);
GLuint cgGLGetTextureParameter(CGparameter param);
void cgGLEnableTextureParameter(CGparameter param);
void cgGLDisableTextureParameter(CGparameter param);
GLenum cgGLGetTextureEnum(CGparameter param);
void cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
CGbool cgGLGetManageTextureParameters(CGcontext ctx);
void cgGLSetupSampler(CGparameter param, GLuint texobj);
void cgGLRegisterStates(CGcontext ctx);
void cgGLEnableProgramProfiles(CGprogram program);
void cgGLDisableProgramProfiles(CGprogram program);
void cgGLSetDebugMode(CGbool debug);
CGbuffer cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
GLuint cgGLGetBufferObject(CGbuffer buffer);
]]
--auto-generated api from ffi headers
local api =
{
["CGGLenum"] = { type ='value', description = "", valuetype = nil, },
["CG_GL_MATRIX_IDENTITY"] = { type ='value', },
["CG_GL_MATRIX_TRANSPOSE"] = { type ='value', },
["CG_GL_MATRIX_INVERSE"] = { type ='value', },
["CG_GL_MATRIX_INVERSE_TRANSPOSE"] = { type ='value', },
["CG_GL_MODELVIEW_MATRIX"] = { type ='value', },
["CG_GL_PROJECTION_MATRIX"] = { type ='value', },
["CG_GL_TEXTURE_MATRIX"] = { type ='value', },
["CG_GL_MODELVIEW_PROJECTION_MATRIX"] = { type ='value', },
["CG_GL_VERTEX"] = { type ='value', },
["CG_GL_FRAGMENT"] = { type ='value', },
["CG_GL_GEOMETRY"] = { type ='value', },
["CG_GL_TESSELLATION_CONTROL"] = { type ='value', },
["CG_GL_TESSELLATION_EVALUATION"] = { type ='value', },
["cgGLIsProfileSupported"] = { type ='function',
description = "",
returns = "(CGbool)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLEnableProfile"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLDisableProfile"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLGetLatestProfile"] = { type ='function',
description = "",
returns = "(CGprofile)",
valuetype = nil,
args = "(CGGLenum profile_type)", },
["cgGLSetOptimalOptions"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLGetOptimalOptions"] = { type ='function',
description = "",
returns = "(char const **)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLLoadProgram"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLUnloadProgram"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLIsProgramLoaded"] = { type ='function',
description = "",
returns = "(CGbool)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLBindProgram"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLUnbindProgram"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprofile profile)", },
["cgGLGetProgramID"] = { type ='function',
description = "",
returns = "(GLuint)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLSetParameter1f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float x)", },
["cgGLSetParameter2f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float x, float y)", },
["cgGLSetParameter3f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float x, float y, float z)", },
["cgGLSetParameter4f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float x, float y, float z, float w)", },
["cgGLSetParameter1fv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *v)", },
["cgGLSetParameter2fv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *v)", },
["cgGLSetParameter3fv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *v)", },
["cgGLSetParameter4fv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *v)", },
["cgGLSetParameter1d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double x)", },
["cgGLSetParameter2d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double x, double y)", },
["cgGLSetParameter3d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double x, double y, double z)", },
["cgGLSetParameter4d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double x, double y, double z, double w)", },
["cgGLSetParameter1dv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *v)", },
["cgGLSetParameter2dv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *v)", },
["cgGLSetParameter3dv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *v)", },
["cgGLSetParameter4dv"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *v)", },
["cgGLGetParameter1f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *v)", },
["cgGLGetParameter2f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *v)", },
["cgGLGetParameter3f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *v)", },
["cgGLGetParameter4f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *v)", },
["cgGLGetParameter1d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *v)", },
["cgGLGetParameter2d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *v)", },
["cgGLGetParameter3d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *v)", },
["cgGLGetParameter4d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *v)", },
["cgGLSetParameterArray1f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *v)", },
["cgGLSetParameterArray2f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *v)", },
["cgGLSetParameterArray3f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *v)", },
["cgGLSetParameterArray4f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *v)", },
["cgGLSetParameterArray1d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *v)", },
["cgGLSetParameterArray2d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *v)", },
["cgGLSetParameterArray3d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *v)", },
["cgGLSetParameterArray4d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *v)", },
["cgGLGetParameterArray1f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *v)", },
["cgGLGetParameterArray2f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *v)", },
["cgGLGetParameterArray3f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *v)", },
["cgGLGetParameterArray4f"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *v)", },
["cgGLGetParameterArray1d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *v)", },
["cgGLGetParameterArray2d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *v)", },
["cgGLGetParameterArray3d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *v)", },
["cgGLGetParameterArray4d"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *v)", },
["cgGLSetParameterPointer"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer)", },
["cgGLEnableClientState"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLDisableClientState"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLSetMatrixParameterdr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *matrix)", },
["cgGLSetMatrixParameterfr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *matrix)", },
["cgGLSetMatrixParameterdc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const double *matrix)", },
["cgGLSetMatrixParameterfc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, const float *matrix)", },
["cgGLGetMatrixParameterdr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *matrix)", },
["cgGLGetMatrixParameterfr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *matrix)", },
["cgGLGetMatrixParameterdc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, double *matrix)", },
["cgGLGetMatrixParameterfc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, float *matrix)", },
["cgGLSetStateMatrixParameter"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, CGGLenum matrix, CGGLenum transform)", },
["cgGLSetMatrixParameterArrayfc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *matrices)", },
["cgGLSetMatrixParameterArrayfr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const float *matrices)", },
["cgGLSetMatrixParameterArraydc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *matrices)", },
["cgGLSetMatrixParameterArraydr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, const double *matrices)", },
["cgGLGetMatrixParameterArrayfc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *matrices)", },
["cgGLGetMatrixParameterArrayfr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, float *matrices)", },
["cgGLGetMatrixParameterArraydc"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *matrices)", },
["cgGLGetMatrixParameterArraydr"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, long offset, long nelements, double *matrices)", },
["cgGLSetTextureParameter"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, GLuint texobj)", },
["cgGLGetTextureParameter"] = { type ='function',
description = "",
returns = "(GLuint)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLEnableTextureParameter"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLDisableTextureParameter"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLGetTextureEnum"] = { type ='function',
description = "",
returns = "(GLenum)",
valuetype = nil,
args = "(CGparameter param)", },
["cgGLSetManageTextureParameters"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGcontext ctx, CGbool flag)", },
["cgGLGetManageTextureParameters"] = { type ='function',
description = "",
returns = "(CGbool)",
valuetype = nil,
args = "(CGcontext ctx)", },
["cgGLSetupSampler"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGparameter param, GLuint texobj)", },
["cgGLRegisterStates"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGcontext ctx)", },
["cgGLEnableProgramProfiles"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLDisableProgramProfiles"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGprogram program)", },
["cgGLSetDebugMode"] = { type ='function',
description = "",
returns = "(void)",
valuetype = nil,
args = "(CGbool debug)", },
["cgGLCreateBuffer"] = { type ='function',
description = "",
returns = "(CGbuffer)",
valuetype = nil,
args = "(CGcontext context, int size, const void *data, GLenum bufferUsage)", },
["cgGLGetBufferObject"] = { type ='function',
description = "",
returns = "(GLuint)",
valuetype = nil,
args = "(CGbuffer buffer)", },
}
return {
cggl = {
type = 'lib',
description = "Cg OpenGL runtime",
childs = api,
},
cgGL = {
type = 'lib',
description = "Cg OpenGL runtime",
childs = api,
},
}

1510
api/lua/corona.lua Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +0,0 @@
--[[// cugl cuGL | Cuda GL Interop
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws. Users and possessors of this source code
* are hereby granted a nonexclusive, royalty-free license to use this code
* in individual and commercial software.
*
* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
* OR PERFORMANCE OF THIS SOURCE CODE.
*
* U.S. Government End Users. This source code is a "commercial item" as
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
* "commercial computer software" and "commercial computer software
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
* and is provided to the U.S. Government only as a commercial end item.
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
* source code with only those rights set forth herein.
*
* Any use of this source code in individual and commercial software must
* include, in the user documentation and internal comments to the code,
* the above Disclaimer and U.S. Government End Users Notice.
*/
CUresult cuGLCtxCreate_v2(CUcontext *pCtx, unsigned int Flags, CUdevice device );
CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags);
CUresult cuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags);
typedef void* HGPUNV;
CUresult cuWGLGetDevice(CUdevice *pDevice, HGPUNV hGpu);
]]
--auto-generated api from ffi headers
local api =
{
["cuGLCtxCreate_v2"] = { type ='function',
description = "",
returns = "(CUresult)",
valuetype = nil,
args = "(CUcontext *pCtx, unsigned int Flags, CUdevice device)", },
["cuGraphicsGLRegisterBuffer"] = { type ='function',
description = "",
returns = "(CUresult)",
valuetype = nil,
args = "(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags)", },
["cuGraphicsGLRegisterImage"] = { type ='function',
description = "",
returns = "(CUresult)",
valuetype = nil,
args = "(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags)", },
["cuWGLGetDevice"] = { type ='function',
description = "",
returns = "(CUresult)",
valuetype = nil,
args = "(CUdevice *pDevice, HGPUNV hGpu)", },
}
return {
cugl = {
type = 'lib',
description = "Cuda GL Interop",
childs = api,
},
cuGL = {
type = 'lib',
description = "Cuda GL Interop",
childs = api,
},
}

2579
api/lua/gideros.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,37 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
-- converted from love_api.lua (https://love2d.org/forums/viewtopic.php?f=3&t=1796&start=30)
-- (as of Nov 1, 2012)
-- the conversion script is at the bottom of this file
-- there were several manual changes done to the "thread" methods that had
-- incorrect structure (demand, set, and few others)
-- manually removed "linear clamped", "exponent clamped", and "inverse clamped"
-- values as those can't be entered through auto-complete.
local love = {
childs = {
audio = {
childs = {
DistanceModel = {
childs = {
exponent = {
description = "Exponential attenuation.",
type = "value"
},
inverse = {
description = "Inverse distance attenuation.",
type = "value"
},
linear = {
description = "Linear attenuation.",
type = "value"
},
none = {
description = "Sources do not get attenuated.",
type = "value"
}
},
description = "class constants",
type = "class"
},
Source = {
childs = {
getDirection = {
@@ -18,7 +43,7 @@ local love = {
getDistance = {
args = "()",
description = "Returns the reference and maximum distance of the source.",
returns = "(ref: string, max: string)",
returns = "(ref: number, max: number)",
type = "function"
},
getPitch = {
@@ -33,6 +58,12 @@ local love = {
returns = "(x: number, y: number, z: number)",
type = "function"
},
getRolloff = {
args = "()",
description = "Returns the rolloff factor of the source.",
returns = "(rolloff: number)",
type = "function"
},
getVelocity = {
args = "()",
description = "Gets the velocity of the Source.",
@@ -45,6 +76,12 @@ local love = {
returns = "(volume: number)",
type = "function"
},
getVolumeLimits = {
args = "()",
description = "Returns the volume limits of the source.",
returns = "(min: number, max: number)",
type = "function"
},
isLooping = {
args = "()",
description = "Returns whether the Source will loop.",
@@ -105,6 +142,12 @@ local love = {
returns = "()",
type = "function"
},
setDistance = {
args = "(ref: number, max: number)",
description = "Sets the reference and maximum distance of the source.",
returns = "()",
type = "function"
},
setLooping = {
args = "(loop: boolean)",
description = "Sets whether the Source should loop.",
@@ -123,6 +166,12 @@ local love = {
returns = "()",
type = "function"
},
setRolloff = {
args = "(rolloff: number)",
description = "Sets the rolloff factor.",
returns = "()",
type = "function"
},
setVelocity = {
args = "(x: number, y: number, z: number)",
description = "Sets the velocity of the Source.\n\nThis does not change the position of the Source, but lets the application know how it has to calculate the doppler effect.",
@@ -135,6 +184,12 @@ local love = {
returns = "()",
type = "function"
},
setVolumeLimits = {
args = "(min: number, max: number)",
description = "Sets the volume limits of the source. The limits have to be numbers from 0 to 1.",
returns = "()",
type = "function"
},
stop = {
args = "()",
description = "Stops a Source.",
@@ -143,7 +198,7 @@ local love = {
},
tell = {
args = "(unit: TimeUnit)",
description = "Stops a Source.",
description = "Gets the currently playing position of the Source.",
returns = "(position: number)",
type = "function"
}
@@ -182,7 +237,7 @@ local love = {
getDistanceModel = {
args = "()",
description = "Returns the distance attenuation model.",
returns = "(model: string)",
returns = "(model: DistanceModel)",
type = "function"
},
getNumSources = {
@@ -216,7 +271,7 @@ local love = {
type = "function"
},
newSource = {
args = "(file: string, type: SourceType)",
args = "(filename: string, type: SourceType)",
description = "Creates a new Source from a file, SoundData, or Decoder. Sources created from SoundData are always static.",
returns = "(source: Source)",
type = "function"
@@ -246,7 +301,7 @@ local love = {
type = "function"
},
setDistanceModel = {
args = "(model: string)",
args = "(model: DistanceModel)",
description = "Sets the distance attenuation model.",
returns = "()",
type = "function"
@@ -312,7 +367,7 @@ local love = {
type = "value"
},
keyreleased = {
description = "Key releaed",
description = "Key released",
type = "value"
},
mousepressed = {
@@ -364,7 +419,7 @@ local love = {
wait = {
args = "()",
description = "Like love.event.poll(), but blocks until there is an event in the queue.",
returns = "(e: Event, a: mixed, b: mixed, c: mixed)",
returns = "(e: Event, a: mixed, b: mixed, c: mixed, d: mixed)",
type = "function"
}
},
@@ -412,7 +467,7 @@ local love = {
type = "function"
},
seek = {
args = "(pos: number)",
args = "(position: number)",
description = "Seek to a position in a file.",
returns = "(success: boolean)",
type = "function"
@@ -575,7 +630,7 @@ local love = {
},
remove = {
args = "(name: string)",
description = "Removes a file (or directory).",
description = "Removes a file or directory.",
returns = "(ok: boolean)",
type = "function"
},
@@ -618,7 +673,7 @@ local love = {
type = "value"
},
Rasterizer = {
description = "A Rasterizer handles font rendering, containing the font data (image or true-type font) and drawable glyphs.",
description = "A Rasterizer handles font rendering, containing the font data (image or TrueType font font) and drawable glyphs.",
type = "value"
},
newFontData = {
@@ -665,20 +720,24 @@ local love = {
},
BlendMode = {
childs = {
canvas = {
description = "Support for Canvas.",
additive = {
description = "Additive blend mode.",
type = "value"
},
npot = {
description = "Support for textures with non-power-of-two textures. See PO2 Syndrome.",
alpha = {
description = "Alpha blend mode (\"normal\").",
type = "value"
},
pixeleffect = {
description = "Support for PixelEffect.",
multiplicative = {
description = "Multiply blend mode.",
type = "value"
},
premultiplied = {
description = "Premultiplied blend mode.",
type = "value"
},
subtractive = {
description = "Support for the subtractive blend mode.",
description = "Subtractive blend mode.",
type = "value"
}
},
@@ -693,6 +752,12 @@ local love = {
returns = "()",
type = "function"
},
getFilter = {
args = "()",
description = "Gets the filter mode of the Canvas.",
returns = "(min: FilterMode, mag: FilterMode)",
type = "function"
},
getImageData = {
args = "()",
description = "Returns the image data stored in the Canvas. Think of it as taking a screenshot of the hidden screen that is the Canvas.",
@@ -711,6 +776,12 @@ local love = {
returns = "()",
type = "function"
},
setFilter = {
args = "(min: FilterMode, mag: FilterMode)",
description = "Sets the filter of the Canvas.",
returns = "()",
type = "function"
},
setWrap = {
args = "(horiz: WrapMode, vert: WrapMode)",
description = "Sets the wrapping properties of a Canvas.\n\n This function sets the way the edges of a Canvas are treated if it is scaled or rotated. If the WrapMode is set to \"clamp\", the edge will not be interpolated. If set to \"repeat\", the edge will be interpolated with the pixels on the opposing side of the framebuffer.",
@@ -799,6 +870,28 @@ local love = {
description = "Defines the shape of characters than can be drawn onto the screen.",
type = "lib"
},
GraphicsFeature = {
childs = {
canvas = {
description = "Support for Canvas.",
type = "value"
},
npot = {
description = "Support for textures with non-power-of-two textures.",
type = "value"
},
pixeleffect = {
description = "Support for PixelEffect.",
type = "value"
},
subtractive = {
description = "Support for the subtractive blend mode.",
type = "value"
}
},
description = "class constants",
type = "class"
},
Image = {
childs = {
getFilter = {
@@ -1118,21 +1211,21 @@ local love = {
type = "function"
}
},
description = "A quadrilateral with texture coordinate information.\n\nQuads can be used to select part of a texture to draw. In this way, one large Texture Atlas can be loaded, and then split up into sub-images.",
description = "A quadrilateral with texture coordinate information.\n\nQuads can be used to select part of a texture to draw. In this way, one large texture atlas can be loaded, and then split up into sub-images.",
type = "lib"
},
SpriteBatch = {
childs = {
add = {
args = "(x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number)",
args = "(x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
description = "Add a sprite to the batch.",
returns = "()",
returns = "(id: number)",
type = "function"
},
addq = {
args = "()",
description = "Add a Quad to the batch.",
returns = "(quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number)",
returns = "(id: number)",
type = "function"
},
bind = {
@@ -1147,12 +1240,36 @@ local love = {
returns = "()",
type = "function"
},
getImage = {
args = "()",
description = "Returns the image used by the SpriteBatch.",
returns = "(image: Image)",
type = "function"
},
set = {
args = "()",
description = "Changes a sprite in the batch. This requires the identifier returned by add and addq.",
returns = "(id: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
type = "function"
},
setColor = {
args = "(r: number, g: number, b: number, a: number)",
description = "Sets the color that will be used for the next add and set operations. Calling the function without arguments will clear the color.\n\nThe global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.",
returns = "()",
type = "function"
},
setImage = {
args = "(image: Image)",
description = "Replaces the image used for the sprites.",
returns = "()",
type = "function"
},
setq = {
args = "()",
description = "Changes a sprite with a quad in the batch. This requires the identifier returned by add and addq.",
returns = "(id: number)",
type = "function"
},
unbind = {
args = "()",
description = "Unbinds the SpriteBatch.",
@@ -1267,12 +1384,6 @@ local love = {
returns = "(height: number)",
type = "function"
},
getLineStipple = {
args = "()",
description = "Gets the current line stipple.",
returns = "(pattern: number, repeat: number)",
type = "function"
},
getLineStyle = {
args = "()",
description = "Gets the line style.",
@@ -1357,12 +1468,6 @@ local love = {
returns = "()",
type = "function"
},
["love.graphics.newStencil"] = {
args = "(stencilFunction: function)",
description = "Creates a new stencil.",
returns = "(myStencil: function)",
type = "function"
},
newCanvas = {
args = "()",
description = "Creates a new Canvas object for offscreen rendering.",
@@ -1383,7 +1488,7 @@ local love = {
},
newImageFont = {
args = "(image: Image, glyphs: string)",
description = "Creates a new font by loading a specifically formatted image. There can be up to 256 glyphs.",
description = "Creates a new font by loading a specifically formatted image. There can be up to 256 glyphs.\n\nExpects ISO 8859-1 encoding for the glyphs string.",
returns = "(font: Font)",
type = "function"
},
@@ -1395,7 +1500,7 @@ local love = {
},
newPixelEffect = {
args = "(code: string)",
description = "Creates a new PixelEffect object for hardware-accelerated pixel level effects.\n\nA PixelEffect contains at least one function, named effect, which is the effect itself, but it can contain additional functions.\n\nvec4 effect( vec4 color, sampler2D texture, vec2 texture_coords, vec2 pixel_coords )",
description = "Creates a new PixelEffect object for hardware-accelerated pixel level effects.\n\nA PixelEffect contains at least one function, named effect, which is the effect itself, but it can contain additional functions.\n\nvec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords )",
returns = "(pixeleffect: PixelEffect)",
type = "function"
},
@@ -1417,6 +1522,12 @@ local love = {
returns = "(spriteBatch: SpriteBatch)",
type = "function"
},
newStencil = {
args = "(stencilFunction: function)",
description = "Creates a new stencil.",
returns = "(myStencil: function)",
type = "function"
},
point = {
args = "(x: number, y: number)",
description = "Draws a point.\n\nThe pixel grid is actually offset to the center of each pixel. So to get clean pixels drawn use 0.5 + integer increments.",
@@ -1443,7 +1554,7 @@ local love = {
},
print = {
args = "(text: string, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
description = "Draws text on screen. If no Font is set, one will be created and set (once) if needed.\n\nAs of LÖVE 0.7.1, when using translation and scaling functions while drawing text, this function assumes the scale occurs first. If you don't script with this in mind, the text won't be in the right position, or possibly even on screen.\n\nDrawing uses the current color, but only if the ColorMode is \"modulate\" (which is the default). If your text is displayed as white, it is probably because the color mode is \"replace\" (which is useful when drawing sprites). Change the color model to \"modulate\" before drawing.\n\nlove.graphics.print stops at the first '\000' (null) character. This can bite you if you are appending keystrokes to form your string, as some of those are multi-byte unicode characters which will likely contain null bytes.",
description = "Draws text on screen. If no Font is set, one will be created and set (once) if needed.\n\nWhen using translation and scaling functions while drawing text, this function assumes the scale occurs first. If you don't script with this in mind, the text won't be in the right position, or possibly even on screen.\n\nDrawing uses the current color, but only if the ColorMode is \"modulate\" (which is the default). If your text is displayed as white, it is probably because the color mode is \"replace\" (which is useful when drawing sprites). Change the color model to \"modulate\" before drawing.\n\nlove.graphics.print stops at the first '\000' (null) character. This can bite you if you are appending keystrokes to form your string, as some of those are multi-byte unicode characters which will likely contain null bytes.",
returns = "()",
type = "function"
},
@@ -1473,24 +1584,24 @@ local love = {
},
reset = {
args = "()",
description = "Resets the current graphics settings.\n\nCalling reset makes the current drawing color white, the current background color black, the window title empty and removes any scissor settings. It sets the BlendMode to alpha and ColorMode to modulate. It also sets both the point and line drawing modes to smooth and their sizes to 1.0 . Finally, it removes any stipple settings.",
description = "Resets the current graphics settings.\n\nCalling reset makes the current drawing color white, the current background color black, the window title empty and removes any scissor settings. It sets the BlendMode to alpha and ColorMode to modulate. It also sets both the point and line drawing modes to smooth and their sizes to 1.0.",
returns = "()",
type = "function"
},
rotate = {
args = "(angle: number)",
description = "Rotates the coordinate system in two dimensions.\n\nCalling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw() exits.",
description = "Rotates the coordinate system in two dimensions.\n\nCalling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw exits.",
returns = "()",
type = "function"
},
scale = {
args = "(sx: number, sy: number)",
description = "Scales the coordinate system in two dimensions.\n\nBy default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this relation.\n\nAfter scaling by sx and sy, all coordinates are treated as if they were multiplied by sx and sy. Every result of a drawing operation is also correspondingly scaled, so scaling by (2, 2) for example would mean making everything twice as large in both x- and y-directions. Scaling by a negative value flips the coordinate system in the corresponding direction, which also means everything will be drawn flipped or upside down, or both. Scaling by zero is not a useful operation.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nScaling lasts until love.draw() exits.",
description = "Scales the coordinate system in two dimensions.\n\nBy default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this relation.\n\nAfter scaling by sx and sy, all coordinates are treated as if they were multiplied by sx and sy. Every result of a drawing operation is also correspondingly scaled, so scaling by (2, 2) for example would mean making everything twice as large in both x- and y-directions. Scaling by a negative value flips the coordinate system in the corresponding direction, which also means everything will be drawn flipped or upside down, or both. Scaling by zero is not a useful operation.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nScaling lasts until love.draw exits.",
returns = "()",
type = "function"
},
setBackgroundColor = {
args = "(r: number, g: number, b: number)",
args = "(r: number, g: number, b: number, a: number)",
description = "Sets the background color.",
returns = "()",
type = "function"
@@ -1545,7 +1656,7 @@ local love = {
},
setInvertedStencil = {
args = "(stencilFunction: function)",
description = "Defines an inverted stencil for the drawing operations or releases the active one.\n\nIt's the same as love.graphics.setStencil with the mask inverted.",
description = "Defines an inverted stencil for the drawing operations or releases the active one.\n\nIt's the same as love.graphics.setStencil with the mask inverted.\n\nCalling the function without arguments releases the active stencil.",
returns = "()",
type = "function"
},
@@ -1555,12 +1666,6 @@ local love = {
returns = "()",
type = "function"
},
setLineStipple = {
args = "(pattern: number, repeat: number)",
description = "Sets the line stipple pattern.\n\nA stipple pattern is made up of a 16bit sequence of 0s and 1s, Just like binary.\n\nThe pattern is repeated to complete the line. Using the repeat will stretch the pattern and multiplies each 1 and 0. For example if three 1s are consecutively placed they are stretched to six if the repeat is 2. The maximum repeat is 255, and the minimum repeat is 1.\n\nA 1 is a a cue to draw a pixel whereas 0 is the opposite and does not draw a pixel, This is done per pixel for the given line.\n\nA pattern is read from back to front.\n\n0x3F07 would equal to 0011111100000111 in binary.\n\nYou can visualise the pattern by reading the binary sequence backwards.",
returns = "()",
type = "function"
},
setLineStyle = {
args = "(style: LineStyle)",
description = "Sets the line style.",
@@ -1580,7 +1685,7 @@ local love = {
type = "function"
},
setNewFont = {
args = "(filename: string, size: number)",
args = "(size: number)",
description = "Creates and sets a new font.",
returns = "(font: Font)",
type = "function"
@@ -1617,7 +1722,7 @@ local love = {
},
setStencil = {
args = "(stencilFunction: function)",
description = "Defines or releases a stencil for the drawing operations.\n\nThe passed function draws to the stencil instead of the screen, creating an image with transparent and opaque pixel. While active, it is used to test where pixel will be drawn or discarded.\n\nCalling the function without arguments releases the active stencil.",
description = "Defines or releases a stencil for the drawing operations.\n\nThe passed function draws to the stencil instead of the screen, creating an image with transparent and opaque pixels. While active, it is used to test where pixels will be drawn or discarded.\n\nCalling the function without arguments releases the active stencil.",
returns = "()",
type = "function"
},
@@ -1635,7 +1740,7 @@ local love = {
},
translate = {
args = "(dx: number, dy: number)",
description = "Translates the coordinate system in two dimensions.\n\nWhen this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nThis change lasts until love.draw() exits or else a love.graphics.pop reverts to a previous love.graphics.push.\n\nTranslating using whole numbers will prevent tearing/blurring of images and fonts draw after translating.",
description = "Translates the coordinate system in two dimensions.\n\nWhen this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nThis change lasts until love.draw exits or else a love.graphics.pop reverts to a previous love.graphics.push.\n\nTranslating using whole numbers will prevent tearing/blurring of images and fonts draw after translating.",
returns = "()",
type = "function"
},
@@ -1646,12 +1751,66 @@ local love = {
type = "function"
}
},
description = "The primary responsibility for the love.graphics module is the drawing of lines, shapes, text, Images and other Drawable objects onto the screen. Its secondary responsibilities include loading external files (including Images and Fonts) into memory, creating specialized objects (such as ParticleSystems or Framebuffers) and managing screen geometry.\n\nLÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0). The x axis is horizontal: larger values are further to the right. The y axis is vertical: larger values are further towards the bottom.\n\nIn many cases, you draw images or shapes in terms of their upper-left corner (See the picture above).\n\nMany of the functions are used to manipulate the graphics coordinate system, which is essentially the the way coordinates are mapped to the display. You can change the position, scale, and even rotation in this way.",
description = "The primary responsibility for the love.graphics module is the drawing of lines, shapes, text, Images and other Drawable objects onto the screen. Its secondary responsibilities include loading external files (including Images and Fonts) into memory, creating specialized objects (such as ParticleSystems or Framebuffers) and managing screen geometry.\n\nLÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0). The x-axis is horizontal: larger values are further to the right. The y-axis is vertical: larger values are further towards the bottom.\n\nIn many cases, you draw images or shapes in terms of their upper-left corner (See the picture above).\n\nMany of the functions are used to manipulate the graphics coordinate system, which is essentially the the way coordinates are mapped to the display. You can change the position, scale, and even rotation in this way.",
type = "class"
},
image = {
childs = {
ImageData = {
childs = {
encode = {
args = "(outFile: string)",
description = "Encodes the ImageData and writes it to the save directory.",
returns = "()",
type = "function"
},
getHeight = {
args = "()",
description = "Gets the height of the ImageData.",
returns = "(height: number)",
type = "function"
},
getPixel = {
args = "(x: number, y: number)",
description = "Gets the pixel at the specified position.\n\nValid x and y values start at 0 and go up to image width and height minus 1.",
returns = "(r: number, g: number, b: number, a: number)",
type = "function"
},
getString = {
args = "()",
description = "Gets the full ImageData as a string.",
returns = "(pixels: string)",
type = "function"
},
getWidth = {
args = "()",
description = "Gets the width of the ImageData.",
returns = "(width: number)",
type = "function"
},
mapPixel = {
args = "(pixelFunction: function)",
description = "Transform an image by applying a function to every pixel.\n\nThis function is a higher order function. It takes another function as a parameter, and calls it once for each pixel in the ImageData.\n\nThe function parameter is called with six parameters for each pixel in turn. The parameters are numbers that represent the x and y coordinates of the pixel and its red, green, blue and alpha values. The function parameter can return up to four number values, which become the new r, g, b and a values of the pixel. If the function returns fewer values, the remaining components are set to 0.",
returns = "()",
type = "function"
},
paste = {
args = "(source: ImageData, dx: number, dy: number, sx: number, sy: number, sw: number, sh: number)",
description = "Paste into ImageData from another source ImageData.",
returns = "()",
type = "function"
},
setPixel = {
args = "(x: number, y: number, r: number, g: number, b: number, a: number)",
description = "Sets the color of a pixel.\n\nValid x and y values start at 0 and go up to image width and height minus 1.",
returns = "()",
type = "function"
}
},
description = "Raw (decoded) image data.\n\nYou can't draw ImageData directly to screen. See Image for that.",
type = "lib"
},
ImageFormat = {
childs = {
bmp = {
description = "BMP image format.",
@@ -1677,12 +1836,6 @@ local love = {
description = "class constants",
type = "class"
},
newEncodedImageData = {
args = "(imageData: ImageData, format: ImageFormat)",
description = "Encodes ImageData.",
returns = "(data: Data)",
type = "function"
},
newImageData = {
args = "(width: number, height: number)",
description = "Create a new ImageData object.",
@@ -1757,7 +1910,7 @@ local love = {
},
getBall = {
args = "(joystick: number, ball: number)",
description = "Returns the change in Ball position.",
description = "Returns the change in ball position.",
returns = "(dx: number, dy: number)",
type = "function"
},
@@ -2053,7 +2206,7 @@ local love = {
type = "value"
},
euro = {
description = "Euro () key",
description = "Euro (&euro;) key",
type = "value"
},
f = {
@@ -2473,19 +2626,19 @@ local love = {
},
getX = {
args = "()",
description = "Returns the current x-position of the mouse.",
description = "Returns the current x position of the mouse.",
returns = "(x: number)",
type = "function"
},
getY = {
args = "()",
description = "Returns the current y-position of the mouse.",
description = "Returns the current y position of the mouse.",
returns = "(y: number)",
type = "function"
},
isDown = {
args = "(button: MouseConstant)",
description = "Checks whether a certain mouse button is down.",
description = "Checks whether a certain mouse button is down. This function does not detect mousewheel scrolling; you must use the love.mousepressed callback for that.",
returns = "(down: boolean)",
type = "function"
},
@@ -2577,7 +2730,7 @@ local love = {
},
getAngle = {
args = "()",
description = "Get the angle of the body.\n\nThe angle is measured in radians. If you need to transform it to degrees, use math.deg.\n\nA value of 0 radians will mean \"looking to the right\". Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view.",
description = "Get the angle of the body.\n\nThe angle is measured in radians. If you need to transform it to degrees, use math.deg.\n\nA value of 0 radians will mean \"looking to the right\". Although radians increase counter-clockwise, the y-axis points down so it becomes clockwise from our point of view.",
returns = "(angle: number)",
type = "function"
},
@@ -2599,6 +2752,12 @@ local love = {
returns = "(fixtures: table)",
type = "function"
},
getGravityScale = {
args = "()",
description = "Returns the gravity scale factor.",
returns = "(scale: number)",
type = "function"
},
getInertia = {
args = "()",
description = "Gets the rotational inertia of the body.\n\nThe rotational inertia is how hard is it to make the body spin. It is set with the 4th argument to Body:setMass, or automatically with Body:setMassFromShapes.",
@@ -2773,6 +2932,12 @@ local love = {
returns = "()",
type = "function"
},
setActive = {
args = "(active: boolean)",
description = "Sets whether the body is active in the world.\n\nAn inactive body does not take part in the simulation. It will not move or cause any collisions.",
returns = "()",
type = "function"
},
setAllowSleeping = {
args = "(permission: boolean)",
description = "Set the sleep behaviour of a body.\n\nA sleeping body is much more efficient to simulate than when awake.\n\nIf sleeping is allowed, a body that has come to rest will sleep.",
@@ -2781,7 +2946,7 @@ local love = {
},
setAngle = {
args = "(angle: number)",
description = "Set the angle of the body.\n\nThe angle is measured in radians. If you need to transform it from degrees, use math.rad.\n\nA value of 0 radians will mean \"looking to the right\". .Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view.\n\nIt is possible to cause a collision with another body by changing its angle.",
description = "Set the angle of the body.\n\nThe angle is measured in radians. If you need to transform it from degrees, use math.rad.\n\nA value of 0 radians will mean \"looking to the right\". .Although radians increase counter-clockwise, the y-axis points down so it becomes clockwise from our point of view.\n\nIt is possible to cause a collision with another body by changing its angle.",
returns = "()",
type = "function"
},
@@ -2915,6 +3080,48 @@ local love = {
description = "class constants",
type = "class"
},
ChainShape = {
childs = {
getChildEdge = {
args = "(index: number)",
description = "Returns a child of the shape as an EdgeShape.",
returns = "(EdgeShape: number)",
type = "function"
},
getPoint = {
args = "(index: number)",
description = "Returns a point of the shape.",
returns = "(x: number, y: number)",
type = "function"
},
getPoints = {
args = "()",
description = "Returns all points of the shape.",
returns = "(x1: number, y1: number, x2: number, y2: number, ...: number)",
type = "function"
},
getVertexCount = {
args = "()",
description = "Returns the number of vertices the shape has.",
returns = "(count: number)",
type = "function"
},
setNextVertex = {
args = "(x: number, y: number)",
description = "Sets a vertex that establishes a connection to the next shape.\n\nThis can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape.",
returns = "()",
type = "function"
},
setPrevVertex = {
args = "(x: number, y: number)",
description = "Sets a vertex that establishes a connection to the previous shape.\n\nThis can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape.",
returns = "()",
type = "function"
}
},
description = "A ChainShape consists of multiple line segments. It can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.\n\nUnlike the PolygonShape, the ChainShape does not have a vertices limit or has to form a convex shape, but self intersections are not supported. ",
type = "lib"
},
CircleShape = {
childs = {
getLocalCenter = {
@@ -2934,6 +3141,12 @@ local love = {
description = "Get the center of the circle in world coordinates.",
returns = "(wx: number, wy: number)",
type = "function"
},
setRadius = {
args = "(radius: number)",
description = "Sets the radius of the circle.",
returns = "()",
type = "function"
}
},
description = "Circle extends Shape and adds a radius and a local position.",
@@ -2953,10 +3166,10 @@ local love = {
returns = "(nx: number, ny: number)",
type = "function"
},
getPosition = {
getPositions = {
args = "()",
description = "Get the location of the contact point between two shapes.",
returns = "(cx: number, cy: number)",
description = "Returns the contact points of the two colliding fixtures. There can be one or two points.",
returns = "(x1: number, y1: number, x2: number, y2: number)",
type = "function"
},
getRestitution = {
@@ -2971,10 +3184,46 @@ local love = {
returns = "(distance: number)",
type = "function"
},
getVelocity = {
isEnabled = {
args = "()",
description = "Get the linear impact velocity of a contact.",
returns = "(vx: number, vy: number)",
description = "Returns whether the contact is enabled. The collision will be ignored if a contact gets disabled in the post solve callback.",
returns = "(enabled: boolean)",
type = "function"
},
isTouching = {
args = "()",
description = "Returns whether the two colliding fixtures are touching each other.",
returns = "(touching: boolean)",
type = "function"
},
resetFriction = {
args = "()",
description = "Resets the contact friction to the mixture value of both fixtures.",
returns = "()",
type = "function"
},
resetRestitution = {
args = "()",
description = "Resets the contact restitution to the mixture value of both fixtures.",
returns = "()",
type = "function"
},
setEnabled = {
args = "(enabled: boolean)",
description = "Enables or disables the contact.",
returns = "()",
type = "function"
},
setFriction = {
args = "(friction: number)",
description = "Sets the contact friction.",
returns = "()",
type = "function"
},
setRestitution = {
args = "(restitution: number)",
description = "Sets the contact restitution.",
returns = "()",
type = "function"
}
},
@@ -3023,6 +3272,12 @@ local love = {
description = "Keeps two bodies at the same distance.",
type = "lib"
},
EdgeShape = {
args = "()",
description = "A EdgeShape is a line segment. They can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.",
returns = "()",
type = "function"
},
Fixture = {
childs = {
destroy = {
@@ -3254,8 +3509,8 @@ local love = {
type = "function"
},
getReactionTorque = {
args = "()",
description = "Gets the reaction torque on Body 2.",
args = "(invdt: number)",
description = "Returns the reaction torque on the second body.",
returns = "(torque: number)",
type = "function"
},
@@ -3307,6 +3562,18 @@ local love = {
},
MouseJoint = {
childs = {
getDampingRatio = {
args = "()",
description = "Returns the damping ratio.",
returns = "(ratio: number)",
type = "function"
},
getFrequency = {
args = "()",
description = "Returns the frequency.",
returns = "(freq: number)",
type = "function"
},
getMaxForce = {
args = "()",
description = "Gets the highest allowed force.",
@@ -3319,6 +3586,18 @@ local love = {
returns = "(x: number, y: number)",
type = "function"
},
setDampingRatio = {
args = "(ratio: number)",
description = "Sets a new damping ratio.",
returns = "()",
type = "function"
},
setFrequency = {
args = "(freq: number)",
description = "Sets a new frequency.",
returns = "()",
type = "function"
},
setMaxForce = {
args = "(f: number)",
description = "Sets the highest allowed force.",
@@ -3343,6 +3622,18 @@ local love = {
},
PrismaticJoint = {
childs = {
enableLimit = {
args = "(enable: boolean)",
description = "Enables or disables the limits of the joint.",
returns = "()",
type = "function"
},
enableMotor = {
args = "(enable: boolean)",
description = "Starts or stops the joint motor.",
returns = "()",
type = "function"
},
getJointSpeed = {
args = "()",
description = "Get the current joint angle speed.",
@@ -3391,9 +3682,9 @@ local love = {
returns = "(upper: number)",
type = "function"
},
isLimitsEnabled = {
isLimitEnabled = {
args = "()",
description = "Checks whether limits are enabled.",
description = "Checks whether the limits are enabled.",
returns = "(enabled: boolean)",
type = "function"
},
@@ -3409,12 +3700,6 @@ local love = {
returns = "()",
type = "function"
},
setLimitsEnabled = {
args = "(enable: boolean)",
description = "Enables/disables the joint limit.",
returns = "()",
type = "function"
},
setLowerLimit = {
args = "(lower: number)",
description = "Sets the lower limit.",
@@ -3427,12 +3712,6 @@ local love = {
returns = "()",
type = "function"
},
setMotorEnabled = {
args = "(enable: boolean)",
description = "Enables/disables the joint motor.",
returns = "()",
type = "function"
},
setMotorSpeed = {
args = "(s: number)",
description = "Sets the motor speed.",
@@ -3463,13 +3742,13 @@ local love = {
returns = "(a1x: number, a1y: number, a2x: number, a2y: number)",
type = "function"
},
getLength1 = {
getLengthA = {
args = "()",
description = "Get the current length of the rope segment attached to the first body.",
returns = "(length: number)",
type = "function"
},
getLength2 = {
getLengthB = {
args = "()",
description = "Get the current length of the rope segment attached to the second body.",
returns = "(length: number)",
@@ -3511,9 +3790,15 @@ local love = {
},
RevoluteJoint = {
childs = {
enableLimits = {
args = "(enable: boolean)",
description = "Enables or disables the joint limits.",
returns = "()",
type = "function"
},
enableMotor = {
args = "(enable: boolean)",
description = "Enables/disables the joint motor.",
description = "Starts or stops the joint motor.",
returns = "()",
type = "function"
},
@@ -3766,8 +4051,34 @@ local love = {
type = "class"
},
WeldJoint = {
childs = {
getDampingRatio = {
args = "()",
description = "Returns the damping ratio of the joint.",
returns = "(ratio: number)",
type = "function"
},
getFrequency = {
args = "()",
description = "Returns the frequency.",
returns = "(freq: number)",
type = "function"
},
setDampingRatio = {
args = "(ratio: number)",
description = "The new damping ratio.",
returns = "()",
type = "function"
},
setFrequency = {
args = "()",
description = "Sets a new frequency.",
returns = "(freq: number)",
type = "function"
}
},
description = "A WeldJoint essentially glues two bodies together.",
type = "value"
type = "lib"
},
World = {
childs = {
@@ -3797,8 +4108,8 @@ local love = {
},
getCallbacks = {
args = "()",
description = "Get functions to be called when two shapes collide.",
returns = "(add: function, persist: function, remove: function, result: function)",
description = "Returns functions for the callbacks during the world update.",
returns = "(beginContact: function, endContact: function, preSolve: function, postSolve: function)",
type = "function"
},
getContactCount = {
@@ -3926,7 +4237,7 @@ local love = {
type = "function"
},
newEdgeShape = {
args = "(body1: Body, body2: Body, x: number, y: number)",
args = "(x1: number, y1: number, x2: number, y2: number)",
description = "Creates a edge shape.",
returns = "(shape: EdgeShape)",
type = "function"
@@ -4008,6 +4319,12 @@ local love = {
description = "Creates a new World.",
returns = "(world: World)",
type = "function"
},
setMeter = {
args = "(scale: number)",
description = "Sets the meter scale factor.\n\nAll coordinates in the physics module are divided by this number, creating a convenient way to draw the objects directly to the screen without the need for graphics transformations.\n\nIt is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters.",
returns = "()",
type = "function"
}
},
description = "Can simulate 2D rigid body physics in a realistic manner. This module is based on Box2D, and this API corresponds to the Box2D API as closely as possible.",
@@ -4119,6 +4436,12 @@ local love = {
returns = "(value: mixed)",
type = "function"
},
getKeys = {
args = "()",
description = "Returns the names of all messages in a table.",
returns = "(msgNames: table)",
type = "function"
},
getName = {
args = "()",
description = "Get the name of a thread.",
@@ -4167,7 +4490,7 @@ local love = {
},
newThread = {
args = "(name: string, filename: string)",
description = "Creates a new Thread from a File or Data Object.",
description = "Creates a new Thread from a File or Data object.",
returns = "(thread: Thread)",
type = "function"
}

2488
api/lua/marmalade.lua Normal file

File diff suppressed because it is too large Load Diff

7546
api/lua/moai.lua Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/clibs/mime/core.dylib Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/clibs/socket/core.dylib Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/liblua.dylib Executable file

Binary file not shown.

BIN
bin/libwx.dylib Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/linux/x64/libwx.so Normal file

Binary file not shown.

BIN
bin/linux/x64/lua Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/linux/x86/libwx.so Normal file

Binary file not shown.

BIN
bin/linux/x86/lua Executable file

Binary file not shown.

BIN
bin/lua Executable file

Binary file not shown.

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>lua</string>
<key>CFBundleDisplayName</key>
<string>Lua</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string></string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Lua</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>

BIN
bin/lua.app/Contents/MacOS/lua Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

142
build/CMakeLists.txt Normal file
View File

@@ -0,0 +1,142 @@
# setup the minimum allowed CMake version
cmake_minimum_required(VERSION 2.8)
# set the default build type (this needs to be done *before* project command)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
endif()
# restrict configuration types to the selected build type
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE INTERNAL "" FORCE)
# set the project name
project("zbstudio")
# set the top-level project directory relative to CMakeLists.txt location
set(TOPDIR ..)
# checks if the Lua module is available
function(check_lua_module MODULE)
if(NOT ${MODULE}_FOUND)
# find Lua executable at first
find_program(LUA_EXECUTABLE "lua")
if(NOT LUA_EXECUTABLE)
message(FATAL_ERROR "Lua executable is not found")
endif()
# run a short script with "require" statement to determine if the Lua module is available
execute_process(COMMAND "${LUA_EXECUTABLE}" -e "require(\"${MODULE}\")"
RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET ERROR_QUIET)
if(EXIT_CODE EQUAL 0)
set(${MODULE}_FOUND TRUE CACHE INTERNAL "")
message(STATUS "Found Lua module: ${MODULE}")
elseif(ARGV1)
message(FATAL_ERROR "Lua module \"${MODULE}\" is not found")
endif()
endif()
endfunction()
# adds an user option to select between system-wide and bundled Lua module
function(add_system_lua_module_option MODULE)
string(TOUPPER ${MODULE} UPPERCASE_MODULE)
if(NOT DEFINED USE_SYSTEM_${UPPERCASE_MODULE})
option(USE_SYSTEM_${UPPERCASE_MODULE}
"Use a system-wide \"${MODULE}\" Lua module instead of the bundled one." ${${MODULE}_FOUND})
endif()
endfunction()
# installs all files listed in the manifest
function(install_from_manifest TYPE MANIFEST DESTDIR EXCLUDE_REGEX)
file(STRINGS ${MANIFEST} PATTERN_LIST)
foreach(PATTERN ${PATTERN_LIST})
string(STRIP ${PATTERN} PATTERN)
if(NOT PATTERN MATCHES ${EXCLUDE_REGEX})
file(GLOB FILELIST RELATIVE "${CMAKE_SOURCE_DIR}/${TOPDIR}" "${CMAKE_SOURCE_DIR}/${TOPDIR}/${PATTERN}")
foreach(FILENAME ${FILELIST})
get_filename_component(FILEPATH ${FILENAME} PATH)
install(${TYPE} ${TOPDIR}/${FILENAME} DESTINATION ${DESTDIR}/${FILEPATH})
endforeach()
endif()
endforeach()
endfunction()
if(WIN32)
# add the executable file to our project
add_executable(zbstudio WIN32 ${TOPDIR}/build/win32_starter.c ${TOPDIR}/zbstudio/res/zbstudio.rc)
# link to the static multi-threaded CRT under MSVC
if(MSVC)
string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
foreach(FLAGS_VAR CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_C_FLAGS_${BUILD_TYPE} CMAKE_CXX_FLAGS_${BUILD_TYPE})
string(REGEX REPLACE "/MD" "/MT" ${FLAGS_VAR} ${${FLAGS_VAR}})
string(REGEX REPLACE "/MDd" "/MTd" ${FLAGS_VAR} ${${FLAGS_VAR}})
endforeach()
endif()
# setup the data directory
set(DATADIR .)
# install IDE executable
install(TARGETS zbstudio DESTINATION ${DATADIR})
# install files from manifest
install_from_manifest(FILES ${TOPDIR}/zbstudio/MANIFEST ${DATADIR} "^$")
install_from_manifest(FILES ${TOPDIR}/zbstudio/MANIFEST-bin-win32 ${DATADIR} "^zbstudio.exe$")
elseif(APPLE)
# setup the data directory
set(ROOTDIR ZeroBraneStudio.app/Contents)
set(DATADIR ${ROOTDIR}/ZeroBraneStudio)
# install IDE shell script
install(PROGRAMS ${TOPDIR}/zbstudio/ZeroBraneStudio.app/Contents/MacOS/ZeroBraneStudio DESTINATION ${ROOTDIR}/MacOS)
# install icon pack and .plist file
install(DIRECTORY ${TOPDIR}/zbstudio/ZeroBraneStudio.app/Contents/Resources DESTINATION ${ROOTDIR})
install(FILES ${TOPDIR}/zbstudio/ZeroBraneStudio.app/Contents/Info.plist DESTINATION ${ROOTDIR})
# install files from manifest
install_from_manifest(FILES ${TOPDIR}/zbstudio/MANIFEST ${DATADIR} "^$")
install_from_manifest(PROGRAMS ${TOPDIR}/zbstudio/MANIFEST-bin-macos ${DATADIR} "^$")
else()
# check the available Lua modules
check_lua_module(wx TRUE)
check_lua_module(socket TRUE)
check_lua_module(copas ${USE_SYSTEM_COPAS})
check_lua_module(luainspect ${USE_SYSTEM_LUAINSPECT})
#check_lua_module(mobdebug ${USE_SYSTEM_MOBDEBUG})
# add user options to select between system-wide and bundled Lua modules
add_system_lua_module_option(copas)
add_system_lua_module_option(luainspect)
#add_system_lua_module_option(mobdebug)
# setup the data directory
set(DATADIR share/zbstudio)
# install IDE shell script
set(IDE_DATADIR "${CMAKE_INSTALL_PREFIX}/${DATADIR}")
configure_file(${TOPDIR}/zbstudio/zbstudio.in "${CMAKE_BINARY_DIR}/zbstudio")
install(PROGRAMS "${CMAKE_BINARY_DIR}/zbstudio" DESTINATION bin)
# install bundled Lua modules
if(NOT USE_SYSTEM_COPAS)
install(DIRECTORY ${TOPDIR}/lualibs/copas ${TOPDIR}/lualibs/coxpcall DESTINATION ${DATADIR}/lualibs)
endif()
if(NOT USE_SYSTEM_LUAINSPECT)
install(DIRECTORY ${TOPDIR}/lualibs/luainspect ${TOPDIR}/lualibs/metalua DESTINATION ${DATADIR}/lualibs)
endif()
if(NOT USE_SYSTEM_MOBDEBUG)
install(DIRECTORY ${TOPDIR}/lualibs/mobdebug DESTINATION ${DATADIR}/lualibs)
endif()
# install .desktop file and hicolor icon theme
install(DIRECTORY ${TOPDIR}/zbstudio/res/icons/ DESTINATION share/icons/hicolor)
install(FILES ${TOPDIR}/zbstudio/res/zbstudio.desktop DESTINATION share/applications)
# install miscellaneous documentation files
install(FILES ${TOPDIR}/CHANGELOG.md ${TOPDIR}/LICENSE ${TOPDIR}/README.md DESTINATION share/doc/zbstudio)
# install files from manifest
install_from_manifest(FILES ${TOPDIR}/zbstudio/MANIFEST ${DATADIR} "^(CHANGELOG.md|LICENSE|README.md)$|^lualibs/")
endif()

22
build/build-linux-prep-deb.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# this script installs prerequisites to build binary files on Linux with deb
sudo apt-get install git-core
sudo apt-get install g++
sudo apt-get install subversion
sudo apt-get install libgtk2.0-dev
# install cmake as wxwidgets needs 2.8.4+ but "sudo apt-get install cmake"
# only installs 2.8.0 on some systems (like Ubuntu 10.4)
mkdir build-cmake
cd build-cmake
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
gunzip cmake-2.8.10.2.tar.gz
tar xvf cmake-2.8.10.2.tar
cd cmake-2.8.10.2
./bootstrap
make
sudo make install
cd ../..
rm -rf build-cmake

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# this script installs prerequisites to build binary files on Linux with rpm
sudo yum install gcc-c++
sudo yum install git
sudo yum install svn
sudo yum install cmake
sudo yum install gtk2-devel

190
build/build-linux.sh Executable file
View File

@@ -0,0 +1,190 @@
#!/bin/bash
if [ "$(uname -m)" = "x86_64" ]; then
FPIC="-fpic"
ARCH="x64"
else
FPIC=""
ARCH="x86"
fi
# ZBS binary directory
BIN_DIR="$(dirname "$PWD")/bin/linux/$ARCH"
# temporary installation directory for dependencies
INSTALL_DIR="$PWD/deps"
# number of parallel jobs used for building
MAKEFLAGS="-j4"
# flags for manual building with gcc
BUILD_FLAGS="-O2 -shared -s -I $INSTALL_DIR/include -L $INSTALL_DIR/lib $FPIC"
# paths configuration
WXWIDGETS_BASENAME="wxWidgets"
WXWIDGETS_URL="http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk"
LIBPNG_BASENAME="libpng-1.6.0"
LIBPNG_FILENAME="$LIBPNG_BASENAME.tar.gz"
LIBPNG_URL="http://sourceforge.net/projects/libpng/files/libpng16/1.6.0/libpng-1.6.0.tar.gz/download"
LUA_BASENAME="lua-5.1.5"
LUA_FILENAME="$LUA_BASENAME.tar.gz"
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
WXLUA_BASENAME="wxlua"
WXLUA_URL="https://wxlua.svn.sourceforge.net/svnroot/wxlua/trunk"
LUASOCKET_BASENAME="luasocket-2.0.2"
LUASOCKET_FILENAME="$LUASOCKET_BASENAME.tar.gz"
LUASOCKET_URL="http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/$LUASOCKET_FILENAME"
# exit if the command line is empty
if [ $# -eq 0 ]; then
echo "Usage: $0 LIBRARY..."
exit 0
fi
# iterate through the command line arguments
for ARG in "$@"; do
case $ARG in
wxwidgets)
BUILD_WXWIDGETS=true
;;
lua)
BUILD_LUA=true
;;
wxlua)
BUILD_WXLUA=true
;;
luasocket)
BUILD_LUASOCKET=true
;;
all)
BUILD_WXWIDGETS=true
BUILD_LUA=true
BUILD_WXLUA=true
BUILD_LUASOCKET=true
;;
*)
echo "Error: invalid argument $ARG"
exit 1
;;
esac
done
# check for g++
if [ ! "$(which g++)" ]; then
echo "Error: g++ isn't found. Please install GNU C++ compiler."
exit 1
fi
# check for cmake
if [ ! "$(which cmake)" ]; then
echo "Error: cmake isn't found. Please install CMake and add it to PATH."
exit 1
fi
# check for svn
if [ ! "$(which svn)" ]; then
echo "Error: svn isn't found. Please install console SVN client."
exit 1
fi
# check for wget
if [ ! "$(which wget)" ]; then
echo "Error: wget isn't found. Please install GNU Wget."
exit 1
fi
# create the installation directory
mkdir -p "$INSTALL_DIR" || { echo "Error: cannot create directory $INSTALL_DIR"; exit 1; }
# build wxWidgets
if [ $BUILD_WXWIDGETS ]; then
# first build get/configure libpng as v1.6 is needed
wget -c "$LIBPNG_URL" -O "$LIBPNG_FILENAME" || { echo "Error: failed to download lbpng"; exit 1; }
tar -xzf "$LIBPNG_FILENAME"
(cd "$LIBPNG_BASENAME"; ./configure --with-libpng-prefix=wxpng_; make $MAKEFLAGS)
svn co "$WXWIDGETS_URL" "$WXWIDGETS_BASENAME" || { echo "Error: failed to checkout wxWidgets"; exit 1; }
# replace src/png with the libpng folder
rm -rf "$WXWIDGETS_BASENAME/src/png"
mv "$LIBPNG_BASENAME" "$WXWIDGETS_BASENAME/src/png"
cd "$WXWIDGETS_BASENAME"
./configure --prefix="$INSTALL_DIR" --disable-debug --disable-shared --enable-unicode \
--with-libjpeg=builtin --with-libpng=builtin --with-libtiff=no --with-expat=no \
--with-zlib=builtin --disable-richtext --with-gtk=2 \
CFLAGS="-Os -fPIC" CXXFLAGS="-Os -fPIC"
make $MAKEFLAGS || { echo "Error: failed to build wxWidgets"; exit 1; }
make install
cd ..
rm -rf "$WXWIDGETS_BASENAME" "$LIBPNG_FILENAME"
fi
# build Lua
if [ $BUILD_LUA ]; then
wget -c "$LUA_URL" -O "$LUA_FILENAME" || { echo "Error: failed to download Lua"; exit 1; }
tar -xzf "$LUA_FILENAME"
cd "$LUA_BASENAME"
# use POSIX as it has minimum dependencies (no readline and no ncurses required)
# LUA_USE_DLOPEN is required for loading libraries
(cd src; make all MYCFLAGS="$FPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E -ldl") || { echo "Error: failed to build Lua"; exit 1; }
make install INSTALL_TOP="$INSTALL_DIR"
cd ..
rm -rf "$LUA_FILENAME" "$LUA_BASENAME"
fi
# build wxLua
if [ $BUILD_WXLUA ]; then
svn co "$WXLUA_URL" "$WXLUA_BASENAME" || { echo "Error: failed to checkout wxLua"; exit 1; }
cd "$WXLUA_BASENAME/wxLua"
# the following patches wxlua source to fix live coding support in wxlua apps
# http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03225.html
sed -i 's/\(m_wxlState = wxLuaState(wxlState.GetLuaState(), wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);\)/\/\/ removed by ZBS build process \/\/ \1/' modules/wxlua/wxlcallb.cpp
cmake -G "Unix Makefiles" -DBUILD_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=FALSE \
-DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
-DwxWidgets_COMPONENTS="stc;html;aui;adv;core;net;base" \
-DwxLuaBind_COMPONENTS="stc;html;aui;adv;core;net;base" -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \
-DwxLua_LUA_INCLUDE_DIR="$INSTALL_DIR/include" -DwxLua_LUA_LIBRARY="$INSTALL_DIR/lib/liblua.a" .
(cd modules/luamodule; make $MAKEFLAGS) || { echo "Error: failed to build wxLua"; exit 1; }
(cd modules/luamodule; make install/strip)
[ -f "$INSTALL_DIR/lib/libwx.so" ] || { echo "Error: libwx.so isn't found"; exit 1; }
cd ../..
rm -rf "$WXLUA_BASENAME"
fi
# build LuaSocket
if [ $BUILD_LUASOCKET ]; then
wget -c "$LUASOCKET_URL" -O "$LUASOCKET_FILENAME" || { echo "Error: failed to download LuaSocket"; exit 1; }
tar -xzf "$LUASOCKET_FILENAME"
cd "$LUASOCKET_BASENAME"
mkdir -p "$INSTALL_DIR/lib/lua/5.1/"{mime,socket}
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/mime/core.so" src/mime.c -llua \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/socket/core.so" \
src/{auxiliar.c,buffer.c,except.c,inet.c,io.c,luasocket.c,options.c,select.c,tcp.c,timeout.c,udp.c,usocket.c} -llua \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
mkdir -p "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ftp.lua,http.lua,smtp.lua,tp.lua,url.lua} "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ltn12.lua,mime.lua,socket.lua} "$INSTALL_DIR/share/lua/5.1"
[ -f "$INSTALL_DIR/lib/lua/5.1/mime/core.so" ] || { echo "Error: mime/core.so isn't found"; exit 1; }
[ -f "$INSTALL_DIR/lib/lua/5.1/socket/core.so" ] || { echo "Error: socket/core.so isn't found"; exit 1; }
cd ..
rm -rf "$LUASOCKET_FILENAME" "$LUASOCKET_BASENAME"
fi
# now copy the compiled dependencies to ZBS binary directory
mkdir -p "$BIN_DIR" || { echo "Error: cannot create directory $BIN_DIR"; exit 1; }
[ $BUILD_LUA ] && cp "$INSTALL_DIR/bin/lua" "$BIN_DIR"
[ $BUILD_WXLUA ] && cp "$INSTALL_DIR/lib/libwx.so" "$BIN_DIR"
if [ $BUILD_LUASOCKET ]; then
mkdir -p "$BIN_DIR/clibs/"{mime,socket}
cp "$INSTALL_DIR/lib/lua/5.1/mime/core.so" "$BIN_DIR/clibs/mime"
cp "$INSTALL_DIR/lib/lua/5.1/socket/core.so" "$BIN_DIR/clibs/socket"
fi
# show a message about successful completion
echo "*** Build has been successfully completed ***"
exit 0

189
build/build-macosx.sh Executable file
View File

@@ -0,0 +1,189 @@
#!/bin/bash
# ZBS binary directory
BIN_DIR="$(dirname "$PWD")/bin"
# temporary installation directory for dependencies
INSTALL_DIR="$PWD/deps"
# Mac OS X global settings
MACOSX_ARCH="i386"
MACOSX_VERSION="10.6"
MACOSX_SDK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
# number of parallel jobs used for building
MAKEFLAGS="-j4"
# flags for manual building with gcc; build universal binaries for luasocket
MACOSX_FLAGS="-arch $MACOSX_ARCH -mmacosx-version-min=$MACOSX_VERSION -isysroot $MACOSX_SDK_PATH"
BUILD_FLAGS="-O2 -arch x86_64 -dynamiclib -undefined dynamic_lookup $MACOSX_FLAGS -I $INSTALL_DIR/include -L $INSTALL_DIR/lib"
# paths configuration
WXWIDGETS_BASENAME="wxWidgets"
WXWIDGETS_URL="http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk"
LUA_BASENAME="lua-5.1.5"
LUA_FILENAME="$LUA_BASENAME.tar.gz"
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
WXLUA_BASENAME="wxlua"
WXLUA_URL="https://wxlua.svn.sourceforge.net/svnroot/wxlua/trunk"
LUASOCKET_BASENAME="luasocket-2.0.2"
LUASOCKET_FILENAME="$LUASOCKET_BASENAME.tar.gz"
LUASOCKET_URL="http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/$LUASOCKET_FILENAME"
# exit if the command line is empty
if [ $# -eq 0 ]; then
echo "Usage: $0 LIBRARY..."
exit 0
fi
# iterate through the command line arguments
for ARG in "$@"; do
case $ARG in
wxwidgets)
BUILD_WXWIDGETS=true
;;
lua)
BUILD_LUA=true
;;
wxlua)
BUILD_WXLUA=true
;;
luasocket)
BUILD_LUASOCKET=true
;;
all)
BUILD_WXWIDGETS=true
BUILD_LUA=true
BUILD_WXLUA=true
BUILD_LUASOCKET=true
;;
*)
echo "Error: invalid argument $ARG"
exit 1
;;
esac
done
# check for g++
if [ ! "$(which g++)" ]; then
echo "Error: g++ isn't found. Please install GNU C++ compiler."
exit 1
fi
# check for cmake
if [ ! "$(which cmake)" ]; then
echo "Error: cmake isn't found. Please install CMake and add it to PATH."
exit 1
fi
# check for svn
if [ ! "$(which svn)" ]; then
echo "Error: svn isn't found. Please install console SVN client."
exit 1
fi
# check for wget
if [ ! "$(which wget)" ]; then
echo "Error: wget isn't found. Please install GNU Wget."
exit 1
fi
# create the installation directory
mkdir -p "$INSTALL_DIR" || { echo "Error: cannot create directory $INSTALL_DIR"; exit 1; }
# build wxWidgets
if [ $BUILD_WXWIDGETS ]; then
svn co "$WXWIDGETS_URL" "$WXWIDGETS_BASENAME" || { echo "Error: failed to checkout wxWidgets"; exit 1; }
cd "$WXWIDGETS_BASENAME"
./configure --prefix="$INSTALL_DIR" --disable-debug --disable-shared --enable-unicode \
--with-libjpeg=builtin --with-libpng=builtin --with-libtiff=no --with-expat=no \
--with-zlib=builtin --disable-richtext \
--enable-macosx_arch=$MACOSX_ARCH --with-macosx-version-min=$MACOSX_VERSION --with-macosx-sdk="$MACOSX_SDK_PATH" \
--with-osx_cocoa CFLAGS="-Os" CXXFLAGS="-Os"
make $MAKEFLAGS || { echo "Error: failed to build wxWidgets"; exit 1; }
make install
cd ..
rm -rf "$WXWIDGETS_BASENAME"
fi
# build Lua
if [ $BUILD_LUA ]; then
wget -c "$LUA_URL" -O "$LUA_FILENAME" || { echo "Error: failed to download Lua"; exit 1; }
tar -xzf "$LUA_FILENAME"
cd "$LUA_BASENAME"
sed -i "" 's/PLATS=/& macosx_dylib/' Makefile
printf "macosx_dylib:\n" >> src/Makefile
printf "\t\$(MAKE) LUA_A=\"liblua.dylib\" AR=\"\$(CC) -dynamiclib $MACOSX_FLAGS -o\" RANLIB=\"strip -u -r\" \\\\\n" >> src/Makefile
printf "\tMYCFLAGS=\"-DLUA_USE_LINUX $MACOSX_FLAGS\" MYLDFLAGS=\"$MACOSX_FLAGS\" MYLIBS=\"-lreadline\" lua\n" >> src/Makefile
printf "\t\$(MAKE) MYCFLAGS=\"-DLUA_USE_LINUX $MACOSX_FLAGS\" MYLDFLAGS=\"$MACOSX_FLAGS\" luac\n" >> src/Makefile
make macosx_dylib || { echo "Error: failed to build Lua"; exit 1; }
make install INSTALL_TOP="$INSTALL_DIR"
strip -u -r "$INSTALL_DIR/bin/lua"
cp src/liblua.dylib "$INSTALL_DIR/lib"
[ -f "$INSTALL_DIR/lib/liblua.dylib" ] || { echo "Error: liblua.dylib isn't found"; exit 1; }
cd ..
rm -rf "$LUA_FILENAME" "$LUA_BASENAME"
fi
# build wxLua
if [ $BUILD_WXLUA ]; then
svn co "$WXLUA_URL" "$WXLUA_BASENAME" || { echo "Error: failed to checkout wxLua"; exit 1; }
cd "$WXLUA_BASENAME/wxLua"
# the following patches wxlua source to fix live coding support in wxlua apps
# http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03225.html
sed -i "" 's/\(m_wxlState = wxLuaState(wxlState.GetLuaState(), wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);\)/\/\/ removed by ZBS build process \/\/ \1/' modules/wxlua/wxlcallb.cpp
cmake -G "Unix Makefiles" -DBUILD_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=FALSE \
-DCMAKE_OSX_ARCHITECTURES=$MACOSX_ARCH -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_VERSION CMAKE_OSX_SYSROOT="$MACOSX_SDK_PATH" \
-DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
-DwxWidgets_COMPONENTS="stc;html;aui;adv;core;net;base" \
-DwxLuaBind_COMPONENTS="stc;html;aui;adv;core;net;base" -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \
-DwxLua_LUA_INCLUDE_DIR="$INSTALL_DIR/include" -DwxLua_LUA_LIBRARY="$INSTALL_DIR/lib/liblua.dylib" .
(cd modules/luamodule; make $MAKEFLAGS) || { echo "Error: failed to build wxLua"; exit 1; }
(cd modules/luamodule; make install/strip)
strip -u -r "$INSTALL_DIR/lib/libwx.dylib"
[ -f "$INSTALL_DIR/lib/libwx.dylib" ] || { echo "Error: libwx.dylib isn't found"; exit 1; }
cd ../..
rm -rf "$WXLUA_BASENAME"
fi
# build LuaSocket
if [ $BUILD_LUASOCKET ]; then
wget -c "$LUASOCKET_URL" -O "$LUASOCKET_FILENAME" || { echo "Error: failed to download LuaSocket"; exit 1; }
tar -xzf "$LUASOCKET_FILENAME"
cd "$LUASOCKET_BASENAME"
mkdir -p "$INSTALL_DIR/lib/lua/5.1/"{mime,socket}
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/mime/core.dylib" src/mime.c \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/socket/core.dylib" \
src/{auxiliar.c,buffer.c,except.c,inet.c,io.c,luasocket.c,options.c,select.c,tcp.c,timeout.c,udp.c,usocket.c} \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
strip -u -r "$INSTALL_DIR/lib/lua/5.1/mime/core.dylib" "$INSTALL_DIR/lib/lua/5.1/socket/core.dylib"
mkdir -p "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ftp.lua,http.lua,smtp.lua,tp.lua,url.lua} "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ltn12.lua,mime.lua,socket.lua} "$INSTALL_DIR/share/lua/5.1"
[ -f "$INSTALL_DIR/lib/lua/5.1/mime/core.dylib" ] || { echo "Error: mime/core.dylib isn't found"; exit 1; }
[ -f "$INSTALL_DIR/lib/lua/5.1/socket/core.dylib" ] || { echo "Error: socket/core.dylib isn't found"; exit 1; }
cd ..
rm -rf "$LUASOCKET_FILENAME" "$LUASOCKET_BASENAME"
fi
# now copy the compiled dependencies to ZBS binary directory
mkdir -p "$BIN_DIR" || { echo "Error: cannot create directory $BIN_DIR"; exit 1; }
if [ $BUILD_LUA ]; then
mkdir -p "$BIN_DIR/lua.app/Contents/MacOS"
cp "$INSTALL_DIR/bin/lua" "$BIN_DIR/lua.app/Contents/MacOS"
cp "$INSTALL_DIR/bin/lua" "$INSTALL_DIR/lib/liblua.dylib" "$BIN_DIR"
fi
[ $BUILD_WXLUA ] && cp "$INSTALL_DIR/lib/libwx.dylib" "$BIN_DIR"
if [ $BUILD_LUASOCKET ]; then
mkdir -p "$BIN_DIR/clibs/"{mime,socket}
cp "$INSTALL_DIR/lib/lua/5.1/mime/core.dylib" "$BIN_DIR/clibs/mime"
cp "$INSTALL_DIR/lib/lua/5.1/socket/core.dylib" "$BIN_DIR/clibs/socket"
fi
# show a message about successful completion
echo "*** Build has been successfully completed ***"
exit 0

216
build/build-win32.sh Normal file
View File

@@ -0,0 +1,216 @@
#!/bin/bash
# ZBS binary directory
BIN_DIR="$(dirname "$PWD")/bin"
# temporary installation directory for dependencies
INSTALL_DIR="$PWD/deps"
# number of parallel jobs used for building
MAKEFLAGS="-j4"
# flags for manual building with gcc
BUILD_FLAGS="-O2 -shared -s -I $INSTALL_DIR/include -L $INSTALL_DIR/lib"
# paths configuration
WXWIDGETS_BASENAME="wxWidgets"
WXWIDGETS_URL="http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk"
LUA_BASENAME="lua-5.1.5"
LUA_FILENAME="$LUA_BASENAME.tar.gz"
LUA_URL="http://www.lua.org/ftp/$LUA_FILENAME"
WXLUA_BASENAME="wxlua"
WXLUA_URL="https://wxlua.svn.sourceforge.net/svnroot/wxlua/trunk"
LUASOCKET_BASENAME="luasocket-2.0.2"
LUASOCKET_FILENAME="$LUASOCKET_BASENAME.tar.gz"
LUASOCKET_URL="http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/$LUASOCKET_FILENAME"
WINAPI_BASENAME="winapi"
WINAPI_URL="https://github.com/stevedonovan/winapi.git"
# exit if the command line is empty
if [ $# -eq 0 ]; then
echo "Usage: $0 LIBRARY..."
exit 0
fi
# iterate through the command line arguments
for ARG in "$@"; do
case $ARG in
wxwidgets)
BUILD_WXWIDGETS=true
;;
lua)
BUILD_LUA=true
;;
wxlua)
BUILD_WXLUA=true
;;
luasocket)
BUILD_LUASOCKET=true
;;
winapi)
BUILD_WINAPI=true
;;
zbstudio)
BUILD_ZBSTUDIO=true
;;
all)
BUILD_WXWIDGETS=true
BUILD_LUA=true
BUILD_WXLUA=true
BUILD_LUASOCKET=true
BUILD_WINAPI=true
BUILD_ZBSTUDIO=true
;;
*)
echo "Error: invalid argument $ARG"
exit 1
;;
esac
done
# check for g++
if [ ! "$(which g++)" ]; then
echo "Error: g++ isn't found. Please install MinGW C++ compiler."
exit 1
fi
# check for cmake
if [ ! "$(which cmake)" ]; then
echo "Error: cmake isn't found. Please install CMake and add it to PATH."
exit 1
fi
# check for svn
if [[ ($BUILD_WXWIDGETS || $BUILD_LUA) && ! "$(which svn)" ]]; then
echo "Error: svn isn't found. Please install console SVN client."
exit 1
fi
# check for git
if [[ $BUILD_WINAPI && ! "$(which git)" ]]; then
echo "Error: git isn't found. Please install console GIT client."
exit 1
fi
# check for wget
if [ ! "$(which wget)" ]; then
# NOTE: can't check the return status since mingw-get always returns 0 even in the case of errors :(
mingw-get install msys-wget
fi
# create the installation directory
mkdir -p "$INSTALL_DIR" || { echo "Error: cannot create directory $INSTALL_DIR"; exit 1; }
# build wxWidgets
if [ $BUILD_WXWIDGETS ]; then
svn co "$WXWIDGETS_URL" "$WXWIDGETS_BASENAME" || { echo "Error: failed to checkout wxWidgets"; exit 1; }
svn revert -R "$WXWIDGETS_BASENAME"
cd "$WXWIDGETS_BASENAME"
./configure --prefix="$INSTALL_DIR" --disable-debug --disable-shared --enable-unicode \
--with-libjpeg=builtin --with-libpng=builtin --with-libtiff=no --with-expat=no \
--with-zlib=builtin --disable-richtext \
CFLAGS="-Os -fno-keep-inline-dllexport" CXXFLAGS="-Os -fno-keep-inline-dllexport"
make $MAKEFLAGS || { echo "Error: failed to build wxWidgets"; exit 1; }
make install
cd ..
rm -rf "$WXWIDGETS_BASENAME"
fi
# build Lua
if [ $BUILD_LUA ]; then
wget -c "$LUA_URL" -O "$LUA_FILENAME" || { echo "Error: failed to download Lua"; exit 1; }
tar -xzf "$LUA_FILENAME"
cd "$LUA_BASENAME"
make mingw || { echo "Error: failed to build Lua"; exit 1; }
make install INSTALL_TOP="$INSTALL_DIR"
cp src/lua51.dll "$INSTALL_DIR/lib"
[ -f "$INSTALL_DIR/lib/lua51.dll" ] || { echo "Error: lua51.dll isn't found"; exit 1; }
cd ..
rm -rf "$LUA_FILENAME" "$LUA_BASENAME"
fi
# build wxLua
if [ $BUILD_WXLUA ]; then
svn co "$WXLUA_URL" "$WXLUA_BASENAME" || { echo "Error: failed to checkout wxLua"; exit 1; }
svn revert -R "$WXLUA_BASENAME"
cd "$WXLUA_BASENAME/wxLua"
sed -i 's|:-/\(.\)/|:-\1:/|' "$INSTALL_DIR/bin/wx-config"
sed -i 's/execute_process(COMMAND/& sh/' build/CMakewxAppLib.cmake modules/wxstedit/build/CMakewxAppLib.cmake
# the following patches wxlua source to fix live coding support in wxlua apps
# http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03225.html
sed -i 's/\(m_wxlState = wxLuaState(wxlState.GetLuaState(), wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);\)/\/\/ removed by ZBS build process \/\/ \1/' modules/wxlua/wxlcallb.cpp
cp "$INSTALL_DIR/lib/libwxscintilla-2.9.a" "$INSTALL_DIR/lib/libwx_mswu_scintilla-2.9.a"
echo "set_target_properties(wxLuaModule PROPERTIES LINK_FLAGS -static)" >> modules/luamodule/CMakeLists.txt
cmake -G "MSYS Makefiles" -DBUILD_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=FALSE \
-DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
-DwxWidgets_COMPONENTS="stc;html;aui;adv;core;net;base" \
-DwxLuaBind_COMPONENTS="stc;html;aui;adv;core;net;base" -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \
-DwxLua_LUA_INCLUDE_DIR="$INSTALL_DIR/include" -DwxLua_LUA_LIBRARY="$INSTALL_DIR/lib/lua51.dll" .
(cd modules/luamodule; make $MAKEFLAGS) || { echo "Error: failed to build wxLua"; exit 1; }
(cd modules/luamodule; make install/strip)
[ -f "$INSTALL_DIR/bin/libwx.dll" ] || { echo "Error: libwx.dll isn't found"; exit 1; }
cd ../..
rm -rf "$WXLUA_BASENAME"
fi
# build LuaSocket
if [ $BUILD_LUASOCKET ]; then
wget -c "$LUASOCKET_URL" -O "$LUASOCKET_FILENAME" || { echo "Error: failed to download LuaSocket"; exit 1; }
tar -xzf "$LUASOCKET_FILENAME"
cd "$LUASOCKET_BASENAME"
mkdir -p "$INSTALL_DIR/lib/lua/5.1/"{mime,socket}
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/mime/core.dll" src/mime.c -llua51 \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
gcc $BUILD_FLAGS -o "$INSTALL_DIR/lib/lua/5.1/socket/core.dll" \
src/{auxiliar.c,buffer.c,except.c,inet.c,io.c,luasocket.c,options.c,select.c,tcp.c,timeout.c,udp.c,wsocket.c} -lwsock32 -llua51 \
|| { echo "Error: failed to build LuaSocket"; exit 1; }
mkdir -p "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ftp.lua,http.lua,smtp.lua,tp.lua,url.lua} "$INSTALL_DIR/share/lua/5.1/socket"
cp src/{ltn12.lua,mime.lua,socket.lua} "$INSTALL_DIR/share/lua/5.1"
[ -f "$INSTALL_DIR/lib/lua/5.1/mime/core.dll" ] || { echo "Error: mime/core.dll isn't found"; exit 1; }
[ -f "$INSTALL_DIR/lib/lua/5.1/socket/core.dll" ] || { echo "Error: socket/core.dll isn't found"; exit 1; }
cd ..
rm -rf "$LUASOCKET_FILENAME" "$LUASOCKET_BASENAME"
fi
# build winapi
if [ $BUILD_WINAPI ]; then
git clone "$WINAPI_URL" "$WINAPI_BASENAME"
cd "$WINAPI_BASENAME"
gcc $BUILD_FLAGS -DPSAPI_VERSION=1 -o "$INSTALL_DIR/lib/lua/5.1/winapi.dll" winapi.c wutils.c -lpsapi -lmpr -llua51 \
|| { echo "Error: failed to build winapi"; exit 1; }
[ -f "$INSTALL_DIR/lib/lua/5.1/winapi.dll" ] || { echo "Error: winapi.dll isn't found"; exit 1; }
cd ..
rm -rf "$WINAPI_BASENAME"
fi
# build ZBS launcher
if [ $BUILD_ZBSTUDIO ]; then
windres ../zbstudio/res/zbstudio.rc zbstudio.rc.o
gcc -O2 -s -mwindows -o ../zbstudio.exe win32_starter.c zbstudio.rc.o
rm zbstudio.rc.o
[ -f ../zbstudio.exe ] || { echo "Error: zbstudio.exe isn't found"; exit 1; }
fi
# now copy the compiled dependencies to ZBS binary directory
mkdir -p "$BIN_DIR" || { echo "Error: cannot create directory $BIN_DIR"; exit 1; }
[ $BUILD_LUA ] && cp "$INSTALL_DIR/bin/lua.exe" "$INSTALL_DIR/lib/lua51.dll" "$BIN_DIR"
[ $BUILD_WXLUA ] && cp "$INSTALL_DIR/bin/libwx.dll" "$BIN_DIR/wx.dll"
[ $BUILD_WINAPI ] && cp "$INSTALL_DIR/lib/lua/5.1/winapi.dll" "$BIN_DIR"
if [ $BUILD_LUASOCKET ]; then
mkdir -p "$BIN_DIR/clibs/"{mime,socket}
cp "$INSTALL_DIR/lib/lua/5.1/mime/core.dll" "$BIN_DIR/clibs/mime"
cp "$INSTALL_DIR/lib/lua/5.1/socket/core.dll" "$BIN_DIR/clibs/socket"
fi
# To build lua5.1.dll proxy:
# (1) get mkforwardlib-gcc.lua from http://lua-users.org/wiki/LuaProxyDllThree
# (2) run it as "lua mkforwardlib-gcc.lua lua51 lua5.1 X86"
# show a message about successful completion
echo "*** Build has been successfully completed ***"
exit 0

92
build/messages.lua Normal file
View File

@@ -0,0 +1,92 @@
-- This scrips extracts all text messages for ZeroBrane Studio and generates
-- a file that can be used to provide translation to a particular language.
-- The name of the file -- ll-cc.lua -- has two segments:
-- ll (mandatory) -- two letter [language code](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes);
-- cc (optional) -- two letter [country code](http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements).
-- You can generate an empty file with all messages by running:
-- > bin\lua.exe build/messages.lua
-- You can also update an existing file with new messages by running:
-- > bin\lua.exe build/messages.lua cfg/i18n/ru.lua
local iswindows = os.getenv('WINDIR') or (os.getenv('OS') or ''):match('[Ww]indows')
if iswindows or not pcall(require, "wx") then
package.cpath = (iswindows and 'bin/?.dll;' or 'bin/lib?.dylib;') .. package.cpath
end
require "wx"
function FileSysGet(dir,spec)
local content = {}
local browse = wx.wxFileSystem()
local cwd = wx.wxGetCwd()
if not wx.wxFileName(dir):DirExists() then return content end
local f = browse:FindFirst(dir,spec)
while #f>0 do
if f:match("^file:") then -- remove file: protocol (wx2.9+)
f = f:gsub(iswindows and "^file:/?" or "^file:","")
:gsub('%%(%x%x)', function(n) return string.char(tonumber(n, 16)) end)
end
-- wx2.9+ return absolute path here instead of expected relative; fix it
if wx.wxIsAbsolutePath(f) then
local relative = wx.wxFileName(f)
relative:MakeRelativeTo(cwd)
f = relative:GetFullPath()
end
table.insert(content, f)
f = browse:FindNext()
end
return content
end
function FileRead(file)
local f = wx.wxFile(file, wx.wxFile.read)
if not f:IsOpened() then
error("Can't open file '"..file.."': "..wx.wxSysErrorMsg()) end
local _, content = f:Read(f:Length())
f:Close()
return content
end
local file = ... -- pass an existing file name as a parameter
local messages = {}
for _, mask in ipairs({"zbstudio/*.lua", "src/main.lua", "src/editor/*.lua"}) do
for _, file in ipairs(FileSysGet(mask, wx.wxFILE)) do
local content = FileRead(file)
for msg in content:gmatch("[^%w]TR(%b())") do
-- remove brackets aroung ("foo")
-- extract message from ("foo", count)
msg = msg:gsub("^%(", ""):gsub("%)$", ""):gsub([[(["']), .+]], "%1")
messages[msg] = messages[msg] or {}
messages[msg][file] = (messages[msg][file] or 0) + 1
end
end
end
local existing = {}
if file then
local content = FileRead(file)
for msg, translation in content:gmatch("%s*%[([^%]]+)%]%s*=%s*([^\010\013]+)") do
if not translation:find('^nil') then existing[tonumber(msg) or msg] = translation end
end
end
local plural = existing[0] and (" [0] = "..existing[0].."\n") or ""
existing[0] = nil
local msgs = {}
for m, files in pairs(messages) do
local str = " ["..m.."] = "..(existing[m] or 'nil, --')
str = str:gsub(" %-%-.*$", "").." -- "
for f in pairs(files) do str = str .. f .. ", " end
msgs[#msgs+1] = str:gsub(", $", "")
existing[m] = nil -- remove from the list of existing elements
end
table.sort(msgs)
print("return {\n"..plural..table.concat(msgs, "\n").."\n}")
if next(existing) then
local str = "-- no match found for the following elements: "
for msg in pairs(existing) do str = str .. msg .. ", " end
print((str:gsub(", $", "")))
end

View File

@@ -4,7 +4,7 @@
// (providing a single exe file in our main directory without
// polluting it with all these dlls located in the /bin folder)
#ifdef __MINGW__ /* not sure if this is the *official* define */
#ifdef __MINGW32__
#define _WIN32_WINNT 0x0502
#endif
@@ -24,7 +24,6 @@ typedef void varfuncvoid (void *L,...);
// from lua.h
#define LUA_GLOBALSINDEX (-10002)
static voidfunc *luaL_newstate;
static varfunc *luaL_loadbuffer;
static varfunc *luaL_openlibs;
@@ -146,13 +145,12 @@ int main (int argc, char *argv[])
#endif
HINSTANCE hinstLib;
char buffer[MAX_PATH],*file;
if (!GetFullPathName(argv[0],MAX_PATH,buffer,&file)) {
MessageBox(NULL,
TEXT("Couldn't find the correct working directory"),
TEXT("Failed to start estrela"),
TEXT("Failed to start editor"),
MB_OK|MB_ICONERROR);
return 0;
}
@@ -166,7 +164,7 @@ int main (int argc, char *argv[])
SetDllDirectory(".\\bin\\");
hinstLib = LoadLibrary("lua5.1.dll");
hinstLib = LoadLibrary("lua51.dll");
if (hinstLib != NULL)
{
luaL_newstate = (voidfunc*) GetProcAddress(hinstLib, "luaL_newstate");
@@ -207,18 +205,18 @@ int main (int argc, char *argv[])
else
MessageBox(NULL,
TEXT("An unexpected error occured while loading the lua chunk."),
TEXT("Failed to start estrela"),
TEXT("Failed to start editor"),
MB_OK|MB_ICONERROR);
} else
MessageBox(NULL,
TEXT("Couldn't initialize a luastate"),
TEXT("Failed to start estrela"),
TEXT("Failed to start editor"),
MB_OK|MB_ICONERROR);
} else {
MessageBox(NULL,
TEXT("Could not load all functions that are supposed to be located in the lua5.1.dll\n"
TEXT("Could not load all functions that are supposed to be located in the lua51.dll\n"
"This is not supposed to be happening..."),
TEXT("Failed to start estrela"),
TEXT("Failed to start editor"),
MB_OK|MB_ICONERROR);
}
@@ -226,11 +224,10 @@ int main (int argc, char *argv[])
FreeLibrary(hinstLib);
} else {
MessageBox(NULL,
TEXT("The lua5.1.dll could not be found or loaded, please check the working directory of the application.\n"),
TEXT("Failed to initialize estrela"),
TEXT("The lua51.dll could not be found or loaded, please check the working directory of the application.\n"),
TEXT("Failed to initialize editor"),
MB_OK|MB_ICONERROR);
}
return 0;
}

View File

@@ -1,38 +0,0 @@
styles = {
-- lexer specific (inherit fg/bg from text)
lexerdef = {fg = {128, 128, 128},},
comment = {fg = {0, 127, 0 },bg = {240, 240, 220}, fill= true,},
stringtxt = {fg = {127, 0, 127},},
stringeol = {fg = {0, 0, 0 },bg = {224, 192, 224}, fill = true, },
preprocessor = {fg = {127, 127, 0 },},
operator = {fg = {0, 0, 0 },},
number = {fg = {90, 100, 0 },},
keywords0 = {fg = {0, 0, 127}, b = true,},
keywords1 = {fg = {127, 0, 0}, b = true,},
keywords2 = {fg = {0, 127, 0}, b = true,},
keywords3 = {fg = {0, 0, 127}, b = true,},
keywords4 = {fg = {127, 0, 95}, b = true,},
keywords5 = {fg = {35, 95, 175}, b = true,},
keywords6 = {fg = {0, 127, 127}, b = true,},
keywords7 = {fg = {240, 255, 255}, b = true,},
-- common (inherit fg/bg from text)
text = nil, -- let os pick
linenumber = {fg = {90, 90, 80},},
bracematch = {fg = {0, 0, 255}, b = true},
bracemiss = {fg = {255, 0, 0 }, b = true},
ctrlchar = nil,
indent = {fg = {192, 192, 192},bg = {255, 255, 255},},
calltip = nil,
-- common special (need custom fg & bg)
calltipbg = nil,
sel = nil,
caret = nil,
caretlinebg = nil,
fold = nil,
whitespace = {fg = {180, 180, 180,},},
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_BOX},
}

View File

@@ -1,38 +0,0 @@
styles = {
-- lexer specific (inherit fg/bg from text)
lexerdef = {fg = {128, 128, 128},},
comment = {fg = {200, 230, 120 },bg = {30, 40, 30 }, fill= true,},
stringtxt = {fg = {240,128,240},},
stringeol = {fg = {240,128,200},bg = {48, 24, 24}, fill = true,},
preprocessor = {fg = {220,175,140},},
operator = {fg = {210, 230, 240 },},
number = {fg = {210, 230, 255, },},
keywords0 = {fg = {240,240,0}},
keywords1 = {fg = {255,64,64},},
keywords2 = {fg = {0,240,240},},
keywords3 = {fg = {140,140,240},},
keywords4 = {fg = {255, 128, 0},},
keywords5 = {fg = {200,200,240},},
keywords6 = {fg = {64, 250, 64},},
keywords7 = {fg = {255, 128, 128},},
-- common (inherit fg/bg from text)
text = {fg = {240,240,240},bg = {24,24,24},},
linenumber = {fg = {30, 30, 40},bg = {230, 230, 230},},
bracematch = {fg = {255, 127, 0}, b = true},
bracemiss = {fg = {255, 0,0}, b = true},
ctrlchar = nil,
indent = {fg = {80, 80, 80},bg = {24,24,24},},
calltip = {fg = {255,255,255},bg = {10,10,10},},
-- common special (need custom fg & bg)
calltipbg = {fg = {240,240,240},bg = {10,10,10},},
sel = {fg = {180,220,140},bg = {70,105,100},},
caret = {fg = {250,250,250},},
caretlinebg = {fg = {180,220,140},bg = {24,44,44},},
fold = nil,
whitespace = {fg = {54,54,54},},
fncall = {fg = {140,140,0}, st = wxstc.wxSTC_INDIC_BOX},
}

View File

@@ -1,38 +0,0 @@
styles = {
-- lexer specific (inherit fg/bg from text)
lexerdef = {fg = {128, 128, 128},},
comment = {fg = {100, 155, 65}, bg = {30, 35, 30 }, fill= true,},
stringtxt = {fg = {200, 145, 145},},
stringeol = {fg = {200, 145, 145},bg = {48, 24, 24}, fill = true,},
preprocessor = {fg = {220, 175, 140},},
operator = {fg = {210, 230, 240 },},
number = {fg = {210, 230, 255, },},
keywords0 = {fg = {128,128,255},},
keywords1 = {fg = {210,90,90},},
keywords2 = {fg = {0,220,220},},
keywords3 = {fg = {220,220,0},},
keywords4 = {fg = {240, 128,0},},
keywords5 = {fg = {200,200,240},},
keywords6 = {fg = {64, 240, 64},},
keywords7 = {fg = {255, 128, 128},},
-- common (inherit fg/bg from text)
text = {fg = {200,200,200},bg = {18,24,26},},
linenumber = {fg = {30, 30, 40},bg = {230, 230, 230},},
bracematch = {fg = {255, 127, 0}, b = true},
bracemiss = {fg = {255, 0,0}, b = true},
ctrlchar = nil,
indent = {fg = {80, 80, 80},bg = {24,24,24},},
calltip = {fg = {255,255,255},bg = {10,10,10},},
-- common special (need custom fg & bg)
calltipbg = {fg = {240,240,240},bg = {10,10,10},},
sel = {fg = {180,220,140},bg = {70,105,100},},
caret = {fg = {250,250,250},},
caretlinebg = {fg = {180,220,140},bg = {24,44,44},},
fold = nil,
whitespace = {fg = {54,54,54},},
fncall = {fg = {75,75,150}, st= wxstc.wxSTC_INDIC_BOX},
}

20
cfg/estrela.lua Normal file
View File

@@ -0,0 +1,20 @@
-- If you have used Estrela before, please copy this content
-- to your user.lua file in the cfg/ directory
-- load all tools, specs, and interpreters
local all = function() return true end
load.tools(all)
load.specs(all)
load.interpreters(all)
-- this flag means that toggling between projects, will not affect the
-- list of opened files (old estrela default).
-- zbstudio defaults here to true, meaning that you get
-- per-project list of openend files
projectautoopen = false
-- default search paths for luxinia
local luxpath = os.getenv("LUXINIA")
path.luxinia = luxpath and luxpath.."/" or "../luxinia/engine/"
local luxpath2 = os.getenv("LUXINIA2")
path.luxinia2 = luxpath2 and luxpath2.."/" or "../luxinia2/runtime/bin_Windows_x86/"

5
cfg/i18n/en.lua Normal file
View File

@@ -0,0 +1,5 @@
return {
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
["traced %d instruction"] = {"traced %d instruction", "traced %d instructions"}, -- src\editor\debugger.lua
["%d instance"] = {"%d instance", "%d instances"}, -- src\editor\findreplace.lua
}

205
cfg/i18n/es.lua Normal file
View File

@@ -0,0 +1,205 @@
-- Traducción realiazada por Iñigo Sola
-- para la versión ZeroBrane Studio 17bdb48
-- 10 de Noviembre de 2012
return {
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
["&About"] = "&Acerca de...", -- src\editor\menu_help.lua
["&Add Watch"] = "Añadir observación", -- src\editor\debugger.lua
["&Break"] = "Ruptura", -- src\editor\menu_project.lua
["&Close Page"] = "Cerrar página", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Compile"] = "Compilar", -- src\editor\menu_project.lua
["&Copy"] = "Copiar", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Default Layout"] = "Diseño por defecto", -- src\editor\menu_view.lua
["&Delete Watch"] = "Eliminar observación", -- src\editor\debugger.lua
["&Edit Watch"] = "Editar observación", -- src\editor\debugger.lua
["&Edit"] = "Editar", -- src\editor\menu_edit.lua
["&File"] = "Archivo", -- src\editor\menu_file.lua
["&Find"] = "Buscar", -- src\editor\menu_search.lua
["&Fold/Unfold All"] = "Plegar/desplegar todo", -- src\editor\menu_edit.lua
["&Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
["&Help"] = "Ayuda", -- src\editor\menu_help.lua
["&New"] = "&Nuevo", -- src\editor\menu_file.lua
["&Open..."] = "&Abrir...", -- src\editor\menu_file.lua
["&Output/Console Window"] = "Salida/Consola", -- src\editor\menu_view.lua
["&Paste"] = "Pegar", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Project"] = "Proyecto", -- src\editor\menu_project.lua, src\editor\inspect.lua
["&Redo"] = "Rehacer", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Replace"] = "Remplazar", -- src\editor\menu_search.lua
["&Run"] = "Ejecutar", -- src\editor\menu_project.lua
["&Save"] = "Guardar", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Search"] = "Buscar", -- src\editor\menu_search.lua
["&Sort"] = "Clasificar", -- src\editor\menu_search.lua
["&Stack Window"] = "Ventana de la pila de ejecución", -- src\editor\menu_view.lua
["&Start Debugger Server"] = "Lanzar servidor de depuración", -- src\editor\menu_project.lua
["&Undo"] = "Deshacer", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&View"] = "Ver", -- src\editor\menu_view.lua
["&Watch Window"] = "Ventana de observaciones", -- src\editor\menu_view.lua
["About %s"] = "Acerca de %s", -- src\editor\menu_help.lua
["Add Watch Expression"] = "Añadir expresión de observación", -- src\editor\editor.lua
["Add to Scratchpad"] = "Añadir al borrador", -- src\editor\editor.lua
["All files"] = "Todos los archivos", -- src\editor\commands.lua
["Allow external process to start debugging"] = "Permitir proceso externo para iniciar depuración", -- src\editor\menu_project.lua
["Analyze the source code"] = "Analizar el código fuente", -- src\editor\inspect.lua
["Analyze"] = "Analizar", -- src\editor\inspect.lua
["Auto Complete Identifiers"] = "Autocompletar identificadores", -- src\editor\menu_edit.lua
["Auto complete while typing"] = "Autocompletar mientras se escribe", -- src\editor\menu_edit.lua
["Break execution at the next executed line of code"] = "Parar ejecución en la siguiente línea de código", -- src\editor\menu_project.lua, src\editor\gui.lua
["C&lear Output Window"] = "Limpiar ventana de Salida", -- src\editor\menu_project.lua
["C&omment/Uncomment"] = "Comentar/descomentar", -- src\editor\menu_edit.lua
["Can't debug the script in the active editor window."] = "No se puede depurar el script en la ventana activa del editor", -- src\editor\debugger.lua
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "No se puede encontrar el archivo '%s' en el proyecto actual para activar la depuración. Actualiza el proyecto o abre el archivo en el editor antes de depurar.", -- src\editor\debugger.lua
["Can't process auto-recovery record; invalid format: %s."] = "No se puede procesar la autorrecuperación; formato inválido: %s.", -- src\editor\commands.lua
["Can't run the entry point script ('%s')."] = "No se pude ejecutar el punto de entrada del script (%s).", -- src\editor\debugger.lua
["Can't start debugging session due to internal error '%s'."] = "No se puede iniciar la sesión de depuración debido a un error interno '%s'.'", -- src\editor\debugger.lua
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "No se puede iniciar la depuración sin abrir un archivo o si no ha sido guardado ('%s').", -- src\editor\debugger.lua
["Choose ..."] = nil, -- src\editor\menu_project.lua
["Choose a project directory"] = "Elegir el directorio del proyecto", -- src\editor\menu_project.lua
["Clear &Dynamic Words"] = "Limpiar las palabras dinámicas", -- src\editor\menu_edit.lua
["Clear the output window before compiling or debugging"] = "Limpiar la ventana de salida antes de compilar o depurar", -- src\editor\menu_project.lua
["Close &Other Pages"] = nil, -- src\editor\gui.lua
["Close A&ll Pages"] = nil, -- src\editor\gui.lua
["Close the current editor window"] = "Cerrar la ventana actual del editor", -- src\editor\menu_file.lua
["Co&ntinue"] = "Continuar", -- src\editor\menu_project.lua
["Col: %d"] = "Col: %d", -- src\editor\editor.lua
["Comment or uncomment current or selected lines"] = {"Comentar o descomentar la línea activa (seleccionada)","Comentar o descomentar las líneas activas (seleccionadas)"}, -- src\editor\menu_edit.lua
["Compilation error"] = "Error de compilación", -- src\editor\debugger.lua, src\editor\commands.lua
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilación exitosa; factor de éxito: %.0f%% (%d/%d).", -- src\editor\commands.lua
["Compile the current file"] = "Compilar el archivo actual", -- src\editor\menu_project.lua
["Complete &Identifier"] = "Completar identificador", -- src\editor\menu_edit.lua
["Complete the current identifier"] = "Completar el actual identificador", -- src\editor\menu_edit.lua
["Copy selected text to clipboard"] = "Copiar el texto seleccionado al portapapeles", -- src\editor\menu_edit.lua
["Couldn't activate file '%s' for debugging; continuing without it."] = "No se pudo activar el archivo '%s' para la depuración; continuar sin él.", -- src\editor\debugger.lua
["Create an empty document"] = "Crear un documento en blanco", -- src\editor\menu_file.lua, src\editor\gui.lua
["Cu&t"] = "Cortar", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Cut selected text to clipboard"] = "Cortar el texto selecionado al portapapeles", -- src\editor\menu_edit.lua
["Debugger server started at %s:%d."] = "Servidor de depuración inciado en %s:%s", -- src\editor\debugger.lua
["Debugging session completed (%s)."] = "Sesión de depuración completada (%s).", -- src\editor\debugger.lua
["Debugging session started in '%s'."] = "Sesión de depuración iniciada en '%s'.", -- src\editor\debugger.lua
["Debugging suspended at %s:%s (couldn't activate the file)."] = nil, -- src\editor\debugger.lua
["Do you want to reload it?"] = "¿Quieres recargarlo?", -- src\editor\editor.lua
["Do you want to save the changes to '%s'?"] = "¿Quieres guardar los cambios en '%s'?", -- src\editor\commands.lua
["E&xit"] = "Salir", -- src\editor\menu_file.lua
["Enter Lua code and press Enter to run it."] = "Introduce código Lua y pulsa <Entrer> para ejecutarlo.", -- src\editor\shellbox.lua
["Enter line number"] = "Introduce número de línea", -- src\editor\menu_search.lua
["Error while loading API file: %s"] = "Error mientras se cargaba el archivo de API: %s", -- src\editor\autocomplete.lua
["Error while loading configuration file: %s"] = nil, -- src\editor\style.lua
["Error while processing API file: %s"] = "Error mientras se procesaba el archivo de API: %s", -- src\editor\autocomplete.lua
["Error while processing configuration file: %s"] = nil, -- src\editor\style.lua
["Error"] = "Error", -- src\editor\commands.lua
["Evaluate in Console"] = "Evaluar en consola", -- src\editor\editor.lua
["Execute the current project/file and keep updating the code to see immediate results"] = "Ejecutar el proyecto/archivo actual y manteniendo actualizado el código para ver resultados en tiempo real", -- src\editor\menu_project.lua
["Execute the current project/file"] = "Ejecutar el proyecto/archivo actual", -- src\editor\menu_project.lua
["Execution error"] = "Error de ejecución", -- src\editor\debugger.lua
["Exit program"] = "Salir del programa", -- src\editor\menu_file.lua
["Expr"] = "Expr.", -- src\editor\debugger.lua
["Expression"] = "Expresión", -- src\editor\debugger.lua
["File '%s' has been modified on disk."] = "El archivo '%s' ha sido modificado en el disco.", -- src\editor\editor.lua
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "El archivo '%s' tiene una fecha más reciente que el restaurado '%s'; por favor, revísalo antes de guardar.", -- src\editor\commands.lua
["File '%s' no longer exists."] = "El archivo '%s' no existe.", -- src\editor\editor.lua
["File history"] = "Historial de archivos", -- src\editor\menu_file.lua
["Find &In Files"] = "Buscar en archivos", -- src\editor\menu_search.lua
["Find &Next"] = "Buscar siguiente", -- src\editor\menu_search.lua
["Find &Previous"] = "Buscar anterior", -- src\editor\menu_search.lua
["Find and replace text in files"] = "Buscar y remplazar texto en archivos", -- src\editor\menu_search.lua
["Find and replace text"] = "Buscar y rempleazar texto", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find text in files"] = "Buscar texto en archivos", -- src\editor\menu_search.lua
["Find text"] = "Buscar texto", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find the earlier text occurence"] = "Buscar la anterior aparición del texto", -- src\editor\menu_search.lua
["Find the next text occurrence"] = "Buscar la siguiente aparecición del texto", -- src\editor\menu_search.lua
["Fold or unfold all code folds"] = "Plegar o desplegar todo el código plegado", -- src\editor\menu_edit.lua
["Found auto-recovery record and restored saved session."] = "Encontrada autorrecuperación y sesión restaurada.", -- src\editor\commands.lua
["Full &Screen"] = "Pantalla completa", -- src\editor\menu_view.lua
["Go to a selected line"] = "Ir a línea seleccionada", -- src\editor\menu_search.lua
["Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
["INS"] = "INS", -- src\editor\editor.lua
["Jump to a function definition..."] = "Saltar a la definición de la función...", -- src\editor\editor.lua
["Known Files"] = "Archivos conocidos", -- src\editor\commands.lua
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
["Local console"] = "Consola local", -- src\editor\shellbox.lua, src\editor\gui.lua
["Lua &Interpreter"] = "Intérprete Lua", -- src\editor\menu_project.lua
["Mapped remote request for '%s' to '%s'."] = nil, -- src\editor\debugger.lua
["Mixed end-of-line encodings detected."] = nil, -- src\editor\commands.lua
["OVR"] = "OVR", -- src\editor\editor.lua
["Open an existing document"] = "Abrir un documento existente", -- src\editor\menu_file.lua, src\editor\gui.lua
["Open file"] = "Abrir archivo", -- src\editor\commands.lua
["Output (running)"] = "Salida (en ejecución)", -- src\editor\output.lua
["Output"] = "Salida", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
["Paste text from the clipboard"] = "Pegar texto desde el portapapeles", -- src\editor\menu_edit.lua
["Prepend '=' to show complex values on multiple lines."] = "Antepón '=' para ver valores complejos en líneas múltiples", -- src\editor\shellbox.lua
["Press cancel to abort."] = "Presiona cancelar para abortar.", -- src\editor\commands.lua
["Program '%s' started in '%s' (pid: %d)."] = "Programa '%s' iniciado en '%s' (pid: %d).", -- src\editor\output.lua
["Program can't start because conflicting process is running as '%s'."] = "El programa no puede iniciarse porque hay un proceso conflictivo en ejecución como '%s'.", -- src\editor\output.lua
["Program completed in %.2f seconds (pid: %d)."] = "Programa completado en %.2f segundos (pid: %d).", -- src\editor\output.lua
["Program starting as '%s'."] = "Programa iniciado como '%s'.", -- src\editor\output.lua
["Program stopped (pid: %d)."] = "Programa parado (pid: %d).", -- src\editor\debugger.lua
["Program unable to run as '%s'."] = "No se puede ejecutar el programa como '%s'.", -- src\editor\output.lua
["Project Directory"] = nil, -- src\editor\menu_project.lua
["Project"] = "Proyecto", -- src\editor\settings.lua, src\editor\gui.lua
["Project/&FileTree Window"] = "Ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
["R/O"] = "R/O", -- src\editor\editor.lua
["R/W"] = "R/W", -- src\editor\editor.lua
["Re&place In Files"] = "Remplazar en archivos", -- src\editor\menu_search.lua
["Recent Files"] = "Archivos recientes", -- src\editor\menu_file.lua
["Redo last edit undone"] = "Rehacer la última edición deshecha", -- src\editor\menu_edit.lua
["Refused a request to start a new debugging session as there is one in progress already."] = "No se pudo lanzar una nueva sesión de depuración porque ya hay una en curso.", -- src\editor\debugger.lua
["Remote console"] = "Consola remota", -- src\editor\shellbox.lua
["Replaced an invalid UTF8 character with %s."] = nil, -- src\editor\commands.lua
["Reset to default layout"] = "Restablecer el diseño por defecto", -- src\editor\menu_view.lua
["Resets the dynamic word list for autocompletion"] = "Restablecer la lista dinámica de palabras para autocompletado", -- src\editor\menu_edit.lua
["Run as Scratchpad"] = "Ejecutar como borrador", -- src\editor\menu_project.lua
["S&top Debugging"] = "Parar depuración", -- src\editor\menu_project.lua
["S&top Process"] = "Parar proceso", -- src\editor\menu_project.lua
["Save &As..."] = "Guardar como...", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save A&ll"] = "Guardar todo", -- src\editor\menu_file.lua
["Save Changes?"] = "¿Guardar cambios?", -- src\editor\commands.lua
["Save all open documents"] = "Guardar todos los documentos abiertos", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save file as"] = "Guardar archivo como", -- src\editor\commands.lua
["Save file?"] = "¿Guardar archivo?", -- src\editor\commands.lua
["Save the current document to a file with a new name"] = "Guardar el documento actual en un archivo con un nombre nuevo", -- src\editor\menu_file.lua
["Save the current document"] = "Guardar el documento actual", -- src\editor\menu_file.lua, src\editor\gui.lua
["Saved auto-recover at %s."] = "Guardar autorrecuperación en %s.", -- src\editor\commands.lua
["Scratchpad error"] = "Error en el borrador", -- src\editor\debugger.lua
["Select &All"] = "Seleccionar todo", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Select all text in the editor"] = "Seleccionar todo el texto en el editor", -- src\editor\menu_edit.lua
["Set From Current File"] = nil, -- src\editor\menu_project.lua
["Set project directory from current file"] = "Establecer el directorio del proyecto del archivo actual", -- src\editor\menu_project.lua, src\editor\gui.lua
["Set the interpreter to be used"] = "Establecer el intérprete a ser usado", -- src\editor\menu_project.lua
["Set the project directory to be used"] = nil, -- src\editor\menu_project.lua
["Show &Tooltip"] = "Ver tooltip", -- src\editor\menu_edit.lua
["Show tooltip for current position; place cursor after opening bracket of function"] = "Ver tooltip para la posición actual; posicionar el cursor después de abrir el paréntisis de los argumentos de la función", -- src\editor\menu_edit.lua
["Sort selected lines"] = "Clasificar las líneas seleccionadas", -- src\editor\menu_search.lua
["Stack"] = nil, -- src\editor\debugger.lua
["Start &Debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua
["Start debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step &Into"] = "Paso dentro", -- src\editor\menu_project.lua
["Step &Over"] = "Paso sin entrar", -- src\editor\menu_project.lua
["Step O&ut"] = "Paso fuera", -- src\editor\menu_project.lua
["Step into"] = "Paso dentro", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step out of the current function"] = "Hasta salir de la función actual", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step over"] = "Paso sin entrar", -- src\editor\menu_project.lua, src\editor\gui.lua
["Stop the currently running process"] = "Parar el proceso en ejecución", -- src\editor\menu_project.lua, src\editor\gui.lua
["Switch to or from full screen mode"] = "Conmutar el modo de pantalla completa", -- src\editor\menu_view.lua
["The API file must be located in a subdirectory of the API directory."] = "El archivo de API debe ser almacenado en un subdirectorio del directorio de API.", -- src\editor\autocomplete.lua
["Toggle Break&point"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua
["Toggle breakpoint"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua, src\editor\gui.lua
["Tr&ace"] = "Traza", -- src\editor\menu_project.lua
["Trace execution showing each executed line"] = "Traza de ejecución mostrando cada línea ejecutada", -- src\editor\menu_project.lua
["Unable to load file '%s'."] = "No se pudo cargar el archivo '%s'.", -- src\editor\commands.lua
["Unable to save file '%s': %s"] = "No se pudo guardar el archivo '%s': %s", -- src\editor\commands.lua
["Unable to stop program (pid: %d), code %d."] = "No se puedo parar el programa (pid: %d), código %d.", -- src\editor\debugger.lua
["Undo last edit"] = "Deshacer la última edición", -- src\editor\menu_edit.lua
["Use '%s' to see full description."] = nil, -- src\editor\editor.lua
["Use '%s' to show line endings and '%s' to convert them."] = nil, -- src\editor\commands.lua
["Use 'clear' to clear the shell output and the history."] = "Usa 'clear' para limpiar la consola de salida y el historial.", -- src\editor\shellbox.lua
["Use Shift-Enter for multiline code."] = "Usa <Shift-Enter> para código multilínea.", -- src\editor\shellbox.lua
["Value"] = "Valor", -- src\editor\debugger.lua
["View the output/console window"] = "Ver ventana de salida/consola", -- src\editor\menu_view.lua
["View the project/filetree window"] = "Ver la ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
["View the stack window"] = "Ver la ventana de la pila de ejecución", -- src\editor\menu_view.lua, src\editor\gui.lua
["View the watch window"] = "Ver la ventana de observación", -- src\editor\menu_view.lua, src\editor\gui.lua
["Watch"] = nil, -- src\editor\debugger.lua
["Welcome to the interactive Lua interpreter."] = "Bienvenido al intérprete interactico de Lua.", -- src\editor\shellbox.lua
["You must save the program first."] = "Debes guardar el programa primero", -- src\editor\commands.lua
["on line %d"] = "en la línea %d", -- src\editor\debugger.lua, src\editor\commands.lua
["traced %d instruction"] = {"%d instrucción trazada", "%d instrucciones trazadas"} -- src\editor\debugger.lua
}

202
cfg/i18n/fr.lua Normal file
View File

@@ -0,0 +1,202 @@
return {
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
["&About"] = "À &propos", -- src\editor\menu_help.lua
["&Add Watch"] = "&Ajouter une expression", -- src\editor\debugger.lua
["&Break"] = "&Interrompre", -- src\editor\menu_project.lua
["&Close Page"] = "&Fermer la page", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Compile"] = "&Compiler", -- src\editor\menu_project.lua
["&Copy"] = "Co&pier", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Default Layout"] = "Affichage par &défaut", -- src\editor\menu_view.lua
["&Delete Watch"] = "&Supprimer une expression", -- src\editor\debugger.lua
["&Edit Watch"] = "&Modifier une expression", -- src\editor\debugger.lua
["&Edit"] = "É&dition", -- src\editor\menu_edit.lua
["&File"] = "&Fichier", -- src\editor\menu_file.lua
["&Find"] = "&Rechercher...", -- src\editor\menu_search.lua
["&Fold/Unfold All"] = "Re&plier/Déplier tout", -- src\editor\menu_edit.lua
["&Goto Line"] = "&Aller à la ligne...", -- src\editor\menu_search.lua
["&Help"] = "Aid&e", -- src\editor\menu_help.lua
["&New"] = "&Nouveau", -- src\editor\menu_file.lua
["&Open..."] = "&Ouvrir...", -- src\editor\menu_file.lua
["&Output/Console Window"] = "&Sortie/Console", -- src\editor\menu_view.lua
["&Paste"] = "Co&ller", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Project"] = "&Projet", -- src\editor\menu_project.lua, src\editor\inspect.lua
["&Redo"] = "&Rétablir", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Replace"] = "Re&mplacer...", -- src\editor\menu_search.lua
["&Run"] = "&Exécuter", -- src\editor\menu_project.lua
["&Save"] = "&Enregistrer", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Search"] = "&Recherche", -- src\editor\menu_search.lua
["&Sort"] = "&Trier", -- src\editor\menu_search.lua
["&Stack Window"] = "&Pile d'exécution", -- src\editor\menu_view.lua
["&Start Debugger Server"] = "Lancer le &serveur de débogage", -- src\editor\menu_project.lua
["&Undo"] = "&Annuler", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&View"] = "&Affichage", -- src\editor\menu_view.lua
["&Watch Window"] = "&Expressions espionnes", -- src\editor\menu_view.lua
["About %s"] = "À propos de %s", -- src\editor\menu_help.lua
["Add Watch Expression"] = "Ajouter une expression", -- src\editor\editor.lua
["Add to Scratchpad"] = "Ajouter au brouillon", -- src\editor\editor.lua
["All files"] = "Tous les fichiers", -- src\editor\commands.lua
["Allow external process to start debugging"] = "Autoriser les processus externes à lancer le débogage", -- src\editor\menu_project.lua
["Analyze the source code"] = "Analyser le code source", -- src\editor\inspect.lua
["Analyze"] = "Analyser", -- src\editor\inspect.lua
["Auto Complete Identifiers"] = "Auto-compléter les identifiants", -- src\editor\menu_edit.lua
["Auto complete while typing"] = "Auto-compléter lors de la saisie", -- src\editor\menu_edit.lua
["Break execution at the next executed line of code"] = "Interrompre l'exécution à la ligne suivante", -- src\editor\menu_project.lua, src\editor\gui.lua
["C&lear Output Window"] = "E&ffacer la fenêtre de sortie", -- src\editor\menu_project.lua
["C&omment/Uncomment"] = "Co&mmenter/Décommenter", -- src\editor\menu_edit.lua
["Can't debug the script in the active editor window."] = "Impossible de déboguer le script dans la fenêtre d'édition active.", -- src\editor\debugger.lua
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Impossible de trouver le fichier '%s' dans le projet courant pour permettre le débogage. Mettez le projet à jour ou ouvrez le fichier dans l'éditeur avant débogage.", -- src\editor\debugger.lua
["Can't process auto-recovery record; invalid format: %s."] = "Impossible de lire la récupération automatique ; format invalide : %s.", -- src\editor\commands.lua
["Can't run the entry point script ('%s')."] = "Impossible d'exécuter le point d'entrée du script ('%s').", -- src\editor\debugger.lua
["Can't start debugging session due to internal error '%s'."] = "Impossible de lancer la session de débogage : erreur interne '%s'.", -- src\editor\debugger.lua
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossible de lancer le débogage si aucun fichier n'est ouvert ou si le fichier courant n'a pas été enregistré ('%s').", -- src\editor\debugger.lua
["Choose ..."] = "Choisir...", -- src\editor\menu_project.lua
["Choose a project directory"] = "Choisissez un répertoire de projet", -- src\editor\menu_project.lua
["Clear &Dynamic Words"] = "Effacer les mots &dynamiques", -- src\editor\menu_edit.lua
["Clear the output window before compiling or debugging"] = "Effacer la fenêtre de sortie avant compilation ou débogage", -- src\editor\menu_project.lua
["Close &Other Pages"] = "Fermer les &autres pages", -- src\editor\gui.lua
["Close A&ll Pages"] = "Fermer &toutes les pages", -- src\editor\gui.lua
["Close the current editor window"] = "Fermer la fenêtre d'édition active", -- src\editor\menu_file.lua
["Co&ntinue"] = "Co&ntinuer", -- src\editor\menu_project.lua
["Col: %d"] = "Col : %d", -- src\editor\editor.lua
["Comment or uncomment current or selected lines"] = "Commenter ou décommenter les lignes courantes ou sélectionnées", -- src\editor\menu_edit.lua
["Compilation error"] = "Erreur de compilation", -- src\editor\debugger.lua, src\editor\commands.lua
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilation réussie ; taux de succès : %.0f%% (%d/%d).", -- src\editor\commands.lua
["Compile the current file"] = "Сompiler le fichier courant", -- src\editor\menu_project.lua
["Complete &Identifier"] = "Compléter l'&identifiant", -- src\editor\menu_edit.lua
["Complete the current identifier"] = "Compléter l'identifiant courant", -- src\editor\menu_edit.lua
["Copy selected text to clipboard"] = "Copier le texte sélectionné dans le presse-papiers", -- src\editor\menu_edit.lua
["Couldn't activate file '%s' for debugging; continuing without it."] = "Impossible d'activer le fichier '%s' pour débogage ; poursuite du processus en ignorant le fichier.", -- src\editor\debugger.lua
["Create an empty document"] = "Créer un document vierge", -- src\editor\menu_file.lua, src\editor\gui.lua
["Cu&t"] = "&Couper", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Cut selected text to clipboard"] = "Couper le texte sélectionné et copier dans le presse-papiers", -- src\editor\menu_edit.lua
["Debugger server started at %s:%d."] = "Serveur de débogage démarré à %s:%d.", -- src\editor\debugger.lua
["Debugging session completed (%s)."] = "Session de débogage terminée (%s).", -- src\editor\debugger.lua
["Debugging session started in '%s'."] = "Session de débogage démarrée dans '%s'.", -- src\editor\debugger.lua
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Débogage interrompu à %s:%s (impossible d'activer le fichier).", -- src\editor\debugger.lua
["Do you want to reload it?"] = "Voulez-vous le recharger ?", -- src\editor\editor.lua
["Do you want to save the changes to '%s'?"] = "Voulez-vous enregistrer les modifications dans '%s' ?", -- src\editor\commands.lua
["E&xit"] = "&Quitter", -- src\editor\menu_file.lua
["Enter Lua code and press Enter to run it."] = "Saisissez du code Lua et appuyez sur <Entrée> pour l´exécuter.", -- src\editor\shellbox.lua
["Enter line number"] = "Entrez le numéro de ligne", -- src\editor\menu_search.lua
["Error while loading API file: %s"] = "Erreur lors du chargement du fichier d'API : %s", -- src\editor\autocomplete.lua
["Error while loading configuration file: %s"] = "Erreur lors du chargement du fichier de configuration : %s", -- src\editor\style.lua
["Error while processing API file: %s"] = "Erreur lors de la lecture du fichier d'API : %s", -- src\editor\autocomplete.lua
["Error while processing configuration file: %s"] = "Erreur lors de la lecture du fichier de configuration : %s", -- src\editor\style.lua
["Error"] = "Erreur", -- src\editor\commands.lua
["Evaluate in Console"] = "Évaluer dans la console", -- src\editor\editor.lua
["Execute the current project/file and keep updating the code to see immediate results"] = "Exécuter le projet/fichier courant en mettant le code à jour afin de voir les résultats en temps réel", -- src\editor\menu_project.lua
["Execute the current project/file"] = "Exécuter le projet/fichier courant", -- src\editor\menu_project.lua
["Execution error"] = "Erreur d'exécution", -- src\editor\debugger.lua
["Exit program"] = "Quitter le programme", -- src\editor\menu_file.lua
["Expr"] = "Expr.", -- src\editor\debugger.lua
["Expression"] = "Expression", -- src\editor\debugger.lua
["File '%s' has been modified on disk."] = "Le fichier '%s' a été modifié sur le disque.", -- src\editor\editor.lua
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Le fichier '%s' a un horodatage plus récent que celui restauré '%s' ; veuillez vérifier avant d'enregistrer.", -- src\editor\commands.lua
["File '%s' no longer exists."] = "Le fichier '%s' n'existe plus.", -- src\editor\editor.lua
["File history"] = "Historique de fichier", -- src\editor\menu_file.lua
["Find &In Files"] = "Rec&hercher dans les fichiers...", -- src\editor\menu_search.lua
["Find &Next"] = "Rechercher l'occurrence &suivante", -- src\editor\menu_search.lua
["Find &Previous"] = "Rechercher l'occurrence &précédente", -- src\editor\menu_search.lua
["Find and replace text in files"] = "Rechercher et remplacer le texte dans les fichiers", -- src\editor\menu_search.lua
["Find and replace text"] = "Rechercher et remplacer le texte", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find text in files"] = "Rechercher le texte dans les fichiers", -- src\editor\menu_search.lua
["Find text"] = "Rechercher le texte", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find the earlier text occurence"] = "Recherche l'occurrence précédente du texte", -- src\editor\menu_search.lua
["Find the next text occurrence"] = "Recherche l'occurrence suivante du texte", -- src\editor\menu_search.lua
["Fold or unfold all code folds"] = "Replier ou déplier tous les blocs de code", -- src\editor\menu_edit.lua
["Found auto-recovery record and restored saved session."] = "Une récupération automatique a été trouvé et la session a été restaurée.", -- src\editor\commands.lua
["Full &Screen"] = "&Plein écran", -- src\editor\menu_view.lua
["Go to a selected line"] = "Aller à la ligne sélectionnée", -- src\editor\menu_search.lua
["Goto Line"] = "Aller à la ligne", -- src\editor\menu_search.lua
["INS"] = "INS", -- src\editor\editor.lua
["Jump to a function definition..."] = "Aller à la définition de fonction...", -- src\editor\editor.lua
["Known Files"] = "Fichiers connus", -- src\editor\commands.lua
["Ln: %d"] = "Lig : %d", -- src\editor\editor.lua
["Local console"] = "Console locale", -- src\editor\shellbox.lua, src\editor\gui.lua
["Lua &Interpreter"] = "Interpréteur L&ua", -- src\editor\menu_project.lua
["Mapped remote request for '%s' to '%s'."] = "La requête distante pour '%s' a été associée à '%s'.", -- src\editor\debugger.lua
["Mixed end-of-line encodings detected."] = "Plusieurs codages de fin de ligne détectés.", -- src\editor\commands.lua
["OVR"] = "OVR", -- src\editor\editor.lua
["Open an existing document"] = "Ouvrir un document existant", -- src\editor\menu_file.lua, src\editor\gui.lua
["Open file"] = "Ouvrir un fichier", -- src\editor\commands.lua
["Output (running)"] = "Sortie (en cours d'exécution)", -- src\editor\output.lua
["Output"] = "Sortie", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
["Paste text from the clipboard"] = "Coller le texte depuis le presse-papiers", -- src\editor\menu_edit.lua
["Prepend '=' to show complex values on multiple lines."] = "Préfixez par '=' pour afficher les valeurs complexes sur plusieurs lignes.", -- src\editor\shellbox.lua
["Press cancel to abort."] = "Cliquez sur Annuler pour annuler.", -- src\editor\commands.lua
["Program '%s' started in '%s' (pid: %d)."] = "Programme '%s' démarré dans '%s' (pid : %d).", -- src\editor\output.lua
["Program can't start because conflicting process is running as '%s'."] = "Le programme ne peut démarrer à cause d'un conflit de processus avec '%s' (en cours d'exécution).", -- src\editor\output.lua
["Program completed in %.2f seconds (pid: %d)."] = "Programme terminé en %.2f secondes (pid : %d).", -- src\editor\output.lua
["Program starting as '%s'."] = "Programme démarré en tant que '%s'.", -- src\editor\output.lua
["Program stopped (pid: %d)."] = "Programme stoppé (pid : %d).", -- src\editor\debugger.lua
["Program unable to run as '%s'."] = "Impossible d'exécuter le programme en tant que '%s'.", -- src\editor\output.lua
["Project Directory"] = "Répertoire de projet", -- src\editor\menu_project.lua
["Project"] = "Projet", -- src\editor\settings.lua, src\editor\gui.lua
["Project/&FileTree Window"] = "&Explorateur de projet", -- src\editor\menu_view.lua
["R/O"] = "R/O", -- src\editor\editor.lua
["R/W"] = "R/W", -- src\editor\editor.lua
["Re&place In Files"] = "Remp&lacer dans les fichiers...", -- src\editor\menu_search.lua
["Recent Files"] = "Fichiers récents", -- src\editor\menu_file.lua
["Redo last edit undone"] = "Rétablir la dernière modification", -- src\editor\menu_edit.lua
["Refused a request to start a new debugging session as there is one in progress already."] = "Une requête de lancement de débogage a été refusée car une session de débogage est déjà en cours.", -- src\editor\debugger.lua
["Remote console"] = "Console à distance", -- src\editor\shellbox.lua
["Replaced an invalid UTF8 character with %s."] = "Un caractère UTF8 invalide a été remplacé par %s.", -- src\editor\commands.lua
["Reset to default layout"] = "Restaurer l'affichage par défaut", -- src\editor\menu_view.lua
["Resets the dynamic word list for autocompletion"] = "Réinitialiser la liste des mots dynamiques pour l'auto-complétion", -- src\editor\menu_edit.lua
["Run as Scratchpad"] = "Exécuter comme brouillon", -- src\editor\menu_project.lua
["S&top Debugging"] = "&Arrêter le débogage", -- src\editor\menu_project.lua
["S&top Process"] = "&Arrêter le processus", -- src\editor\menu_project.lua
["Save &As..."] = "Enregistrer &sous...", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save A&ll"] = "Enregistrer &tout", -- src\editor\menu_file.lua
["Save Changes?"] = "Enregistrer les modifications ?", -- src\editor\commands.lua
["Save all open documents"] = "Enregistrer tous les documents ouverts", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save file as"] = "Enregistrer le fichier sous", -- src\editor\commands.lua
["Save file?"] = "Enregistrer le fichier ?", -- src\editor\commands.lua
["Save the current document to a file with a new name"] = "Enregistrer le document courant sous un nouveau nom", -- src\editor\menu_file.lua
["Save the current document"] = "Enregistrer le document courant", -- src\editor\menu_file.lua, src\editor\gui.lua
["Saved auto-recover at %s."] = "Récup. auto enregistrée à %s.", -- src\editor\commands.lua
["Scratchpad error"] = "Erreur dans le brouillon", -- src\editor\debugger.lua
["Select &All"] = "Sélectionner &tout", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Select all text in the editor"] = "Sélectionner tout le texte dans l'éditeur", -- src\editor\menu_edit.lua
["Set From Current File"] = "Définir depuis le fichier courant", -- src\editor\menu_project.lua
["Set project directory from current file"] = "Définir le répertoire de projet depuis le fichier courant", -- src\editor\menu_project.lua, src\editor\gui.lua
["Set the interpreter to be used"] = "Définir l'interpréteur à utiliser", -- src\editor\menu_project.lua
["Set the project directory to be used"] = "Définir le répertoire de projet à utiliser", -- src\editor\menu_project.lua
["Show &Tooltip"] = "Afficher l'info-&bulle", -- src\editor\menu_edit.lua
["Show tooltip for current position; place cursor after opening bracket of function"] = "Afficher l'info-bulle pour la position actuelle ; placez le curseur après la parenthèse ouvrante de la fonction", -- src\editor\menu_edit.lua
["Sort selected lines"] = "Trier les lignes sélectionnées", -- src\editor\menu_search.lua
["Stack"] = "Pile d'exécution", -- src\editor\debugger.lua
["Start &Debugging"] = "Lancer le &débogage", -- src\editor\menu_project.lua
["Start debugging"] = "Lancer le débogage", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step &Into"] = "Pas à pas détai&llé", -- src\editor\menu_project.lua
["Step &Over"] = "Pas à pas so&mmaire", -- src\editor\menu_project.lua
["Step O&ut"] = "Pas à pas so&rtant", -- src\editor\menu_project.lua
["Step into"] = "Rentrer dans l'instruction suivante", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step out of the current function"] = "Sortir de la fonction courante", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step over"] = "Enjamber l'instruction suivante", -- src\editor\menu_project.lua, src\editor\gui.lua
["Stop the currently running process"] = "Arrêter le processus en cours d'exécution", -- src\editor\menu_project.lua, src\editor\gui.lua
["Switch to or from full screen mode"] = "Activer ou désactiver le mode plein écran", -- src\editor\menu_view.lua
["The API file must be located in a subdirectory of the API directory."] = "Le fichier d'API doit être placé dans un sous-répertoire du répertoire d'API.", -- src\editor\autocomplete.lua
["Toggle Break&point"] = "Créer/Supprimer un &point d'arrêt", -- src\editor\menu_project.lua
["Toggle breakpoint"] = "Créer ou supprimer un point d'arrêt", -- src\editor\menu_project.lua, src\editor\gui.lua
["Tr&ace"] = "&Tracer", -- src\editor\menu_project.lua
["Trace execution showing each executed line"] = "Tracer l'exécution en montrant chaque ligne de code exécutée", -- src\editor\menu_project.lua
["Unable to load file '%s'."] = "Impossible de charger le le fichier '%s'.", -- src\editor\commands.lua
["Unable to save file '%s': %s"] = "Impossible d'enregistrer le fichier '%s' : %s", -- src\editor\commands.lua
["Unable to stop program (pid: %d), code %d."] = "Impossible d'arrêter le programme (pid : %d), code %d.", -- src\editor\debugger.lua
["Undo last edit"] = "Annuler la dernière modification", -- src\editor\menu_edit.lua
["Use '%s' to see full description."] = "Utilisez '%s' pour voir la description complète.", -- src\editor\editor.lua
["Use '%s' to show line endings and '%s' to convert them."] = "Utilisez '%s' pour afficher les fins de ligne et '%s' pour les convertir.", -- src\editor\commands.lua
["Use 'clear' to clear the shell output and the history."] = "Utilisez 'clear' pour effacer la sortie console et l´historique.", -- src\editor\shellbox.lua
["Use Shift-Enter for multiline code."] = "Appuyez sur <Shift-Entrée> pour du code multiligne.", -- src\editor\shellbox.lua
["Value"] = "Valeur", -- src\editor\debugger.lua
["View the output/console window"] = "Afficher la fenêtre de sortie/console", -- src\editor\menu_view.lua
["View the project/filetree window"] = "Afficher la fenêtre d'explorateur de projet", -- src\editor\menu_view.lua
["View the stack window"] = "Afficher la fenêtre de pile d'exécution", -- src\editor\menu_view.lua, src\editor\gui.lua
["View the watch window"] = "Afficher la fenêtre d'expressions espionnes", -- src\editor\menu_view.lua, src\editor\gui.lua
["Watch"] = "Expressions espionnes", -- src\editor\debugger.lua
["Welcome to the interactive Lua interpreter."] = "Bienvenue dans l´interpréteur interactif Lua.", -- src\editor\shellbox.lua
["You must save the program first."] = "Vous devez d'abord enregistrer le programme.", -- src\editor\commands.lua
["on line %d"] = "à la ligne %d", -- src\editor\debugger.lua, src\editor\commands.lua
["traced %d instruction"] = {"%d instruction tracée", "%d instructions tracées"} -- src\editor\debugger.lua
}

202
cfg/i18n/it.lua Normal file
View File

@@ -0,0 +1,202 @@
return {
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
["&About"] = "Informazioni", -- src\editor\menu_help.lua
["&Add Watch"] = "&Aggiungi Espressione di Controllo", -- src\editor\debugger.lua
["&Break"] = "Interrompi", -- src\editor\menu_project.lua
["&Close Page"] = "&Chiudi pagina", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Compile"] = "&Compila", -- src\editor\menu_project.lua
["&Copy"] = "&Copia", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Default Layout"] = "Visualizzazione di &Default", -- src\editor\menu_view.lua
["&Delete Watch"] = "Elimina Espressione di Controllo", -- src\editor\debugger.lua
["&Edit Watch"] = "Modifica Espressione di Controllo", -- src\editor\debugger.lua
["&Edit"] = "Modifica", -- src\editor\menu_edit.lua
["&File"] = "File", -- src\editor\menu_file.lua
["&Find"] = "Ricerca", -- src\editor\menu_search.lua
["&Fold/Unfold All"] = "Apri/Chiudi tutto", -- src\editor\menu_edit.lua
["&Goto Line"] = "Vai a riga", -- src\editor\menu_search.lua
["&Help"] = "Aiuto", -- src\editor\menu_help.lua
["&New"] = "&Nuovo", -- src\editor\menu_file.lua
["&Open..."] = "&Apri...", -- src\editor\menu_file.lua
["&Output/Console Window"] = "Finestra di Output/Console", -- src\editor\menu_view.lua
["&Paste"] = "Incolla", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Project"] = "&Progetto", -- src\editor\menu_project.lua, src\editor\inspect.lua
["&Redo"] = "&Ripeti", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Replace"] = "Sostituisci", -- src\editor\menu_search.lua
["&Run"] = "Lancia", -- src\editor\menu_project.lua
["&Save"] = "&Salva", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Search"] = "Ricerca", -- src\editor\menu_search.lua
["&Sort"] = "Ordina", -- src\editor\menu_search.lua
["&Stack Window"] = "Stack di chiamate", -- src\editor\menu_view.lua
["&Start Debugger Server"] = "Avvia Debugger Server", -- src\editor\menu_project.lua
["&Undo"] = "Annulla", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&View"] = "Visualizza", -- src\editor\menu_view.lua
["&Watch Window"] = "Finestra Espressioni di Controllo", -- src\editor\menu_view.lua
["About %s"] = "Informazioni su %s", -- src\editor\menu_help.lua
["Add Watch Expression"] = "Aggiungi Espressione di Controllo", -- src\editor\editor.lua
["Add to Scratchpad"] = "Aggiungi a Scratchpad ", -- src\editor\editor.lua
["All files"] = "Tutti i files", -- src\editor\commands.lua
["Allow external process to start debugging"] = "Permetti a processi esterni di avviare il debug", -- src\editor\menu_project.lua
["Analyze the source code"] = "Analizza il codice", -- src\editor\inspect.lua
["Analyze"] = "Analizza", -- src\editor\inspect.lua
["Auto Complete Identifiers"] = "Autocompletamento identificatori", -- src\editor\menu_edit.lua
["Auto complete while typing"] = "Autocompletamento in linea", -- src\editor\menu_edit.lua
["Break execution at the next executed line of code"] = "Interrompi l'esecuzione alla successiva riga di codice ", -- src\editor\menu_project.lua, src\editor\gui.lua
["C&lear Output Window"] = "Pulisci finestra di output", -- src\editor\menu_project.lua
["C&omment/Uncomment"] = "Commenta/Scommenta", -- src\editor\menu_edit.lua
["Can't debug the script in the active editor window."] = "Impossibile farte debug dello script nella finestra attiva", -- src\editor\debugger.lua
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "File '%s' non trovato nel progetto per attivare il debug. Modificare il progetto o apire il file prima di lanciare il debug.", -- src\editor\debugger.lua
["Can't process auto-recovery record; invalid format: %s."] = "Impossibile procedere all'auto-recovery; Formato non valido: %s.", -- src\editor\commands.lua
["Can't run the entry point script ('%s')."] = "Impossibile eseguire il punto di ingresos dello script (%s).", -- src\editor\debugger.lua
["Can't start debugging session due to internal error '%s'."] = "Impossibile lanciare la sessione di debug: errore interno '%s'.'", -- src\editor\debugger.lua
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossibile lanciare il debug senza aver aperto un file o se il file corrente non è stato salvato ('%s').", -- src\editor\debugger.lua
["Choose ..."] = "Scegli...", -- src\editor\menu_project.lua
["Choose a project directory"] = "Scegli la directory di un progetto", -- src\editor\menu_project.lua
["Clear &Dynamic Words"] = "Elimna le &Dynamic Words", -- src\editor\menu_edit.lua
["Clear the output window before compiling or debugging"] = "Pulisci la finestra di output prima di compilare o lanciare debug", -- src\editor\menu_project.lua
["Close &Other Pages"] = "Chidi le Altre Pagine", -- src\editor\gui.lua
["Close A&ll Pages"] = "Chiudi Tutte le Pagine", -- src\editor\gui.lua
["Close the current editor window"] = "Chiude la finestra dell'edit corrente", -- src\editor\menu_file.lua
["Co&ntinue"] = "Co&ntinua", -- src\editor\menu_project.lua
["Col: %d"] = "Col: %d", -- src\editor\editor.lua
["Comment or uncomment current or selected lines"] = "Commenta o scommenta la linea corrente o selezionat", -- src\editor\menu_edit.lua
["Compilation error"] = "Errore di compilazione", -- src\editor\debugger.lua, src\editor\commands.lua
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilazione riuscita; tasso di successo : %.0f%% (%d/%d).", -- src\editor\commands.lua
["Compile the current file"] = "Compila il file corrente", -- src\editor\menu_project.lua
["Complete &Identifier"] = "Completa l'&Identificatore", -- src\editor\menu_edit.lua
["Complete the current identifier"] = "Completa l'identificatore corrente", -- src\editor\menu_edit.lua
["Copy selected text to clipboard"] = "Copia il testo selezionato negli appunti", -- src\editor\menu_edit.lua
["Couldn't activate file '%s' for debugging; continuing without it."] = "Impossibile attivare il file '%s' per debug; si prosegue senza.", -- src\editor\debugger.lua
["Create an empty document"] = "Crea un documento vuoto", -- src\editor\menu_file.lua, src\editor\gui.lua
["Cu&t"] = "&Taglia", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Cut selected text to clipboard"] = "Taglia il testo selezionato e mette negli appunti", -- src\editor\menu_edit.lua
["Debugger server started at %s:%d."] = "Server Debugger iniziato %s:%s", -- src\editor\debugger.lua
["Debugging session completed (%s)."] = "Sessione di debug completata (%s).", -- src\editor\debugger.lua
["Debugging session started in '%s'."] = "Sessione di debug iniziata da '%s'.", -- src\editor\debugger.lua
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Debug sospeso a %s:%s (impossibile attivare il file).", -- src\editor\debugger.lua
["Do you want to reload it?"] = "Vuoi ricaricarlo?", -- src\editor\editor.lua
["Do you want to save the changes to '%s'?"] = "Vuoi salvare le modifiche a '%s'?", -- src\editor\commands.lua
["E&xit"] = "Uscita", -- src\editor\menu_file.lua
["Enter Lua code and press Enter to run it."] = "Inserisci codice Lua e premi <Enter> per eseguirlo.", -- src\editor\shellbox.lua
["Enter line number"] = "Inserisci il numero di linea", -- src\editor\menu_search.lua
["Error while loading API file: %s"] = "Errore durante il caricamento del file API: %s", -- src\editor\autocomplete.lua
["Error while loading configuration file: %s"] = "Errore nel caricamento del file di configurazione: %s", -- src\editor\style.lua
["Error while processing API file: %s"] = "Errore durante l'elaborazione del file API: %s", -- src\editor\autocomplete.lua
["Error while processing configuration file: %s"] = "Errore durante l'elaborazione del file di configurazione: %s", -- src\editor\style.lua
["Error"] = "Errore", -- src\editor\commands.lua
["Evaluate in Console"] = "Elabora in console", -- src\editor\editor.lua
["Execute the current project/file and keep updating the code to see immediate results"] = "Esegue il progetto/file corrente e permette di modificare il codice per vedere i risultati in tempo reale", -- src\editor\menu_project.lua
["Execute the current project/file"] = "Esegue il progetto/file corrente", -- src\editor\menu_project.lua
["Execution error"] = "Errore di esecuzione", -- src\editor\debugger.lua
["Exit program"] = "Uscita dal programma", -- src\editor\menu_file.lua
["Expr"] = "Expr.", -- src\editor\debugger.lua
["Expression"] = "Espressione", -- src\editor\debugger.lua
["File '%s' has been modified on disk."] = "Il file '%s' e' stato modificato sul disco.", -- src\editor\editor.lua
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Il file '%s' ha un timestamp più recente di quello ripristinato '%s'; verificare prima di salvare.", -- src\editor\commands.lua
["File '%s' no longer exists."] = "Il file '%s' non esiste piu'.", -- src\editor\editor.lua
["File history"] = "Storia del file", -- src\editor\menu_file.lua
["Find &In Files"] = "Ricerca nei files", -- src\editor\menu_search.lua
["Find &Next"] = "Cerca il successivo", -- src\editor\menu_search.lua
["Find &Previous"] = "Cerca il precedente", -- src\editor\menu_search.lua
["Find and replace text in files"] = "Cerca e sostituisci testo nei files", -- src\editor\menu_search.lua
["Find and replace text"] = "Cerca e sostituisci testo", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find text in files"] = "Cerca testo nei files", -- src\editor\menu_search.lua
["Find text"] = "Cerca testo", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find the earlier text occurence"] = "Cerca la precedente occorrenza nel testo", -- src\editor\menu_search.lua
["Find the next text occurrence"] = "Cerca la successiva occorrenza nel testo", -- src\editor\menu_search.lua
["Fold or unfold all code folds"] = "Apri o chiudi tutti i blocchi di codice", -- src\editor\menu_edit.lua
["Found auto-recovery record and restored saved session."] = "Trovato punto di auto-revcovery e ripristinata la sessione salvata", -- src\editor\commands.lua
["Full &Screen"] = "Schermo pieno", -- src\editor\menu_view.lua
["Go to a selected line"] = "Vai alla riga selezionata", -- src\editor\menu_search.lua
["Goto Line"] = "Vai alla riga", -- src\editor\menu_search.lua
["INS"] = "INS", -- src\editor\editor.lua
["Jump to a function definition..."] = "Salta alla definizione della funzione...", -- src\editor\editor.lua
["Known Files"] = "Files conosciuti", -- src\editor\commands.lua
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
["Local console"] = "Console locale", -- src\editor\shellbox.lua, src\editor\gui.lua
["Lua &Interpreter"] = "&Interprete Lua", -- src\editor\menu_project.lua
["Mapped remote request for '%s' to '%s'."] = "Richiesta remota '%s' mappata su '%s'.", -- src\editor\debugger.lua
["Mixed end-of-line encodings detected."] = "Trovata codifica Fine-Riga mista.", -- src\editor\commands.lua
["OVR"] = "OVR", -- src\editor\editor.lua
["Open an existing document"] = "Apri un documento esistente", -- src\editor\menu_file.lua, src\editor\gui.lua
["Open file"] = "Apri un file", -- src\editor\commands.lua
["Output (running)"] = "Output (in corso d'esecuzione)", -- src\editor\output.lua
["Output"] = "Output", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
["Paste text from the clipboard"] = "Incolla testo dagli appunti", -- src\editor\menu_edit.lua
["Prepend '=' to show complex values on multiple lines."] = "Prefissa '=' per visualizzare valori complessi su piu` righe", -- src\editor\shellbox.lua
["Press cancel to abort."] = "Premi cancel per bloccare.", -- src\editor\commands.lua
["Program '%s' started in '%s' (pid: %d)."] = "Programma '%s' partito da '%s' (pid: %d).", -- src\editor\output.lua
["Program can't start because conflicting process is running as '%s'."] = "Il programma non puo' partire perchè in conflitto con il processo in esecuzione '%s'.", -- src\editor\output.lua
["Program completed in %.2f seconds (pid: %d)."] = "Programma completato in %.2f secondi (pid: %d).", -- src\editor\output.lua
["Program starting as '%s'."] = "Programma partito da '%s'.", -- src\editor\output.lua
["Program stopped (pid: %d)."] = "Programma fermato (pid: %d).", -- src\editor\debugger.lua
["Program unable to run as '%s'."] = "Il programma non puo' partire '%s'.", -- src\editor\output.lua
["Project Directory"] = "Directory del Progetto", -- src\editor\menu_project.lua
["Project"] = "Progetto", -- src\editor\settings.lua, src\editor\gui.lua
["Project/&FileTree Window"] = "Progetto/Explorer", -- src\editor\menu_view.lua
["R/O"] = "R/O", -- src\editor\editor.lua
["R/W"] = "R/W", -- src\editor\editor.lua
["Re&place In Files"] = "Sostituisci nei files", -- src\editor\menu_search.lua
["Recent Files"] = "Files recenti", -- src\editor\menu_file.lua
["Redo last edit undone"] = "Ripeti l'ultima azione annullata", -- src\editor\menu_edit.lua
["Refused a request to start a new debugging session as there is one in progress already."] = "Impossibile aprire una nuova sessione di debug in quanto ne esiste una in corso", -- src\editor\debugger.lua
["Remote console"] = "Console remota", -- src\editor\shellbox.lua
["Replaced an invalid UTF8 character with %s."] = "Sostituito un carattere UTF8 invalido con %s.", -- src\editor\commands.lua
["Reset to default layout"] = "Ritorna al default layout", -- src\editor\menu_view.lua
["Resets the dynamic word list for autocompletion"] = "Azzera la lista di dynamic words per l'autocompletamento", -- src\editor\menu_edit.lua
["Run as Scratchpad"] = "Esegui in Scratchpad (Live coding)", -- src\editor\menu_project.lua
["S&top Debugging"] = "Ferma il debugger", -- src\editor\menu_project.lua
["S&top Process"] = "Ferma il processo", -- src\editor\menu_project.lua
["Save &As..."] = "S&alva con nome...", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save A&ll"] = "Sa&lva tutto", -- src\editor\menu_file.lua
["Save Changes?"] = "Vuoi salvare le modifiche?", -- src\editor\commands.lua
["Save all open documents"] = "Salva tutti i documenti aperti", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save file as"] = "Salva il file con nome", -- src\editor\commands.lua
["Save file?"] = "Vuoi salvare il file?", -- src\editor\commands.lua
["Save the current document to a file with a new name"] = "Salva il documento corrente in un file con un nuovo nome", -- src\editor\menu_file.lua
["Save the current document"] = "Salva il documento corrente", -- src\editor\menu_file.lua, src\editor\gui.lua
["Saved auto-recover at %s."] = "Salvato auto-recover a %s.", -- src\editor\commands.lua
["Scratchpad error"] = "Errore durente Scratchpad", -- src\editor\debugger.lua
["Select &All"] = "Selezion&a Tutto", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Select all text in the editor"] = "Seleziona tutto il testo nell'editor", -- src\editor\menu_edit.lua
["Set From Current File"] = "Impostato da file corrente", -- src\editor\menu_project.lua
["Set project directory from current file"] = "Definisci la directory del progeetto dal file corrente", -- src\editor\menu_project.lua, src\editor\gui.lua
["Set the interpreter to be used"] = "Definisci l'interprete da utilizzare", -- src\editor\menu_project.lua
["Set the project directory to be used"] = "Imposta la directory di progetto da usare", -- src\editor\menu_project.lua
["Show &Tooltip"] = "Mos&tra i consgli", -- src\editor\menu_edit.lua
["Show tooltip for current position; place cursor after opening bracket of function"] = "Mostra i consigli per la posizione corrente; muovi il cursore dopo la parentesi o la funzione", -- src\editor\menu_edit.lua
["Sort selected lines"] = "Ordina le righe selezionate", -- src\editor\menu_search.lua
["Stack"] = "Stack", -- src\editor\debugger.lua
["Start &Debugging"] = "Inizia il &Debug", -- src\editor\menu_project.lua
["Start debugging"] = "Inizia il Debug", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step &Into"] = "Step &Into", -- src\editor\menu_project.lua
["Step &Over"] = "Step &Over", -- src\editor\menu_project.lua
["Step O&ut"] = "Step O&ut", -- src\editor\menu_project.lua
["Step into"] = "Step into", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step out of the current function"] = "Contina fino all'uscita della funzione", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step over"] = "Continua senza entrare nella funzione", -- src\editor\menu_project.lua, src\editor\gui.lua
["Stop the currently running process"] = "Ferma il processo in esecuzione", -- src\editor\menu_project.lua, src\editor\gui.lua
["Switch to or from full screen mode"] = "Passa da tutto schermo a finestra", -- src\editor\menu_view.lua
["The API file must be located in a subdirectory of the API directory."] = "Il file API deve essere presente in una sottodirectory o nella direcotory API.", -- src\editor\autocomplete.lua
["Toggle Break&point"] = "Attiva/Disattiva Break&point", -- src\editor\menu_project.lua
["Toggle breakpoint"] = "Attiva/Disattiva Breakpoint", -- src\editor\menu_project.lua, src\editor\gui.lua
["Tr&ace"] = "Tr&ace", -- src\editor\menu_project.lua
["Trace execution showing each executed line"] = "Traccia l'esecuzione mostrando le righe eseguite", -- src\editor\menu_project.lua
["Unable to load file '%s'."] = "Impossibile aprire il file '%s'.", -- src\editor\commands.lua
["Unable to save file '%s': %s"] = "Impossibile salvare il file '%s': %s", -- src\editor\commands.lua
["Unable to stop program (pid: %d), code %d."] = "Impossibile fermare il programma (pid: %d), code %d.", -- src\editor\debugger.lua
["Undo last edit"] = "Annulla l'ultima azione di edit", -- src\editor\menu_edit.lua
["Use '%s' to see full description."] = "Utilizza '%s' per vedere la descrizione completa.", -- src\editor\editor.lua
["Use '%s' to show line endings and '%s' to convert them."] = "Utilizza '%s' per vedere la fine della riga e '%s' per convertirli.", -- src\editor\commands.lua
["Use 'clear' to clear the shell output and the history."] = "Utilizza 'clear' per pulire l`output e lo storico.", -- src\editor\shellbox.lua
["Use Shift-Enter for multiline code."] = "Premi <Shift-Invio> per inserire piu` righe di codice.", -- src\editor\shellbox.lua
["Value"] = "Valore", -- src\editor\debugger.lua
["View the output/console window"] = "Mostra la finestra di output/console", -- src\editor\menu_view.lua
["View the project/filetree window"] = "Mostra la finestra di progetto/explorer", -- src\editor\menu_view.lua
["View the stack window"] = "Mostra la finestra dello Stack", -- src\editor\menu_view.lua, src\editor\gui.lua
["View the watch window"] = "Mostra la finestra delle Espressioni di Controllo", -- src\editor\menu_view.lua, src\editor\gui.lua
["Watch"] = "Watch", -- src\editor\debugger.lua
["Welcome to the interactive Lua interpreter."] = "Benvenuti nell`interprete interattivo Lua.", -- src\editor\shellbox.lua
["You must save the program first."] = "Devi prima salvare il programma", -- src\editor\commands.lua
["on line %d"] = "alla linea %d", -- src\editor\debugger.lua, src\editor\commands.lua
["traced %d instruction"] = {"tracciata %d istruzione", "%d istruzioni tracciate"} -- src\editor\debugger.lua
}

232
cfg/i18n/ru.lua Normal file
View File

@@ -0,0 +1,232 @@
return {
[0] = function(c) c = (c-9)%100 < 9 and 9 or (c-1)%10 return c == 0 and 1 or c < 4 and 2 or 3 end, -- plural
["%d instance"] = {"%d совпадение", "%d совпадения", "%d совпадений"}, -- src\editor\findreplace.lua
["&About"] = "&О программе", -- src\editor\menu_help.lua
["&Add Watch"] = "&Добавить выражение", -- src\editor\debugger.lua
["&Break"] = "Пр&ервать", -- src\editor\menu_project.lua
["&Close Page"] = "&Закрыть", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Compile"] = "&Компилировать", -- src\editor\menu_project.lua
["&Copy"] = "&Копировать", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Default Layout"] = "Вид по &умолчанию", -- src\editor\menu_view.lua
["&Delete Watch"] = "&Удалить выражение", -- src\editor\debugger.lua
["&Down"] = "Вниз", -- src\editor\findreplace.lua
["&Edit Watch"] = "&Редактировать выражение", -- src\editor\debugger.lua
["&Edit"] = "&Правка", -- src\editor\menu_edit.lua
["&File"] = "&Файл", -- src\editor\menu_file.lua
["&Find All"] = "Найти все", -- src\editor\findreplace.lua
["&Find Next"] = "Найти далее", -- src\editor\findreplace.lua
["&Find"] = "&Найти", -- src\editor\menu_search.lua
["&Fold/Unfold All"] = "Св&ернуть/развернуть все", -- src\editor\menu_edit.lua
["&Goto Line"] = "&Перейти к строке", -- src\editor\menu_search.lua
["&Help"] = "&Справка", -- src\editor\menu_help.lua
["&New"] = "Соз&дать", -- src\editor\menu_file.lua
["&Open..."] = "&Открыть...", -- src\editor\menu_file.lua
["&Output/Console Window"] = "Окно &вывода/консоли", -- src\editor\menu_view.lua
["&Paste"] = "В&ставить", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Project"] = "Пр&оект", -- src\editor\menu_project.lua, src\editor\inspect.lua
["&Redo"] = "Верну&ть", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Replace All"] = "Заменить всe", -- src\editor\findreplace.lua
["&Replace"] = "За&менить", -- src\editor\findreplace.lua, src\editor\menu_search.lua
["&Run"] = "За&пустить", -- src\editor\menu_project.lua
["&Save"] = "&Сохранить", -- src\editor\menu_file.lua, src\editor\gui.lua
["&Search"] = "По&иск", -- src\editor\menu_search.lua
["&Sort"] = "&Cортировать", -- src\editor\menu_search.lua
["&Stack Window"] = "Окно &стека", -- src\editor\menu_view.lua
["&Start Debugger Server"] = "Запустить сервер отла&дки", -- src\editor\menu_project.lua
["&Subdirectories"] = "В папках", -- src\editor\findreplace.lua
["&Undo"] = "&Отменить", -- src\editor\editor.lua, src\editor\menu_edit.lua
["&Up"] = "Вверх", -- src\editor\findreplace.lua
["&View"] = "&Вид", -- src\editor\menu_view.lua
["&Watch Window"] = "Окно &выражений", -- src\editor\menu_view.lua
[".&bak on Replace"] = ".&bak после замены", -- src\editor\findreplace.lua
["About %s"] = "О %s", -- src\editor\menu_help.lua
["Add Watch Expression"] = "Добавить выражение", -- src\editor\editor.lua
["Add to Scratchpad"] = "Добавить в черновик", -- src\editor\editor.lua
["All files"] = "Все файлы", -- src\editor\commands.lua
["Allow external process to start debugging"] = "Разрешить внешнему процессу начать отладку", -- src\editor\menu_project.lua
["Analyze the source code"] = "Проанализировать исходный код", -- src\editor\inspect.lua
["Analyze"] = "Анализировать", -- src\editor\inspect.lua
["Auto Complete Identifiers"] = "Автодополнение идентификаторов", -- src\editor\menu_edit.lua
["Auto complete while typing"] = "Автоматически дополнять идентификаторы при наборе", -- src\editor\menu_edit.lua
["Break execution at the next executed line of code"] = "Прервать выполнение на следующей строке", -- src\editor\menu_project.lua, src\editor\gui.lua
["C&lear Output Window"] = "Очистка ок&на вывода", -- src\editor\menu_project.lua
["C&omment/Uncomment"] = "Зако&мментировать/раскомментировать", -- src\editor\menu_edit.lua
["Can't debug the script in the active editor window."] = "Невозможно отладить скрипт в текущем окне редактирования.", -- src\editor\debugger.lua
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Файл '%s', необходимый для отладки, не найден в текущем проекте. Обновите проект или откройте файл в редакторе перед началом отладки.", -- src\editor\debugger.lua
["Can't process auto-recovery record; invalid format: %s."] = "Ошибка обработки записи автоматического восстановления; неверный формат: %s.", -- src\editor\commands.lua
["Can't run the entry point script ('%s')."] = "Ошибка выполнения стартового скрипта ('%s').", -- src\editor\debugger.lua
["Can't start debugging session due to internal error '%s'."] = "Невозможно начать отладочную сессию из-за внутренней ошибки '%s'.", -- src\editor\debugger.lua
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Невозможно начать отладку без открытого файла или с несохраненным текущим файлом ('%s').", -- src\editor\debugger.lua
["Cancel"] = "Отмена", -- src\editor\findreplace.lua
["Choose ..."] = "Выбрать ...", -- src\editor\menu_project.lua
["Choose a project directory"] = "Выберите папку проекта", -- src\editor\findreplace.lua, src\editor\menu_project.lua
["Clear &Dynamic Words"] = "Очистить &динамические слова", -- src\editor\menu_edit.lua
["Clear the output window before compiling or debugging"] = "Очистить окно вывода перед компиляцией или отладкой", -- src\editor\menu_project.lua
["Close &Other Pages"] = "Закрыть &остальные вкладки", -- src\editor\gui.lua
["Close A&ll Pages"] = "Закрыть &все вкладки", -- src\editor\gui.lua
["Close the current editor window"] = "Закрыть текущее окно редактирования", -- src\editor\menu_file.lua
["Co&ntinue"] = "Пр&одолжить", -- src\editor\menu_project.lua
["Col: %d"] = "Стб: %d", -- src\editor\editor.lua
["Comment or uncomment current or selected lines"] = "Закомментировать или раскомментировать текущую или выделенные строки", -- src\editor\menu_edit.lua
["Compilation error"] = "Ошибка компиляции", -- src\editor\debugger.lua, src\editor\commands.lua
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Компиляция завершена успешно; процент успеха: %.0f%% (%d/%d).", -- src\editor\commands.lua
["Compile the current file"] = "Скомпилировать текущий файл", -- src\editor\menu_project.lua
["Complete &Identifier"] = "Дополнить &идентификатор", -- src\editor\menu_edit.lua
["Complete the current identifier"] = "Дополнить текущий идентификатор", -- src\editor\menu_edit.lua
["Copy selected text to clipboard"] = "Скопировать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua
["Couldn't activate file '%s' for debugging; continuing without it."] = "Невозможно открыть файл '%s' для отладки; выполнение будет продолжено без него.", -- src\editor\debugger.lua
["Create an empty document"] = "Создать новый документ", -- src\editor\menu_file.lua, src\editor\gui.lua
["Cu&t"] = "Вы&резать", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Cut selected text to clipboard"] = "Вырезать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua
["Debugger server started at %s:%d."] = "Сервер отладки запущен на %s:%d.", -- src\editor\debugger.lua
["Debugging session completed (%s)."] = "Отладочная сессия завершена (%s).", -- src\editor\debugger.lua
["Debugging session started in '%s'."] = "Отладочная сессия запущена в '%s'.", -- src\editor\debugger.lua
["Debugging suspended at %s:%s (couldn't activate the file)."] = "Отладка остановлена на %s:%s (невозможно открыть файл).", -- src\editor\debugger.lua
["Directory"] = "Папка", -- src\editor\findreplace.lua
["Do you want to reload it?"] = "Перезагрузить его?", -- src\editor\editor.lua
["Do you want to save the changes to '%s'?"] = "Сохранить изменения в '%s'?", -- src\editor\commands.lua
["E&xit"] = "Вы&ход", -- src\editor\menu_file.lua
["Enter Lua code and press Enter to run it."] = "Введите код на Lua и нажмите Enter для выполнения.", -- src\editor\shellbox.lua
["Enter line number"] = "Введите номер строки", -- src\editor\menu_search.lua
["Error while loading API file: %s"] = "Ошибка загрузки файла определений API: %s", -- src\editor\autocomplete.lua
["Error while loading configuration file: %s"] = "Ошибка загрузки файла конфигурации: %s", -- src\editor\style.lua
["Error while processing API file: %s"] = "Ошибка обработки файла определений API: %s", -- src\editor\autocomplete.lua
["Error while processing configuration file: %s"] = "Ошибка обработки файла конфигурации: %s", -- src\editor\style.lua
["Error"] = "Ошибка", -- src\editor\commands.lua
["Evaluate in Console"] = "Выполнить в консоли", -- src\editor\editor.lua
["Execute the current project/file and keep updating the code to see immediate results"] = "Запустить текущий проект/файл и продолжать вносить изменения в код с немедленным выводом результатов", -- src\editor\menu_project.lua
["Execute the current project/file"] = "Запустить текущий проект/файл", -- src\editor\menu_project.lua
["Execution error"] = "Ошибка выполнения", -- src\editor\debugger.lua
["Exit program"] = "Выйти из программы", -- src\editor\menu_file.lua
["Expr"] = "Выр.", -- src\editor\debugger.lua
["Expression"] = "Выражение", -- src\editor\debugger.lua
["File '%s' has been modified on disk."] = "Файл '%s' был изменен на диске.", -- src\editor\editor.lua
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Файл '%s' имеет более позднее время модификации, чем восстановленный '%s'; пожалуйста просмотрите его перед сохранением.", -- src\editor\commands.lua
["File '%s' no longer exists."] = "Файл '%s' больше не существует.", -- src\editor\editor.lua, src\editor\menu_file.lua
["File Type"] = "Тип файла", -- src\editor\findreplace.lua
["File history"] = "История файлов", -- src\editor\menu_file.lua
["Find &In Files"] = "Н&айти в файлах", -- src\editor\menu_search.lua
["Find &Next"] = "Найти &далее", -- src\editor\menu_search.lua
["Find &Previous"] = "Найти &ранее", -- src\editor\menu_search.lua
["Find In Files"] = "Найти в файлах", -- src\editor\findreplace.lua
["Find and replace text in files"] = "Найти и заменить текст в файлах", -- src\editor\menu_search.lua
["Find and replace text"] = "Найти и заменить текст", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find text in files"] = "Найти текст в файлах", -- src\editor\menu_search.lua
["Find text"] = "Найти текст", -- src\editor\menu_search.lua, src\editor\gui.lua
["Find the earlier text occurence"] = "Найти предыдущее вхождение текста", -- src\editor\menu_search.lua
["Find the next text occurrence"] = "Найти следующее вхождение текста", -- src\editor\menu_search.lua
["Find"] = "Найти", -- src\editor\findreplace.lua
["Fold or unfold all code folds"] = "Свернуть или развернуть все блоки кода", -- src\editor\menu_edit.lua
["Found auto-recovery record and restored saved session."] = "Найдена запись авто-восстановления и восстановлена сохраненная сессия.", -- src\editor\commands.lua
["Found"] = "Найдено", -- src\editor\findreplace.lua
["Full &Screen"] = "Во весь экр&ан", -- src\editor\menu_view.lua
["Go to a selected line"] = "Перейти к заданной строке", -- src\editor\menu_search.lua
["Goto Line"] = "Перейти к строке", -- src\editor\menu_search.lua
["INS"] = "ВСТ", -- src\editor\editor.lua
["In Files"] = "Установки файлов", -- src\editor\findreplace.lua
["Jump to a function definition..."] = "Перейти к определению функции...", -- src\editor\editor.lua
["Known Files"] = "Файлы Lua", -- src\editor\commands.lua
["Ln: %d"] = "Стр: %d", -- src\editor\editor.lua
["Local console"] = "Локальная консоль", -- src\editor\shellbox.lua, src\editor\gui.lua
["Lua &Interpreter"] = "&Интерпретатор Lua", -- src\editor\menu_project.lua
["Mapped remote request for '%s' to '%s'."] = "Удаленный запрос для '%s' отображен на '%s'.", -- src\editor\debugger.lua
["Match &case"] = "Совпадение регистра", -- src\editor\findreplace.lua
["Match &whole word"] = "Совпадение целого слова", -- src\editor\findreplace.lua
["Mixed end-of-line encodings detected."] = "Обнаружены смешанные символы конца строки.", -- src\editor\commands.lua
["OVR"] = "ЗАМ", -- src\editor\editor.lua
["Open an existing document"] = "Открыть существующий документ", -- src\editor\menu_file.lua, src\editor\gui.lua
["Open file"] = "Открыть файл", -- src\editor\commands.lua
["Options"] = "Установки", -- src\editor\findreplace.lua
["Output (running)"] = "Вывод (запущен)", -- src\editor\output.lua
["Output"] = "Вывод", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
["Paste text from the clipboard"] = "Вставить текст из буфера обмена", -- src\editor\menu_edit.lua
["Preferences"] = "Настройки", -- src\editor\menu_edit.lua
["Prepend '=' to show complex values on multiple lines."] = "Укажите '=' в начале выражения для отображения сложных значений на нескольких строках.", -- src\editor\shellbox.lua
["Press cancel to abort."] = "Нажмите Отмена для завершения.", -- src\editor\commands.lua
["Program '%s' started in '%s' (pid: %d)."] = "Программа '%s' запущена в '%s' (pid: %d).", -- src\editor\output.lua
["Program can't start because conflicting process is running as '%s'."] = "Программа не может быть запущена из-за конфликтующего процесса, выполняющегося как '%s'.", -- src\editor\output.lua
["Program completed in %.2f seconds (pid: %d)."] = "Программа завершена за %.2f секунд (pid: %d).", -- src\editor\output.lua
["Program starting as '%s'."] = "Программа запускается как '%s'.", -- src\editor\output.lua
["Program stopped (pid: %d)."] = "Программа завершена (pid: %d).", -- src\editor\debugger.lua
["Program unable to run as '%s'."] = "Программа не может быть запущена как '%s'.", -- src\editor\output.lua
["Project Directory"] = "Папка проекта", -- src\editor\menu_project.lua
["Project"] = "Проект", -- src\editor\settings.lua, src\editor\gui.lua
["Project/&FileTree Window"] = "Окно &проекта/списка файлов", -- src\editor\menu_view.lua
["R/O"] = "R/O", -- src\editor\editor.lua
["R/W"] = "R/W", -- src\editor\editor.lua
["Re&place In Files"] = "Замени&ть в файлах", -- src\editor\menu_search.lua
["Recent Files"] = "Недавние файлы", -- src\editor\menu_file.lua
["Redo last edit undone"] = "Вернуть последнее отмененное изменение", -- src\editor\menu_edit.lua
["Refused a request to start a new debugging session as there is one in progress already."] = "Отказано в запросе на запуск новой отладочной сессии, поскольку одна сессия уже выполняется.", -- src\editor\debugger.lua
["Regular &expression"] = "Регулярное выражение", -- src\editor\findreplace.lua
["Remote console"] = "Удаленная консоль", -- src\editor\shellbox.lua
["Replace &All"] = "Заменить все", -- src\editor\findreplace.lua
["Replace"] = "Заменить", -- src\editor\findreplace.lua
["Replaced an invalid UTF8 character with %s."] = "Некорректный символ UTF8 заменен на %s.", -- src\editor\commands.lua
["Replaced"] = "Заменено", -- src\editor\findreplace.lua
["Replacing"] = "Замена", -- src\editor\findreplace.lua
["Reset to default layout"] = "Установить расположение окон по умолчанию", -- src\editor\menu_view.lua
["Resets the dynamic word list for autocompletion"] = "Очистить список динамических слов для автодополнения", -- src\editor\menu_edit.lua
["Run as Scratchpad"] = "Запустить как черновик", -- src\editor\menu_project.lua
["S&top Debugging"] = "&Завершить отладку", -- src\editor\menu_project.lua
["S&top Process"] = "&Завершить процесс", -- src\editor\menu_project.lua
["Save &As..."] = "Сохранить &как...", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save A&ll"] = "Сохранить &все", -- src\editor\menu_file.lua
["Save Changes?"] = "Сохранить изменения?", -- src\editor\commands.lua
["Save all open documents"] = "Сохранить все открытые документы", -- src\editor\menu_file.lua, src\editor\gui.lua
["Save file as"] = "Сохранить файл как", -- src\editor\commands.lua
["Save file?"] = "Сохранить файл?", -- src\editor\commands.lua
["Save the current document to a file with a new name"] = "Сохранить текущий документ в файл под новым именем", -- src\editor\menu_file.lua
["Save the current document"] = "Сохранить текущий документ", -- src\editor\menu_file.lua, src\editor\gui.lua
["Saved auto-recover at %s."] = "Сохранено авто-восст в %s.", -- src\editor\commands.lua
["Scope"] = "Направление", -- src\editor\findreplace.lua
["Scratchpad error"] = "Ошибка в черновике", -- src\editor\debugger.lua
["Searching for"] = "Поиск", -- src\editor\findreplace.lua
["Select &All"] = "Выделить &все", -- src\editor\editor.lua, src\editor\menu_edit.lua
["Select all text in the editor"] = "Выделить весь текст в редакторе", -- src\editor\menu_edit.lua
["Set From Current File"] = "Установить по текущему файлу", -- src\editor\menu_project.lua
["Set project directory from current file"] = "Установить папку проекта по текущему файлу", -- src\editor\menu_project.lua, src\editor\gui.lua
["Set the interpreter to be used"] = "Установить используемый интерпретатор", -- src\editor\menu_project.lua
["Set the project directory to be used"] = "Установить используемую папку проекта", -- src\editor\menu_project.lua
["Settings: System"] = "Установки: Системы", -- src\editor\menu_edit.lua
["Settings: User"] = "Установки: Пользователя", -- src\editor\menu_edit.lua
["Show &Tooltip"] = "Показать &подсказку", -- src\editor\menu_edit.lua
["Show tooltip for current position; place cursor after opening bracket of function"] = "Показать подсказку в текущей позиции; переместите курсор в позицию после открывающей скобки функции", -- src\editor\menu_edit.lua
["Sort selected lines"] = "Отсортировать выделенные строки", -- src\editor\menu_search.lua
["Stack"] = "Стек", -- src\editor\debugger.lua
["Start &Debugging"] = "Начать &отладку", -- src\editor\menu_project.lua
["Start debugging"] = "Начать отладку", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step &Into"] = "&Войти", -- src\editor\menu_project.lua
["Step &Over"] = "&Следующая строка", -- src\editor\menu_project.lua
["Step O&ut"] = "В&ыйти", -- src\editor\menu_project.lua
["Step into"] = "Войти в функцию", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step out of the current function"] = "Выйти из текущей функции", -- src\editor\menu_project.lua, src\editor\gui.lua
["Step over"] = "Перейти на следующую строку", -- src\editor\menu_project.lua, src\editor\gui.lua
["Stop the currently running process"] = "Завершить текущий процесс", -- src\editor\menu_project.lua, src\editor\gui.lua
["Switch to or from full screen mode"] = "Переключить полноэкранный режим", -- src\editor\menu_view.lua
["Text not found."] = "Текст не найден.", -- src\editor\findreplace.lua
["The API file must be located in a subdirectory of the API directory."] = "Файл определений API должен быть расположен внутри папки API.", -- src\editor\autocomplete.lua
["Toggle Break&point"] = "&Точка останова", -- src\editor\menu_project.lua
["Toggle breakpoint"] = "Переключить точку останова", -- src\editor\menu_project.lua, src\editor\gui.lua
["Tr&ace"] = "Т&рассировка", -- src\editor\menu_project.lua
["Trace execution showing each executed line"] = "Отслеживать выполнение, показывая каждую выполненную строку", -- src\editor\menu_project.lua
["Unable to load file '%s'."] = "Ошибка загрузки файла '%s'.", -- src\editor\commands.lua
["Unable to save file '%s': %s"] = "Ошибка сохранения файла '%s': %s", -- src\editor\commands.lua
["Unable to stop program (pid: %d), code %d."] = "Невозможно завершить программу (pid: %d), код %d.", -- src\editor\debugger.lua
["Undo last edit"] = "Отменить последнее действие", -- src\editor\menu_edit.lua
["Use '%s' to see full description."] = "Используйте '%s' для полного описания.", -- src\editor\editor.lua
["Use '%s' to show line endings and '%s' to convert them."] = "Используйте '%s' для отображения символов конца строки и '%s' для их преобразования.", -- src\editor\commands.lua
["Use 'clear' to clear the shell output and the history."] = "Используйте команду 'clear' для очистки содержимого окна и истории.", -- src\editor\shellbox.lua
["Use Shift-Enter for multiline code."] = "Используйте Shift-Enter для многострочного кода.", -- src\editor\shellbox.lua
["Value"] = "Значение", -- src\editor\debugger.lua
["View the output/console window"] = "Показать окно вывода/консоли", -- src\editor\menu_view.lua
["View the project/filetree window"] = "Показать окно проекта/списка файлов", -- src\editor\menu_view.lua
["View the stack window"] = "Показать окно стека", -- src\editor\menu_view.lua, src\editor\gui.lua
["View the watch window"] = "Показать окно выражений", -- src\editor\menu_view.lua, src\editor\gui.lua
["Watch"] = "Выражение", -- src\editor\debugger.lua
["Welcome to the interactive Lua interpreter."] = "Добро пожаловать в интерактивный интерпретатор Lua.", -- src\editor\shellbox.lua
["Wrap ar&ound"] = "Продолжить сначала", -- src\editor\findreplace.lua
["You must save the program first."] = "Вы должны сначала сохранить программу.", -- src\editor\commands.lua
["on line %d"] = "в строке %d", -- src\editor\debugger.lua, src\editor\commands.lua
["traced %d instruction"] = {"выполнена %d инструкция", "выполнено %d инструкции", "выполнено %d инструкций"}, -- src\editor\debugger.lua
}

26
cfg/scheme-picker.lua Normal file
View File

@@ -0,0 +1,26 @@
--[[
1. Pick a color scheme by clicking on a link:
- [Tomorrow](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Tomorrow')))
- [TomorrowContrast](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowContrast')))
- [TomorrowNight](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNight')))
- [TomorrowNightBlue](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightBlue')))
- [TomorrowNightBright](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightBright')))
- [TomorrowNightEighties](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightEighties')))
- [Zenburn](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Zenburn')))
- [Monokai](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Monokai')))
- [SolarizedDark](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','SolarizedDark')))
- [SolarizedLight](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','SolarizedLight')))
- [ZeroBrane Studio](macro:shell(ide.config.styles = StylesGetDefault(); ReApplySpecAndStyles()))
2. [Apply the same scheme to Output/Console windows](macro:shell(ide.config.stylesoutshell = ide.config.styles; ReApplySpecAndStyles())).
3. Add the following code with the scheme you selected to `cfg/user.lua`.
--]]
local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('TomorrowNightBlue')
stylesoutshell = styles -- also apply the same scheme to Output/Console windows
-- code example
if false and true then func(1, 2, 3) end

261
cfg/tomorrow.lua Normal file
View File

@@ -0,0 +1,261 @@
-- This is a file that sets color scheme based on Tomorrow format.
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
-- Tomorrow colors from https://github.com/chriskempson/tomorrow-theme
-- Zenburn colors from https://github.com/jnurmine/Zenburn/blob/master/colors/zenburn.vim (contributed by Srdjan Marković)
-- Monokai colors from http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
-- Solarized colors from https://github.com/altercation/vim-colors-solarized
local theme = ...
local function h2d(n) return 0+('0x'..n) end
local function H(c, bg) c = c:gsub('#','')
-- since alpha is not implemented, convert RGBA to RGB
-- assuming 0 is transparent and 255 is opaque
-- based on http://stackoverflow.com/a/2645218/1442917
local bg = bg and H(bg) or {255, 255, 255}
local a = #c > 6 and h2d(c:sub(7,8))/255 or 1
local r, g, b = h2d(c:sub(1,2)), h2d(c:sub(3,4)), h2d(c:sub(5,6))
return {
math.min(255, math.floor((1-a)*bg[1]+a*r)),
math.min(255, math.floor((1-a)*bg[2]+a*g)),
math.min(255, math.floor((1-a)*bg[3]+a*b))}
end
local colors = {
Tomorrow = {
Background = H'ffffff',
CurrentLine = H'efefef',
Selection = H'd6d6d6',
Foreground = H'4d4d4c',
Comment = H'8e908c',
Red = H'c82829',
Orange = H'f5871f',
Yellow = H'eab700',
Green = H'718c00',
Aqua = H'3e999f',
Blue = H'4271ae',
Purple = H'8959a8',
},
TomorrowContrast = { -- contributed by Sergey Lerg
Background = H'f7f7f7',
CurrentLine = H'efefef',
Selection = H'd6d6d6',
Foreground = H'202020',
Comment = H'8e908c',
Red = H'4669ff', --numbers
Orange = H'f5871f',
Yellow = H'eab700',
Green = H'108010', --strings
Aqua = H'4060b0', --built in functions
Blue = H'101080', --keywords
Purple = H'a01090',
},
TomorrowNight = {
Background = H'1d1f21',
CurrentLine = H'282a2e',
Selection = H'373b41',
Foreground = H'c5c8c6',
Comment = H'969896',
Red = H'cc6666',
Orange = H'de935f',
Yellow = H'f0c674',
Green = H'b5bd68',
Aqua = H'8abeb7',
Blue = H'81a2be',
Purple = H'b294bb',
},
TomorrowNightEighties = {
Background = H'2d2d2d',
CurrentLine = H'393939',
Selection = H'515151',
Foreground = H'cccccc',
Comment = H'999999',
Red = H'f2777a',
Orange = H'f99157',
Yellow = H'ffcc66',
Green = H'99cc99',
Aqua = H'66cccc',
Blue = H'6699cc',
Purple = H'cc99cc',
},
TomorrowNightBlue = {
Background = H'002451',
CurrentLine = H'00346e',
Selection = H'003f8e',
Foreground = H'ffffff',
Comment = H'7285b7',
Red = H'ff9da4',
Orange = H'ffc58f',
Yellow = H'ffeead',
Green = H'd1f1a9',
Aqua = H'99ffff',
Blue = H'bbdaff',
Purple = H'ebbbff',
},
TomorrowNightBright = {
Background = H'000000',
CurrentLine = H'2a2a2a',
Selection = H'424242',
Foreground = H'eaeaea',
Comment = H'969896',
Red = H'd54e53',
Orange = H'e78c45',
Yellow = H'e7c547',
Green = H'b9ca4a',
Aqua = H'70c0b1',
Blue = H'7aa6da',
Purple = H'c397d8',
},
Zenburn = {
Background = H'3f3f3f',
CurrentLine = H'363636',
Selection = H'1f1f1f',
Foreground = H'dcdccc',
Comment = H'7f9f7f',
Red = H'8cd0d3',
Orange = H'dfaf8f',
Yellow = H'e3ceab',
Green = H'cc9393',
Aqua = H'dca3a3',
Blue = H'f0dfaf',
Purple = H'efef8f',
},
Monokai = {
Background = H'272822',
CurrentLine = H'2D2F29',
Selection = H'49483E',
Foreground = H'F8F8F2',
Comment = H'75715E',
Red = H'AE81FF',
Orange = H'AE81FF',
Yellow = H'F8F8F2',
Green = H'E6DB74',
Aqua = H'66D9EF',
Blue = H'F92672',
Purple = H'A6E22E',
},
SolarizedDark = {
Background = H'042029',
CurrentLine = H'0A2933',
Selection = H'073642',
Foreground = H'839496',
Comment = H'586E75',
Red = H'D33682',
Orange = H'B58900',
Yellow = H'839496',
Green = H'2AA198',
Aqua = H'839496',
Blue = H'859900',
Purple = H'268BD2',
},
SolarizedLight = {
Background = H'FDF6E3',
CurrentLine = H'EEE8D5',
Selection = H'E0E0D0',
Foreground = H'586E75',
Comment = H'93A1A1',
Red = H'D33682',
Orange = H'B58900',
Yellow = H'586E75',
Green = H'2AA198',
Aqua = H'586E75',
Blue = H'859900',
Purple = H'268BD2',
},
}
-- add more of the specified color (keeping all in 0-255 range)
local mixer = function(c, n, more)
if not c or #c == 0 then return c end
local c = {c[1], c[2], c[3]} -- create a copy, so it can be modified
c[n] = c[n] + more
local excess = c[n] - 255
if excess > 0 then
for clr = 1, 3 do
c[clr] = n == clr and 255 or c[clr] > excess and c[clr] - excess or 0
end
end
return c
end
local C = colors[theme] or colors.Tomorrow
return {
-- wxstc.wxSTC_LUA_DEFAULT
lexerdef = {fg = C.Foreground},
-- wxstc.wxSTC_LUA_COMMENT, wxstc.wxSTC_LUA_COMMENTLINE, wxstc.wxSTC_LUA_COMMENTDOC
comment = {fg = C.Comment, fill = true},
-- wxstc.wxSTC_LUA_STRING, wxstc.wxSTC_LUA_CHARACTER, wxstc.wxSTC_LUA_LITERALSTRING
stringtxt = {fg = C.Green},
-- wxstc.wxSTC_LUA_STRINGEOL
stringeol = {fg = C.Green, fill = true},
-- wxstc.wxSTC_LUA_PREPROCESSOR
preprocessor = {fg = C.Orange},
-- wxstc.wxSTC_LUA_OPERATOR
operator = {fg = C.Aqua},
-- wxstc.wxSTC_LUA_NUMBER
number = {fg = C.Red},
-- wxstc.wxSTC_LUA_WORD, wxstc.wxSTC_LUA_WORD2-8
keywords0 = {fg = C.Blue, b = true},
keywords1 = {fg = C.Aqua, b = false},
keywords2 = {fg = C.Aqua, b = true},
keywords3 = {fg = C.Purple, b = false},
keywords4 = {fg = C.Purple, b = false},
keywords5 = {fg = C.Purple, b = false},
keywords6 = {fg = C.Purple, b = false},
keywords7 = {fg = C.Purple, b = false},
-- common (inherit fg/bg from text)
-- wxstc.wxSTC_LUA_IDENTIFIER
text = {fg = C.Foreground, bg = C.Background},
linenumber = {fg = C.Comment},
bracematch = {fg = C.Orange, b = true},
bracemiss = {fg = C.Red, b = true},
ctrlchar = {fg = C.Yellow},
indent = {fg = C.Comment},
calltip = nil,
-- common special (need custom fg & bg)
calltipbg = nil,
sel = {bg = C.Selection},
caret = {fg = C.Foreground},
caretlinebg = {bg = C.CurrentLine},
fold = {fg = C.Comment, bg = C.Background},
whitespace = {fg = C.Comment, bg = C.Background},
fncall = {fg = C.Purple, st = wxstc.wxSTC_INDIC_PLAIN},
--[[ other possible values are:
wxSTC_INDIC_PLAIN Single-line underline
wxSTC_INDIC_SQUIGGLE Squiggly underline
wxSTC_INDIC_TT Line of small T-shapes
wxSTC_INDIC_DIAGONAL Diagonal hatching
wxSTC_INDIC_STRIKE Strike-out
wxSTC_INDIC_BOX Box
wxSTC_INDIC_ROUNDBOX Rounded Box
--]]
-- markup
['['] = {hs = mixer(C.Comment, 3, 64)},
['|'] = {fg = mixer(mixer(C.Comment, 1, 64), 3, 64)},
-- markers
marker = {
message = {bg = C.Selection},
output = {bg = C.CurrentLine},
prompt = {fg = C.Foreground, bg = C.Background},
error = {bg = mixer(C.Background, 1, 32)},
},
}
--[[
---- Solarized license ----
Copyright (c) 2011 Ethan Schoonover
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--]]

View File

@@ -1,35 +1,137 @@
--[[-- Rename this file to `user.lua` to get loaded
--[[-- This file shows examples of settings you can adjust.
Configuration files are loaded in the following order
Configuration files with preferences are loaded in the following order:
1. cfg/user.lua (system-wide configuration)
2. HOME/.zbstudio/user.lua (per-user configuration)
3. -cfg <lua code fragment|filename> (command line configuration)
1. <application>\config.lua
2. cfg\user.lua
3. ~\.zbs\user.lua
4. -cfg commandline strings
See [configuration](http://studio.zerobrane.com/doc-configuration.html) page for information about location of configuration files.
--]]--
-- an example of how loaded configuration can be modified from this file
local G = ... -- this now points to the global environment in the script
local luaspec = G.ide.specs['lua']
luaspec.exts[2] = "luaz"
luaspec.exts[#luaspec.exts+1] = "luaz"
luaspec.keywords[1] = luaspec.keywords[1] .. ' foo'
-- change font size to 12
-- to modify a key mapping; see the full list of IDs in src/editor/keymap.lua
local G = ...
keymap[G.ID_STARTDEBUG] = "Ctrl-Shift-D"
-- to change font size to 12
editor.fontsize = 12 -- this is mapped to ide.config.editor.fontsize
editor.fontname = "Courier New"
filehistorylength = 20 -- this is mapped to ide.config.filehistorylength
-- specify full path to love2d executable; this is only needed
-- to specify full path to love2d *executable*; this is only needed
-- if the game folder and the executable are NOT in the same folder.
path.love2d = 'd:/lua/love/love'
-- specify full path to moai executable if it's not in one of PATH folders
-- to specify full path to moai *executable* if it's not in one of PATH folders
path.moai = 'd:/lua/moai/moai'
-- Moai config.lua file is searched in the following places: (1) MOAI_CONFIG,
-- (2) project directory (if set) or folder with the current file,
-- (3) folder with the moai executable.
-- specify full path to lua interpreter if you need to use your own version
-- to specify full path to gideros *executable* if it's not in one of PATH folders
path.gideros = 'd:/Program Files/Gideros/GiderosPlayer.exe'
-- to specify full path to corona *executable* if it's not in one of PATH folders
path.corona = 'd:/path/to/Corona SDK/Corona Simulator.exe'
-- to specify full path to lua interpreter if you need to use your own version
path.lua = 'd:/lua/lua'
-- fix an issue with 0d0d0a line endings in MOAI examples,
-- to specify full path to GSL-shell *executable* if it's not in one of PATH folders
path.gslshell = [[D:\Lua\gsl-shell\gsl-shell.exe]]
-- to provide output filter for those engines that support redirecting
-- of "print" output to the IDE (like Corona SDK or Gideros)
debugger.outputfilter = function(m) return #m < 124 and m or m:sub(1,120).."...\n" end
-- to fix an issue with 0d0d0a line endings in MOAI examples,
-- which may negatively affect breakpoints during debugging
editor.iofilter = "0d0d0aFix"
--]]--
-- to have 4 spaces when TAB is used in the editor
editor.tabwidth = 4
-- to have TABs stored in the file (to allow mixing tabs and spaces)
editor.usetabs = true
-- to disable wrapping of long lines in the editor
editor.usewrap = false
-- to turn dynamic words on and to start suggestions after 4 characters
acandtip.nodynwords = false
acandtip.startat = 4
-- to automatically open files requested during debugging
editor.autoactivate = true
-- to specify a list of MOAI entrypoints
moai = { entrypoints = { "main.lua", "source/main.lua" } }
-- to specify language to use in the IDE (requires a file in cfg/i18n folder)
language = "ru"
-- to change background color (or other colors in the IDE);
-- see cfg/tomorrow.lua for example/details on what other colors to change
styles.text = {bg = {240,240,220}}
-- to change the default color scheme; check tomorrow.lua for the list
-- of supported schemes or use cfg/scheme-picker.lua to pick a scheme.
local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('Tomorrow')
-- also apply the same scheme to Output and Console windows
stylesoutshell = styles
-- to change markers used in console and output windows
styles.marker = styles.marker or {}
styles.marker.message = {ch = wxstc.wxSTC_MARK_ARROWS, {0, 0, 0}, {240, 240, 240}}
styles.marker.output = {ch = wxstc.wxSTC_MARK_BACKGROUND, {0, 0, 0}, {240, 240, 240}}
styles.marker.prompt = {ch = wxstc.wxSTC_MARK_CHARACTER+('>'):byte(), {0, 0, 0}, {240, 240, 240}}
stylesoutshell = styles
-- to disable indicators (underlining) on function calls
editor.showfncall = false
-- to change the color of the indicator used for function calls
styles.fncall.fg = {240,0,0}
-- to change the type of the indicator used for function calls
styles.fncall.st = wxstc.wxSTC_INDIC_PLAIN
--[[ other possible values are:
wxSTC_INDIC_PLAIN Single-line underline
wxSTC_INDIC_SQUIGGLE Squiggly underline
wxSTC_INDIC_TT Line of small T-shapes
wxSTC_INDIC_DIAGONAL Diagonal hatching
wxSTC_INDIC_STRIKE Strike-out
wxSTC_INDIC_BOX Box
wxSTC_INDIC_ROUNDBOX Rounded Box
--]]
-- to enable additional spec files (like spec/cpp.lua)
load.specs(function(file) return file:find('spec[/\\]cpp%.lua$') end)
-- to specify a default EOL encoding to be used for new files:
-- `wxstc.wxSTC_EOL_CRLF` or `wxstc.wxSTC_EOL_LF`;
-- `nil` means OS default: CRLF on Windows and LF on Linux/Unix and OSX.
-- (OSX had CRLF as a default until v0.36, which fixed it).
editor.defaulteol = wxstc.wxSTC_EOL_LF
-- to turn off checking for mixed end-of-line encodings in loaded files
editor.checkeol = false
-- to force execution to continue immediately after starting debugging;
-- set to `false` to disable (the interpreter will stop on the first line or
-- when debugging starts); some interpreters may use `true` or `false`
-- by default, but can be still reconfigured with this setting.
debugger.runonstart = true
-- to set compact fold that doesn't include empty lines after a block
editor.foldcompact = true
-- to disable zoom with mouse wheel as it may be too sensitive on OSX
editor.nomousezoom = true

59
cfg/user-snippet.lua Normal file
View File

@@ -0,0 +1,59 @@
--[[-- Copy snippets from this file to `user.lua` --]]--
--[[ Add a shortcut to generate `~` if your keyboard doesn't have one
local G = ... -- this now points to the global environment in the script
local ide, wx, TR, ID = G.ide, G.wx, G.TR, G.ID
local postinit = ide.app.postinit
ide.app.postinit = function()
if postinit then postinit() end
local menu = ide.frame.menuBar:GetMenu(ide.frame.menuBar:FindMenu(TR("&Edit")))
menu:Append(ID "tilde", "Tilde\tAlt-'")
ide.frame:Connect(ID "tilde", wx.wxEVT_COMMAND_MENU_SELECTED,
function () GetEditor():AddText("~") end)
end
--]]
--[[ Add `Evaluate in Console` option to the Edit menu
local G = ... -- this now points to the global environment in the script
local ide, wx, TR, ID = G.ide, G.wx, G.TR, G.ID
local postinit = ide.app.postinit
ide.app.postinit = function()
if postinit then postinit() end
local menu = ide.frame.menuBar:GetMenu(ide.frame.menuBar:FindMenu(TR("&Edit")))
menu:Append(ID "eval", "Evaluate in Console\tCtrl-E")
ide.frame:Connect(ID "eval", wx.wxEVT_COMMAND_MENU_SELECTED,
function () ShellExecuteCode(GetEditor():GetSelectedText()) end)
ide.frame:Connect(ID "eval", wx.wxEVT_UPDATE_UI,
function (event) event:Enable(GetEditor() and #GetEditor():GetSelectedText() > 0) end)
end
--]]
--[[ Add `Zoom` menu to increase/decrease/reset font in the editor
local G = ... -- this now points to the global environment in the script
local ide, wx, TR, ID = G.ide, G.wx, G.TR, G.ID
local postinit = ide.app.postinit
ide.app.postinit = function()
if postinit then postinit() end
local zoomMenu = wx.wxMenu{
{ID "zoomreset", "Zoom to 100%\tCtrl-0"},
{ID "zoomin", "Zoom In\tCtrl-+"},
{ID "zoomout", "Zoom Out\tCtrl--"},
}
local menu = ide.frame.menuBar:GetMenu(ide.frame.menuBar:FindMenu(TR("&View")))
menu:Append(ID "zoom", "Zoom", zoomMenu)
ide.frame:Connect(ID "zoomreset", wx.wxEVT_COMMAND_MENU_SELECTED,
function () GetEditor():SetZoom(1) end)
ide.frame:Connect(ID "zoomin", wx.wxEVT_COMMAND_MENU_SELECTED,
function () GetEditor():SetZoom(GetEditor():GetZoom()+1) end)
ide.frame:Connect(ID "zoomout", wx.wxEVT_COMMAND_MENU_SELECTED,
function () GetEditor():SetZoom(GetEditor():GetZoom()-1) end)
-- only enable if there is an editor
for _, m in G.ipairs({"zoomreset", "zoomin", "zoomout"}) do
ide.frame:Connect(ID(m), wx.wxEVT_UPDATE_UI,
function (event) event:Enable(GetEditor() ~= nil) end)
end
end
--]]

74
cfg/xcode-keys.lua Normal file
View File

@@ -0,0 +1,74 @@
-- Copy the content of this file to user.lua;
-- see the [configuration](http://studio.zerobrane.com/doc-configuration.html) page for details.
local G = ...
-- Alt-Shift-Cmd-X (Alt maps to Option, Ctrl maps to Command)
-- The mapping is largely based on [Xcode Keyboard Shortcuts](http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/xcode_help-command_shortcuts/MenuCommands/MenuCommands014.html).
local xcode = {
-- File menu
[G.ID_NEW] = "Ctrl-N",
[G.ID_OPEN] = "Ctrl-O",
[G.ID_CLOSE] = "Ctrl-W",
[G.ID_SAVE] = "Ctrl-S",
[G.ID_SAVEAS] = "Shift-Ctrl-S",
[G.ID_SAVEALL] = "Alt-Ctrl-S",
[G.ID_RECENTFILES] = "",
[G.ID_EXIT] = "Ctrl-Q",
-- Edit menu
[G.ID_CUT] = "Ctrl-X",
[G.ID_COPY] = "Ctrl-C",
[G.ID_PASTE] = "Ctrl-V",
[G.ID_SELECTALL] = "Ctrl-A",
[G.ID_UNDO] = "Ctrl-Z",
[G.ID_REDO] = "Shift-Ctrl-Z",
[G.ID_SHOWTOOLTIP] = "Ctrl-T",
[G.ID_AUTOCOMPLETE] = "Ctrl-K",
[G.ID_AUTOCOMPLETEENABLE] = "",
[G.ID_COMMENT] = "Ctrl-U",
[G.ID_FOLD] = "F12",
[G.ID_CLEARDYNAMICWORDS] = "",
-- Search menu
[G.ID_FIND] = "Ctrl-F",
[G.ID_FINDNEXT] = "Ctrl-G",
[G.ID_FINDPREV] = "Shift-Ctrl-G",
[G.ID_REPLACE] = "Alt-Ctrl-F",
[G.ID_FINDINFILES] = "Shift-Ctrl-F",
[G.ID_REPLACEINFILES] = "Alt-Shift-Ctrl-F",
[G.ID_GOTOLINE] = "",
[G.ID_SORT] = "",
-- View menu
[G.ID_VIEWFILETREE] = "Shift-Ctrl-P",
[G.ID_VIEWOUTPUT] = "Shift-Ctrl-O",
[G.ID_VIEWWATCHWINDOW] = "Shift-Ctrl-W",
[G.ID_VIEWCALLSTACK] = "Shift-Ctrl-S",
[G.ID_VIEWDEFAULTLAYOUT] = "",
[G.ID_VIEWFULLSCREEN] = "Shift-Ctrl-A",
-- Project menu
[G.ID_RUN] = "Ctrl-R",
[G.ID_RUNNOW] = "Shift-Ctrl-R",
[G.ID_COMPILE] = "Ctrl-B",
[G.ID_ANALYZE] = "Shift-Ctrl-B",
[G.ID_STARTDEBUG] = "F5",
[G.ID_ATTACHDEBUG] = "",
[G.ID_STOPDEBUG] = "Ctrl-.",
[G.ID_STEP] = "F7",
[G.ID_STEPOVER] = "F6",
[G.ID_STEPOUT] = "F8",
[G.ID_TRACE] = "",
[G.ID_BREAK] = "Ctrl-Y",
[G.ID_TOGGLEBREAKPOINT] = "Ctrl-\\",
[G.ID_CLEAROUTPUT] = "",
[G.ID_INTERPRETER] = "",
[G.ID_PROJECTDIR] = "",
-- Help menu
[G.ID_ABOUT] = "F1",
-- Watch window menu items
[G.ID_ADDWATCH] = "Ins",
[G.ID_EDITWATCH] = "F2",
[G.ID_DELETEWATCH] = "Del",
-- Editor popup menu items
[G.ID_QUICKADDWATCH] = "",
[G.ID_QUICKEVAL] = "",
}
for id, key in G.pairs(xcode) do keymap[id] = key end

Binary file not shown.

View File

@@ -1,29 +0,0 @@
local ide = ide
local app = {
loadfilters = {
tools = function(file) return true end,
specs = function(file) return true end,
interpreters = function(file) return true end,
},
postinit = function ()
dofile("estrela/menu_help.lua")
local icon = wx.wxIcon()
icon:LoadFile("estrela/res/estrela.ico",wx.wxBITMAP_TYPE_ICO)
ide.frame:SetIcon(icon)
end,
stringtable = {
editor = "Estrela Editor",
about = "About Estrela Editor",
editormessage = "Estrela Editor Message",
statuswelcome = "Welcome to Estrela Editor",
settingsapp = "EstrelaEditor",
settingsvendor = "LuxiniaDev",
},
}
return app

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="starter" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="..\..\estrela" prefix_auto="1" extension_auto="1" />
<Option working_dir="..\..\" />
<Option object_output="obj\Debug\" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="..\..\estrela" prefix_auto="1" extension_auto="1" />
<Option working_dir="..\..\" />
<Option object_output="obj\Release\" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-D__MINGW__" />
</Compiler>
<Linker>
<Add library="kernel32" />
</Linker>
<Unit filename="..\res\estrela.ico" />
<Unit filename="..\res\estrela.rc">
<Option compilerVar="WINDRES" />
</Unit>
<Unit filename="..\win32_starter.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@@ -1,212 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="estrela_editor"
ProjectGUID="{065C5DC6-EAE4-4A57-9069-39810D816C41}"
RootNamespace="luxinia_glfw"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="../../estrela.exe"
LinkIncremental="2"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="libc"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetPath).pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="../../estrela.exe"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateManifest="true"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetPath).pdb"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
RandomizedBaseAddress="0"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\win32_starter.c"
>
</File>
</Filter>
<Filter
Name="Ressourcendateien"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\..\res\estrela.rc"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,61 +0,0 @@
local luxpath = os.getenv("LUXINIA")
path.luxinia = luxpath and luxpath.."/" or "../luxinia/engine/"
local luxpath2 = os.getenv("LUXINIA2")
path.luxinia2 = luxpath2 and luxpath2.."/" or "../luxinia2/runtime/bin_Windows_x86/"
interpreter = "estrelashell"
editor.fontname = "Courier New"
editor.caretline = true
editor.showfncall = true
editor.whitespace = true
editor.usetabs = false
editor.autotabs = true
editor.tabwidth = 2
filehistorylength = 20
singleinstance = true
singleinstanceport = 0xe493
acandtip.shorttip = true
acandtip.nodynwords = true
acandtip.ignorecase = true
styles = {
-- lexer specific (inherit fg/bg from text)
lexerdef = {fg = {128, 128, 128},},
comment = {fg = {0, 127, 0 },bg = {240, 240, 220}, fill= true,},
stringtxt = {fg = {127, 0, 127},},
stringeol = {fg = {0, 0, 0 },bg = {224, 192, 224}, fill = true, },
preprocessor = {fg = {127, 127, 0 },},
operator = {fg = {0, 0, 0 },},
number = {fg = {90, 100, 0 },},
keywords0 = {fg = {0, 0, 127}, b = true,},
keywords1 = {fg = {127, 0, 0}, b = true,},
keywords2 = {fg = {0, 127, 0}, b = true,},
keywords3 = {fg = {0, 0, 127}, b = true,},
keywords4 = {fg = {127, 0, 95}, b = true,},
keywords5 = {fg = {35, 95, 175}, b = true,},
keywords6 = {fg = {0, 127, 127}, b = true,},
keywords7 = {fg = {240, 255, 255}, b = true,},
-- common (inherit fg/bg from text)
text = nil, -- let os pick
linenumber = {fg = {90, 90, 80},},
bracematch = {fg = {0, 0, 255}, b = true},
bracemiss = {fg = {255, 0, 0 }, b = true},
ctrlchar = nil,
indent = {fg = {192, 192, 192},bg = {255, 255, 255},},
calltip = nil,
-- common special (need custom fg & bg)
calltipbg = nil,
sel = nil,
caret = nil,
caretlinebg = nil,
fold = nil,
whitespace = nil,
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_BOX},
}

View File

@@ -1,113 +0,0 @@
-- authors: Lomtik Software (J. Winwood & John Labenski)
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
---------------------------------------------------------
local ide = ide
-- ---------------------------------------------------------------------------
-- Create the Help menu and attach the callback functions
local frame = ide.frame
local menuBar = frame.menuBar
local helpMenu = wx.wxMenu{
{ ID_ABOUT, "&About\tF1", "About Estrela Editor" },
}
menuBar:Append(helpMenu, "&Help")
local function DisplayAbout(event)
local page = [[
<html>
<body bgcolor = "#ffffff" text='#ffffff'>
<table border='0' width="100%">
<tr><td><img src = "estrela/res/estrela.png"></center></td><td>
<table cellspacing = 4 cellpadding = 4 width = "400">
<tr>
<td bgcolor = "#010156">
<center>
<font size = +2 color = "#FFFFFF"><br><b>]]..
wxlua.wxLUA_VERSION_STRING..[[</b></font>
<font size = +1 color = "#FFFFFF">built with</font>
<font size = +2 color = "#FFFFFF"><b>]]..
wx.wxVERSION_STRING..[[</b></font>
</center>
</td>
</tr>
<tr>
<td bgcolor = "#4747A1">
<b>Estrela Editor</b><br>
<b><font color='#ffffff'>Copyright &copy; 2008-2011 Luxinia DevTeam</font></b>
<p>
<font size=-1>
<table cellpadding = 0 cellspacing = 0 width = "100%">
<tr>
<td width = "65%">
Christoph Kubisch<br>
Eike Decker<p>
</td>
<td valign = top>
</td>
</tr>
</table>
<font size = 1>
Licensed under The MIT License.
</font>
</font>
</td>
</tr>
<tr>
<td bgcolor = "#4747A1">
<b>based on wxLua editor sample</b><br>
<b>Copyright &copy; 2002-2005 Lomtick Software</b>
<p>
<font size=-1>
<table cellpadding = 0 cellspacing = 0 width = "100%">
<tr>
<td width = "65%">
J. Winwood (luascript@thersgb.net)<br>
John Labenski<p>
</td>
<td valign = top>
<img src = "estrela/res/wxlualogo2.png">
</td>
</tr>
</table>
<font size = 1>
wxLua binding licensed under wxWindows Library License, Version 3.
</font>
</font>
</td>
</tr>
</table>
</td></tr></table>
</body>
</html>
]]
local dlg = wx.wxDialog(frame, wx.wxID_ANY, "About Estrela Editor")
local html = wx.wxLuaHtmlWindow(dlg, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxSize(500, 270),
wx.wxHW_SCROLLBAR_NEVER)
local line = wx.wxStaticLine(dlg, wx.wxID_ANY)
local button = wx.wxButton(dlg, wx.wxID_OK, "OK")
button:SetDefault()
html:SetBorders(0)
html:SetPage(page)
html:SetSize(html:GetInternalRepresentation():GetWidth(),
html:GetInternalRepresentation():GetHeight())
local topsizer = wx.wxBoxSizer(wx.wxVERTICAL)
topsizer:Add(html, 1, wx.wxALL, 10)
topsizer:Add(line, 0, wx.wxEXPAND + wx.wxLEFT + wx.wxRIGHT, 10)
topsizer:Add(button, 0, wx.wxALL + wx.wxALIGN_RIGHT, 10)
dlg:SetAutoLayout(true)
dlg:SetSizer(topsizer)
topsizer:Fit(dlg)
dlg:ShowModal()
dlg:Destroy()
end
frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, DisplayAbout)

View File

@@ -1,20 +0,0 @@
Estrela Editor
-----------------
Estrela Editor is a wxLua based IDE. It supports multiple
fileformats, "api" for autocompletion and tooltips, and custom
commandline tools. Focus is extensibility for target applications
using Lua. Its main purpose is as IDE for the 3D engine "Luxinia".
Commandline:
------------
Open File(s):
<exe> <filename> [<filename>...]
any non-option will be treated as filename
Overriding Config:
<exe> [...] -cfg "<luacode overriding config>" [...]
e.g.: estrela.exe -cfg "singleinstance=false;" somefile.lua

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -1 +0,0 @@
icon ICON "../res/estrela.ico"

View File

@@ -1,706 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2178"
sodipodi:version="0.32"
inkscape:version="0.46+devel"
width="146"
height="146"
version="1.0"
sodipodi:docname="idelogo.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="36.990002"
inkscape:export-ydpi="36.990002">
<metadata
id="metadata2183">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs2181">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 73 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="146 : 73 : 1"
inkscape:persp3d-origin="73 : 48.666667 : 1"
id="perspective86" />
<linearGradient
id="linearGradient4596">
<stop
style="stop-color:#5151ac;stop-opacity:1;"
offset="0"
id="stop4598" />
<stop
style="stop-color:#000055;stop-opacity:1;"
offset="1"
id="stop4600" />
</linearGradient>
<linearGradient
id="linearGradient4588">
<stop
style="stop-color:#62769d;stop-opacity:1;"
offset="0"
id="stop4590" />
<stop
style="stop-color:#ff0000;stop-opacity:0;"
offset="1"
id="stop4592" />
</linearGradient>
<linearGradient
id="linearGradient5185">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop5187" />
<stop
style="stop-color:#000000;stop-opacity:1"
offset="1"
id="stop5189" />
</linearGradient>
<linearGradient
id="linearGradient2237">
<stop
style="stop-color:#0d0d3f;stop-opacity:1;"
offset="0"
id="stop2239" />
<stop
id="stop3702"
offset="0.33628318"
style="stop-color:#12127a;stop-opacity:1;" />
<stop
style="stop-color:#3e3e80;stop-opacity:1"
offset="1"
id="stop2241" />
</linearGradient>
<filter
inkscape:collect="always"
x="-0.13963953"
width="1.279279"
y="-0.14821953"
height="1.2964391"
id="filter3840">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="6.5521521"
id="feGaussianBlur3842" />
</filter>
<filter
inkscape:collect="always"
id="filter6278">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.214876"
id="feGaussianBlur6280" />
</filter>
<mask
maskUnits="userSpaceOnUse"
id="mask6290">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect6292"
width="128"
height="128"
x="0"
y="-8.5265128e-014"
ry="13.206349"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask6295">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect6297"
width="128"
height="128"
x="0"
y="-8.5265128e-014"
ry="13.206349"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</mask>
<filter
inkscape:collect="always"
id="filter6316">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.6425"
id="feGaussianBlur6318" />
</filter>
<filter
inkscape:collect="always"
x="-0.096865753"
width="1.1937315"
y="-0.13864499"
height="1.27729"
id="filter6400">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.3595156"
id="feGaussianBlur6402" />
</filter>
<filter
inkscape:collect="always"
x="-0.091426807"
width="1.1828536"
y="-0.21857401"
height="1.437148"
id="filter6510">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="4.3854492"
id="feGaussianBlur6512" />
</filter>
<filter
inkscape:collect="always"
x="-0.065166176"
width="1.1303324"
y="-0.14160248"
height="1.283205"
id="filter6588">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="3.0129427"
id="feGaussianBlur6590" />
</filter>
<filter
inkscape:collect="always"
x="-0.10324995"
width="1.2064999"
y="-0.19036609"
height="1.3807322"
id="filter6628">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.1083162"
id="feGaussianBlur6630" />
</filter>
<filter
inkscape:collect="always"
x="-0.66312472"
width="2.3262494"
y="-0.13057123"
height="1.2611425"
id="filter6690">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.059841"
id="feGaussianBlur6692" />
</filter>
<filter
inkscape:collect="always"
x="-0.75290101"
width="2.505802"
y="-0.11094242"
height="1.2218848"
id="filter6776">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.1015794"
id="feGaussianBlur6778" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4596"
id="linearGradient4602"
x1="63.296463"
y1="141"
x2="63.296463"
y2="-5.0469656"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(13.788582,2.1213203)" />
<filter
inkscape:collect="always"
id="filter3377"
x="-0.1015625"
width="1.203125"
y="-0.087053571"
height="1.1741071">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.7929688"
id="feGaussianBlur3379" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4596"
id="linearGradient3381"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.89166667,0,0,0.89166667,19.638582,9.162987)"
x1="63.296463"
y1="141"
x2="63.296463"
y2="-5.0469656" />
<filter
inkscape:collect="always"
id="filter3419"
x="-0.10422356"
width="1.2084471"
y="-0.093260085"
height="1.1865202">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="4.0324593"
id="feGaussianBlur3421" />
</filter>
<filter
inkscape:collect="always"
id="filter3425"
x="-0.12187501"
width="1.24375"
y="-0.10446428"
height="1.2089286">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.9431967"
id="feGaussianBlur3427" />
</filter>
<filter
inkscape:collect="always"
id="filter3451"
x="-0.1187245"
width="1.237449"
y="-0.12130321"
height="1.2426064">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="7.6549135"
id="feGaussianBlur3453" />
</filter>
<filter
height="1.3165256"
y="-0.15826278"
width="1.3097967"
x="-0.15489837"
id="filter3467"
inkscape:collect="always">
<feGaussianBlur
id="feGaussianBlur3469"
stdDeviation="9.98727"
inkscape:collect="always" />
</filter>
<filter
inkscape:collect="always"
id="filter3483"
x="-0.27362286"
width="1.5472457"
y="-0.27956598"
height="1.559132">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="17.642184"
id="feGaussianBlur3485" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4596"
id="linearGradient3497"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9558335,0,0,0.9558335,16.173573,4.9921428)"
x1="63.296463"
y1="141"
x2="63.296463"
y2="-5.0469656" />
<filter
inkscape:collect="always"
id="filter3499"
x="-0.059528317"
width="1.1190566"
y="-0.10133829"
height="1.2026766">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.667066"
id="feGaussianBlur3501" />
</filter>
<filter
inkscape:collect="always"
id="filter3509"
x="-0.0309375"
width="1.061875"
y="-2.0109374"
height="5.0218749">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.3472814"
id="feGaussianBlur3511" />
</filter>
</defs>
<sodipodi:namedview
inkscape:window-height="719"
inkscape:window-width="1024"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:zoom="1"
inkscape:cx="74.122861"
inkscape:cy="61.737644"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:current-layer="layer2"
showborder="true"
inkscape:showpageshadow="false"
showgrid="false" />
<g
inkscape:groupmode="layer"
id="layer1"
style="opacity:0.34615383;display:none"
transform="translate(6,5)">
<image
xlink:href="c:\temp\luxlogo.png"
sodipodi:absref="c:\temp\luxlogo.png"
width="128"
height="128"
id="image2185"
x="0"
y="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
style="display:inline"
transform="translate(6,5)">
<rect
y="4.7046537"
x="14.288583"
height="124.83334"
width="107"
id="rect3423"
style="opacity:1;fill:url(#linearGradient3381);fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter3425)"
transform="matrix(1.0719628,0,0,1.0719628,-4.8782561,-4.8302384)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587" />
<rect
style="opacity:1;fill:url(#linearGradient3497);fill-opacity:1;fill-rule:evenodd;stroke:none"
id="rect4586"
width="114.70002"
height="133.8167"
x="10.438573"
y="0.21297537"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587" />
<g
id="g3227"
transform="matrix(0.36255137,0,0,0.36255137,43.548278,21.953343)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587">
<g
id="g2599"
transform="matrix(0.73621364,0,0,0.73621364,15.540372,-36.334537)">
<path
sodipodi:nodetypes="csscssc"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 19.37247,3.0246539 C -16.608082,20.649318 -41.404147,57.657551 -41.404147,100.40056 c 0,59.80351 48.5400427,108.34356 108.343566,108.34356 40.892381,0 76.510811,-22.69984 94.952061,-56.1714 -15.59146,8.96867 -33.63299,14.11858 -52.89924,14.11858 C 50.276054,166.69131 2.5877015,119.06356 2.5877015,60.347369 c 0,-21.110232 6.1656802,-40.772917 16.7847685,-57.3227151 z"
id="path2193"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none"
d="m 46.59366,22.910342 11.81888,0 9.19246,-10.505671 5.252837,14.445294 11.818878,1.969814 -11.818878,9.192463 0.656603,13.132087 -11.81888,-9.849067 -11.818877,3.939627 4.59623,-11.818877 -7.879253,-10.50567 z"
id="path2205"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none"
d="m 113.62886,82.661339 13.7887,-14.445296 -5.25284,-19.69813 18.38488,8.535854 15.10187,-10.505668 -1.9698,19.698131 15.1019,12.475482 -19.04153,4.596232 -7.87924,15.758505 -8.53582,-16.41511 -19.69812,0 z"
id="path2207"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none;display:inline"
d="m 84.710796,92.101734 3.261705,-2.372978 0.427566,-4.744945 4.349957,2.931871 3.6572,-1.829365 -1.416054,4.909864 2.817849,3.492287 -5.239188,-0.345107 -2.470713,3.460214 -1.104536,-4.184532 -4.283786,-1.317309 z"
id="path2209"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</g>
</g>
<text
xml:space="preserve"
style="font-size:29.89867401px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Palatino Linotype;-inkscape-font-specification:Palatino Linotype"
x="66.859642"
y="95.922615"
id="text2585"
sodipodi:linespacing="100%"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587"><tspan
sodipodi:role="line"
id="tspan2587"
x="66.859642"
y="95.922615">Estrela</tspan><tspan
sodipodi:role="line"
x="66.859642"
y="125.82129"
id="tspan2589">Editor</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;"
id="rect3383"
width="104.51637"
height="1.6079443"
x="15.530396"
y="99.936134"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587" />
<g
transform="matrix(0.36255137,0,0,0.36255137,43.548278,21.953343)"
id="g3439"
style="filter:url(#filter3451)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587">
<g
transform="matrix(0.73621364,0,0,0.73621364,15.540372,-36.334537)"
id="g3441">
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3443"
d="M 19.37247,3.0246539 C -16.608082,20.649318 -41.404147,57.657551 -41.404147,100.40056 c 0,59.80351 48.5400427,108.34356 108.343566,108.34356 40.892381,0 76.510811,-22.69984 94.952061,-56.1714 -15.59146,8.96867 -33.63299,14.11858 -52.89924,14.11858 C 50.276054,166.69131 2.5877015,119.06356 2.5877015,60.347369 c 0,-21.110232 6.1656802,-40.772917 16.7847685,-57.3227151 z"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
sodipodi:nodetypes="csscssc" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3445"
d="m 46.59366,22.910342 11.81888,0 9.19246,-10.505671 5.252837,14.445294 11.818878,1.969814 -11.818878,9.192463 0.656603,13.132087 -11.81888,-9.849067 -11.818877,3.939627 4.59623,-11.818877 -7.879253,-10.50567 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3447"
d="m 113.62886,82.661339 13.7887,-14.445296 -5.25284,-19.69813 18.38488,8.535854 15.10187,-10.505668 -1.9698,19.698131 15.1019,12.475482 -19.04153,4.596232 -7.87924,15.758505 -8.53582,-16.41511 -19.69812,0 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3449"
d="m 84.710796,92.101734 3.261705,-2.372978 0.427566,-4.744945 4.349957,2.931871 3.6572,-1.829365 -1.416054,4.909864 2.817849,3.492287 -5.239188,-0.345107 -2.470713,3.460214 -1.104536,-4.184532 -4.283786,-1.317309 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none;display:inline" />
</g>
</g>
<g
style="filter:url(#filter3467)"
id="g3455"
transform="matrix(0.36255137,0,0,0.36255137,43.548278,21.953343)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587">
<g
id="g3457"
transform="matrix(0.73621364,0,0,0.73621364,15.540372,-36.334537)">
<path
sodipodi:nodetypes="csscssc"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 19.37247,3.0246539 C -16.608082,20.649318 -41.404147,57.657551 -41.404147,100.40056 c 0,59.80351 48.5400427,108.34356 108.343566,108.34356 40.892381,0 76.510811,-22.69984 94.952061,-56.1714 -15.59146,8.96867 -33.63299,14.11858 -52.89924,14.11858 C 50.276054,166.69131 2.5877015,119.06356 2.5877015,60.347369 c 0,-21.110232 6.1656802,-40.772917 16.7847685,-57.3227151 z"
id="path3459"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none"
d="m 46.59366,22.910342 11.81888,0 9.19246,-10.505671 5.252837,14.445294 11.818878,1.969814 -11.818878,9.192463 0.656603,13.132087 -11.81888,-9.849067 -11.818877,3.939627 4.59623,-11.818877 -7.879253,-10.50567 z"
id="path3461"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none"
d="m 113.62886,82.661339 13.7887,-14.445296 -5.25284,-19.69813 18.38488,8.535854 15.10187,-10.505668 -1.9698,19.698131 15.1019,12.475482 -19.04153,4.596232 -7.87924,15.758505 -8.53582,-16.41511 -19.69812,0 z"
id="path3463"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none;display:inline"
d="m 84.710796,92.101734 3.261705,-2.372978 0.427566,-4.744945 4.349957,2.931871 3.6572,-1.829365 -1.416054,4.909864 2.817849,3.492287 -5.239188,-0.345107 -2.470713,3.460214 -1.104536,-4.184532 -4.283786,-1.317309 z"
id="path3465"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</g>
</g>
<g
transform="matrix(0.36255137,0,0,0.36255137,43.548278,21.953343)"
id="g3471"
style="filter:url(#filter3483)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587">
<g
transform="matrix(0.73621364,0,0,0.73621364,15.540372,-36.334537)"
id="g3473">
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3475"
d="M 19.37247,3.0246539 C -16.608082,20.649318 -41.404147,57.657551 -41.404147,100.40056 c 0,59.80351 48.5400427,108.34356 108.343566,108.34356 40.892381,0 76.510811,-22.69984 94.952061,-56.1714 -15.59146,8.96867 -33.63299,14.11858 -52.89924,14.11858 C 50.276054,166.69131 2.5877015,119.06356 2.5877015,60.347369 c 0,-21.110232 6.1656802,-40.772917 16.7847685,-57.3227151 z"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
sodipodi:nodetypes="csscssc" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3477"
d="m 46.59366,22.910342 11.81888,0 9.19246,-10.505671 5.252837,14.445294 11.818878,1.969814 -11.818878,9.192463 0.656603,13.132087 -11.81888,-9.849067 -11.818877,3.939627 4.59623,-11.818877 -7.879253,-10.50567 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3479"
d="m 113.62886,82.661339 13.7887,-14.445296 -5.25284,-19.69813 18.38488,8.535854 15.10187,-10.505668 -1.9698,19.698131 15.1019,12.475482 -19.04153,4.596232 -7.87924,15.758505 -8.53582,-16.41511 -19.69812,0 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none" />
<path
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="c:\temp\logotest"
id="path3481"
d="m 84.710796,92.101734 3.261705,-2.372978 0.427566,-4.744945 4.349957,2.931871 3.6572,-1.829365 -1.416054,4.909864 2.817849,3.492287 -5.239188,-0.345107 -2.470713,3.460214 -1.104536,-4.184532 -4.283786,-1.317309 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:none;display:inline" />
</g>
</g>
<text
sodipodi:linespacing="100%"
id="text3487"
y="93.989136"
x="66.922005"
style="font-size:27.89152144999999900px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Palatino Linotype;-inkscape-font-specification:Palatino Linotype;filter:url(#filter3499);opacity:1"
xml:space="preserve"
transform="matrix(1.0719628,0,0,1.0719628,-4.8782561,-4.8302384)"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587"><tspan
y="93.989136"
x="66.922005"
id="tspan3489"
sodipodi:role="line">Estrela</tspan><tspan
id="tspan3491"
y="121.88066"
x="66.922005"
sodipodi:role="line">Editor</tspan></text>
<rect
y="99.936134"
x="15.530396"
height="1.6079443"
width="104.51637"
id="rect3507"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3509)"
inkscape:export-xdpi="181.25587"
inkscape:export-ydpi="181.25587"
inkscape:export-filename="D:\dev\c\tools\wxide\res\estrela.png" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="uninstall"
style="opacity:0.87179488;display:none">
<path
style="opacity:0.90909095;fill:#ff0000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6628)"
d="M 14,129.5 C 14.336023,78.681123 10.223888,102.29852 28,126 C 30.459675,129.27957 31.666667,118.66667 33.5,115 C 34.280157,113.43969 60.370804,77.40912 51.5,105.5 C 50.690734,108.06268 52.166667,110.83333 52.5,113.5 C 53.627928,122.52343 58.069819,95.430181 64.5,89 C 77.260993,76.239007 72.034223,53.027263 77.5,84 C 81.920823,109.05133 73.638657,88.715336 86.5,85.5 C 115.4259,78.268526 69.170508,123.74712 95.5,104 C 128.78796,79.03403 116,64.235283 116,113.5 C 116,117.62311 118,105.5 119,101.5 C 121.13437,92.962501 126.33333,117.5 130,125.5 C 130.87839,127.41648 131.33333,121.5 132,119.5 C 133.424,115.228 131.66667,128.5 131.5,133"
id="path6594"
transform="matrix(1,0,0,1.6987359,0,-92.931881)" />
<path
style="opacity:0.81404952;fill:#ff0000;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;filter:url(#filter6400)"
d="M 9.5,127 C 9.3333333,127 9.1666667,127 9,127 C 5.1450826,127 5,115.26288 5,113 C 5,108.88399 4.5,104.31286 4.5,100 C 4.5,90.729345 9.3911698,86.181384 14,78.5 C 16.525846,74.290257 21.294069,70.176551 23.5,66.5 C 24.010025,65.649958 19.12736,72.1816 18,75 C 16.175585,79.561038 16.938863,85.255452 18,89.5 C 19.417577,95.17031 20.550245,97.050245 24.5,101 C 27.204082,103.70408 28.564013,105.87197 30.5,102 C 32.717007,97.565986 32.821681,88.213274 34,83.5 C 36.21779,74.628838 33.5,60.648945 33.5,51.5 C 33.5,51.084452 43.746631,33.513476 40.5,46.5 C 37.526688,58.393246 42.328731,65.743097 48.5,75 C 57.52302,88.53453 51.657407,61.728395 65.5,52.5 C 75.452786,45.864809 69.5,56.563364 69.5,63.5 C 69.5,97.806907 73.726993,52.544988 80,63 C 104.74932,104.24887 98.5,68.637999 98.5,48 C 98.5,43.548461 105.9654,52.637713 112,63.5 C 131.67898,98.922169 101.60755,95.392446 125.5,71.5 C 131.39727,65.602731 126.5,88.160003 126.5,96.5 C 126.5,103.50198 126.00977,110.56839 127,117.5 C 127.95497,124.1848 139.22574,81.791102 137,108.5 C 136.48054,114.73353 136,120.29333 136,126.5 C 136,131.40801 136.45529,134 131,134 C 124.83333,134 118.66667,134 112.5,134 C 106.66667,134 100.83333,134 95,134 C 87.666667,134 80.333333,134 73,134 C 59.815481,134 46.676285,134.5 33.5,134.5 C 29,134.5 24.5,134.5 20,134.5 C 17.560468,134.5 15.299427,130.79943 14.5,130 C 12.881524,128.38152 11.876707,127.47534 9.5,127 z "
id="path6360" />
<path
style="opacity:0.7892562;fill:#ffff00;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6510)"
d="M 18,133 C 17.666667,128.16667 17.333333,123.33333 17,118.5 C 16.12131,105.759 12.392768,108.83915 20.5,121 C 26.928487,130.64273 27.121348,121.87865 34.5,114.5 C 40.14466,108.85534 28.809035,133.69097 46.5,116 C 69.437036,93.062964 57.251105,73.257733 62,106.5 C 62.141421,107.48995 62,108.5 62,109.5 C 62,116.18839 65.961948,99.019026 77,93.5 C 84.016889,89.991555 79.782388,94.911939 82,106 C 84.489642,118.44821 104.6601,90.259847 107.5,86 C 108.99663,83.755053 110.63899,106.80503 109.5,112.5 C 107.85301,120.73495 118.5,80.922943 118.5,109 C 118.5,136.59389 130.5,113.97346 130.5,123.5 C 130.5,126.59415 130.47115,131.64424 130,134"
id="path6404" />
<path
style="opacity:0.47107436;fill:#ffff00;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6588)"
d="M 23,129.5 C 23,132.18128 23.707157,117.52684 20.5,105.5 C 18.755021,98.956331 22.5,82.949866 22.5,98 C 22.5,101.13302 26.815124,126.46219 32,113.5 C 37.373635,100.06591 49.880495,78.048761 46.5,86.5 C 45.909734,87.975665 37.7573,136.7281 47.5,107.5 C 47.857122,106.42863 51.414918,124.58508 58,118 C 68.456644,107.54336 70,50.914151 70,100.5 C 70,131.81187 78.663987,96.334003 94,92.5 C 101.72907,90.567732 88.111037,107.55652 87.5,115.5 C 87.384247,117.00479 87.833333,118.5 88,120 C 89.236992,131.13293 100.98113,100.50944 111,95.5 C 121.54122,90.229389 111.5,106.05757 111.5,112 C 111.5,113.79505 112.83333,115.33333 113.5,117 C 114.6363,119.84076 116.5,111.66667 118,109 C 127.18664,92.668192 120.25003,138.81244 129.5,118 C 129.81325,117.2952 131,128.12728 131,131.5"
id="path6514"
transform="matrix(1,0,0,1.558102,0,-73.390417)" />
<path
style="opacity:0.73966944;fill:#ffa500;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6690)"
d="M 98.5,75 C 103.15482,68.57691 90.320092,24.848129 101.5,40.5 C 102.88049,42.432688 106.61962,69.035283 102,72.5 C 100.85302,73.360232 99.666667,74.166667 98.5,75 z "
id="path6632" />
<path
style="opacity:0.94214872;fill:#ffba00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6776)"
d="M 51,68 C 45.233621,73.766379 50.387595,36.449622 50.5,36 C 53.115126,25.539495 57.714899,13.962753 49.5,34.5 C 44.403872,47.24032 50.084923,57.754768 53.5,68 C 53.763523,68.790569 51.833333,68 51,68 z "
id="path6696" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="border"
style="display:none">
<rect
transform="translate(6,5)"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline;filter:url(#filter6316)"
id="rect6282"
width="128"
height="128"
x="0"
y="-8.5265128e-014"
ry="13.206349"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<rect
transform="translate(6,5)"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline;filter:url(#filter6278)"
id="rect4190"
width="128"
height="128"
x="0"
y="-8.5265128e-014"
ry="13.206349"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300"
mask="url(#mask6290)" />
<rect
transform="translate(6,5)"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect5203"
width="128"
height="128"
x="0"
y="-8.5265128e-014"
ry="13.206349"
inkscape:export-filename="c:\temp\logotest"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300"
mask="url(#mask6295)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -1,132 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="204.22055"
height="96.006279"
id="svg3513"
sodipodi:version="0.32"
inkscape:version="0.46+devel"
version="1.0"
inkscape:export-filename="D:\dev\c\tools\wxide\res\wxlualogo2.png"
inkscape:export-xdpi="59.996075"
inkscape:export-ydpi="59.996075"
sodipodi:docname="wxlogo.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs3515">
<linearGradient
id="linearGradient3538">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3540" />
<stop
style="stop-color:#e3e3eb;stop-opacity:1;"
offset="1"
id="stop3542" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective3521" />
<inkscape:perspective
id="perspective3530"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3538"
id="linearGradient3544"
x1="88.214287"
y1="0.2142856"
x2="88.214287"
y2="81.130592"
gradientUnits="userSpaceOnUse" />
<filter
inkscape:collect="always"
id="filter4057"
x="-0.044305418"
width="1.0886108"
y="-0.10071105"
height="1.2014221">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.2929748"
id="feGaussianBlur4059" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="98.55416"
inkscape:cy="58.784487"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1024"
inkscape:window-height="719"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata3518">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-102.354,-435.00191)">
<rect
ry="12.142858"
y="-1.9285716"
x="-5"
height="85"
width="193.21428"
id="rect3546"
style="opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter4057)"
transform="translate(112.85714,442.43362)" />
<rect
style="opacity:1;fill:url(#linearGradient3544);fill-opacity:1;fill-rule:nonzero;stroke:none"
id="rect3536"
width="193.21428"
height="85"
x="-5"
y="-1.9285716"
transform="translate(112.85714,442.43362)"
ry="12.142858" />
<image
y="442.43362"
x="112.85714"
id="image3532"
height="77"
width="180"
sodipodi:absref="D:\dev\c\tools\wxide\res\wxlualogo.png"
xlink:href="wxlualogo.png" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

75
interpreters/corona.lua Normal file
View File

@@ -0,0 +1,75 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
local corona
local win = ide.osname == "Windows"
local mac = ide.osname == "Macintosh"
return {
name = "Corona",
description = "Corona SDK mobile framework",
api = {"baselib", "corona"},
frun = function(self,wfilename,rundebug)
corona = corona or ide.config.path.corona -- check if the path is configured
if not corona then
local sep = win and ';' or ':'
local default =
win and ([[C:\Program Files\Corona SDK]]..sep..[[D:\Program Files\Corona SDK]]..sep..
[[C:\Program Files\Corona Labs\Corona SDK]]..sep..[[D:\Program Files\Corona Labs\Corona SDK]]..sep..
[[C:\Program Files (x86)\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona SDK]]..sep..
[[C:\Program Files (x86)\Corona Labs\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona Labs\Corona SDK]]..sep)
or mac and ('/Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS'..sep)
or ''
local path = default
..(os.getenv('PATH') or '')..sep
..(os.getenv('HOME') and os.getenv('HOME') .. '/bin' or '')
local paths = {}
for p in path:gmatch("[^"..sep.."]+") do
corona = corona or GetFullPathIfExists(p, win and 'Corona Simulator.exe' or 'Corona Simulator')
table.insert(paths, p)
end
if not corona then
DisplayOutput("Can't find corona executable in any of the folders in PATH: "
..table.concat(paths, ", ").."\n")
return
end
end
local file = GetFullPathIfExists(self:fworkdir(wfilename), 'main.lua')
if not file then
DisplayOutput("Can't find 'main.lua' file in the current project folder.\n")
return
end
if rundebug then
-- start running the application right away
DebuggerAttachDefault({startwith = file, redirect = mac and "r" or "c",
runstart = ide.config.debugger.runonstart ~= false})
-- copy mobdebug.lua to Resources/ folder on Win and to the project folder on OSX
-- as copying it to Resources/ folder seems to break the signature of the app.
local mdbc = mac and MergeFullPath(self:fworkdir(wfilename), "mobdebug.lua")
or MergeFullPath(GetPathWithSep(corona), "Resources/mobdebug.lua")
local mdbl = MergeFullPath(GetPathWithSep(ide.editorFilename), "lualibs/mobdebug/mobdebug.lua")
if not wx.wxFileExists(mdbc)
or GetFileModTime(mdbc):GetTicks() < GetFileModTime(mdbl):GetTicks() then
FileCopy(mdbl, mdbc)
DisplayOutput(("Copied ZeroBrane Studio debugger ('mobdebug.lua') to '%s' folder.\n"):format(mdbc))
end
end
local debugopt = mac and "-debug 1 -project " or "-debug "
local cmd = ('"%s" %s"%s"'):format(corona, rundebug and debugopt or "", file)
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
function() ide.debugger.pid = nil end)
end,
fprojdir = function(self,wfilename)
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
fworkdir = function(self,wfilename)
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
scratchextloop = true,
}

View File

@@ -1,12 +0,0 @@
return {
name = "Estrela Editor",
description = "Estrela Editor as run target (IDE development)",
api = {"wxwidgets","baselib"},
frun = function(self,wfilename)
local cmd = ide.editorFilename and '"'..ide.editorFilename..'" '..(wfilename and wfilename:GetFullPath() or "")..' -cfg "singleinstance=false;"' or nil
CommandLineRun(cmd,nil,false,true)
end,
fprojdir = function(self,wfilename)
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
}

149
interpreters/gideros.lua Normal file
View File

@@ -0,0 +1,149 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
local gideros
local win = ide.osname == "Windows"
local mac = ide.osname == "Macintosh"
local function isValidPid(bid, cmd)
if not bid or bid == -1 or bid == 0 then
DisplayOutputLn(("Program unable to run as '%s'."):format(cmd))
return
end
return bid
end
local function waitToComplete(bid)
while wx.wxProcess.Exists(bid) do
wx.wxSafeYield()
wx.wxWakeUpIdle()
wx.wxMilliSleep(100)
end
end
return {
name = "Gideros",
description = "Gideros mobile platform",
api = {"baselib", "gideros"},
frun = function(self,wfilename,rundebug)
gideros = gideros or ide.config.path.gideros -- check if the path is configured
if not gideros then
local sep = win and ';' or ':'
local default =
win and ([[C:\Program Files\Gideros]]..sep..[[D:\Program Files\Gideros]]..sep..
[[C:\Program Files (x86)\Gideros]]..sep..[[D:\Program Files (x86)\Gideros]]..sep)
or mac and ('/Applications/Gideros Studio/Gideros Player.app/Contents/MacOS'..sep)
or ''
local path = default
..(os.getenv('PATH') or '')..sep
..(os.getenv('HOME') and os.getenv('HOME') .. '/bin' or '')
local paths = {}
for p in path:gmatch("[^"..sep.."]+") do
gideros = gideros or GetFullPathIfExists(p, win and 'GiderosPlayer.exe' or 'Gideros Player')
table.insert(paths, p)
end
if not gideros then
DisplayOutputLn("Can't find gideros executable in any of the folders in PATH: "
..table.concat(paths, ", "))
return
end
end
if gideros and not wx.wxFileName(gideros):FileExists() then
DisplayOutputLn("Can't find the specified gideros executable '"..gideros.."'.")
return
end
local giderostools = wx.wxFileName.DirName(wx.wxFileName(gideros)
:GetPath(wx.wxPATH_GET_VOLUME)
..(win and '/Tools' or '/../../../Gideros Studio.app/Contents/Tools'))
giderostools:Normalize()
local giderospath = giderostools:GetPath(wx.wxPATH_GET_VOLUME)
local gdrbridge = GetFullPathIfExists(giderospath, win and 'gdrbridge.exe' or 'gdrbridge')
if not gdrbridge then
DisplayOutputLn("Can't find gideros bridge executable in '"..giderospath.."'.")
return
end
-- find *.gproj file in the project directory
local file
for _, proj in ipairs(FileSysGetRecursive(self:fworkdir(wfilename), false, "*.gproj")) do
if file then
DisplayOutputLn("Found multiple .gproj files in the project directory; ignored '"..proj.."'.")
end
file = file or proj
end
if not file then
DisplayOutputLn("Can't find gideros project file in the project directory.")
return
end
if rundebug then DebuggerAttachDefault(
{redirect = "c", runstart = ide.config.debugger.runonstart ~= false}) end
local pid
local remote = ide.config.gideros and ide.config.gideros.remote
if remote then
local cmd = ('"%s" %s "%s"'):format(gdrbridge, 'setip', remote)
DisplayOutputLn(("Configuring remote player at %s."):format(remote))
local bid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC)
if not isValidPid(bid, cmd) then return end
waitToComplete(bid) -- wait for a bit to give Gideros chance to connect
else
local cmd = ('"%s"'):format(gideros)
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
pid = CommandLineRun(cmd,self:fworkdir(wfilename),not mac,true,nil,nil,
function() ide.debugger.pid = nil end)
if not pid then return end
end
do
DisplayOutputLn("Starting the player and waiting for the bridge to connect at '"..gdrbridge.."'.")
local cmd = ('"%s" %s'):format(gdrbridge, 'isconnected')
local attempts, connected = 12
for _ = 1, attempts do
local proc = wx.wxProcess()
proc:Redirect()
proc:Connect(wx.wxEVT_END_PROCESS, function(event) proc = nil end)
local bid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC + wx.wxEXEC_MAKE_GROUP_LEADER, proc)
if not isValidPid(bid, cmd) then return end
local streamin = proc:GetInputStream()
for _ = 1, 20 do
if streamin:CanRead() then
connected = tonumber(streamin:Read(4096)) == 1
break end
wx.wxSafeYield()
wx.wxWakeUpIdle()
wx.wxMilliSleep(250)
end
if connected then break end
if connected == nil and proc then
wx.wxProcess.Kill(bid, wx.wxSIGKILL, wx.wxKILL_CHILDREN)
if not remote then wx.wxProcess.Kill(pid, wx.wxSIGKILL, wx.wxKILL_CHILDREN) end
DisplayOutputLn("Couldn't connect to the player. Try again or check starting the player and the bridge manually.")
return
end
end
if not connected then
if not remote then wx.wxProcess.Kill(pid, wx.wxSIGKILL, wx.wxKILL_CHILDREN) end
DisplayOutputLn("Couldn't connect after "..attempts.." attempts. Try again or check starting the player manually.")
return
end
local cmd = ('"%s" %s "%s"'):format(gdrbridge, 'play', file)
DisplayOutputLn(("Starting project file '%s'."):format(file))
local bid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC)
if not isValidPid(bid, cmd) then return end
end
return pid
end,
fprojdir = function(self,wfilename)
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
fworkdir = function(self,wfilename)
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
scratchextloop = true,
}

73
interpreters/gslshell.lua Normal file
View File

@@ -0,0 +1,73 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
local gslshell
local win = ide.osname == "Windows"
return {
name = "GSL-shell",
description = "GSL-shell interpreter",
api = {"baselib"},
frun = function(self,wfilename,rundebug)
gslshell = gslshell or ide.config.path.gslshell -- check if the path is configured
if not gslshell then
local sep = win and ';' or ':'
local default =
win and ([[C:\Program Files\gsl-shell]]..sep..[[D:\Program Files\gsl-shell]]..sep..
[[C:\Program Files (x86)\gsl-shell]]..sep..[[D:\Program Files (x86)\gsl-shell]]..sep)
or ''
local path = default
..(os.getenv('PATH') or '')..sep
..(GetPathWithSep(self:fworkdir(wfilename)))..sep
..(os.getenv('HOME') and GetPathWithSep(os.getenv('HOME'))..'bin' or '')
local paths = {}
for p in path:gmatch("[^"..sep.."]+") do
gslshell = gslshell or GetFullPathIfExists(p, win and 'gsl-shell.exe' or 'gsl-shell')
table.insert(paths, p)
end
if not gslshell then
DisplayOutput("Can't find gsl-shell executable in any of the following folders: "
..table.concat(paths, ", ").."\n")
return
end
end
do
-- add path to GSL-shell modules and templates/?.lua.in
local gslpath = GetPathWithSep(gslshell)
local luapath = gslpath.."gsl-shell/?.lua;"..gslpath.."gsl-shell/templates/?.lua.in"
local luacpath = gslpath.."gsl-shell/?.dll"
-- add GSL-shell modules to the end of LUA_PATH
local _, path = wx.wxGetEnv("LUA_PATH")
if path and not path:find(gslpath, 1, true) then
wx.wxSetEnv("LUA_PATH", path..";"..luapath)
end
-- add GSL-shell modules to the beginning of LUA_CPATH to make luajit
-- friendly luasocket to load before it loads luasocket shipped with ZBS
local _, cpath = wx.wxGetEnv("LUA_CPATH")
if cpath and not cpath:find(gslpath, 1, true) then
wx.wxSetEnv("LUA_CPATH", luacpath..";"..cpath)
end
end
if rundebug then
DebuggerAttachDefault({runstart = ide.config.debugger.runonstart == true})
end
local cmd = ('"%s" "%s"'):format(gslshell, wfilename:GetFullPath())
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
function() ide.debugger.pid = nil end)
end,
fprojdir = function(self,wfilename)
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
fworkdir = function(self,wfilename)
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
skipcompile = true,
unhideanywindow = true,
}

View File

@@ -1,5 +1,8 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
local love2d
local win = ide.osname == "Windows"
local mac = ide.osname == "Macintosh"
return {
name = "Love2d",
@@ -9,7 +12,13 @@ return {
love2d = love2d or ide.config.path.love2d -- check if the path is configured
if not love2d then
local sep = win and ';' or ':'
local path = (os.getenv('PATH') or '')..sep
local default =
win and ([[C:\Program Files\love]]..sep..[[D:\Program Files\love]]..sep..
[[C:\Program Files (x86)\love]]..sep..[[D:\Program Files (x86)\love]]..sep)
or mac and ('/Applications/love.app/Contents/MacOS'..sep)
or ''
local path = default
..(os.getenv('PATH') or '')..sep
..(GetPathWithSep(self:fworkdir(wfilename)))..sep
..(os.getenv('HOME') and GetPathWithSep(os.getenv('HOME'))..'bin' or '')
local paths = {}
@@ -29,7 +38,9 @@ return {
return
end
if rundebug then DebuggerAttachDefault() end
if rundebug then
DebuggerAttachDefault({runstart = ide.config.debugger.runonstart == true})
end
local cmd = ('"%s" "%s"%s'):format(love2d,
self:fworkdir(wfilename), rundebug and ' -debug' or '')

View File

@@ -4,8 +4,9 @@ local function exePath()
local mainpath = ide.editorFilename:gsub("[^/\\]+$","")
local macExe = mainpath..'bin/lua.app/Contents/MacOS/lua'
return ide.config.path.lua or
(ide.osname == "Windows" and mainpath..[[bin\lua]]
or (wx.wxFileExists(macExe) and macExe or mainpath..'bin/lua'))
(ide.osname == "Windows" and mainpath..[[bin\lua.exe]]
or (ide.osname == "Unix" and mainpath..([[bin/linux/%s/lua]]):format(ide.osarch))
or (wx.wxFileExists(macExe) and macExe or mainpath..[[bin/lua]]))
end
return {
@@ -15,10 +16,8 @@ return {
frun = function(self,wfilename,rundebug)
exe = exe or exePath()
local filepath = wfilename:GetFullPath()
local script
if rundebug then
DebuggerAttachDefault()
script = rundebug
DebuggerAttachDefault({runstart = ide.config.debugger.runonstart == true})
else
-- if running on Windows and can't open the file, this may mean that
-- the file path includes unicode characters that need special handling
@@ -29,11 +28,11 @@ return {
winapi.set_encoding(winapi.CP_UTF8)
filepath = winapi.short_path(filepath)
end
script = ('dofile [[%s]]'):format(filepath)
end
local code = ([[xpcall(function() io.stdout:setvbuf('no'); %s end,function(err) print(debug.traceback(err)) end)]]):format(script)
local cmd = '"'..exe..'" -e "'..code..'"'
local code = rundebug
and ([[-e "io.stdout:setvbuf('no'); %s"]]):format(rundebug)
or ([[-e "io.stdout:setvbuf('no')" "%s"]]):format(filepath)
local cmd = '"'..exe..'" '..code
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
function() ide.debugger.pid = nil end)
@@ -46,4 +45,6 @@ return {
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
scratchextloop = false,
unhideanywindow = true,
}

View File

@@ -1,21 +1,31 @@
if (not(ide.config.path.luxinia and
wx.wxFileExists(ide.config.path.luxinia..'luxinia.exe'))) then
return
end
return {
name = "Luxinia",
description = "Luxinia project",
api = {"luxiniaapi","baselib"},
frun = function(self,wfilename,withdebug)
if not ide.config.path.luxinia then wx.wxMessageBox("Please define 'path.luxinia' in your cfg/user.lua (see estrela.lua for examples)"); return end
local projdir = ide.config.path.projectdir
local endstr = (projdir and projdir:len()>0
local args = (projdir and projdir:len()>0
and " -p "..projdir or "")
local fname = wfilename:GetFullName()
endstr = endstr..(fname and (" -t "..fname) or "")
args = args..(fname and (" -t "..fname) or "")
if withdebug and ide.config.luxinia1debug then
DebuggerAttachDefault({
basedir=projdir,
run=true, }
)
local editorDir = string.gsub(ide.editorFilename:gsub("[^/\\]+$",""),"\\","/")
script = ""..
"package.path=package.path..';"..editorDir.."lualibs/?/?.lua';"..
"io.stdout:setvbuf('no'); mobdebug = require('mobdebug'); mobdebug.start('" .. ide.debugger.hostname.."',"..ide.debugger.portnumber..");"..
"jit.debug();mobdebug.off();"
local cmd = 'luxinia.exe --nologo'..endstr
args = args..' -b "'..script..'"'
end
local cmd = 'luxinia.exe --nologo'..args
CommandLineRun(cmd,ide.config.path.luxinia,true,true)
end,
fuid = function(self,wfilename) return "luxinia "..(ide.config.path.projectdir or "") end,
@@ -30,4 +40,5 @@ return {
return path:sub(0,-2)
end,
hasdebugger = ide.config.luxinia1debug or false,
}

View File

@@ -1,15 +1,12 @@
if (not(ide.config.path.luxinia2 and
wx.wxFileExists(ide.config.path.luxinia2..'luajit.exe'))) then
return
end
return {
name = "Luxinia2",
description = "Luxinia2",
api = {"baselib","cg30","cggl30","glfw","glewgl","assimp20","luxmath","luxgfx","luxscene","luajit2",},
api = {"baselib","glfw","glewgl","assimp20","luxmath","luxgfx","luxscene","luajit2",},
finitclient = function(self)
if (not CommandLineRunning(self:fuid(wfilename))) then return end
if not ide.config.path.luxinia2 then wx.wxMessageBox("Please define 'path.luxinia2' in your cfg/user.lua (see estrela.lua for examples)"); return end
local init = dofile(ide.config.path.luxinia2.."/../comserver/client.lua")
local fenv = {}
setmetatable(fenv,{__index = _G})

117
interpreters/marmalade.lua Normal file
View File

@@ -0,0 +1,117 @@
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
local quick
local win = ide.osname == "Windows"
local mac = ide.osname == "Macintosh"
local exe = win and [[win32\s3e_simulator_debug.exe]] or [[loader/osx/s3e_simulator_debug]]
local s3e = os.getenv("S3E_DIR")
return {
name = "Marmalade Quick",
description = "Marmalade Quick mobile framework",
api = {"baselib", "marmalade"},
frun = function(self,wfilename,rundebug)
quick = quick or ide.config.path.quick or (s3e and GetFullPathIfExists(s3e, exe))
if not quick then
local sep = win and ';' or ':'
local path =
win and ([[C:\Marmalade]]..sep..[[D:\Marmalade]]..sep..
[[C:\Program Files\Marmalade]]..sep..[[D:\Program Files\Marmalade]]..sep..
[[C:\Program Files (x86)\Marmalade]]..sep..[[D:\Program Files (x86)\Marmalade]]..sep)
or mac and ([[/Developer/Marmalade]]..sep)
or ''
-- Marmalade can be installed in a folder with version number or without
-- so it may be c:\Marmalade\s3e\... or c:\Marmalade\6.2\s3e\...
local candidates, paths = {}, {}
for p in path:gmatch("[^"..sep.."]+") do
table.insert(paths, p)
for _, candidate in ipairs(FileSysGetRecursive(p, false, "*")) do
if GetFullPathIfExists(candidate, exe) then table.insert(candidates, candidate) end
if GetFullPathIfExists(candidate.."/s3e", exe) then table.insert(candidates, candidate.."/s3e") end
end
end
-- multiple candidates may be present, so sort and use the latest.
-- only happens if multiple versions are installed and S3E_DIR is not set.
table.sort(candidates)
if #candidates > 0 then
s3e = candidates[#candidates]
quick = GetFullPathIfExists(s3e, exe) -- guaranteed to exist
else
DisplayOutputLn("Can't find Marmalade installation in any of these folders (and S3E_DIR environmental variable is not set): "
..table.concat(paths, ", "))
return
end
end
local projdir = self:fworkdir(wfilename)
local file = GetFullPathIfExists(projdir, 'main.lua')
if not file then
DisplayOutputLn("Can't find 'main.lua' file in the current project folder.")
return
end
-- check for *.mkb file; it can be in the same or in the parent folder
local mproj, mfile = MergeFullPath(projdir, "./")
for _, file in ipairs(FileSysGetRecursive(mproj, false, "*.mkb")) do mfile = file end
if not mfile then
mproj, mfile = MergeFullPath(projdir, "../")
for _, file in ipairs(FileSysGetRecursive(mproj, false, "*.mkb")) do mfile = file end
end
if not mfile then
DisplayOutputLn(("Can't find '%s' project file."):format(mproj))
return
end
local mkb = FileRead(mfile)
local datadir = mkb:match("options%s*%{[^%}]*s3e%-data%-dir%s*=%s*(.-)%s*[\r\n%}]")
datadir = datadir and datadir:gsub("^['\"]", ""):gsub("['\"][\r\n]*$", "")
local icf1, icf2 = mkb:match("options%s*%{[^%}]*app%-icf%s*=%s*(.-)%s*[\r\n%}]")
icf1 = icf1 and icf1:gsub("^['\"]", ""):gsub("['\"][\r\n]*$", "")
if icf1 and icf1:find(",") then
icf1, icf2 = icf1:match("(.+),(.*)")
end
datadir = datadir and (wx.wxIsAbsolutePath(datadir) and datadir or MergeFullPath(mproj, datadir))
icf1 = icf1 and (wx.wxIsAbsolutePath(icf1) and icf1 or MergeFullPath(mproj, icf1))
icf2 = icf2 and (wx.wxIsAbsolutePath(icf2) and icf2 or MergeFullPath(mproj, icf2))
if rundebug then
-- start running the application right away
DebuggerAttachDefault({redirect = mac and "r" or "c", basedir = datadir,
runstart = ide.config.debugger.runonstart ~= false})
-- copy mobdebug.lua to the configured datadir or project folder
local mdbc = MergeFullPath(datadir or projdir, "mobdebug.lua")
local mdbl = MergeFullPath(GetPathWithSep(ide.editorFilename), "lualibs/mobdebug/mobdebug.lua")
if not wx.wxFileExists(mdbc)
or GetFileModTime(mdbc):GetTicks() < GetFileModTime(mdbl):GetTicks() then
FileCopy(mdbl, mdbc)
DisplayOutputLn("Copied ZeroBrane Studio debugger ('mobdebug.lua') to the project folder.")
end
end
local dll = GetFullPathIfExists(s3e, "../quick/target/quick_prebuilt_d.s86")
or MergeFullPath(s3e, ("../quick/target/%s/quick_prebuilt_d.s86"):format(mac and 'osx' or 'win'))
local options = table.concat({
([[--dll="%s"]]):format(dll),
(datadir and ([[--data="%s"]]):format(datadir) or ''),
-- Quick doesn't handle correctly spaces in quoted parameters on OSX,
-- so replace those with escaped spaces; still quote on Windows
(icf1 and ([[--app-icf1=%s]]):format(mac and icf1:gsub(" ", "\\ ") or '"'..icf1..'"') or ''),
(icf2 and ([[--app-icf2=%s]]):format(mac and icf2:gsub(" ", "\\ ") or '"'..icf2..'"') or nil),
}, " ")
local cmd = ('"%s" %s'):format(quick, options)
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
return CommandLineRun(cmd,GetPathWithSep(projdir),true,true,nil,nil,
function() ide.debugger.pid = nil end)
end,
fprojdir = function(self,wfilename)
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
fworkdir = function(self,wfilename)
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
end,
hasdebugger = true,
fattachdebug = function(self) DebuggerAttachDefault() end,
}

View File

@@ -4,12 +4,17 @@ local win = ide.osname == "Windows"
return {
name = "Moai",
description = "Moai mobile platform",
api = {"baselib"},
api = {"baselib", "moai"},
frun = function(self,wfilename,rundebug)
moai = moai or ide.config.path.moai -- check if the path is configured
if not moai then
local sep = win and ';' or ':'
local path = (os.getenv('PATH') or '')..sep
local default =
win and ([[C:\Program Files\moai]]..sep..[[D:\Program Files\moai]]..sep..
[[C:\Program Files (x86)\moai]]..sep..[[D:\Program Files (x86)\moai]]..sep)
or ''
local path = default
..(os.getenv('PATH') or '')..sep
..(os.getenv('MOAI_BIN') or '')..sep
..(os.getenv('HOME') and os.getenv('HOME') .. '/bin' or '')
local paths = {}
@@ -41,7 +46,8 @@ return {
if rundebug then
-- start running the application right away
DebuggerAttachDefault({runstart=true, startwith = file})
DebuggerAttachDefault({startwith = file,
runstart = ide.config.debugger.runonstart ~= false})
local code = (
[[xpcall(function()
io.stdout:setvbuf('no')
@@ -58,6 +64,14 @@ return {
end
f:write(code)
f:close()
-- add mobdebug as the first path to LUA_PATH to provide a workaround
-- for a MOAI issue: https://github.com/pkulchenko/ZeroBraneStudio/issues/96
local mdb = MergeFullPath(GetPathWithSep(ide.editorFilename), "lualibs/mobdebug/?.lua")
local _, path = wx.wxGetEnv("LUA_PATH")
if path and path:find(mdb, 1, true) ~= 1 then
wx.wxSetEnv("LUA_PATH", mdb..";"..path)
end
end
file = file or wfilename:GetFullPath()

View File

@@ -2,7 +2,7 @@
-- an abstract syntax tree (AST)
local file = debug.getinfo(1, "S").source
if string.find(file, "@") == 1 then file = string.sub(file, 2) end
package.path = package.path .. ';' .. string.gsub(file, "metalua%.lua$", "?.lua")
package.path = string.gsub(file, "metalua%.lua$", "?.lua") .. ';' .. package.path
-- these modules are sufficient to build an AST from a source file/string
require "lexer"

File diff suppressed because it is too large Load Diff

78
spec/cpp.lua Normal file
View File

@@ -0,0 +1,78 @@
-- author: Paul Kulchenko
---------------------------------------------------------
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
return {
exts = {"cpp", "c", "hpp", "h"},
lexer = wxstc.wxSTC_LEX_CPP,
apitype = "cpp",
linecomment = "//",
stylingbits = 5,
isfncall = function(str)
return string.find(str, funccall .. "%(")
end,
lexerstyleconvert = {
text = {wxstc.wxSTC_C_IDENTIFIER,},
lexerdef = {wxstc.wxSTC_C_DEFAULT,},
comment = {wxstc.wxSTC_C_COMMENT,
wxstc.wxSTC_C_COMMENTLINE,
wxstc.wxSTC_C_COMMENTDOC,},
stringtxt = {wxstc.wxSTC_C_STRING,
wxstc.wxSTC_C_CHARACTER,
wxstc.wxSTC_C_VERBATIM,},
stringeol = {wxstc.wxSTC_C_STRINGEOL,},
preprocessor= {wxstc.wxSTC_C_PREPROCESSOR,},
operator = {wxstc.wxSTC_C_OPERATOR,},
number = {wxstc.wxSTC_C_NUMBER,},
keywords0 = {wxstc.wxSTC_C_WORD,},
keywords1 = {wxstc.wxSTC_C_WORD2,},
},
keywords = {
[[ alignas alignof and and_eq asm auto bitand bitor break case catch
class compl const constexpr const_cast continue
decltype default delete do dynamic_cast else enum explicit export
extern for friend goto if inline mutable namespace new noexcept not
not_eq nullptr operator or or_eq private protected public register
reinterpret_cast return sizeof static static_assert static_cast
struct switch template this thread_local throw try typedef typeid
typename union using virtual volatile while xor xor_eq]],
[[ NULL bool char char16_t char32_t double false float int long
short signed true unsigned void wchar_t]]
},
}
--[==[ C-only keywords
[[ auto break case const continue default do else enum extern for goto if
register return sizeof static struct switch typedef union volatile while]],
[[ NULL char double float int long short signed unsigned void]]
--]==]
--[[
// Lexical states for SCLEX_CPP
%define wxSTC_C_DEFAULT
%define wxSTC_C_COMMENT
%define wxSTC_C_COMMENTLINE
%define wxSTC_C_COMMENTDOC
%define wxSTC_C_NUMBER
%define wxSTC_C_WORD
%define wxSTC_C_STRING
%define wxSTC_C_CHARACTER
%define wxSTC_C_UUID
%define wxSTC_C_PREPROCESSOR
%define wxSTC_C_OPERATOR
%define wxSTC_C_IDENTIFIER
%define wxSTC_C_STRINGEOL
%define wxSTC_C_VERBATIM
%define wxSTC_C_REGEX
%define wxSTC_C_COMMENTLINEDOC
%define wxSTC_C_WORD2
%define wxSTC_C_COMMENTDOCKEYWORD
%define wxSTC_C_COMMENTDOCKEYWORDERROR
%define wxSTC_C_GLOBALCLASS
]]

View File

@@ -19,27 +19,19 @@ return {
end,
lexerstyleconvert = {
text = {wxstc.wxSTC_C_IDENTIFIER,
wxstc.wxSTC_C_VERBATIM,
wxstc.wxSTC_C_REGEX,
wxstc.wxSTC_C_REGEX,
wxstc.wxSTC_C_GLOBALCLASS,},
text = {wxstc.wxSTC_C_IDENTIFIER,},
lexerdef = {wxstc.wxSTC_C_DEFAULT,},
comment = {wxstc.wxSTC_C_COMMENT,
wxstc.wxSTC_C_COMMENTLINE,
wxstc.wxSTC_C_COMMENTDOC,
wxstc.wxSTC_C_COMMENTLINEDOC,
wxstc.wxSTC_C_COMMENTDOCKEYWORD,
wxstc.wxSTC_C_COMMENTDOCKEYWORDERROR,},
wxstc.wxSTC_C_COMMENTDOC,},
stringtxt = {wxstc.wxSTC_C_STRING,
wxstc.wxSTC_C_CHARACTER,
wxstc.wxSTC_C_UUID,},
wxstc.wxSTC_C_VERBATIM,},
stringeol = {wxstc.wxSTC_C_STRINGEOL,},
preprocessor= {wxstc.wxSTC_C_PREPROCESSOR,},
operator = {wxstc.wxSTC_C_OPERATOR,},
number = {wxstc.wxSTC_C_NUMBER,
wxstc.wxSTC_C_WORD},
number = {wxstc.wxSTC_C_NUMBER,},
keywords0 = {wxstc.wxSTC_C_WORD,},
keywords1 = {wxstc.wxSTC_C_WORD2,},

View File

@@ -3,31 +3,61 @@
local funcdef = "([A-Za-z_][A-Za-z0-9_%.%:]*)%s*"
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
local decindent = {
['else'] = true, ['elseif'] = true, ['end'] = true}
local incindent = {
['else'] = true, ['elseif'] = true, ['for'] = true, ['do'] = true,
['if'] = true, ['repeat'] = true, ['until'] = true, ['while'] = true}
local function isfndef(str)
local l
local s,e,cap,par = string.find(str, "function%s+" .. funcdef .. "(%(.-%))")
-- try to match without brackets now, but only at the beginning of the line
if (not s) then
s,e,cap = string.find(str, "^%s*function%s+" .. funcdef)
end
-- try to match "foo = function()"
if (not s) then
s,e,cap,par = string.find(str, funcdef .. "=%s*function%s*(%(.-%))")
end
if (s) then
l = string.find(string.sub(str,1,s-1),"local%s+$")
cap = cap .. " " .. (par or "(?)")
end
return s,e,cap,l
end
return {
exts = {"lua", "rockspec"},
exts = {"lua", "rockspec", "wlua"},
lexer = wxstc.wxSTC_LEX_LUA,
apitype = "lua",
linecomment = "--",
sep = "%.:",
isfncall = function(str)
return string.find(str, funccall .. "%(")
return string.find(str, funccall .. "[%({'\"]")
end,
isfndef = function(str)
local l
local s,e,cap,par = string.find(str, "function%s+" .. funcdef .. "(%(.-%))")
-- try to match without brackets now, but only at the beginning of the line
if (not s) then
s,e,cap = string.find(str, "^%s*function%s+" .. funcdef)
end
-- try to match "foo = function()"
if (not s) then
s,e,cap,par = string.find(str, funcdef .. "=%s*function%s*(%(.-%))")
end
if (s) then
l = string.find(string.sub(str,1,s-1),"local%s+$")
cap = cap .. " " .. (par or "(?)")
end
return s,e,cap,l
isfndef = isfndef,
isdecindent = function(str)
-- this handles three different cases:
local term = str:match("^%s*(%w+)%s*$")
-- (1) 'end', 'elseif', 'else'
local match = term and decindent[term]
-- (2) 'end)' and 'end}'
if not term then term, match = str:match("^%s*(end)%s*([%)%}]+)%s*[,;]?") end
-- (3) '},', '};', '),' and ');'
if not term then match = str:match("^%s*[%)%}]+%s*[,;]?%s*$") end
return match and 1 or 0, match and term and 1 or 0
end,
isincindent = function(str)
local term = str:match("^%s*(%w+)[^%w]*")
term = term and incindent[term] and 1 or 0
local _, opened = str:gsub("([%{%(])", "%1")
local _, closed = str:gsub("([%}%)])", "%1")
local func = (isfndef(str) or str:match("[^%w]+function%s*%(")) and 1 or 0
-- ended should only be used to negate term and func effects
local ended = (term + func > 0) and str:match("[^%w]+end%s*$") and 1 or 0
return opened - closed + func + term - ended
end,
typeassigns = function(editor)
@@ -63,7 +93,6 @@ return {
line = line -1
end
local added
while (line <= endline) do
local ls = editor:PositionFromLine(line)
local s = bit.band(editor:GetStyleAt(ls),31)
@@ -73,35 +102,47 @@ return {
-- check for assignments
local varname = "([%w_%.]+)"
local identifier = "([%w_%.:]+)"
local identifier = "([%w_%.:%s]+)"
-- special hint
local typ,var = tx:match("%s*%-%-=%s*"..varname.."%s+"..identifier)
if (var and typ) then
typ = typ:gsub("%s","")
assigns[var] = typ
added = true
else
-- real assignments
local var,typ,rest = tx:match("%s*"..identifier.."%s*=%s*"..identifier.."(.*)")
local comment = rest and rest:match(".*%-%-=%s*"..varname.."%s*$")
local comma = rest and rest:match(".-%s*([,]*)%s*$")
if (var and comment) then
assigns[var] = comment
added = true
elseif (var and typ and comma=="") then
local var,typ = tx:match("%s*"..identifier.."%s*=%s*([^;]+)")
var = var and var:gsub("local","")
var = var and var:gsub("%s","")
typ = typ and typ:gsub("%b[]","")
typ = typ and typ:gsub("%b()","")
typ = typ and typ:gsub("%b{}","")
if (typ and (typ:match(",") or typ:match("%sor%s") or typ:match("%sand%s"))) then
typ = nil
end
typ = typ and typ:gsub("%s","")
if (var and typ) then
class,func = typ:match(varname.."[%.:]"..varname)
if (func) then
if (assigns[typ]) then
assigns[var] = assigns[typ]
elseif (func) then
-- FIXME remove this, in favor of proper api definitions
local added
local funcnames = {"new","load","create"}
for i,v in ipairs(funcnames) do
if (func:match("^"..v)) then
if (func == v) then
assigns[var] = class
added = true
break
end
end
elseif (assigns[typ]) then
assigns[var] = assigns[typ]
added = true
if (not added) then
-- let's hope autocomplete info can resolve this
assigns[var] = typ
end
else
assigns[var] = typ
end
end
end
@@ -138,36 +179,32 @@ return {
},
keywords = {
[[and break do else elseif end false for function if ipairs pairs
in local nil not or repeat return then true until while]],
[[and break do else elseif end for function goto if in local not or repeat return then until while]],
[[_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring
print rawget rawset require tonumber tostring type unpack]],
[[_G _VERSION _ENV false io.stderr io.stdin io.stdout nil math.huge math.pi package.config
package.cpath package.loaded package.loaders package.path package.preload package.searchers self true]],
[[_G getfenv getmetatable loadlib next pcall
rawequal setfenv setmetatable xpcall
string table math coroutine io os debug
load module select]],
[[assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring
module next pairs pcall print rawequal rawget rawlen rawset require
select setfenv setmetatable tonumber tostring type unpack xpcall]],
[[string.byte string.char string.dump string.find string.len
string.lower string.rep string.sub string.upper string.format string.gfind string.gsub
table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn
math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp
math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod
math.pi math.pow math.rad math.random math.randomseed math.sin math.sqrt math.tan
string.gmatch string.match string.reverse table.maxn
math.cosh math.fmod math.modf math.sinh math.tanh math.huge]],
[[coroutine.create coroutine.resume coroutine.status
coroutine.wrap coroutine.yield
io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write
io.stdin io.stdout io.stderr
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename
os.setlocale os.time os.tmpname
coroutine.running package.cpath package.loaded package.loadlib package.path
package.preload package.seeall io.popen
debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal
debug.getmetatable debug.getregistry debug.getupvalue debug.setfenv
debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.traceback]],
[[bit32.arshift bit32.band bit32.bnot bit32.bor bit32.btest bit32.bxor bit32.extract
bit32.lrotate bit32.lshift bit32.replace bit32.rrotate bit32.rshift
coroutine.create coroutine.resume coroutine.running coroutine.status coroutine.wrap coroutine.yield
debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal
debug.getmetatable debug.getregistry debug.getupvalue debug.getuservalue debug.setfenv
debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.setuservalue
debug.traceback debug.upvalueid debug.upvaluejoin
io.close io.flush io.input io.lines io.open io.output io.popen io.read io.tmpfile io.type io.write
close flush lines read seek setvbuf write
math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.cosh math.deg math.exp
math.floor math.fmod math.frexp math.ldexp math.log math.log10 math.max math.min math.modf
math.pow math.rad math.random math.randomseed math.sin math.sinh math.sqrt math.tan math.tanh
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname
package.loadlib package.searchpath package.seeall
string.byte string.char string.dump string.find string.format string.gmatch string.gsub string.len
string.lower string.match string.rep string.reverse string.sub string.upper
byte find format gmatch gsub len lower match rep reverse sub upper
table.concat table.insert table.maxn table.pack table.remove table.sort table.unpack]]
},
}

View File

@@ -54,7 +54,7 @@ style = {
linenumber = stattr,
bracematch = stattr,
bracemiss = stattr,
escapechar = stattr,
ctrlchar = stattr,
indent = stattr,
calltip = stattr,
@@ -79,40 +79,33 @@ style = {
-- content is optional
-- config is loaded into existing config table
config = {
appname = "estrela", -- by default the launcher name
appname = "zbstudio", -- by default the launcher name
path = {
-- path for tools/interpreters
luxinia = "C:/luxbin/",
-- path to luxinia exe
projectdir = "",
-- the project directory, used by
-- some tools/interpreters
path = { -- path for tools/interpreters
luxinia = "C:/luxbin/", -- path to luxinia exe
projectdir = "", -- the project directory, used by some tools/interpreters
},
editor = {
fontname = "Courier New",
-- default font
fontsize = 10,
-- defailt size
caretline = true,
-- show active line
-- input/output filtering of strings
-- current filters "GermanUtf8Ascii"
iofilter = nil,
-- use indicator to show function calls
-- if spec allows
showfncall = true,
fontname = "Courier New", -- default font
fontsize = 10, -- default size
caretline = true, -- show active line
iofilter = nil, -- input/output filtering of strings
showfncall = true, -- use indicator to show function calls if spec allows
tabwidth = 4,
usetabs = true, -- if false then spaces are used
usewrap = true, -- if true then the text is wrapped in the editor
whitespace = false,
autotabs = true, -- if true test for tabs after file load,
-- sets "usetabs" to true for this file
-- sets "usetabs" to true for this file
calltipdelay = nil, -- delay to show calltip (in ms)
autoactivate = false, -- auto-activate/open files during debugging
smartindent = false, -- use smart indentation if spec allows
foldcompact = true, -- use compact fold that includes empty lines
checkeol = true, -- check for eol encoding on loaded files and use it
-- also report mixed eol encodings
defaulteol = nil, -- default line-endings for new files; valid values are
-- wxstc.wxSTC_EOL_CRLF, wxstc.wxSTC_EOL_LF and nil (OS default)
nomousezoom = nil, -- disable zooming using mouse wheel
},
default = {
@@ -122,60 +115,59 @@ config = {
debugger = {
verbose = false,
hostname = nil, -- hostname to use when the detected one is incorrect
port = nil, -- port number to use
runonstart = nil, -- if debugger should run immediately after starting
-- default values are different for different interpreters
}
outputshell = {
-- output and shell settings
fontname = "Courier New",
-- default font
fontsize = 10,
-- defult size
outputshell = { -- output and shell settings
fontname = "Courier New", -- default font
fontsize = 10, -- defult size
}
styles = {},
-- styles table as above for editor
filetree = { -- filetree settings
fontname = nil, -- no default font as it is system dependent
fontsize = nil, -- no default size as it is system dependent
}
stylesoutshell = {},
-- styles for output/shell
keymap = {}, -- mapping of menu IDs to hot keys
messages = {}, -- list of messages in a particular language
language = "en", -- current UI language
interpreter = "EstrelaEditor",
-- the default "project" lua interpreter
styles = {}, -- styles table as above for editor
stylesoutshell = {}, -- styles for output/shell
autocomplete = true,
-- whether autocomplete is on by default
interpreter = "luadeb", -- the default "project" lua interpreter
autocomplete = true, -- whether autocomplete is on by default
acandtip = {
shorttip = false,
-- tooltips are compact during typing
nodynwords = false,
-- no dynamic words (user entered words)
ignorecase = false,
-- ignores case when performing comparison with autocomplete list
shorttip = false, -- tooltips are compact during typing
nodynwords = false, -- no dynamic words (user entered words)
ignorecase = false, -- ignores case when performing comparison with autocomplete list
startat = 2, -- start suggesting dynamic words after 2 characters
strategy = 0,
-- 0: is string comparison
-- 1: substring leading characters (camel case or _ separated)
-- 2: leading + any correctly ordered fragments (default)
width = 60, -- width of the tooltip text (in characters)
}
savebak = false,
-- if bak files are created on save
savebak = false, -- if bak files are created on save
filehistorylength = 20,
-- historylength for files
filehistorylength = 20, -- historylength for files
projecthistorylength = 15,
-- historylength for project directories
projecthistorylength = 15, -- historylength for project directories
singleinstance = true,
-- if true creates a UDP server to exchange messages
-- for loading commandline passed files
singleinstanceport = 0xe493,
-- UDP port for single instance communication
singleinstance = true, -- if true creates a UDP server to run IDE once and to load files
singleinstanceport = 0xe493, -- UDP port for single instance communication
activateoutput = false, -- activate output/console on Run/Debug/Compile
unhidewindow = false, -- to unhide a gui window
allowinteractivescript = false, -- allow interaction in the output window
projectautoopen = false, -- allow auto open/close files on a project switch
autorecoverinactivity = nil, -- period of inactivity (s) for autorecover
}
-- application engine
@@ -202,11 +194,17 @@ app = {
api = {
-- global space words, e.g "table"
["blah"] = {
-- "function", "class", "keyword", "value", "lib"
-- "function", "class", "keyword", "value", "lib", "method"
-- method is for class:func functions
type = "function",
description = "this does something",
-- value and function:
-- value/function/method:
-- for autocomplete type guessing, insert the string
-- that the variable name is replace with
-- e.g. "test = somefunc()" somefunc has valuetype of "math"
-- then typing "test." will be treated as "math." in
-- autcomplete logic
valuetype = "api.ClassName",
-- function:
@@ -247,7 +245,7 @@ spec = {
linecomment = "//",
-- string for linecomments
sep = "[%.:]",
sep = "%.:",
-- class.function separator match string,
-- e.g in lua both . and : are allowed
-- default is "\1" which should yield no matches
@@ -320,5 +318,9 @@ interpreter = {
fprojdir = function(self,wfilename) return "projpath_from_filename" end, -- (opt)
fattachdebug = function(self) end, -- (opt)
hasdebugger = false, -- if debugging is available
scratchextloop = false, -- (opt) if scratchpad requires handling for external loop
scratchextloop = nil, -- (opt) indicates scratchpad support
-- nil, no support for scratchpad;
-- false, scratchpad supported;
-- true, scratchpad supported and requires handling for external loop.
skipcompile = nil, -- don't compile before running if true
}

View File

@@ -11,7 +11,7 @@ local statusBar = ide.frame.statusBar
local function newAPI(api)
api = api or {}
for i,v in pairs(api) do
for i in pairs(api) do
api[i] = nil
end
-- tool tip info and reserved names
@@ -36,8 +36,6 @@ local apis = {
lua = newAPI(),
}
local config = ide.config.ac
function GetApi(apitype)
return apis[apitype] or apis["none"]
end
@@ -46,9 +44,9 @@ end
-- API loading
local function addAPI(apifile,only,subapis,known) -- relative to API directory
local ftype,fname = apifile:match("api[/\\]([^/\\]+)[/\\](.*)%.")
if not ftype then
print("The API file must be located in a subdirectory of the API directory\n")
local ftype, fname = apifile:match("api[/\\]([^/\\]+)[/\\](.*)%.")
if not ftype or not fname then
DisplayOutputLn(TR("The API file must be located in a subdirectory of the API directory."))
return
end
if ((only and ftype ~= only) or (known and not known[ftype])) then
@@ -58,20 +56,16 @@ local function addAPI(apifile,only,subapis,known) -- relative to API directory
local fn,err = loadfile(apifile)
if err then
print("API file '"..apifile.."' could not be loaded: "..err.."\n")
DisplayOutputLn(TR("Error while loading API file: %s"):format(err))
return
end
local mt
local env = apis[ftype] or newAPI()
apis[ftype] = env
env = env.ac.childs
local suc,res = xpcall(function()return fn(env)end, function(err)
DisplayOutput("Error while loading API file: "..apifile..":\n")
DisplayOutput(debug.traceback(err))
DisplayOutput("\n")
end)
if (suc and res) then
local suc,res = pcall(function()return fn(env) end)
if (not suc) then
DisplayOutputLn(TR("Error while processing API file: %s"):format(res))
elseif (res) then
local function gennames(tab,prefix)
for i,v in pairs(tab) do
v.classname = (prefix and (prefix..".") or "")..i
@@ -85,17 +79,11 @@ local function addAPI(apifile,only,subapis,known) -- relative to API directory
env[i] = v
end
end
end
local function loadallAPIs (only,subapis,known)
for i,dir in ipairs(FileSysGet("./api/*",wx.wxDIR)) do
local files = FileSysGet(dir.."/*.*",wx.wxFILE)
for i,file in ipairs(files) do
if file:match "%.lua$" then
addAPI(file,only,subapis,known)
end
end
for _, file in ipairs(FileSysGetRecursive("api", true, "*.lua")) do
if not file:match(string_Pathsep.."$") then addAPI(file,only,subapis,known) end
end
end
@@ -103,6 +91,8 @@ end
-- ToolTip and reserved words list
-- also fixes function descriptions
local tipwidth = math.max(20, ide.config.acandtip.width or 60)
local widthmask = ("[^\n]"):rep(tipwidth-10)..("[^\n]?"):rep(10)
local function fillTips(api,apibasename,apiname)
local apiac = api.ac
local tclass = api.tip
@@ -125,28 +115,24 @@ local function fillTips(api,apibasename,apiname)
if not tab.childs then return end
for key,info in pairs(tab.childs) do
traverse(info,key)
if info.type == "function" then
if info.type == "function" or info.type == "method" then
local libstr = libname ~= "" and libname.."." or ""
-- fix description
local frontname = (info.returns or "(?)").." "..libstr..key.." "..(info.args or "(?)")
frontname = frontname:gsub("\n"," ")
frontname = frontname:gsub("\t","")
frontname = frontname:gsub("("..("[^\n]"):rep(60)..".-[%s,%)%]:%.])([^%)])","%1\n %2")
frontname = frontname
:gsub("\n"," ")
:gsub("\t","")
:gsub("("..widthmask..")[ \t]([^%)])","%1\n %2")
info.description = info.description:gsub("\n\n","<br>")
info.description = info.description:gsub("[^%s]\n[^%s]","")
info.description = info.description:gsub("\n"," ")
info.description = info.description:gsub("<br>","\n")
info.description = info.description:gsub("[^%s]\t[^%s]"," ")
info.description = info.description:gsub("\t%s","")
info.description = info.description:gsub("%s\t","")
info.description = info.description:gsub("("..("[^\n]"):rep(60)..".-[%s,%)%]:%.])","%1\n")
info.description = info.description
:gsub("\n\n","<br>"):gsub("\n"," "):gsub("<br>","\n")
:gsub("[ \t]+"," ")
:gsub("("..widthmask..") ","%1\n")
-- build info
local inf = frontname.."\n"..info.description
local sentence = info.description:match("^([^\n]+)\n.*")
local sentence = sentence and sentence:match("([^%.]+)%..*$")
local sentence = info.description:match("^(.-)%. ?\n")
local infshort = frontname.."\n"..(sentence and sentence.."..." or info.description)
local infshortbatch = (info.returns and info.args) and frontname or infshort
@@ -216,30 +202,42 @@ local function resolveAssign(editor,tx)
return tab,a
end
local classname
local c = ""
local c
if (assigns) then
-- find assign
for w,s in tx:gmatch("([%w_]*)([%.:]?)") do
local old = classname
classname = classname or (assigns[c..w])
if (s ~= "" and old ~= classname) then
c = classname..s
else
c = c..w..s
local change = true
while (change) do
local classname = nil
c = ""
change = false
for w,s in tx:gmatch("([%w_]+)([%.:]?)") do
local old = classname
-- check if what we have so far can be matched with a class name
-- this can happen if it's a reference to a value with a known type
classname = classname or assigns[c..w]
if (s ~= "" and old ~= classname) then
c = classname..s
change = true
else
c = c..w..s
end
end
-- abort if the same value is returned; no need to continue.
-- this can happen after typing "smth = smth:new(); smth:"
if tx == c then break end
tx = c
end
else
c = tx
end
-- then work from api
return getclass(ac,c)
end
function GetTipInfo(editor, content, short)
local caller = content:match("([%w_]+)%(%s*$")
local class = caller and content:match("([%w_]+)[%.:]"..caller.."%(%s*$")
local class = caller and content:match("([%w_]+)[%.:]"..caller.."%(%s*$") or ""
local tip = editor.api.tip
local classtab = short and tip.shortfinfoclass or tip.finfoclass
@@ -266,7 +264,7 @@ function ReloadLuaAPI()
interpreterapi = interpreterapi and interpreterapi.api
if (interpreterapi) then
local apinames = {}
for i,v in ipairs(interpreterapi) do
for _, v in ipairs(interpreterapi) do
apinames[v] = true
end
interpreterapi = apinames
@@ -276,7 +274,7 @@ end
do
local known = {}
for n,spec in pairs(ide.specs) do
for _, spec in pairs(ide.specs) do
if (spec.apitype) then
known[spec.apitype] = true
end
@@ -377,19 +375,31 @@ end
------------
-- Final Autocomplete
local cache = {}
local cachemain = {}
local cachemethod = {}
local laststrategy
local function getAutoCompApiList(childs,fragment)
local lastmethod
local function getAutoCompApiList(childs,fragment,method)
fragment = fragment:lower()
local strategy = ide.config.acandtip.strategy
if (laststrategy ~= strategy) then cache = {}; laststrategy = strategy end
if (laststrategy ~= strategy) then
cachemain = {}
cachemethod = {}
laststrategy = strategy
end
local cache = method and cachemethod or cachemain
if (strategy == 2) then
local wlist = cache[childs]
if not wlist then
wlist = " "
for i,v in pairs(childs) do
wlist = wlist..i.." "
-- if a:b typed, then value (type == "value") not allowed
-- if a.b typed, then method (type == "method") not allowed
if (method and v.type ~= "value") or (not method and v.type ~= "method") then
wlist = wlist..i.." "
end
end
cache[childs] = wlist
end
@@ -415,30 +425,34 @@ local function getAutoCompApiList(childs,fragment)
local t = {}
cache[childs] = t
local sub = strat == 1
for key, info in pairs(childs) do
local used = {}
--
local kl = key:lower()
for i=0,#key do
local k = kl:sub(1,i)
t[k] = t[k] or {}
used[k] = true
table.insert(t[k],key)
end
if (sub) then
-- find camel case / _ separated subwords
-- glfwGetGammaRamp -> g, gg, ggr
-- GL_POINT_SPRIT -> g, gp, gps
local last = ""
for ks in string.gmatch(key,"([A-Z%d]*[a-z%d]*_?)") do
local k = last..(ks:sub(1,1):lower())
last = k
local sub = strategy == 1
for key,v in pairs(childs) do
-- if a:b typed, then value (type == "value") not allowed
-- if a.b typed, then method (type == "method") not allowed
if (method and v.type ~= "value") or (not method and v.type ~= "method") then
local used = {}
--
local kl = key:lower()
for i=0,#key do
local k = kl:sub(1,i)
t[k] = t[k] or {}
if (not used[k]) then
used[k] = true
table.insert(t[k],key)
used[k] = true
table.insert(t[k],key)
end
if (sub) then
-- find camel case / _ separated subwords
-- glfwGetGammaRamp -> g, gg, ggr
-- GL_POINT_SPRIT -> g, gp, gps
local last = ""
for ks in string.gmatch(key,"([A-Z%d]*[a-z%d]*_?)") do
local k = last..(ks:sub(1,1):lower())
last = k
t[k] = t[k] or {}
if (not used[k]) then
used[k] = true
table.insert(t[k],key)
end
end
end
end
@@ -457,6 +471,8 @@ function CreateAutoCompList(editor,key)
local tip = api.tip
local ac = api.ac
local method = key:match(":[^:%.]*$") ~= nil
-- ignore keywords
if tip.keys[key] then return end
@@ -468,7 +484,7 @@ function CreateAutoCompList(editor,key)
if not (progress) then return end
if (tab == ac) then
local obj,krest = rest:match("([%w_]+)[:%.]([%w_]+)%s*$")
local _, krest = rest:match("([%w_]+)[:%.]([%w_]+)%s*$")
if (krest) then
if (#krest < 3) then return end
tab = tip.finfo
@@ -480,13 +496,14 @@ function CreateAutoCompList(editor,key)
rest = rest:gsub("[^%w_]","")
end
local last = key:match "([%w_]+)%s*$"
local last = key:match("([%w_]+)%s*$")
-- build dynamic word list
-- only if api search couldnt descend
-- ie we couldnt find matching sub items
local dw = ""
if (tab == ac) then
if (tab == ac and last and #last >= (ide.config.acandtip.startat or 2)) then
last = last:lower()
if dynamicwords[last] then
local list = dynamicwords[last]
table.sort(list,function(a,b)
@@ -496,7 +513,7 @@ function CreateAutoCompList(editor,key)
end)
-- ignore if word == last and sole user
for i,v in ipairs(list) do
if (v == last and dywordentries[v] == 1) then
if (v:lower() == last and dywordentries[v] == 1) then
table.remove(list,i)
break
end
@@ -504,12 +521,11 @@ function CreateAutoCompList(editor,key)
local res = table.concat(list," ")
dw = res ~= "" and " "..res or ""
end
end
-- list from api
local apilist = getAutoCompApiList(tab.childs or tab,rest)
local apilist = getAutoCompApiList(tab.childs or tab,rest,method)
local compstr = ""
if apilist then
if (#rest > 0) then
@@ -526,13 +542,13 @@ function CreateAutoCompList(editor,key)
local ma,mb = 0,0
g(a,pat,function(...)
local l = {...}
for i,v in ipairs(l) do
for _, v in ipairs(l) do
ma = ma + ((v=="") and 0 or 1)
end
end)
g(b,pat,function(...)
local l = {...}
for i,v in ipairs(l) do
for _, v in ipairs(l) do
mb = mb + ((v=="") and 0 or 1)
end
end)
@@ -557,5 +573,4 @@ function CreateAutoCompList(editor,key)
local li = (compstr .. dw)
return li ~= "" and (#li > 1024 and li:sub(1,1024).."..." or li)
end

View File

@@ -7,14 +7,21 @@ local notebook = frame.notebook
local openDocuments = ide.openDocuments
local uimgr = frame.uimgr
local CURRENT_LINE_MARKER = StylesGetMarker("currentline")
local CURRENT_LINE_MARKER_VALUE = 2^CURRENT_LINE_MARKER
local BREAKPOINT_MARKER = StylesGetMarker("breakpoint")
function NewFile(event)
local editor = CreateEditor(ide.config.default.fullname)
local editor = CreateEditor()
SetupKeywords(editor, "lua")
local doc = AddEditor(editor, ide.config.default.fullname)
if doc then SetEditorSelection(doc.index) end
return editor
end
-- Find an editor page that hasn't been used at all, eg. an untouched NewFile()
local function findDocumentToReuse()
local editor = nil
local function findUnusedEditor()
local editor
for id, document in pairs(openDocuments) do
if (document.editor:GetLength() == 0) and
(not document.isModified) and (not document.filePath) and
@@ -26,18 +33,23 @@ local function findDocumentToReuse()
return editor
end
function LoadFile(filePath, editor, file_must_exist)
function LoadFile(filePath, editor, file_must_exist, skipselection)
local filePath = wx.wxFileName(filePath)
filePath:Normalize() -- make it absolute and remove all .. and . if possible
-- prevent files from being reopened again
if (not editor) then
local filePath = wx.wxFileName(filePath)
for id, doc in pairs(openDocuments) do
if doc.filePath and filePath:SameAs(wx.wxFileName(doc.filePath)) then
notebook:SetSelection(doc.index)
if not skipselection and doc.index ~= notebook:GetSelection() then
-- selecting the same tab doesn't trigger PAGE_CHANGE event,
-- but moves the focus to the tab bar, which needs to be avoided.
notebook:SetSelection(doc.index) end
return doc.editor
end
end
end
filePath = wx.wxFileName(filePath):GetFullPath()
filePath = filePath:GetFullPath()
-- if not opened yet, try open now
local file_text = FileRead(filePath)
@@ -50,38 +62,76 @@ function LoadFile(filePath, editor, file_must_exist)
end
local current = editor and editor:GetCurrentPos()
editor = editor
or findDocumentToReuse()
or CreateEditor(wx.wxFileName(filePath):GetFullName()
or ide.config.default.fullname)
editor = editor or findUnusedEditor() or CreateEditor()
editor:Clear()
editor:ClearAll()
editor:Freeze()
SetupKeywords(editor, GetFileExt(filePath))
editor:MarkerDeleteAll(BREAKPOINT_MARKER)
editor:MarkerDeleteAll(CURRENT_LINE_MARKER)
editor:AppendText(file_text)
editor:MarkerDeleteAll(-1)
editor:SetText(file_text or "")
-- check the editor as it can be empty if the file has malformed UTF8;
-- skip binary files as they may have any sequences; can't show them anyway.
if file_text and #file_text > 0 and #(editor:GetText()) == 0
and not isBinary(file_text) then
local replacement, invalid = "\022"
file_text, invalid = fixUTF8(file_text, replacement)
if #invalid > 0 then
editor:AppendText(file_text)
local lastline = nil
for _, n in ipairs(invalid) do
local line = editor:LineFromPosition(n)
if line ~= lastline then
DisplayOutputLn(("%s:%d: %s")
:format(filePath, line+1, TR("Replaced an invalid UTF8 character with %s."):format(replacement)))
lastline = line
end
end
end
end
editor:Colourise(0, -1)
editor:Thaw()
if current then editor:GotoPos(current) end
if (ide.config.editor.autotabs) then
if (file_text and ide.config.editor.autotabs) then
local found = string.find(file_text,"\t") ~= nil
editor:SetUseTabs(found)
end
if (file_text and ide.config.editor.checkeol) then
-- Auto-detect CRLF/LF line-endings
local foundcrlf = string.find(file_text,"\r\n") ~= nil
local foundlf = (string.find(file_text,"[^\r]\n") ~= nil)
or (string.find(file_text,"^\n") ~= nil) -- edge case: file beginning with LF and having no other LF
if foundcrlf and foundlf then -- file with mixed line-endings
DisplayOutputLn(("%s: %s")
:format(filePath, TR("Mixed end-of-line encodings detected.")..' '..
TR("Use '%s' to show line endings and '%s' to convert them.")
:format("GetEditor():SetViewEOL(1)", "GetEditor():ConvertEOLs(GetEditor():GetEOLMode())")))
elseif foundcrlf then
editor:SetEOLMode(wxstc.wxSTC_EOL_CRLF)
elseif foundlf then
editor:SetEOLMode(wxstc.wxSTC_EOL_LF)
-- else (e.g. file is 1 line long or uses another line-ending): use default EOL mode
end
end
editor:EmptyUndoBuffer()
local id = editor:GetId()
if openDocuments[id] then -- existing editor; switch to the tab
notebook:SetSelection(openDocuments[id].index)
else -- the editor has not been added to notebook
AddEditor(editor, wx.wxFileName(filePath):GetFullName()
or ide.config.default.fullname)
end
openDocuments[id].filePath = filePath
openDocuments[id].fileName = wx.wxFileName(filePath):GetFullName()
openDocuments[id].modTime = GetFileModTime(filePath)
SetDocumentModified(id, false)
editor:Colourise(0, -1)
IndicateFunctions(editor)
SettingsAppendFileToHistory(filePath)
-- activate the editor; this is needed for those cases when the editor is
-- created from some other element, for example, from a project tree.
SetEditorSelection()
if not skipselection then SetEditorSelection() end
return editor
end
@@ -97,25 +147,21 @@ local function getExtsString()
end
knownexts = knownexts:len() > 0 and knownexts:sub(1,-2) or nil
local exts = knownexts and "Known Files ("..knownexts..")|"..knownexts.."|" or ""
exts = exts.."All files (*)|*"
return exts
local exts = knownexts and TR("Known Files").." ("..knownexts..")|"..knownexts.."|" or ""
return exts..TR("All files").." (*)|*"
end
function OpenFile(event)
local exts = getExtsString()
local fileDialog = wx.wxFileDialog(ide.frame, "Open file",
local fileDialog = wx.wxFileDialog(ide.frame, TR("Open file"),
"",
"",
exts,
wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)
if fileDialog:ShowModal() == wx.wxID_OK then
if not LoadFile(fileDialog:GetPath(), nil, true) then
wx.wxMessageBox("Unable to load file '"..fileDialog:GetPath().."'.",
"Error",
wx.wxMessageBox(TR("Unable to load file '%s'."):format(fileDialog:GetPath()),
TR("Error"),
wx.wxOK + wx.wxCENTRE, ide.frame)
end
end
@@ -142,10 +188,11 @@ function SaveFile(editor, filePath)
openDocuments[id].fileName = wx.wxFileName(filePath):GetFullName()
openDocuments[id].modTime = GetFileModTime(filePath)
SetDocumentModified(id, false)
SetAutoRecoveryMark()
return true
else
wx.wxMessageBox("Unable to save file '"..filePath.."': "..err,
"Error",
wx.wxMessageBox(TR("Unable to save file '%s': %s"):format(filePath, err),
TR("Error"),
wx.wxICON_ERROR + wx.wxOK + wx.wxCENTRE, ide.frame)
end
end
@@ -165,12 +212,18 @@ function SaveFileAs(editor)
local fn = wx.wxFileName(filePath)
fn:Normalize() -- want absolute path for dialog
local exts = getExtsString()
local fileDialog = wx.wxFileDialog(ide.frame, "Save file as",
local ext = fn:GetExt()
if (not ext or #ext == 0) and editor.spec and editor.spec.exts then
ext = editor.spec.exts[1]
-- set the extension on the file if assigned as this is used by OSX/Linux
-- to present the correct default "save as type" choice.
if ext then fn:SetExt(ext) end
end
local fileDialog = wx.wxFileDialog(ide.frame, TR("Save file as"),
fn:GetPath(wx.wxPATH_GET_VOLUME),
fn:GetFullName(),
exts,
-- specify the current extension plus all other extensions based on specs
(ext and #ext > 0 and "*."..ext.."|*."..ext.."|" or "")..getExtsString(),
wx.wxFD_SAVE)
if fileDialog:ShowModal() == wx.wxID_OK then
@@ -180,9 +233,12 @@ function SaveFileAs(editor)
SetEditorSelection() -- update title of the editor
FileTreeRefresh() -- refresh the tree to reflect the new file
FileTreeMarkSelected(filePath)
SetupKeywords(editor, GetFileExt(filePath))
IndicateFunctions(editor)
if MarkupStyle then MarkupStyle(editor) end
if ext ~= GetFileExt(filePath) then
-- new extension, so setup new keywords and re-apply indicators
SetupKeywords(editor, GetFileExt(filePath))
IndicateFunctions(editor)
MarkupStyle(editor)
end
saved = true
end
end
@@ -196,7 +252,7 @@ function SaveAll()
local editor = document.editor
local filePath = document.filePath
if document.isModified then
if document.isModified or not document.filePath then
SaveFile(editor, filePath) -- will call SaveFileAs if necessary
end
end
@@ -246,7 +302,8 @@ local function removePage(index)
notebook:SetSelection(prevIndex)
end
SetEditorSelection() -- will use notebook GetSelection to update
-- need to set editor selection as it's called *after* PAGE_CHANGED event
SetEditorSelection()
end
function ClosePage(selection)
@@ -256,18 +313,37 @@ function ClosePage(selection)
DynamicWordsRemoveAll(editor)
local debugger = ide.debugger
-- check if the window with the scratchpad running is being closed
if debugger and debugger.scratchpad and debugger.scratchpad.editor == editor then
if debugger and debugger.scratchpad and debugger.scratchpad.editors
and debugger.scratchpad.editors[editor] then
DebuggerScratchpadOff()
end
-- check if the debugger is running and is using the current window
-- abort the debugger if the current marker is in the window being closed
-- also abort the debugger if it is running, as we don't know what
-- window will need to be activated when the debugger is paused
if debugger and debugger.pid and
if debugger and debugger.server and
(debugger.running or editor:MarkerNext(0, CURRENT_LINE_MARKER_VALUE) >= 0) then
debugger.terminate()
end
removePage(ide.openDocuments[id].index)
-- disable full screen if the last tab is closed
if not (notebook:GetSelection() >= 0) then ShowFullScreen(false) end
end
end
function CloseAllPagesExcept(selection)
local toclose = {}
for _, document in pairs(ide.openDocuments) do
table.insert(toclose, document.index)
end
table.sort(toclose)
-- close pages for those files that match the project in the reverse order
-- (as ids shift when pages are closed)
for i = #toclose, 1, -1 do
if toclose[i] ~= selection then ClosePage(toclose[i]) end
end
end
@@ -280,12 +356,12 @@ function SaveModifiedDialog(editor, allow_cancel)
local filePath = document.filePath
local fileName = document.fileName
if document.isModified then
local message = "Do you want to save the changes to '"
..(fileName or ide.config.default.name).."'?"
local message = TR("Do you want to save the changes to '%s'?")
:format(fileName or ide.config.default.name)
local dlg_styles = wx.wxYES_NO + wx.wxCENTRE + wx.wxICON_QUESTION
if allow_cancel then dlg_styles = dlg_styles + wx.wxCANCEL end
local dialog = wx.wxMessageDialog(ide.frame, message,
"Save Changes?",
TR("Save Changes?"),
dlg_styles)
result = dialog:ShowModal()
dialog:Destroy()
@@ -316,50 +392,47 @@ function SaveOnExit(allow_cancel)
return true
end
-- circle through "fold all" => "hide base lines" => "unfold all"
function FoldSome()
local editor = GetEditor()
editor:Colourise(0, -1) -- update doc's folding info
local visible, baseFound, expanded, folded
for ln = 2, editor.LineCount - 1 do
local foldall = false -- at least on header unfolded => fold all
local hidebase = false -- at least one base is visible => hide all
for ln = 0, editor.LineCount - 1 do
local foldRaw = editor:GetFoldLevel(ln)
local foldLvl = math.mod(foldRaw, 4096)
local foldHdr = math.mod(math.floor(foldRaw / 8192), 2) == 1
if not baseFound and (foldLvl == wxstc.wxSTC_FOLDLEVELBASE) then
baseFound = true
visible = editor:GetLineVisible(ln)
end
if foldHdr then
if editor:GetFoldExpanded(ln) then
expanded = true
else
folded = true
end
end
if expanded and folded and baseFound then break end
end
local show = not visible or (not baseFound and expanded) or (expanded and folded)
local hide = visible and folded
if show then
editor:ShowLines(1, editor.LineCount-1)
-- at least one header is expanded
foldall = foldall or (foldHdr and editor:GetFoldExpanded(ln))
-- at least one base can be hidden
hidebase = hidebase or (
not foldHdr
and ln > 1 -- first line can't be hidden, so ignore it
and foldLvl == wxstc.wxSTC_FOLDLEVELBASE
and bit.band(foldRaw, wxstc.wxSTC_FOLDLEVELWHITEFLAG) == 0
and editor:GetLineVisible(ln))
end
for ln = 1, editor.LineCount - 1 do
-- shows lines; this doesn't change fold status for folded lines
if not foldall and not hidebase then editor:ShowLines(0, editor.LineCount-1) end
for ln = 0, editor.LineCount-1 do
local foldRaw = editor:GetFoldLevel(ln)
local foldLvl = math.mod(foldRaw, 4096)
local foldHdr = math.mod(math.floor(foldRaw / 8192), 2) == 1
if show then
if foldHdr then
if not editor:GetFoldExpanded(ln) then editor:ToggleFold(ln) end
end
elseif hide and (foldLvl == wxstc.wxSTC_FOLDLEVELBASE) then
if not foldHdr then
editor:HideLines(ln, ln)
end
elseif foldHdr then
if editor:GetFoldExpanded(ln) then
editor:ToggleFold(ln)
end
if foldall then
if foldHdr and editor:GetFoldExpanded(ln) then
editor:ToggleFold(ln) end
elseif hidebase then
if not foldHdr and (foldLvl == wxstc.wxSTC_FOLDLEVELBASE) then
editor:HideLines(ln, ln) end
else -- unfold all
if foldHdr and not editor:GetFoldExpanded(ln) then
editor:ToggleFold(ln) end
end
end
editor:EnsureCaretVisible()
@@ -395,6 +468,7 @@ function ClearAllCurrentLineMarkers()
end
end
local compileOk, compileTotal = 0, 0
function CompileProgram(editor, quiet)
-- remove shebang line (#!) as it throws a compilation error as
-- loadstring() doesn't allow it even though lua/loadfile accepts it.
@@ -402,19 +476,28 @@ function CompileProgram(editor, quiet)
local editorText = editor:GetText():gsub("^#!.-\n", "\n")
local id = editor:GetId()
local filePath = DebuggerMakeFileName(editor, openDocuments[id].filePath)
local _, errMsg, line_num = wxlua.CompileLuaScript(editorText, filePath)
local func, line_num, errMsg, _ = loadstring(editorText, filePath), -1
if not func then
_, errMsg, line_num = wxlua.CompileLuaScript(editorText, filePath)
end
if ide.frame.menuBar:IsChecked(ID_CLEAROUTPUT) then ClearOutput() end
compileTotal = compileTotal + 1
if line_num > -1 then
DisplayOutput("Compilation error on line "..tostring(line_num)..":\n"..
errMsg:gsub("Lua:.-\n", "").."\n")
DisplayOutput(TR("Compilation error")
.." "..TR("on line %d"):format(line_num)
..":\n"..errMsg:gsub("Lua:.-\n", ""))
if not quiet then editor:GotoLine(line_num-1) end
else
if not quiet then DisplayOutput("Compilation successful.\n") end
compileOk = compileOk + 1
if not quiet then
DisplayOutputLn(TR("Compilation successful; %.0f%% success rate (%d/%d).")
:format(compileOk/compileTotal*100, compileOk, compileTotal))
end
end
return line_num == -1 -- return true if it compiled ok
return line_num == -1, editorText -- return true if it compiled ok
end
------------------
@@ -425,8 +508,9 @@ function SaveIfModified(editor)
if openDocuments[id].isModified then
local saved = false
if not openDocuments[id].filePath then
local ret = wx.wxMessageBox("You must save the program before running it.\nPress cancel to abort running.",
"Save file?", wx.wxOK + wx.wxCANCEL + wx.wxCENTRE, ide.frame)
local ret = wx.wxMessageBox(
TR("You must save the program first.").."\n"..TR("Press cancel to abort."),
TR("Save file?"), wx.wxOK + wx.wxCANCEL + wx.wxCENTRE, ide.frame)
if ret == wx.wxOK then
saved = SaveFileAs(editor)
end
@@ -451,57 +535,215 @@ function GetOpenFiles()
local wxfname = wx.wxFileName(document.filePath)
wxfname:Normalize()
table.insert(opendocs,{fname=wxfname:GetFullPath(),id=document.index,
cursorpos = document.editor:GetCurrentPos()})
table.insert(opendocs, {filename=wxfname:GetFullPath(),
id=document.index, cursorpos = document.editor:GetCurrentPos()})
end
end
-- to keep tab order
table.sort(opendocs,function(a,b) return (a.id < b.id) end)
local openfiles = {}
for i,doc in ipairs(opendocs) do
table.insert(openfiles,{filename = doc.fname, cursorpos = doc.cursorpos} )
end
local id = GetEditor()
id = id and id:GetId()
return openfiles, id and openDocuments[id].index or 0
return opendocs, {index = (id and openDocuments[id].index or 0)}
end
function SetOpenFiles(nametab,index)
function SetOpenFiles(nametab,params)
for i,doc in ipairs(nametab) do
local editor = LoadFile(doc.filename,nil,true)
if editor then
editor:SetCurrentPos(doc.cursorpos or 0)
editor:SetSelectionStart(doc.cursorpos or 0)
editor:SetSelectionEnd(doc.cursorpos or 0)
editor:EnsureCaretVisible()
end
local editor = LoadFile(doc.filename,nil,true,true) -- skip selection
if editor then editor:GotoPosDelayed(doc.cursorpos or 0) end
end
notebook:SetSelection(index or 0)
notebook:SetSelection(params and params.index or 0)
SetEditorSelection()
end
local beforeFullScreenPerspective
function ShowFullScreen(setFullScreen)
if setFullScreen then
beforeFullScreenPerspective = uimgr:SavePerspective()
uimgr:GetPane("bottomnotebook"):Show(false)
uimgr:GetPane("projpanel"):Show(false)
local panes = frame.uimgr:GetAllPanes()
for index = 0, panes:GetCount()-1 do
local name = panes:Item(index).name
if name ~= "notebook" then frame.uimgr:GetPane(name):Hide() end
end
uimgr:Update()
SetEditorSelection() -- make sure the focus is on the editor
elseif beforeFullScreenPerspective then
uimgr:LoadPerspective(beforeFullScreenPerspective)
uimgr:LoadPerspective(beforeFullScreenPerspective, true)
beforeFullScreenPerspective = nil
end
uimgr:GetPane("toolBar"):Show(not setFullScreen)
uimgr:Update()
-- On OSX, toolbar and status bar are not hidden when switched to
-- full screen: http://trac.wxwidgets.org/ticket/14259; do manually.
-- need to turn off before showing full screen and turn on after,
-- otherwise the window is restored incorrectly and is reduced in size.
if ide.osname == 'Macintosh' and setFullScreen then
frame:GetStatusBar():Hide()
frame:GetToolBar():Hide()
end
-- protect from systems that don't have ShowFullScreen (GTK on linux?)
pcall(function() frame:ShowFullScreen(setFullScreen) end)
if ide.osname == 'Macintosh' and not setFullScreen then
frame:GetStatusBar():Show()
frame:GetToolBar():Show()
end
end
function CloseWindow(event)
function ProjectConfig(dir, config)
if config then ide.session.projects[dir] = config
else return unpack(ide.session.projects[dir] or {}) end
end
function SetOpenTabs(params)
local recovery, nametab = loadstring("return "..params.recovery)
if recovery then recovery, nametab = pcall(recovery) end
if not recovery then
DisplayOutputLn(TR("Can't process auto-recovery record; invalid format: %s."):format(nametab))
return
end
DisplayOutputLn(TR("Found auto-recovery record and restored saved session."))
for _,doc in ipairs(nametab) do
local editor = doc.filename and LoadFile(doc.filename,nil,true,true) or NewFile()
local opendoc = openDocuments[editor:GetId()]
if doc.content then
notebook:SetPageText(opendoc.index, doc.tabname)
editor:SetText(doc.content)
if doc.filename and doc.modified < opendoc.modTime:GetTicks() then
DisplayOutputLn(TR("File '%s' has more recent timestamp than restored '%s'; please review before saving.")
:format(doc.filename, doc.tabname))
end
end
editor:GotoPosDelayed(doc.cursorpos or 0)
end
notebook:SetSelection(params and params.index or 0)
SetEditorSelection()
end
local function getOpenTabs()
local opendocs = {}
for id, document in pairs(ide.openDocuments) do
table.insert(opendocs, {
filename = document.filePath,
tabname = notebook:GetPageText(document.index),
modified = document.modTime and document.modTime:GetTicks(), -- get number of seconds
content = document.isModified and document.editor:GetText() or nil,
id = document.index, cursorpos = document.editor:GetCurrentPos()})
end
-- to keep tab order
table.sort(opendocs, function(a,b) return (a.id < b.id) end)
local id = GetEditor()
id = id and id:GetId()
return opendocs, {index = (id and openDocuments[id].index or 0)}
end
function SetAutoRecoveryMark()
ide.session.lastupdated = os.time()
end
local function saveAutoRecovery(event)
if not ide.config.autorecoverinactivity or not ide.session.lastupdated then return end
if ide.session.lastupdated < (ide.session.lastsaved or 0)
or ide.session.lastupdated + ide.config.autorecoverinactivity > os.time()
then return end
-- find all open modified files and save them
local opentabs, params = getOpenTabs()
if #opentabs > 0 then
params.recovery = require('mobdebug').line(opentabs, {comment = false})
SettingsSaveAll()
SettingsSaveFileSession({}, params)
ide.settings:Flush()
end
ide.session.lastsaved = os.time()
ide.frame.statusBar:SetStatusText(
TR("Saved auto-recover at %s."):format(os.date("%H:%M:%S")), 1)
end
local function fastWrap(func, ...)
-- ignore SetEditorSelection that is not needed as `func` may work on
-- multipe files, but editor needs to be selected once.
local SES = SetEditorSelection
SetEditorSelection = function() end
func(...)
SetEditorSelection = SES
end
function StoreRestoreProjectTabs(curdir, newdir)
local win = ide.osname == 'Windows'
local interpreter = ide.interpreter.fname
local current, closing, restore = notebook:GetSelection(), 0, false
if ide.osname ~= 'Macintosh' then notebook:Freeze() end
if curdir and #curdir > 0 then
local lowcurdir = win and string.lower(curdir) or curdir
local lownewdir = win and string.lower(newdir) or newdir
local projdocs, closdocs = {}, {}
for _, document in ipairs(GetOpenFiles()) do
local dpath = win and string.lower(document.filename) or document.filename
if dpath:find(lowcurdir, 1, true) then
table.insert(projdocs, document)
closing = closing + (document.id < current and 1 or 0)
-- only close if the file is not in new project as it would be reopened
if not dpath:find(lownewdir, 1, true) then
table.insert(closdocs, document)
end
elseif document.id == current then restore = true end
end
-- adjust for the number of closing tabs on the left from the current one
current = current - closing
-- save opened files from this project
ProjectConfig(curdir, {projdocs,
{index = notebook:GetSelection() - current, interpreter = interpreter}})
-- close pages for those files that match the project in the reverse order
-- (as ids shift when pages are closed)
for i = #closdocs, 1, -1 do fastWrap(ClosePage, closdocs[i].id) end
end
local files, params = ProjectConfig(newdir)
if files then
-- provide fake index so that it doesn't activate it as the index may be not
-- quite correct if some of the existing files are already open in the IDE.
fastWrap(SetOpenFiles, files, {index = #files + notebook:GetPageCount()})
end
if params and params.interpreter and ide.interpreter.fname ~= params.interpreter then
ProjectSetInterpreter(params.interpreter) -- set the interpreter
end
if ide.osname ~= 'Macintosh' then notebook:Thaw() end
local index = params and params.index
if notebook:GetPageCount() == 0 then NewFile()
elseif restore and current >= 0 then notebook:SetSelection(current)
elseif index and index >= 0 and files[index+1] then
-- move the editor tab to the front with the file from the config
LoadFile(files[index+1].filename, nil, true)
SetEditorSelection() -- activate the editor in the active tab
end
-- remove current config as it may change; the current configuration is
-- stored with the general config.
-- The project configuration will be updated when the project is changed.
ProjectConfig(newdir, {})
end
local function closeWindow(event)
-- if the app is already exiting, then help it exit; wxwidgets on Windows
-- is supposed to report Shutdown/logoff events by setting CanVeto() to
-- false, but it doesn't happen. We simply leverage the fact that
-- CloseWindow is called several times in this case and exit. Similar
-- behavior has been also seen on Linux, so this logic applies everywhere.
if ide.exitingProgram then os.exit() end
ide.exitingProgram = true -- don't handle focus events
if not SaveOnExit(event:CanVeto()) then
@@ -511,19 +753,37 @@ function CloseWindow(event)
end
ShowFullScreen(false)
SettingsSaveProjectSession(FileTreeGetProjects())
SettingsSaveFileSession(GetOpenFiles())
SettingsSaveView()
SettingsSaveFramePosition(ide.frame, "MainFrame")
SettingsSaveEditorSettings()
if DebuggerCloseWatchWindow then DebuggerCloseWatchWindow() end
if DebuggerCloseStackWindow then DebuggerCloseStackWindow() end
if DebuggerShutdown then DebuggerShutdown() end
ide.settings:delete() -- always delete the config
event:Skip()
-- without explicit exit() the IDE crashes with SIGILL exception when closed
-- on MacOS compiled under 64bit with wxwidgets 2.9.3
if ide.osname == "Macintosh" then os.exit() end
SettingsSaveAll()
ide.settings:Flush()
do -- hide all floating panes first
local panes = frame.uimgr:GetAllPanes()
for index = 0, panes:GetCount()-1 do
local pane = frame.uimgr:GetPane(panes:Item(index).name)
if pane:IsFloating() then pane:Hide() end
end
end
frame.uimgr:Update() -- hide floating panes
frame.uimgr:UnInit()
frame:Hide() -- hide the main frame while the IDE exits
-- first need to detach all processes IDE has launched as the current
-- process is likely to terminate before child processes are terminated,
-- which may lead to a crash when EVT_END_PROCESS event is called.
DetachChildProcess()
DebuggerShutdown()
if ide.session.timer then ide.session.timer:Stop() end
event:Skip()
end
frame:Connect(wx.wxEVT_CLOSE_WINDOW, closeWindow)
frame:Connect(wx.wxEVT_TIMER, saveAutoRecovery)
if ide.config.autorecoverinactivity then
ide.session.timer = wx.wxTimer(frame)
-- check at least 5s to be never more than 5s off
ide.session.timer:Start(math.min(5, ide.config.autorecoverinactivity)*1000)
end
frame:Connect(wx.wxEVT_CLOSE_WINDOW, CloseWindow)

File diff suppressed because it is too large Load Diff

View File

@@ -17,8 +17,7 @@ local projcombobox = ide.frame.projpanel.projcombobox
-- Only update if the text has changed.
local statusTextTable = { "OVR?", "R/O?", "Cursor Pos" }
-- set funclist font to be the same as the combobox in the project dropdown
funclist:SetFont(ide.font.fNormal)
funclist:SetFont(ide.font.dNormal)
local function updateStatusText(editor)
local texts = { "", "", "" }
@@ -28,9 +27,9 @@ local function updateStatusText(editor)
local col = 1 + pos - editor:PositionFromLine(line)
texts = {
iff(editor:GetOvertype(), "OVR", "INS"),
iff(editor:GetReadOnly(), "R/O", "R/W"),
"Ln: "..tostring(line + 1).." Col: "..tostring(col) }
iff(editor:GetOvertype(), TR("OVR"), TR("INS")),
iff(editor:GetReadOnly(), TR("R/O"), TR("R/W")),
TR("Ln: %d"):format(line + 1).." "..TR("Col: %d"):format(col) }
end
if ide.frame then
@@ -103,11 +102,14 @@ local function isFileAlteredOnDisk(editor)
local modTime = GetFileModTime(filePath)
if modTime == nil then
openDocuments[id].modTime = nil
wx.wxMessageBox(fileName.." is no longer on the disk.",
wx.wxMessageBox(
TR("File '%s' no longer exists."):format(fileName),
GetIDEString("editormessage"),
wx.wxOK + wx.wxCENTRE, ide.frame)
elseif not editor:GetReadOnly() and modTime:IsValid() and oldModTime:IsEarlierThan(modTime) then
local ret = wx.wxMessageBox(fileName.." has been modified on disk.\nDo you want to reload it?",
local ret = wx.wxMessageBox(
TR("File '%s' has been modified on disk."):format(fileName)
.."\n"..TR("Do you want to reload it?"),
GetIDEString("editormessage"),
wx.wxYES_NO + wx.wxCENTRE, ide.frame)
@@ -141,18 +143,19 @@ function SetEditorSelection(selection)
ide.frame:SetTitle(getFileTitle(editor))
if editor then
if funclist:IsEmpty() then funclist:Append('Jump to a function definition...', 0) end
if funclist:IsEmpty() then funclist:Append(TR("Jump to a function definition..."), 0) end
funclist:SetSelection(0)
editor:SetFocus()
editor:SetSTCFocus(true)
local id = editor:GetId()
if openDocuments[id] and openDocuments[id].filePath then
FileTreeMarkSelected(openDocuments[id].filePath)
end
FileTreeMarkSelected(openDocuments[id] and openDocuments[id].filePath or '')
AddToFileHistory(openDocuments[id] and openDocuments[id].filePath)
else
FileTreeMarkSelected('')
end
SetAutoRecoveryMark()
end
function GetEditorFileAndCurInfo(nochecksave)
@@ -163,9 +166,7 @@ function GetEditorFileAndCurInfo(nochecksave)
local id = editor:GetId()
local filepath = openDocuments[id].filePath
if (nochecksave and not filepath) then
return
end
if not filepath then return end
local fn = wx.wxFileName(filepath)
fn:Normalize()
@@ -182,6 +183,7 @@ end
-- Set if the document is modified and update the notebook page text
function SetDocumentModified(id, modified)
if not openDocuments[id] then return end
local pageText = openDocuments[id].fileName or ide.config.default.fullname
if modified then
@@ -193,87 +195,131 @@ function SetDocumentModified(id, modified)
end
function EditorAutoComplete(editor)
if (editor == nil or not editor.spec) then return end
if not (editor and editor.spec) then return end
local pos = editor:GetCurrentPos()
-- don't do auto-complete in comments or strings.
-- the current position and the previous one have default style (0),
-- so we need to check two positions back.
local style = pos >= 2 and bit.band(editor:GetStyleAt(pos-2),31) or 0
if editor.spec.iscomment[style] or editor.spec.isstring[style] then return end
-- retrieve the current line and get a string to the current cursor position in the line
local pos = editor:GetCurrentPos()
local line = editor:GetCurrentLine()
local linetx = editor:GetLine(line)
local linestart = editor:PositionFromLine(line)
local localpos = pos-linestart
local lt = linetx:sub(1,localpos)
lt = lt:gsub("%s*("..editor.spec.sep..")%s*",function(a) return a end)
lt = lt:gsub("%s*%b[]%s*","")
lt = lt:gsub("%s*%b()%s*","")
lt = lt:gsub("%s*%b{}%s*","")
lt = lt:match("[^%[%(%s]*$")
lt = lt:gsub("%s","")
lt = lt:gsub("%s*(["..editor.spec.sep.."])%s*", "%1")
-- strip closed brace scopes
lt = lt:gsub("%b()","")
lt = lt:gsub("%b[]","")
lt = lt:gsub("%b{}","")
-- match from starting brace
lt = lt:match("[^%[%(%{%s]*$")
-- know now which string is to be completed
local userList = CreateAutoCompList(editor,lt)
if userList and string.len(userList) > 0 then
-- don't show the list if the only option is what's already typed
if userList and #userList > 0 and userList ~= lt then
editor:UserListShow(1, userList)
elseif editor:AutoCompActive() then
editor:AutoCompCancel()
end
end
function EditorCallTip(editor, pos)
local function getValAtPosition(editor, pos)
local line = editor:LineFromPosition(pos)
local linetx = editor:GetLine(line)
local linestart = editor:PositionFromLine(line)
local localpos = pos-linestart
local ident = "([a-zA-Z_0-9][a-zA-Z_0-9%.%:]*)"
local ident = "([a-zA-Z_][a-zA-Z_0-9%.%:]*)"
local linetxtopos = linetx:sub(1,localpos)
linetxtopos = linetxtopos..")"
linetxtopos = linetxtopos:match(ident .. "%b()$")
local selected = editor:GetSelectionStart() ~= editor:GetSelectionEnd()
and pos >= editor:GetSelectionStart() and pos <= editor:GetSelectionEnd()
-- check if we have a selected text or an identifier
-- for an identifier, check fragments on the left and on the right.
-- this is to match 'io' in 'i^o.print' and 'io.print' in 'io.pr^int'.
-- remove square brackets to make tbl[index].x show proper values.
local start = linetx:sub(1,localpos)
:gsub("%b[]", function(s) return ("."):rep(#s) end)
:find(ident.."$")
-- check if the style is the right one; this is to ignore
-- comments, strings, numbers (to avoid '1 = 1'), keywords, and such
if start and not selected then
local style = bit.band(editor:GetStyleAt(linestart+start),31)
if editor.spec.iscomment[style]
or (MarkupIsAny and MarkupIsAny(style)) -- markup in comments
or editor.spec.isstring[style]
or style == wxstc.wxSTC_LUA_NUMBER
or style == wxstc.wxSTC_LUA_WORD then
-- don't do anything for strings or comments or numbers
return nil, linetxtopos
end
end
local right = linetx:sub(localpos+1,#linetx):match("^[a-zA-Z_0-9]*")
local var = selected and editor:GetSelectedText()
or (start and linetx:sub(start,localpos):gsub(":",".")..right or nil)
return var, linetxtopos
end
function EditorCallTip(editor, pos, x, y)
-- don't show anything if the calltip is active; this may happen after
-- typing function name, while the mouse is over a different function.
if editor:CallTipActive() then return end
local var, linetxtopos = getValAtPosition(editor, pos)
local tip = linetxtopos and GetTipInfo(editor,linetxtopos.."(",false)
if ide.debugger and ide.debugger.server then
local selected = editor:GetSelectionStart() ~= editor:GetSelectionEnd()
and pos >= editor:GetSelectionStart() and pos <= editor:GetSelectionEnd()
-- check if we have a selected text or an identifier
-- for an identifier, check fragments on the left and on the right.
-- this is to match 'io' in 'i^o.print' and 'io.print' in 'io.pr^int'.
-- remove square brackets to make tbl[index].x show proper values.
local start = linetx:sub(1,localpos)
:gsub("%b[]", function(s) return ("."):rep(#s) end)
:find(ident.."$")
-- check if the style is the right one; this is to ignore
-- comments, strings, numbers (to avoid '1 = 1'), keywords, and such
if start and not selected then
local style = bit.band(editor:GetStyleAt(linestart+start),31)
if editor.spec.iscomment[style]
or editor.spec.isstring[style]
or style == wxstc.wxSTC_LUA_NUMBER
or style == wxstc.wxSTC_LUA_WORD then
return -- don't do anything for strings or comments or numbers
end
end
local right = linetx:sub(localpos+1,#linetx):match("^[a-zA-Z_0-9]*")
local var = selected and editor:GetSelectedText()
or (start and linetx:sub(start,localpos):gsub(":",".")..right or nil)
if var then
local limit = 128
ide.debugger.quickeval(var, function(val)
if #val > limit then val = val:sub(1, limit-3).."..." end
-- check if the mouse position is specified and the mouse has moved,
-- then don't show the tooltip as it's already too late for it.
if x and y then
local mpos = wx.wxGetMousePosition()
if mpos.x ~= x or mpos.y ~= y then return end
end
editor:CallTipShow(pos, val) end)
end
elseif tip then
-- only shorten if shown on mouse-over. Use shortcut to get full info.
local shortento = 450
local showtooltip = ide.frame.menuBar:FindItem(ID_SHOWTOOLTIP)
local suffix = "...\n"
..TR("Use '%s' to see full description."):format(showtooltip:GetLabel())
if x and y and #tip > shortento then
tip = tip:sub(1, shortento-#suffix):gsub("%W*%w*$","")..suffix
end
editor:CallTipShow(pos, tip)
end
end
function EditorIsModified(editor)
local modified = false
if editor then
local id = editor:GetId()
modified = openDocuments[id]
and (openDocuments[id].isModified or not openDocuments[id].filePath)
end
return modified
end
-- ----------------------------------------------------------------------------
-- Create an editor and add it to the notebook
function CreateEditor(name)
-- Create an editor
function CreateEditor()
local editor = wxstc.wxStyledTextCtrl(notebook, editorID,
wx.wxDefaultPosition, wx.wxDefaultSize,
wx.wxDefaultPosition, wx.wxSize(0, 0),
wx.wxBORDER_STATIC)
editorID = editorID + 1 -- increment so they're always unique
@@ -299,11 +345,15 @@ function CreateEditor(name)
editor:SetWrapVisualFlagsLocation(wxstc.wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT)
end
if (ide.config.editor.defaulteol == wxstc.wxSTC_EOL_CRLF
or ide.config.editor.defaulteol == wxstc.wxSTC_EOL_LF) then
editor:SetEOLMode(ide.config.editor.defaulteol)
-- else: keep wxStyledTextCtrl default behavior (CRLF on Windows, LF on Unix)
end
editor:SetCaretLineVisible(ide.config.editor.caretline and 1 or 0)
editor:SetVisiblePolicy(wxstc.wxSTC_VISIBLE_SLOP, 3)
--editor:SetXCaretPolicy(wxstc.wxSTC_CARET_SLOP, 10)
--editor:SetYCaretPolicy(wxstc.wxSTC_CARET_SLOP, 3)
editor:SetVisiblePolicy(wxstc.wxSTC_VISIBLE_STRICT, 3)
editor:SetMarginWidth(0, editor:TextWidth(32, "99999_")) -- line # margin
@@ -311,8 +361,8 @@ function CreateEditor(name)
editor:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL)
editor:SetMarginSensitive(1, true)
editor:MarkerDefine(BREAKPOINT_MARKER, wxstc.wxSTC_MARK_ROUNDRECT, wx.wxWHITE, wx.wxRED)
editor:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxGREEN)
editor:MarkerDefine(StylesGetMarker("currentline"))
editor:MarkerDefine(StylesGetMarker("breakpoint"))
editor:SetMarginWidth(2, 16) -- fold margin
editor:SetMarginType(2, wxstc.wxSTC_MARGIN_SYMBOL)
@@ -322,19 +372,24 @@ function CreateEditor(name)
editor:SetFoldFlags(wxstc.wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED +
wxstc.wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED)
editor:SetProperty("fold", "1")
editor:SetProperty("fold.compact", "1")
editor:SetProperty("fold.comment", "1")
-- allow multiple selection and multi-cursor editing if supported
if ide.wxver >= "2.9.5" then
editor:SetMultipleSelection(1)
editor:SetAdditionalCaretsBlink(1)
editor:SetAdditionalSelectionTyping(1)
end
local grey = wx.wxColour(128, 128, 128)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, wx.wxWHITE, grey)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, wx.wxWHITE, grey)
grey:delete()
do
local fg, bg = wx.wxWHITE, wx.wxColour(128, 128, 128)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, fg, bg)
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, fg, bg)
bg:delete()
end
if ide.config.editor.calltipdelay and ide.config.editor.calltipdelay > 0 then
editor:SetMouseDwellTime(ide.config.editor.calltipdelay)
@@ -346,6 +401,34 @@ function CreateEditor(name)
editor:AutoCompStops([[ \n\t=-+():.,;*/!"'$%&~'#°^@?´`<>][|}{]])
end
-- GotoPos should work by itself, but it doesn't (wx 2.9.5).
-- This is likely because the editor window hasn't been refreshed yet,
-- so its LinesOnScreen method returns 0/-1, which skews the calculations.
-- To avoid this, the caret line is made visible at the first opportunity.
do
local redolater
function editor:GotoPosDelayed(pos)
local badtime = self:LinesOnScreen() <= 0 -- -1 on OSX, 0 on Windows
if pos then
if badtime then
redolater = pos
-- without this GotoPos the content is not scrolled correctly on
-- Windows, but with this it's not scrolled correctly on OSX.
if ide.osname ~= 'Macintosh' then self:GotoPos(pos) end
else
redolater = nil
self:GotoPos(pos)
end
elseif not badtime and redolater then
-- reset the left margin first to make sure that the position
-- is set "from the left" to get the best content displayed.
self:SetXOffset(0)
self:GotoPos(redolater)
redolater = nil
end
end
end
editor.ev = {}
editor:Connect(wxstc.wxEVT_STC_MARGINCLICK,
function (event)
@@ -372,10 +455,12 @@ function CreateEditor(name)
end
local evtype = event:GetModificationType()
if (bit.band(evtype,wxstc.wxSTC_MOD_INSERTTEXT) ~= 0) then
SetAutoRecoveryMark()
table.insert(editor.ev,{event:GetPosition(),event:GetLinesAdded()})
DynamicWordsAdd("post",editor,nil,editor:LineFromPosition(event:GetPosition()),event:GetLinesAdded())
end
if (bit.band(evtype,wxstc.wxSTC_MOD_DELETETEXT) ~= 0) then
SetAutoRecoveryMark()
table.insert(editor.ev,{event:GetPosition(),0})
DynamicWordsAdd("post",editor,nil,editor:LineFromPosition(event:GetPosition()),0)
end
@@ -402,30 +487,56 @@ function CreateEditor(name)
local linetx = editor:GetLine(line)
local linestart = editor:PositionFromLine(line)
local localpos = pos-linestart
local linetxtopos = linetx:sub(1,localpos)
if (ch == char_CR and eol==2) or (ch == char_LF and eol==0) then
if (ch == char_LF) then
if (line > 0) then
local indent = editor:GetLineIndentation(line - 1)
if indent > 0 then
editor:SetLineIndentation(line, indent)
local tw = editor:GetTabWidth()
local ut = editor:GetUseTabs()
local indent = ut and (indent / tw) or indent
editor:GotoPos(pos+indent)
local linedone = editor:GetLine(line - 1)
-- if the indentation is 0 and the current line is not empty
-- then take indentation from the current line (instead of the
-- previous one). This may happen when CR is hit at the beginning
-- of a line (rather than at the end).
if indent == 0 and not linetx:match("^[\010\013]*$") then
indent = editor:GetLineIndentation(line)
end
local tw = editor:GetTabWidth()
local ut = editor:GetUseTabs()
if ide.config.editor.smartindent
and editor.spec.isdecindent and editor.spec.isincindent then
local closed, blockend = editor.spec.isdecindent(linedone)
local opened = editor.spec.isincindent(linedone)
-- if the current block is already indented, skip reverse indenting
if (line > 1) and (closed > 0 or blockend > 0)
and editor:GetLineIndentation(line-2) > indent then
-- adjust opened first; this is needed when use ENTER after })
if blockend == 0 then opened = opened + closed end
closed, blockend = 0, 0
end
editor:SetLineIndentation(line-1, indent - tw * closed)
indent = indent + tw * (opened - blockend)
if indent < 0 then indent = 0 end
end
editor:SetLineIndentation(line, indent)
indent = ut and (indent / tw) or indent
editor:GotoPos(editor:GetCurrentPos()+indent)
end
elseif ch == ("("):byte() then
local tip = GetTipInfo(editor,linetxtopos,ide.config.acandtip.shorttip)
if tip then
if editor:CallTipActive() then editor:CallTipCancel() end
editor:CallTipShow(pos,tip)
end
elseif ide.config.autocomplete then -- code completion prompt
local trigger = linetxtopos:match("["..editor.spec.sep.."%w_]+$")
if (trigger and (#trigger > 1 or trigger:match("[%.:]"))) then
if (trigger and (#trigger > 1 or trigger:match("["..editor.spec.sep.."]"))) then
ide.frame:AddPendingEvent(wx.wxCommandEvent(
wx.wxEVT_COMMAND_MENU_SELECTED, ID_AUTOCOMPLETE))
end
@@ -434,9 +545,28 @@ function CreateEditor(name)
editor:Connect(wxstc.wxEVT_STC_DWELLSTART,
function (event)
local position = editor:PositionFromPointClose(event:GetX(),event:GetY())
-- on Linux DWELLSTART event seems to be generated even for those
-- editor windows that are not active. What's worse, when generated
-- the event seems to report "old" position when retrieved using
-- event:GetX and event:GetY, so instead we use wxGetMousePosition.
local linux = ide.osname == 'Unix'
if linux and editor ~= GetEditor() then return end
-- check if this editor has focus; it may not when Stack/Watch window
-- is on top, but DWELL events are still triggered in this case.
-- Don't want to show calltip as it is still shown when the focus
-- is switched to a different application.
local focus = editor:FindFocus()
if focus and focus:GetId() ~= editor:GetId() then return end
-- event:GetX() and event:GetY() positions don't correspond to
-- the correct positions calculated using ScreenToClient (at least
-- on Windows and Linux), so use what's calculated.
local mpos = wx.wxGetMousePosition()
local cpos = editor:ScreenToClient(mpos)
local position = editor:PositionFromPointClose(cpos.x, cpos.y)
if position ~= wxstc.wxSTC_INVALID_POSITION then
EditorCallTip(editor, position)
EditorCallTip(editor, position, mpos.x, mpos.y)
end
event:Skip()
end)
@@ -447,6 +577,12 @@ function CreateEditor(name)
event:Skip()
end)
editor:Connect(wx.wxEVT_KILL_FOCUS,
function (event)
if editor:AutoCompActive() then editor:AutoCompCancel() end
event:Skip()
end)
editor:Connect(wxstc.wxEVT_STC_USERLISTSELECTION,
function (event)
local pos = editor:GetCurrentPos()
@@ -465,16 +601,33 @@ function CreateEditor(name)
SetDocumentModified(editor:GetId(), true)
end)
-- "updateStatusText" should be called in UPDATEUI event, but it creates
-- several performance problems on Windows (using wx2.9.5+) when
-- brackets or backspace is used (very slow screen repaint with 0.5s delay).
-- Moving it to PAINTED event creates problems on OSX (using wx2.9.5+),
-- where refresh of R/W and R/O status in the status bar is delayed.
editor:Connect(wxstc.wxEVT_STC_PAINTED,
function ()
if ide.osname == 'Windows' then updateStatusText(editor) end
end)
editor:Connect(wxstc.wxEVT_STC_UPDATEUI,
function ()
updateStatusText(editor)
if ide.osname ~= 'Windows' then updateStatusText(editor) end
editor:GotoPosDelayed()
updateBraceMatch(editor)
local minupdated
for _,iv in ipairs(editor.ev) do
local line = editor:LineFromPosition(iv[1])
if not minupdated or line < minupdated then minupdated = line end
IndicateFunctions(editor,line,line+iv[2])
if MarkupStyle then MarkupStyle(editor,line,line+iv[2]+1) end
end
if MarkupStyleRefresh then MarkupStyleRefresh(editor, editor.ev) end
local firstline = editor:DocLineFromVisible(editor:GetFirstVisibleLine())
local lastline = math.min(editor:GetLineCount(),
editor:DocLineFromVisible(editor:GetFirstVisibleLine() + editor:LinesOnScreen()))
MarkupStyle(editor,minupdated or firstline,lastline)
editor.ev = {}
end)
@@ -489,6 +642,16 @@ function CreateEditor(name)
event:Skip()
end)
if ide.config.editor.nomousezoom then
-- disable zoom using mouse wheel as it triggers zooming when scrolling
-- on OSX with kinetic scroll and then pressing CMD.
editor:Connect(wx.wxEVT_MOUSEWHEEL,
function (event)
if wx.wxGetKeyState(wx.WXK_CONTROL) then return end
event:Skip()
end)
end
local inhandler = false
editor:Connect(wx.wxEVT_SET_FOCUS,
function (event)
@@ -502,40 +665,126 @@ function CreateEditor(name)
editor:Connect(wx.wxEVT_KEY_DOWN,
function (event)
local keycode = event:GetKeyCode()
local mod = event:GetModifiers()
local first, last = 0, notebook:GetPageCount()-1
if keycode == wx.WXK_ESCAPE and frame:IsFullScreen() then
ShowFullScreen(false)
elseif event:ControlDown() and
(keycode == wx.WXK_PAGEUP or keycode == wx.WXK_TAB and event:ShiftDown()) then
-- Ctrl-Home and Ctrl-End don't work on OSX with 2.9.5+; fix it
elseif ide.osname == 'Macintosh' and ide.wxver >= "2.9.5"
and (mod == wx.wxMOD_RAW_CONTROL or mod == (wx.wxMOD_RAW_CONTROL + wx.wxMOD_SHIFT))
and (keycode == wx.WXK_HOME or keycode == wx.WXK_END) then
local pos = keycode == wx.WXK_HOME and 0 or editor:GetLength()
if event:ShiftDown() -- mark selection and scroll to caret
then editor:SetCurrentPos(pos) editor:EnsureCaretVisible()
else editor:GotoPos(pos) end
elseif mod == wx.wxMOD_RAW_CONTROL and keycode == wx.WXK_PAGEUP
or mod == (wx.wxMOD_RAW_CONTROL + wx.wxMOD_SHIFT) and keycode == wx.WXK_TAB then
if notebook:GetSelection() == first
then notebook:SetSelection(last)
else notebook:AdvanceSelection(false) end
elseif event:ControlDown() and
(keycode == wx.WXK_PAGEDOWN or keycode == wx.WXK_TAB) then
elseif mod == wx.wxMOD_RAW_CONTROL
and (keycode == wx.WXK_PAGEDOWN or keycode == wx.WXK_TAB) then
if notebook:GetSelection() == last
then notebook:SetSelection(first)
else notebook:AdvanceSelection(true) end
elseif (keycode == wx.WXK_DELETE or keycode == wx.WXK_BACK)
and (mod == wx.wxMOD_NONE) then
-- Delete and Backspace behave the same way for selected text
if #(editor:GetSelectedText()) > 0 then
editor:SetTargetStart(editor:GetSelectionStart())
editor:SetTargetEnd(editor:GetSelectionEnd())
else
local pos = editor:GetCurrentPos()
if keycode == wx.WXK_BACK then
pos = pos - 1
if pos < 0 then return end
end
-- check if the modification is to one of "invisible" characters.
-- if not, proceed with "normal" processing as there are other
-- events that may depend on Backspace, for example, re-calculating
-- auto-complete suggestions.
local style = bit.band(editor:GetStyleAt(pos), 31)
if not MarkupIsSpecial or not MarkupIsSpecial(style) then
event:Skip()
return
end
editor:SetTargetStart(pos)
editor:SetTargetEnd(pos+1)
end
editor:ReplaceTarget("")
elseif ide.osname == "Unix" and ide.wxver >= "2.9.5"
and keycode == ('T'):byte() and mod == wx.wxMOD_CONTROL then
ide.frame:AddPendingEvent(wx.wxCommandEvent(
wx.wxEVT_COMMAND_MENU_SELECTED, ID_SHOWTOOLTIP))
else
if ide.osname == 'Macintosh' and event:CmdDown() then
if ide.osname == 'Macintosh' and mod == wx.wxMOD_META then
return -- ignore a key press if Command key is also pressed
end
event:Skip()
end
end)
local value
editor:Connect(wx.wxEVT_CONTEXT_MENU,
function (event)
local menu = wx.wxMenu()
menu:Append(ID_UNDO, TR("&Undo"))
menu:Append(ID_REDO, TR("&Redo"))
menu:AppendSeparator()
menu:Append(ID_CUT, TR("Cu&t"))
menu:Append(ID_COPY, TR("&Copy"))
menu:Append(ID_PASTE, TR("&Paste"))
menu:Append(ID_SELECTALL, TR("Select &All"))
menu:AppendSeparator()
menu:Append(ID_QUICKADDWATCH, TR("Add Watch Expression"))
menu:Append(ID_QUICKEVAL, TR("Evaluate in Console"))
menu:Append(ID_ADDTOSCRATCHPAD, TR("Add to Scratchpad"))
local point = editor:ScreenToClient(event:GetPosition())
local pos = editor:PositionFromPointClose(point.x, point.y)
value = pos ~= wxstc.wxSTC_INVALID_POSITION and getValAtPosition(editor, pos) or nil
menu:Enable(ID_QUICKADDWATCH, value ~= nil)
menu:Enable(ID_QUICKEVAL, value ~= nil)
local debugger = ide.debugger
menu:Enable(ID_ADDTOSCRATCHPAD, debugger.scratchpad
and debugger.scratchpad.editors and not debugger.scratchpad.editors[editor])
-- cancel calltip as it interferes with popup menu
if editor:CallTipActive() then editor:CallTipCancel() end
editor:PopupMenu(menu)
end)
editor:Connect(ID_QUICKADDWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
function(event) DebuggerAddWatch(value) end)
editor:Connect(ID_QUICKEVAL, wx.wxEVT_COMMAND_MENU_SELECTED,
function(event) ShellExecuteCode(value) end)
editor:Connect(ID_ADDTOSCRATCHPAD, wx.wxEVT_COMMAND_MENU_SELECTED,
function(event) DebuggerScratchpadOn(editor) end)
return editor
end
-- ----------------------------------------------------------------------------
-- Add an editor to the notebook
function AddEditor(editor, name)
if notebook:AddPage(editor, name, true) then
local id = editor:GetId()
local document = {}
document.editor = editor
document.index = notebook:GetSelection()
document.index = notebook:GetPageIndex(editor)
document.fileName = nil
document.filePath = nil
document.modTime = nil
document.isModified = false
openDocuments[id] = document
return document
end
return editor
return
end
function GetSpec(ext,forcespec)
@@ -650,6 +899,17 @@ function SetupKeywords(editor, ext, forcespec, styles, font, fontitalic)
editor.spec = ide.specs.none
end
-- need to set folding property after lexer is set, otherwise
-- the folds are not shown (wxwidgets 2.9.5)
editor:SetProperty("fold", "1")
editor:SetProperty("fold.compact", ide.config.editor.foldcompact and "1" or "0")
editor:SetProperty("fold.comment", "1")
-- quickfix to prevent weird looks, otherwise need to update styling mechanism for cpp
-- cpp "greyed out" styles are styleid + 64
editor:SetProperty("lexer.cpp.track.preprocessor", "0")
editor:SetProperty("lexer.cpp.update.preprocessor", "0")
StylesApplyToEditor(styles or ide.config.styles, editor,
font or ide.font.eNormal,fontitalic or ide.font.eItalic,lexerstyleconvert)
end
@@ -657,41 +917,50 @@ end
----------------------------------------------------
-- function list for current file
funclist:Connect(wx.wxEVT_SET_FOCUS,
function (event)
event:Skip()
local function refreshFunctionList(event)
event:Skip()
-- parse current file and update list
local editor = GetEditor()
local editor = GetEditor()
if (editor and not (editor.spec and editor.spec.isfndef)) then return end
if (not (editor and editor.spec and editor.spec.isfndef)) then return end
-- parse current file and update list
-- first populate with the current label to minimize flicker
-- then populate the list and update the label
local current = funclist:GetCurrentSelection()
local label = funclist:GetString(current)
local default = funclist:GetString(0)
funclist:Clear()
funclist:Append(current ~= wx.wxNOT_FOUND and label or default, 0)
funclist:SetSelection(0)
-- first populate with the current label to minimize flicker
-- then populate the list and update the label
local current = funclist:GetCurrentSelection()
local label = funclist:GetString(current)
local default = funclist:GetString(0)
funclist:Clear()
funclist:Append(current ~= wx.wxNOT_FOUND and label or default, 0)
funclist:SetSelection(0)
local lines = 0
local linee = editor:GetLineCount()-1
for line=lines,linee do
local tx = editor:GetLine(line)
local s,_,cap,l = editor.spec.isfndef(tx)
if (s) then
local ls = editor:PositionFromLine(line)
local style = bit.band(editor:GetStyleAt(ls+s),31)
if not (editor.spec.iscomment[style] or editor.spec.isstring[style]) then
funclist:Append((l and " " or "")..cap,line)
end
local lines = 0
local linee = (editor and editor:GetLineCount() or 0)-1
for line=lines,linee do
local tx = editor:GetLine(line)
local s,_,cap,l = editor.spec.isfndef(tx)
if (s) then
local ls = editor:PositionFromLine(line)
local style = bit.band(editor:GetStyleAt(ls+s),31)
if not (editor.spec.iscomment[style] or editor.spec.isstring[style]) then
funclist:Append((l and " " or "")..cap,line)
end
end
end
funclist:SetString(0, default)
funclist:SetSelection(current ~= wx.wxNOT_FOUND and current or 0)
end)
funclist:SetString(0, default)
funclist:SetSelection(current ~= wx.wxNOT_FOUND and current or 0)
end
-- wx.wxEVT_SET_FOCUS is not triggered for wxChoice on Mac (wx 2.8.12),
-- so use wx.wxEVT_LEFT_DOWN instead; none of the events are triggered for
-- wxChoice on Linux (wx 2.9.5+), so use EVT_ENTER_WINDOW attached to the
-- toolbar itself until something better is available.
if ide.osname == 'Unix' then
ide.frame.toolBar:Connect(wx.wxEVT_ENTER_WINDOW, refreshFunctionList)
else
local event = ide.osname == 'Macintosh' and wx.wxEVT_LEFT_DOWN or wx.wxEVT_SET_FOCUS
funclist:Connect(event, refreshFunctionList)
end
funclist:Connect(wx.wxEVT_COMMAND_CHOICE_SELECTED,
function (event)

View File

@@ -26,9 +26,13 @@ ide.filetree = {
}
local filetree = ide.filetree
local iscaseinsensitive = wx.wxFileName("A"):SameAs(wx.wxFileName("a"))
-- generic tree
-- ------------
local IMG_DIRECTORY, IMG_FILE_KNOWN, IMG_FILE_OTHER = 0, 1, 2
do
local getBitmap = (ide.app.createbitmap or wx.wxArtProvider.GetBitmap)
local size = wx.wxSize(16, 16)
@@ -37,51 +41,25 @@ do
filetree.imglist:Add(getBitmap(wx.wxART_FOLDER, wx.wxART_OTHER, size))
-- 1 = file known spec
filetree.imglist:Add(getBitmap(wx.wxART_HELP_PAGE, wx.wxART_OTHER, size))
-- 2 = file rest
-- 2 = file other
filetree.imglist:Add(getBitmap(wx.wxART_NORMAL_FILE, wx.wxART_OTHER, size))
end
local function treeAddDir(tree,parent_id,rootdir)
local item, cookie = tree:GetFirstChild(parent_id)
local items = {}
while true do
if not item:IsOk() then break end
local item, cookie = tree:GetFirstChild(parent_id)
while item:IsOk() do
items[tree:GetItemText(item) .. tree:GetItemImage(item)] = item
item, cookie = tree:GetNextChild(parent_id, cookie)
end
local cache = {}
local curr
local search = rootdir..string_Pathsep.."*"
-- append directories
for _,dir in ipairs(FileSysGet(search,wx.wxDIR)) do
local name = dir:match("%"..string_Pathsep.."("..stringset_File.."+)$")
local icon = 0
local item = items[name .. icon]
if item then -- existing item
-- keep deleting items until we find item
while true do
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() or name == tree:GetItemText(next) then
curr = next
break
end
tree:Delete(next)
end
else -- new item
local dir_id = curr and tree:InsertItem(parent_id, curr, name, icon)
or tree:PrependItem(parent_id, name, icon)
tree:SetItemHasChildren(dir_id,FileSysHasContent(dir))
curr = dir_id
end
end
-- then append files
for _,file in ipairs(FileSysGet(search,wx.wxFILE)) do
local name = file:match("%"..string_Pathsep.."("..stringset_File.."+)$")
for _, file in ipairs(FileSysGetRecursive(rootdir)) do
local name, dir = file:match("("..stringset_File.."+)("..string_Pathsep.."?)$")
local known = GetSpec(GetFileExt(name))
local icon = known and 1 or 2
local icon = #dir>0 and IMG_DIRECTORY or known and IMG_FILE_KNOWN or IMG_FILE_OTHER
local item = items[name .. icon]
if item then -- existing item
-- keep deleting items until we find item
@@ -97,7 +75,9 @@ local function treeAddDir(tree,parent_id,rootdir)
else -- new item
curr = curr and tree:InsertItem(parent_id, curr, name, icon)
or tree:PrependItem(parent_id, name, icon)
if #dir>0 then tree:SetItemHasChildren(curr, FileSysHasContent(file)) end
end
if curr:IsOk() then cache[iscaseinsensitive and name:lower() or name] = curr end
end
-- delete any leftovers (something that exists in the tree, but not on disk)
@@ -108,6 +88,11 @@ local function treeAddDir(tree,parent_id,rootdir)
tree:Delete(next)
end
-- cache the mapping from names to tree items
local data = wx.wxLuaTreeItemData()
data:SetData(cache)
tree:SetItemData(parent_id, data)
tree:SetItemHasChildren(parent_id,
tree:GetChildrenCount(parent_id, false) > 0)
end
@@ -118,10 +103,11 @@ local function treeGetItemFullName(tree,treedata,item_id)
while (#cur > 0) do
item_id = tree:GetItemParent(item_id)
if not item_id:IsOk() then break end
cur = tree:GetItemText(item_id)
if cur and string.len(cur) > 0 then str = cur..string_Pathsep..str end
end
-- as root may already include path separate, normalize the path
-- as root may already include path separator, normalize the path
local fullPath = wx.wxFileName(
filetree.showroot and str or filetree.projdata.rootdir .. str)
fullPath:Normalize()
@@ -135,49 +121,64 @@ local function treeSetRoot(tree,treedata,rootdir)
return
end
local root_id = tree:AddRoot(rootdir,0)
local root_id = tree:AddRoot(rootdir, IMG_DIRECTORY)
treedata.root_id = root_id
treedata.rootdir = rootdir
treeAddDir(tree,root_id,rootdir)
filetree.newfiledir = rootdir
tree:Expand(root_id)
-- make sure that the item can expand
tree:SetItemHasChildren(root_id, true)
tree:Expand(root_id) -- this will also populate the tree
end
local function treeSetConnectorsAndIcons(tree,treedata)
tree:SetImageList(filetree.imglist)
local function refreshAncestors(node)
while node:IsOk() do
local dir = treeGetItemFullName(tree,treedata,node)
treeAddDir(tree,node,dir)
node = tree:GetItemParent(node)
end
end
-- connect to some events from the wxTreeCtrl
tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING,
function( event )
local item_id = event:GetItem()
local dir = treeGetItemFullName(tree,treedata,item_id)
treeAddDir(tree,item_id,dir)
if wx.wxDirExists(dir) then treeAddDir(tree,item_id,dir) -- refresh folder
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
return true
end )
end)
tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
function() return true end )
function() return true end)
tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
function( event )
local item_id = event:GetItem()
local name = treeGetItemFullName(tree,treedata,item_id)
-- refresh the folder
if (tree:GetItemImage(item_id) == 0) then
if wx.wxFileName(name):DirExists() then
treeAddDir(tree,item_id,name) -- refresh the content
else -- stale filetree information; rescan
treeAddDir(tree,tree:GetItemParent(item_id),name)
end
if (tree:GetItemImage(item_id) == IMG_DIRECTORY) then
if wx.wxDirExists(name) then treeAddDir(tree,item_id,name)
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
else -- open file
if wx.wxFileName(name):FileExists() then
LoadFile(name,nil,true)
else -- stale filetree information; rescan
treeAddDir(tree,tree:GetItemParent(item_id),name)
end
if wx.wxFileExists(name) then LoadFile(name,nil,true)
else refreshAncestors(tree:GetItemParent(item_id)) end -- stale content
end
end )
end)
-- toggle a folder on
tree:Connect( wx.wxEVT_LEFT_DOWN,
function( event )
local item_id = tree:HitTest(event:GetPosition())
-- only toggle if this is a folder and the click is on the label
if item_id and tree:GetItemImage(item_id) == IMG_DIRECTORY then
tree:Toggle(item_id)
tree:SelectItem(item_id)
else
event:Skip()
end
return true
end)
end
-- project
@@ -190,9 +191,10 @@ local projcombobox = wx.wxComboBox(projpanel, ID "filetree.proj.drivecb",
wx.wxDefaultPosition, wx.wxDefaultSize,
filetree.projdirTextArray, wx.wxTE_PROCESS_ENTER)
local projbutton = wx.wxButton(projpanel, ID "debug.projectdir.choose", "...",wx.wxDefaultPosition, wx.wxSize(26,20))
local projbutton = wx.wxButton(projpanel, ID_PROJECTDIRCHOOSE,
"...",wx.wxDefaultPosition, wx.wxSize(26,20))
local projtree = wx.wxTreeCtrl(projpanel, ID "filetree.projtree",
local projtree = wx.wxTreeCtrl(projpanel, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxDefaultSize,
filetree.showroot
and (wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE)
@@ -215,12 +217,19 @@ projpanel:SetSizer(projSizer)
-- proj connectors
-- ---------------
local inupdate = false
local function projcomboboxUpdate(event)
if inupdate then return end
local cur = projcombobox:GetValue()
local fn = wx.wxFileName(cur)
fn:Normalize()
-- on Windows, wxwidgets (2.9.5+) generates two COMMAND_COMBOBOX_SELECTED
-- events when the selection is done with ENTER, which causes recursive
-- call of updateProjectDir. To prevent this the second call is ignored.
inupdate = true
filetree:updateProjectDir(fn:GetFullPath(), event:GetEventType() == wx.wxEVT_COMMAND_COMBOBOX_SELECTED)
inupdate = false
end
projpanel:Connect(ID "filetree.proj.drivecb", wx.wxEVT_COMMAND_COMBOBOX_SELECTED, projcomboboxUpdate)
@@ -232,11 +241,18 @@ treeSetConnectorsAndIcons(projtree,filetree.projdata)
-- ---------------
function filetree:updateProjectDir(newdir, cboxsel)
if (newdir and newdir:sub(-3,-2) == string_Pathsep) then
newdir = newdir:sub(0,-2)
if (not newdir) or not wx.wxDirExists(newdir) then return end
local dirname = wx.wxFileName.DirName(newdir)
if filetree.projdirText and #filetree.projdirText > 0
and dirname:SameAs(wx.wxFileName.DirName(filetree.projdirText)) then return end
-- strip the last path separator if any
local newdir = dirname:GetPath(wx.wxPATH_GET_VOLUME)
if ide.config.projectautoopen and filetree.projdirText then
StoreRestoreProjectTabs(filetree.projdirText, newdir)
end
if ((not newdir) or filetree.projdirText == newdir or not wx.wxDirExists(newdir)) then return end
filetree.projdirText = newdir
PrependStringToArray(filetree.projdirTextArray,newdir,ide.config.projecthistorylength)
@@ -266,8 +282,8 @@ projpanel.projcombobox = projcombobox
projpanel.projtree = projtree
function FileTreeGetDir()
return projpanel:IsShown() and filetree.newfiledir
and wx.wxFileName.DirName(filetree.newfiledir):GetFullPath()
return projpanel:IsShown() and filetree.projdata.rootdir
and wx.wxFileName.DirName(filetree.projdata.rootdir):GetFullPath()
end
function FileTreeSetProjects(tab)
@@ -285,21 +301,33 @@ local function findItem(tree, match)
local node = projtree:GetRootItem()
local label = tree:GetItemText(node)
local s, e = string.find(match, label, 1, true)
local s, e
if iscaseinsensitive then
s, e = string.find(match:lower(), label:lower(), 1, true)
else
s, e = string.find(match, label, 1, true)
end
if not s or s ~= 1 then return end
for token in string.gmatch(string.sub(match,e+1), "[^%"..string_Pathsep.."]+") do
local dir = treeGetItemFullName(tree,filetree.projdata,node)
treeAddDir(tree,node,dir)
local data = tree:GetItemData(node)
local cache = data and data:GetData()
if cache and cache[iscaseinsensitive and token:lower() or token] then
node = cache[iscaseinsensitive and token:lower() or token]
else
-- token is missing; may need to re-scan the folder; maybe new file
local dir = treeGetItemFullName(tree,filetree.projdata,node)
treeAddDir(tree,node,dir)
local item, cookie = tree:GetFirstChild(node)
while true do
if not item:IsOk() then return end -- not found
if tree:GetItemText(item) == token then
node = item
break
local item, cookie = tree:GetFirstChild(node)
while true do
if not item:IsOk() then return end -- not found
if tree:GetItemText(item) == token then
node = item
break
end
item, cookie = tree:GetNextChild(node, cookie)
end
item, cookie = tree:GetNextChild(node, cookie)
end
end
@@ -326,10 +354,12 @@ function FileTreeMarkSelected(file)
end
if item_id then
projtree:EnsureVisible(item_id)
projtree:SetScrollPos(wx.wxHORIZONTAL, 0, true)
projtree:SetItemBold(item_id, true)
end
curr_file = file
projtree:Refresh() -- to force refresh on Mac (ide.osname == 'Macintosh')
if ide.wxver < "2.9.5" and ide.osname == 'Macintosh' then
projtree:Refresh() end
end
end

View File

@@ -53,19 +53,23 @@ local function setSearchFlags(editor)
editor:SetSearchFlags(flags)
end
local function setTarget(editor, fDown, fInclude)
local function setTarget(editor, fDown, fAll, fWrap)
local selStart = editor:GetSelectionStart()
local selEnd = editor:GetSelectionEnd()
local len = editor:GetLength()
local s, e
if fDown then
e= len
s = iff(fInclude, selStart, selEnd +1)
s = iff(fAll, selStart, selEnd)
e = len
else
s = 0
e = iff(fInclude, selEnd, selStart-1)
e = iff(fAll, selEnd, selStart)
end
if not fDown and not fInclude then s, e = e, s end
-- if going up and not search/replace All, then switch the range to
-- allow the next match to be properly marked
if not fDown and not fAll then s, e = e, s end
-- if wrap around and search all requested, then search the entire document
if fAll and fWrap then s, e = 0, len end
editor:SetTargetStart(s)
editor:SetTargetEnd(e)
return e
@@ -92,16 +96,33 @@ function findReplace:GetSelectedString()
local endSel = editor:GetSelectionEnd()
if (startSel ~= endSel) and (editor:LineFromPosition(startSel) == editor:LineFromPosition(endSel)) then
findReplace.findText = editor:GetSelectedText()
findReplace.foundString = true
return true
end
end
return false
end
local function shake(window, shakes, duration, vigour)
shakes = shakes or 4
duration = duration or 0.5
vigour = vigour or 0.05
local delay = math.floor(duration/shakes/2)
local position = window:GetPosition() -- get current position
local deltax = window:GetSize():GetWidth()*vigour
for s = 1, shakes do
window:Move(position:GetX()-deltax, position:GetY())
wx.wxMilliSleep(delay)
window:Move(position:GetX()+deltax, position:GetY())
wx.wxMilliSleep(delay)
end
window:Move(position) -- restore position
end
function findReplace:FindString(reverse)
if findReplace:HasText() then
local editor = findReplace:GetEditor()
local fDown = iff(reverse, not findReplace.fDown, findReplace.fDown)
local lenFind = string.len(findReplace.findText)
setSearchFlags(editor)
setTarget(editor, fDown)
local posFind = editor:SearchInTarget(findReplace.findText)
@@ -112,13 +133,15 @@ function findReplace:FindString(reverse)
end
if posFind == -1 then
findReplace.foundString = false
ide.frame:SetStatusText("Text not found.")
ide.frame:SetStatusText(TR("Text not found."))
shake(findReplace.dialog)
else
findReplace.foundString = true
local start = editor:GetTargetStart()
local finish = editor:GetTargetEnd()
EnsureRangeVisible(start, finish)
editor:SetSelection(start, finish)
ide.frame:SetStatusText("")
end
end
end
@@ -156,34 +179,40 @@ end
-- registers every position item was found
-- supposed for "Search/Replace in Files"
function findReplace:ReplaceString(fReplaceAll,inFileRegister)
function findReplace:ReplaceString(fReplaceAll, inFileRegister)
local replaced = false
if findReplace:HasText() then
local replaceLen = string.len(findReplace.replaceText)
local findLen = string.len(findReplace.findText)
local editor = findReplace:GetEditor()
local endTarget = inFileRegister and setTargetAll(editor) or
setTarget(editor, findReplace.fDown, fReplaceAll)
setTarget(editor, findReplace.fDown, fReplaceAll, findReplace.fWrap)
if fReplaceAll then
setSearchFlags(editor)
local occurrences = 0
local posFind = editor:SearchInTarget(findReplace.findText)
if (posFind ~= -1) then
if(not inFileRegister) then editor:BeginUndoAction() end
if (not inFileRegister) then editor:BeginUndoAction() end
while posFind ~= -1 do
if(inFileRegister) then inFileRegister(posFind) end
if (inFileRegister) then inFileRegister(posFind) end
local length = editor:GetLength()
editor:ReplaceTarget(findReplace.replaceText)
editor:SetTargetStart(posFind + replaceLen)
endTarget = endTarget + replaceLen - findLen
-- adjust the endTarget as the position could have changed;
-- can't simply subtract findText length as it could be a regexp
endTarget = endTarget + (editor:GetLength() - length)
editor:SetTargetEnd(endTarget)
posFind = editor:SearchInTarget(findReplace.findText)
occurrences = occurrences + 1
end
if(not inFileRegister) then editor:EndUndoAction() end
if (not inFileRegister) then editor:EndUndoAction() end
replaced = true
end
ide.frame:SetStatusText(("%s %s."):format(
TR("Replaced"), TR("%d instance", occurrences):format(occurrences)))
else
if findReplace.foundString then
local start = editor:GetSelectionStart()
@@ -205,22 +234,17 @@ local function onFileRegister(pos)
local line = editor:LineFromPosition(pos)
local linepos = pos - editor:PositionFromLine(line)
local result = "("..(line+1)..","..(linepos+1).."): "..editor:GetLine(line)
DisplayOutput(findReplace.curfilename..result)
DisplayOutputLn(findReplace.curfilename..result:gsub("\r?\n$",""))
findReplace.occurrences = findReplace.occurrences + 1
end
local function ProcInFiles(startdir,mask,subdirs,replace)
if (subdirs) then
local dirs = FileSysGet(startdir..string_Pathsep.."*",wx.wxDIR)
for _,dir in ipairs(dirs) do
ProcInFiles(dir,mask,true,replace)
end
end
local files = FileSysGet(startdir..string_Pathsep..mask,wx.wxFILE)
local files = FileSysGetRecursive(startdir,subdirs,mask)
for _,file in ipairs(files) do
-- ignore .bak files when replacing and asked to store .bak files
if not (replace and findReplace.fMakeBak and file:find('.bak$')) then
-- and skip folders as these are included in the list as well
if not (replace and findReplace.fMakeBak and file:find('.bak$'))
and not file:match(string_Pathsep.."$") then
findReplace.curfilename = file
local filetext = FileRead(file)
@@ -247,42 +271,54 @@ function findReplace:RunInFiles(replace)
end
findReplace.oveditor = wxstc.wxStyledTextCtrl(findReplace.dialog, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxSize(1,1),
wx.wxBORDER_STATIC)
wx.wxDefaultPosition, wx.wxSize(1,1), wx.wxBORDER_STATIC)
findReplace.occurrences = 0
local fname = wx.wxFileName(findReplace.filedirText)
local startdir = findReplace.filedirText
DisplayOutput("FindInFiles: "..(replace and "Replacing" or "Searching for").." '"..findReplace.findText.."'.\n")
DisplayOutputLn(("%s '%s'."):format(
(replace and TR("Replacing") or TR("Searching for")),
findReplace.findText))
ProcInFiles(startdir, findReplace.filemaskText, findReplace.fSubDirs, replace)
DisplayOutput("FindInFiles: "..findReplace.occurrences.." instance(s) have been "..
(replace and "replaced" or "found")..".\n")
DisplayOutputLn(("%s %s."):format(
(replace and TR("Replaced") or TR("Found")),
TR("%d instance", findReplace.occurrences):format(findReplace.occurrences)))
findReplace.oveditor = nil
end
local function createFindReplaceDialog(replace,infiles)
function findReplace:createDialog(replace,infiles)
local ID_FIND_NEXT = 1
local ID_REPLACE = 2
local ID_REPLACE_ALL = 3
local ID_SETDIR = 4
local mac = ide.osname == 'Macintosh'
local findReplace = self
local position = wx.wxDefaultPosition
if findReplace.dialog then
-- grab current position before destroying the dialog
position = findReplace.dialog:GetPosition()
findReplace.dialog:Destroy()
end
local findDialog = wx.wxDialog(ide.frame, wx.wxID_ANY, infiles and TR("Find In Files") or TR("Find"),
position, wx.wxDefaultSize, wx.wxDEFAULT_DIALOG_STYLE)
findReplace.replace = replace
findReplace.infiles = infiles
local findDialog = wx.wxDialog(ide.frame, wx.wxID_ANY, infiles and "Find In Files" or "Find", wx.wxDefaultPosition, wx.wxDefaultSize,
wx.wxDEFAULT_DIALOG_STYLE)
-- Create right hand buttons and sizer
local findButton = wx.wxButton(findDialog, ID_FIND_NEXT, infiles and "&Find All" or "&Find Next")
findButton:SetDefault()
local replaceButton = wx.wxButton(findDialog, ID_REPLACE, infiles and replace and "&Replace All" or "&Replace")
local findButton = wx.wxButton(findDialog, ID_FIND_NEXT, infiles and TR("&Find All") or TR("&Find Next"))
local replaceButton = wx.wxButton(findDialog, ID_REPLACE, infiles and replace and TR("&Replace All") or TR("&Replace"))
local replaceAllButton = nil
if (replace and not infiles) then
replaceAllButton = wx.wxButton(findDialog, ID_REPLACE_ALL, "Replace &All")
replaceAllButton = wx.wxButton(findDialog, ID_REPLACE_ALL, TR("Replace &All"))
end
local cancelButton = wx.wxButton(findDialog, wx.wxID_CANCEL, "Cancel")
local cancelButton = wx.wxButton(findDialog, wx.wxID_CANCEL, TR("Cancel"))
local buttonsSizer = wx.wxBoxSizer(wx.wxVERTICAL)
buttonsSizer:Add(findButton, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
@@ -293,58 +329,69 @@ local function createFindReplaceDialog(replace,infiles)
buttonsSizer:Add(cancelButton, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
-- Create find/replace text entry sizer
local findStatText = wx.wxStaticText( findDialog, wx.wxID_ANY, "Find: ")
local findTextCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.findText, wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.findTextArray, wx.wxCB_DROPDOWN)
local findStatText = wx.wxStaticText(findDialog, wx.wxID_ANY, TR("Find")..": ")
local findTextCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.findText,
wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.findTextArray,
wx.wxCB_DROPDOWN + (mac and wx.wxTE_PROCESS_ENTER or 0))
findTextCombo:SetFocus()
local infilesMaskStat,infilesMaskCombo
local infilesDirStat,infilesDirCombo,infilesDirButton
if (infiles) then
infilesMaskStat = wx.wxStaticText( findDialog, wx.wxID_ANY, "File Type: ")
infilesMaskCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.filemaskText, wx.wxDefaultPosition, wx.wxSize(250,20), findReplace.filemaskTextArray)
infilesMaskStat = wx.wxStaticText(findDialog, wx.wxID_ANY, TR("File Type")..": ")
infilesMaskCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.filemaskText,
wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.filemaskTextArray)
local fname = GetEditorFileAndCurInfo(true)
if (fname) then
findReplace.filedirText = fname:GetPath(wx.wxPATH_GET_VOLUME)
end
infilesDirStat = wx.wxStaticText( findDialog, wx.wxID_ANY, "Directory: ")
infilesDirCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.filedirText, wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.filedirTextArray)
infilesDirStat = wx.wxStaticText(findDialog, wx.wxID_ANY, TR("Directory")..": ")
infilesDirCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.filedirText,
wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.filedirTextArray)
infilesDirButton = wx.wxButton(findDialog, ID_SETDIR, "...",wx.wxDefaultPosition, wx.wxSize(26,20))
end
local replaceStatText, replaceTextCombo
if (replace) then
replaceStatText = wx.wxStaticText( findDialog, wx.wxID_ANY, "Replace: ")
replaceTextCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.replaceText, wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.replaceTextArray)
replaceStatText = wx.wxStaticText(findDialog, wx.wxID_ANY, TR("Replace")..": ")
replaceTextCombo = wx.wxComboBox(findDialog, wx.wxID_ANY, findReplace.replaceText,
wx.wxDefaultPosition, wx.wxDefaultSize, findReplace.replaceTextArray,
wx.wxCB_DROPDOWN + (mac and wx.wxTE_PROCESS_ENTER or 0))
end
local findReplaceSizer = wx.wxFlexGridSizer(2, 3, 0, 0)
findReplaceSizer:AddGrowableCol(1)
findReplaceSizer:Add(findStatText, 0, wx.wxALL + wx.wxALIGN_LEFT, 0)
findReplaceSizer:Add(findTextCombo, 1, wx.wxALL + wx.wxGROW + wx.wxCENTER, 0)
findReplaceSizer:Add(16,8, 0, wx.wxALL + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE,0)
findReplaceSizer:Add(findStatText, 0, wx.wxALL + wx.wxALIGN_RIGHT + wx.wxALIGN_CENTER_VERTICAL, 0)
findReplaceSizer:Add(findTextCombo, 1, wx.wxALL + wx.wxGROW + wx.wxCENTER+ wx.wxALIGN_CENTER_VERTICAL, 0)
findReplaceSizer:Add(16, 8, 0, wx.wxALL + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE,0)
if (infiles) then
findReplaceSizer:Add(infilesMaskStat, 0, wx.wxTOP + wx.wxALIGN_CENTER, 5)
findReplaceSizer:Add(infilesMaskCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER, 5)
findReplaceSizer:Add(16,8, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE ,5)
findReplaceSizer:Add(infilesMaskStat, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxALIGN_CENTER_VERTICAL, 5)
findReplaceSizer:Add(infilesMaskCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER+ wx.wxALIGN_CENTER_VERTICAL, 5)
findReplaceSizer:Add(16, 8, 0, wx.wxTOP, 5)
findReplaceSizer:Add(infilesDirStat, 0, wx.wxTOP + wx.wxALIGN_CENTER, 5)
findReplaceSizer:Add(infilesDirCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER, 5)
findReplaceSizer:Add(infilesDirButton, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE, 5)
findReplaceSizer:Add(infilesDirStat, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxALIGN_CENTER_VERTICAL, 5)
findReplaceSizer:Add(infilesDirCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER+ wx.wxALIGN_CENTER_VERTICAL, 5)
findReplaceSizer:Add(infilesDirButton, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxADJUST_MINSIZE+ wx.wxALIGN_CENTER_VERTICAL, 5)
end
if (replace) then
findReplaceSizer:Add(replaceStatText, 0, wx.wxTOP + wx.wxALIGN_CENTER, 5)
findReplaceSizer:Add(replaceTextCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER, 5)
findReplaceSizer:Add(replaceStatText, 0, wx.wxTOP + wx.wxALIGN_RIGHT + wx.wxALIGN_CENTER_VERTICAL, 5)
findReplaceSizer:Add(replaceTextCombo, 1, wx.wxTOP + wx.wxGROW + wx.wxCENTER+ wx.wxALIGN_CENTER_VERTICAL, 5)
end
-- the StaticBox(Sizer) needs to be created before checkboxes, otherwise
-- checkboxes don't get any clicks on OSX (ide.osname == 'Macintosh')
-- as the z-order for event traversal appears to be incorrect.
local optionsSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog, TR("Options"))
-- Create find/replace option checkboxes
local wholeWordCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, "Match &whole word")
local matchCaseCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, "Match &case")
local wrapAroundCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, "Wrap ar&ound")
local regexCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, "Regular &expression")
local wholeWordCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR("Match &whole word"))
local matchCaseCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR("Match &case"))
local wrapAroundCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR("Wrap ar&ound"))
local regexCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR("Regular &expression"))
wholeWordCheckBox:SetValue(findReplace.fWholeWord)
matchCaseCheckBox:SetValue(findReplace.fMatchCase)
wrapAroundCheckBox:SetValue(findReplace.fWrap)
@@ -355,7 +402,7 @@ local function createFindReplaceDialog(replace,infiles)
optionSizer:Add(matchCaseCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
optionSizer:Add(regexCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
local optionsSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog, "Options" );
optionsSizer:Add(optionSizer, 0, 0, 5)
-- Create scope radiobox
@@ -365,8 +412,11 @@ local function createFindReplaceDialog(replace,infiles)
local scopeSizer
if (infiles) then
subDirCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, "&Subdirectories")
makeBakCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, ".&bak on Replace")
-- the StaticBox(Sizer) needs to be created before checkboxes
scopeSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog, TR("In Files"))
subDirCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR("&Subdirectories"))
makeBakCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY, TR(".&bak on Replace"))
subDirCheckBox:SetValue(findReplace.fSubDirs)
makeBakCheckBox:SetValue(findReplace.fMakeBak)
@@ -374,13 +424,13 @@ local function createFindReplaceDialog(replace,infiles)
optionSizer:Add(subDirCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
optionSizer:Add(makeBakCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
scopeSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog, "In Files" );
scopeSizer:Add(optionSizer, 0, 0, 5)
else
scopeRadioBox = wx.wxRadioBox(findDialog, wx.wxID_ANY, "Scope", wx.wxDefaultPosition, wx.wxDefaultSize, {"&Up", "&Down"}, 1, wx.wxRA_SPECIFY_COLS)
scopeRadioBox = wx.wxRadioBox(findDialog, wx.wxID_ANY, TR("Scope"), wx.wxDefaultPosition,
wx.wxDefaultSize, {TR("&Up"), TR("&Down")}, 1, wx.wxRA_SPECIFY_COLS)
scopeRadioBox:SetSelection(iff(findReplace.fDown, 1, 0))
scopeSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog );
scopeSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
scopeSizer:Add(scopeRadioBox, 0, 0, 0)
end
@@ -397,7 +447,7 @@ local function createFindReplaceDialog(replace,infiles)
mainSizer:Add(leftSizer, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 10)
mainSizer:Add(buttonsSizer, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 10)
mainSizer:SetSizeHints( findDialog )
mainSizer:SetSizeHints(findDialog)
findDialog:SetSizer(mainSizer)
local function TransferDataFromWindow()
@@ -428,12 +478,26 @@ local function createFindReplaceDialog(replace,infiles)
return true
end
-- this is a workaround for Enter issue in wxComboBox on OSX:
-- https://groups.google.com/d/msg/wx-users/EVJr8GqyNUA/CUALp585E78J
if (mac and ide.wxver >= "2.9.5") then
local function simulateEnter()
findDialog:AddPendingEvent(wx.wxCommandEvent(
wx.wxEVT_COMMAND_BUTTON_CLICKED, ID_FIND_NEXT))
end
findTextCombo:Connect(wx.wxEVT_COMMAND_TEXT_ENTER, simulateEnter)
if replace then
replaceTextCombo:Connect(wx.wxEVT_COMMAND_TEXT_ENTER, simulateEnter)
end
end
findDialog:Connect(ID_FIND_NEXT, wx.wxEVT_COMMAND_BUTTON_CLICKED,
function()
TransferDataFromWindow()
if (findReplace.infiles) then
findReplace:RunInFiles()
findReplace.dialog:Destroy()
findReplace.dialog = nil
else
findReplace:FindString()
end
@@ -447,13 +511,12 @@ local function createFindReplaceDialog(replace,infiles)
if (findReplace.infiles) then
findReplace:RunInFiles(true)
findReplace.dialog:Destroy()
findReplace.dialog = nil
else
findReplace:ReplaceString()
end
else
findReplace.dialog:Destroy()
findReplace.dialog = createFindReplaceDialog(true,infiles)
findReplace.dialog:Show(true)
findReplace:createDialog(true,infiles)
end
end)
@@ -469,7 +532,7 @@ local function createFindReplaceDialog(replace,infiles)
if infilesDirButton then
findDialog:Connect(ID_SETDIR, wx.wxEVT_COMMAND_BUTTON_CLICKED,
function()
local filePicker = wx.wxDirDialog(findDialog, "Choose a project directory",
local filePicker = wx.wxDirDialog(findDialog, TR("Choose a project directory"),
findReplace.filedirText~="" and findReplace.filedirText or wx.wxGetCwd(),wx.wxFLP_USE_TEXTCTRL)
local res = filePicker:ShowModal(true)
@@ -477,22 +540,26 @@ local function createFindReplaceDialog(replace,infiles)
infilesDirCombo:SetValue(filePicker:GetPath())
end
end)
end
findDialog:Connect(wx.wxID_ANY, wx.wxEVT_CLOSE_WINDOW,
function (event)
TransferDataFromWindow()
event:Skip()
findDialog:Show(false)
findDialog:Destroy()
end)
-- if on OSX then select the current value of the default dropdown
-- and don't set the default as it doesn't make Enter to work, but
-- prevents associated hotkey (Cmd-F) from working (wx2.9.5).
if ide.osname == 'Macintosh' then
findTextCombo:SetSelection(0, #findTextCombo:GetValue())
else
findButton:SetDefault()
end
-- reset search when re-creating dialog to avoid modifying selected
-- fragment after successful search and updated replacement
findReplace.foundString = false
findReplace.dialog = findDialog
findDialog:Show(true)
return findDialog
end
function findReplace:Show(replace,infiles)
self.dialog = nil
self.dialog = createFindReplaceDialog(replace,infiles)
self.dialog:Show(true)
self:GetSelectedString()
self:createDialog(replace,infiles)
end

Some files were not shown because too many files have changed in this diff Show More