YoshiRulz
d76e1a8a8b
Refactor PlatformLinkedLibSingleton and replace RunningOnUnix with CurrentOS
2019-05-18 15:30:29 +10:00
YoshiRulz
e6374ef477
Use string interpolation
2019-03-19 00:06:37 +10:00
feos
d54146791e
fix #1509
2019-03-14 19:30:52 +03:00
James Groom
42764f0019
Add preliminary Unix compatibility (using Mono; resolves #1384 ) ( #1380 )
...
* Move PlatformSpecificLinkedLibs and implementations to common and rename
* Specify file ext. at LoadPlatformSpecific call site
* Move Client.Common.Global.RunningOnUnix to PlatformLinkedLibSingleton
* Inline var Resolver
* Use PlatformLinkedLibManager internally
* Move plugin load check to LinkedLibManager, use LinkedLibManager
* Interpolate
* Return exit code from dlclose/FreeLibrary
* Skip all calls to externs in BlipBufDll when using mono
* Use PlatformLinkedLibManager in SevenZipLibraryManager
* Add expected return value to workaround (from testing on Win32)
* Remove ".dll" from DllImport attr, remove temporary workaround, see desc.
The library can be built by changing the output file name in
`.../blip_buf/Makefile` to `libblip_buf.so`, and running `make`. It will be
loaded if placed in the `.../output` folder.
* Remove unused code, add TODO (this class is req. for Waterbox.PeWrapper)
The TODO is to [rewrite with
C#](https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files )
instead of importing from `kernel32.dll`.
* Update OpenTK again but better (for #1384 )
* Add Mono run script
* Add libblip_buf.so (temporary)
Temporary because it should be a separate package which BizHawk depends on.
* Add distro detection, add "already running" and "unknown distro" messages
* Gray-out Lua Console on Unix
* Extract superclass from EmuLuaLibrary, add shell implementation for Unix
* Specify libdl version, Fedora doesn't have the versionless symlink
* Remove empty `ToolStripMenuItem`, null `Text` caused crash on Unix
* Transform OpenTK keyboard input into a `List<KeyEvent>` and read that
Also fixes crash on rebind
* Remove debug `using ...;`
2019-01-04 01:50:55 +03:00
feos
5721894dbf
lua console context menu: copy and select all
...
fix #1284
2018-09-08 12:41:26 +03:00
Scepheo
37ace00fea
Extract Lua file enable logic for toggling and reuse when loading for the first time. Fixes #1138 .
2018-05-06 23:05:50 +02:00
adelikat
f81f745fcc
Some luaconsole refactoring and moving more logic into LuaImp
2017-05-24 15:59:05 -05:00
adelikat
47f2371953
Misc cleanups
2017-05-24 09:06:31 -05:00
adelikat
4d1dd215e6
Lua Console - temp fix to fix recent regression of lua scripts disappearing on reboot core
2017-05-24 08:30:30 -05:00
adelikat
4919fc5182
don't reference GlobalWin.LuaConsole in LuaConsole!
2017-05-23 13:04:28 -05:00
adelikat
facd845453
Lua Console - Move StartLuaDrawing() and EndLuaDrawing() to LuaImp since they exclusively LuaImp logic
2017-05-23 12:40:40 -05:00
adelikat
6196d81b5d
Move _luaList from LuaConsole to LuaImp
2017-05-22 16:47:27 -05:00
adelikat
75affd8940
Lua console code cleanup
2017-05-18 14:53:03 -05:00
adelikat
4c48542b98
fix null reference exception when LuaSandbox attempts to use the Logger
2017-05-18 14:27:22 -05:00
nattthebear
ebe789eed2
heh
2017-05-10 07:45:23 -04:00
J.D. Purcell
b53502eed8
Spaces -> tabs.
2017-04-15 16:37:30 -04:00
adelikat
f35717aae2
Remove yet more unused code
2017-02-22 10:11:08 -06:00
adelikat
7653b86f44
Remove some unused code
2017-02-22 10:09:44 -06:00
adelikat
0480ea3f44
when toggling a script on, update on screen lua drawing stuff. On gui.clearGraphics() immediate update the screen
2017-02-04 15:54:04 -06:00
adelikat
3b197b8fdf
lua console - roll back commit that disposes scripts when closing the window, apparnetly luainterface doesn't want you to dispose of disposable things
2017-02-04 15:30:13 -06:00
adelikat
3d805a3541
null check for previous commit
2017-02-04 10:45:32 -06:00
adelikat
923565c350
Lua console - dispose of scripts when closing the console window
2017-02-04 10:32:36 -06:00
adelikat
c050eaa8c7
lua console - fix the edit button to account for relative vs absolute pathing
2017-02-02 17:48:32 -06:00
adelikat
3bfce81eae
LuaConsole - have a RequiredService of IEmulator and pass it into the lua implementation instead of using Global.Emulator
2016-12-06 10:35:11 -06:00
adelikat
889feeeeba
fix #414 by idiot-proofing the lua console command window, if emu.frameadvance() is called, log a warning instead of blowing up
2016-11-13 11:26:09 -06:00
adelikat
ddf23e4c3a
Lua console - use string.IsNullOrWhiteSpace when checking the command line box
2016-11-13 11:15:30 -06:00
adelikat
ec502acd1d
Lua - make a call to DrawFinish() when closing the lua console. Fixes endless locked emu surface errors when opening it back up and loading a script that draws
2016-11-08 10:37:59 -06:00
adelikat
11b4f5a5b1
Lua - fix #691 - When calling client.reboot_core we still want to re-inject dependencies to the lua libraries
2016-08-28 12:07:26 -04:00
zeromus
a7d2b8d7f7
* add a new IToolForm update mechanism which has extensible update points (so a tool can both pre- and post- update)
...
* make trace logging "core-pushes" model, to a sink installed by the frontend. This sink can go straight to the disk without wasting memory if that's what the Trace Logger tool has selected; or the Trace Logger will buffer it if it needs to. Formerly, we had a "core-pushes-to-buffer" and "client-pulls-once-per-frame" which necessarily caused huge buffers no matter what was going on.
2016-08-13 15:31:26 -05:00
adelikat
47d9432ad4
Lua - set file watchers on lua session autoload
2016-02-14 21:51:12 -05:00
adelikat
36b82c3563
Lua Console - add a button that installs auto-complete for all bizhawk's lua library to Sublime Text 2's lua syntax, still todo - notepad++
2016-02-07 08:27:57 -05:00
adelikat
907850ce02
Lua - fix exception when reloading a lua script with registered functions while the registered functions dialog is open
2016-02-06 14:22:56 -05:00
adelikat
487fce328b
Lua - add option to detect changes in scripts and automatically reload them. Have this option off by default for now. Also fix reloading of scripts which was recently broken.
2016-02-06 13:50:02 -05:00
zeromus
5e89e563d0
overhaul lua sandboxing so that each lua script has its own sandbox. elaborate tracking of winform/event ownership to ensure that lua doesnt receive calls without going through the owner's sandbox. add win32-specific speed hacks for currdir set/get at higher speed. There may be bugs in this commit, but I think we're on the right track now.
2016-01-31 19:54:55 -06:00
adelikat
30c7b32bc1
Lua Console - when a lua exception occurs we also want to update the script status icons
2016-01-31 19:02:02 -05:00
adelikat
0ff2db5c8d
Lua - ResumeScripts - loop through only running scripts, to avoid sandbox calls for non-running scripts
2016-01-31 14:31:29 -05:00
zeromus
42c0b62261
fix some lua currdir bugs, but its all broken, dont pay any attention to it
2016-01-31 03:18:34 -06:00
zeromus
da865e28b8
try sandboxing currenty directory harder
2016-01-31 02:40:48 -06:00
adelikat
0013646db5
Rip out obsolete notion of a WatchList domain, change ram watch menu item to Default Domain, who's functionality is simply to decide the default domain used when adding a new watch, also add some Visual Studio designer shenanigans for a previous commit I made that broke it
2016-01-30 22:17:31 -05:00
adelikat
894a9c2318
Rework ToolHelpers from a static object to ToolFormBase that inherits form and have a lot of tools inherit it, in hopes of moving a lot of copy pasta into a base class, move a few functions that show up a lot there
2016-01-30 20:24:53 -05:00
adelikat
1e57a0a221
Lua Console - remember column widths
2016-01-30 19:20:52 -05:00
adelikat
fdae465089
Lua - refresh the lua console when a script exits
2016-01-30 18:50:05 -05:00
feos
7409a32658
lua: attempt to use sandbox in callbacks.
2016-01-30 23:26:27 +03:00
zeromus
260ad45a88
fix lua's reboot_core function... maybe
2015-12-19 21:14:13 -06:00
feos
eb41e8a8e0
lua: remove registered functions on toggle option.
2015-11-29 22:56:28 +03:00
feos
fbd1d6d8e2
Lua: autoload recent scripts too (unless there's a recent session to autoload).
...
pixelText bg tweak.
2015-11-29 13:29:48 +03:00
feos
128c09e7b4
progress with lua:
...
- added fceux and gens/snes9x pixelated fonts
- added gui.pixelFont() function for them (no resizing, so perfectly scalable)
- added background to drawText and pixelText (halo was painfully slow, so just a box)
- reordered fore and back colors for gui.text (no need to specify back every time we want to change fore). thought its back color was shadow, that is obsoleted by halo now, whose color we can't change. anyway, it's way slower than simple text functions, so they should be used mostly.
- option to toggle all scripts if none is selected. greatly reduces routine when heavily tweaking a script, and is just generally pretty.
2015-11-28 22:19:15 +03:00
zeromus
93e7c91ee9
clean up lua console pause/stop behaviour a little bit and add listview icons to make it more clear what's going on
2015-10-22 16:28:52 -05:00
Tom Rochette
a783ef75f6
Simple Lua sandbox.
...
Uses an EnvironmentSandbox to restore the Environment.CurrentDirectory. Will also catch any script exception and redirect them to the Lua console.
With this change, I've tried to replace all the places where Lua is executed so that if an exception occurs, it is catched, sent to the console and a callback is executed if necessary.
This also fixes a small issue where any callback generating an exception would crash BizHawk.
2015-07-01 22:38:19 -04:00
adelikat
6982df8035
Lua console - add a null check on close, LuaImp should never be null unless something went bonkers on load
2015-03-28 01:09:50 +00:00
scepheo
48a6686f31
Lua Console: Command window gives slightly more sensible output now.
2015-02-08 23:47:15 +00:00
adelikat
53cda95ca5
Lua Console - don't nag to save a session, unless a session exists
2015-01-31 01:52:29 +00:00
scepheo
860227ee66
LuaConsole: Actually stop and restart script upon tool restart.
2015-01-29 14:50:09 +00:00
adelikat
6f2488aa57
Lua - clear out lua drawing surface on restart
2015-01-29 03:36:19 +00:00
adelikat
24a517d293
Lua - properly re-inject core dependencies on restart
2015-01-28 14:38:06 +00:00
adelikat
09072acb3b
Lua Console - immediate box - in some situations wrap the text in a console.log(), such as if the user simply types a variable name
2015-01-27 23:27:44 +00:00
adelikat
3b13ea4a8f
spaces to tabs, good ol whitespace commit
2015-01-27 23:18:48 +00:00
christoph.boehmwalder
99f9d91671
LuaConsole - Fixed tooltip of Duplicate button.
2015-01-03 22:40:11 +00:00
christoph.boehmwalder
e11811e2f8
Lua - Added an input box to the script console for on-the-fly command input
...
Set ImageScaling to None for all buttons in the toolbar in order to fix scaling issues
2015-01-02 19:36:32 +00:00
adelikat
b8d667812b
convert Lua Console to IToolFormAutoConfig
2015-01-01 17:48:25 +00:00
adelikat
a2bee4f88a
Lua Console - move "Autoload Session" to the recent session menu
2015-01-01 17:28:34 +00:00
goyuken
08d09bc64f
a few more itoolform cleanups
2014-12-15 18:13:54 +00:00
scepheo
769cbeb1a0
- IToolForm: Added RequiredServices attribute to define dependencies, and added EmulatorServices for ToolManager to supply them.
...
- IServiceProvider, BasicServiceProvider: Added compile-time unknown type versions of GetService and HasService.
- ToolManager: Added IsAvailable to test whether all dependencies for a tool are available.
2014-12-13 21:54:59 +00:00
adelikat
21889bba58
Lua Console - replace a NullEmulator check with a Global.Game != null check as that is more precisely why a check is happening
2014-11-30 18:44:20 +00:00
adelikat
4681fef0c2
Add an IsNull() extension method to IEmulator (checks for null and if NullEmulator) and replace EmuHawk NullEmulator checks with this method instead
2014-11-30 14:18:44 +00:00
adelikat
96b626434f
Lua Console - on drag and drop, don't be case sensitive with the file extension
2014-11-26 17:42:30 +00:00
adelikat
e4cd7a3449
Lua Console - when reporting a script error, update the number of active scripts label
2014-11-18 01:09:06 +00:00
adelikat
252ea85f99
Lua Console - add a duplicate script menu and toolbar item, functions similarly to new script except it starts with the text from the highlighted script
2014-11-09 16:18:09 +00:00
kylelyk
321c8c64bf
Added documentation to IControlMainForm, renamed a few variables, moved IControlMainForm related code in MainForm to the same region.
2014-08-19 19:24:17 +00:00
adelikat
fe09023ef6
When closing the lua console - clear the lua surface
2014-08-16 20:09:57 +00:00
adelikat
7ec866ced5
add some extensions to the ControlExtension class for converting cruddy .NET 1.0 collection objects to IEnumerable<T>, and start removing some code in specific forms that work around cruddy .NET 1.0 stuff
2014-07-28 03:01:57 +00:00
adelikat
5d4ff76ed6
Convert a copy/pasted method in a bunch of tool dialogs to an extension method
2014-07-28 02:31:51 +00:00
adelikat
ce4ce0bacc
Convert some static methods in ToolHelpers to extension methods
2014-07-28 01:51:11 +00:00
adelikat
0397ea1ff4
Remove the CustomControls/Util file and move all the classes into the Form Extensions file, since they were all extension methods for window form objects
2014-07-27 15:22:30 +00:00
adelikat
570f77cc68
Implement FastUpdate() on IToolForm. The intent here is for tools to do the minimum amount necessary when updating. This allows them to avoid slow things like drawing, but do critical activities such as Ram tools incrementing change counters, and loggers can continue logging. When Turboing, instead of bypassing tool updates, the client will run the fast update instead. Note: a few tools still need to be thought out as to what they need to do in a fast update
2014-07-25 01:55:21 +00:00
zeromus
0fe74f95e7
fix LuaConsole PWD-related bugs
2014-06-03 02:39:15 +00:00
adelikat
0782c9820d
Lua - implement event.onexit() - fires when the calling script stops execution, supports multiple callbacks per script
2014-05-26 03:08:16 +00:00
adelikat
ce6cd2ec5f
rip out the lua writer dialog and deeming it a failed experiment. Lua Console - re-implement the new script dialog so that it calls a save file dialog, and if the user picks a file it creates a new lua script with a minimal while loop, and then invokes a new process with this newly created file for quick editing
2014-05-24 01:59:59 +00:00
adelikat
0b6795fffc
Some misc cleanup of redundant qualifiers
2014-05-04 14:10:28 +00:00
adelikat
9d7c92fb6e
Oops
2014-04-29 21:25:17 +00:00
adelikat
8f35b29a5c
Remove extra newline in console.log/print
2014-04-29 20:39:19 +00:00
adelikat
67704b35bf
Lua Console - dont' flag changes when change the on/off status of a script as that leads to being nagged too much (for instance, toggling a lua script at any time during recording and then restarting your movie). Remember the file name when creating a new session as to do a Save As during AskSave()
2014-04-22 21:35:04 +00:00
zeromus
7adc15d97e
work on opengl display manager: optimized codepaths, user retroshader selection, support for importing a textureID from another core; add erase button to lua console;
2014-04-15 21:46:18 +00:00
adelikat
8ac9f7d2dd
Lua Console - try to use relative paths when saving and loading lua scripts
2014-03-23 14:44:18 +00:00
adelikat
4ca0f5792b
rip out some lua console code I didn't mean to check in
2014-02-16 23:06:14 +00:00
adelikat
5849d2d80d
make the Select All feature built right into VirtualListView instead of writing the same code over and over in the tool dialogs, also make said code faster on large lists
2014-02-15 19:15:04 +00:00
adelikat
05823d3022
fix ButtonCount lua script to use console.log instead of the now deleted console.output, Lua - remove some todos that had been done and some rather useless cleanup
2014-02-14 01:27:38 +00:00
zeromus
96da0880b4
work towards generalizing lua display layers. "emu" and "native" surfaces now work and are accessible from lua.
2014-02-14 00:55:18 +00:00
zeromus
da5daaa989
change lua console to have distinct toggle and refresh functions.. since the refresh icon being a toggle function was misleading me and refresh is what i want 100% of the time anyway
2014-02-13 23:25:36 +00:00
adelikat
f3755975a1
Lua - implement Always on Top and Floating Window
2014-01-30 22:32:29 +00:00
mvl1986
0a494c386e
LuaConsole now updates when a new Luascript is saved in the LuaWriter.
...
LineNumbers can now be shown in the Writer, only updates when a selectionchanged event occurs, not on the scrolling of the screen.
Option to toggle LineNumbers on and off
-MightyMar
2014-01-24 12:44:55 +00:00
adelikat
8ab655d963
A better fix for something I broke
2014-01-21 16:31:12 +00:00
adelikat
9df0821fcd
Lua Console - convert spaces to tabs and remove a todo
2014-01-21 16:25:51 +00:00
mvl1986
a177a111b9
Line 53:
...
changed: LuaImp = new EmuLuaLibrary(this);
into: LuaImp = new EmuLuaLibrary();
-MightyMar
2014-01-21 16:24:03 +00:00
mvl1986
9963518715
Added sorting to the columns in the ListView
2014-01-17 11:51:52 +00:00
adelikat
a3a8170c44
Check Global.Config.SupressAskSave in ToolManager instead of doing it in the tool dialogs themselves
2014-01-01 02:09:03 +00:00
adelikat
95c619a0b7
Lua Console - a round of code cleanup
2013-12-19 01:17:53 +00:00
adelikat
b2b8edb319
Fix removing of registered functions via Lua console
2013-12-19 01:02:50 +00:00
adelikat
b604d81d10
Lua Console - refresh things better
2013-12-19 00:54:35 +00:00
pasky1382
ac97e62ed1
Remove registered functions when disabling lua scripts
2013-12-19 00:12:46 +00:00