Fix/Enhancement: Permit lua files to be located away from application

Mudlet will now seek out and check for LuaGlobal.lua (which loads all
other Mudlet specific lua files) on start up and permit the user to search
for it if not found or is not read accessible (or is too large - see
below).  Before the search is invoked the user is advised what the problem
is and what to do and directions given as to what will happen if they both
can and cannot complete the required action.  Once a suitable instance of
LuaGlobal.lua is found it's location is stored in the Mudlet.conf file
and used in the future.  As of this commit if a wrong version is selected
the only way to change it is to hand delete the relevant line from that
human readable file.  The in-game console text shown during lua start-up
now shows the directory from which the Mudlet lua files were loaded and
then the working directory being used afterwards.

During Lua subsystem start up the lua search path is now set to include the
directory of LuaGlobal.lua and the current directory is temporarily changed
to that during loading of the Mudlet lua and Geyser lua files before being
changed to that of the Mudlet executable.  LuaGlobal.lua has been edited
to NOT now search for the wanted files it loads in some hard-coded
locations - it expects to be IN the required direction on invocation.

Adds four mudlet themed icons for general usage with QMessageBox and other
dialogs.

Deletes obsolete "all-in-one" LuaGlobal.lua file in root of src tree
which shares a name with the wanted one in a sub-directory.  The
check mentioned above only accepts a file of this name less than 10K Bytes
as the obsolete one is 60K and the wanted one is around 5K.

The need to provide a sensible default location to search for the
LuaGlobal.lua file for different operating systems had a useful side-effect
in that it also specifies the location for an installer to put those
files.  All the lua files required to operate Mudlet have been explicitly
brought into the Windows/Unix src.pro and *nix installer commands added
so that Mudlet can now be "deployed" after building in Qt Creator with
a "make install" executed in the build directory.

*** With these changes Qt "Shadow building" (out of source directory) works ***

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Fixup: Update README and correct some non-executable file permissions.

Also revises a comment in LuaGlobal.lua

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Reversion: Undo previous commit's file mode changes

Attempting to adopt the "one change - one branch" policy. See
"man GITWORKFLOWS(7)" if available! 8-)

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Enhancement: Provide limited *nix Install capability

With the preceding changes to the lua subsystem it is now possible to
attempt to provide a *nix make install capability within the Qt Creator
IDE.  However there are issues with the resulting Makefile which does
not comprehend that the user compiling the code may not have sufficient
privileges as is to actually install the component parts of Mudlet in a
(possibly) multi-user system.  This addition uses GNU awk (other flavours
might work) to carefully modify the qmake generated Makefile so that the
parts that add or remove files and directories from the main system area
(typically off of the /usr/local area of the filesystem) are run with
the necessary privilege escalation.  To do this it uses sudo and a utility
such as ssh-askpass that provides a GUI dialog for sudo to ask for a
password as required in a GUI environment such as the Qt IDE.

The target destinations are set by the .path elements of the target, and
LUA install targets set in the src.pro project file.  To maintain
consistency with values compiled into Mudlet the variable that should be
modified by the UNIX user in the project file is the fairly conventional,
according to Linux File Hierarchical Standard, PREFIX one that is set to
/usr/local near the top of the project file.


Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Fixup: Revert a couple of unwanted modifications to src.pro

I was not paying attention. 8-(

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Revision: Removed unnecessary external unix install script

Found a simpler means to run "make install" when QtCreator user is not
normally privileged enough to do so (see src.pro project file for
instructions).

Also checked behaviour of qmake "install sets" when the .files member
is given just a path as a file to copy FROM - the entire tree from the
root of qmake's idea of the project's source directory (the Mudlet ./src
one) to each of the (effectively wild-carded) file in that path is
pre-pended to the .path member which is not what is wanted - SO THE FILES
MUST BE INDIVIDUALLY LISTED - which perhaps is a good thing in that odd
extra files in the source tree won't get included by accident.

Specifying files explicitly like this should still work with the mac
install process - so an intended merger of the mac_src.pro file into
the main project file should be possible.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Merge Prep: Update README & add merge guidance comment to src.pro

As the changes to the project file won't auto-merge I have tested
what needs to be done with meld or kdiff3 to combine the two specified
branches in the proposed order and provided guidance as a (deleted after
performing) comment at the top of the file.

(A previous attempt to do ended up with the comment in the wrong branch's
copy of the file...!)

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Enhancement: Debug controls framework for developer run-time modifications

Provide places to put in code elements that place controls into the last
tab in the dlgProfilePreferences.cpp dialog that can be used to modify,
possibly temporarily, the operation of the program on a per host basis or
application wide.  Useful to allow the run-time selection of alternate
pieces of code for performance comparisons or to investigate suspect code.

The primary reason to inserting this framework is so that developers can
override the per-user setting of the Mudlet Lua files location - setting
the added check-box option on the last tab of the dlgProfilePreference
dialog forces following instances of Mudlet and any profiles opened after
in the current instance to use the Mudlet lua files in the src directory of
the Mudlet sources rather that the value that was set and remains stored in the user's
Mudlet configuration file.  Resetting the option reverts to normal
operation for following cases.  The setting IS retained and carries over
to following instances of the application.

Also included here is a spin-box control to reduce the alpha of the colour
used to draw the rooms on the 2D map, which I had done to help with
checking the placement of exits lines close to/under the room symbol.

The extra lines in the comments are intentional to allow sufficient space
between individual controls so that patching to insert or remove them
can be done automagically (the patch program has an easier time of it
if lines around changes remain stable through changes, or so I understand).

N.B. Host.cpp gains the Q_OBJECT macro so qmake WILL need to be run to
ensure it gets run though the "moc" when the make is done!

If the Todo plugin is available and enabled in QtCreator IDE one can locate
the places where the code is by adding the string "DEBUGCONTROLS" as a
title of one of things to track as this and a following spaced digit/letter
is embedded in the opening comment for each of the placeholders for
blocks of code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
BugFix: correct indexing into Lua state when retrieving Error messages

When multiple errors were encountered during the start up of the lua
subsystem use of a positive (absolute?) index caused only the first error
message to be retrieved, changing to the negative (relative) reference
allows all of them to be collected.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Update: Requested changes from other developers

Following a suggestion from another developer the code in T2DMap.cpp to
reduce the opacity of the room symbols has been removed from the 2D mapper
though the control variable code has been left - commented out - in place
as an example.

Following a request from Vadim, a developer override control has been added
to force the use of the Lua files distributed in the source package by
in-source or shadow-build instances of the Mudlet application - the setting
is stored between invocations of the application but any profiles loaded
(auto-login profiles or the first profile loaded) - before the profile
preferences dialog becomes available - will obviously use EITHER {if RESET}
the automatically maintained storage location for LuaGlobal.lua that Mudlet
rechecks each time it starts since the "fileLocation" modification was
incorporated OR {if SET} the source one DEPENDING ON the previously stored
value of this control - which is initially RESET in this patch.


Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Merge preparation: sort project file file-lists, revise TLua::loadGlobal()

Attempt to reduce / simplify manual merging required to incorporate into
mudletDev branch.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Merge branch 'mudletDev_fileLocation_debugControls' into mudletDev

Resolved conflicts:
	README
	src/TLuaInterpreter.cpp
	src/mudlet_alpha.qrc
	src/src.pro

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>