-
-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
146 changed files
with
6,244 additions
and
4,134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ target_wrapper.* | |
CMakeLists.txt.user* | ||
|
||
*.pyc | ||
|
||
/installer/packages/app/data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: 0.3.1.{build} | ||
version: 0.3.2.{build} | ||
image: Visual Studio 2019 | ||
|
||
init: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Prepare Release | ||
|
||
1. Update version in `appveyor.yml` | ||
2. Update version in `installer/config/config.xml` | ||
3. Update version and date in `installer/packages/app/meta/package.xml` | ||
4. Update version in `src/Version.pri` | ||
|
||
## Build Release | ||
Example bat script to build release | ||
|
||
``` | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 | ||
set PATH=C:\Qt\5.15.0\msvc2019_64\bin\;C:\Qt\Tools\QtCreator\bin\;%PATH% | ||
mkdir build | ||
cd build | ||
qmake ..\src\NotepadNext.pro | ||
jom | ||
jom make_package | ||
jom zip | ||
jom prepare_installer | ||
cd .. | ||
mkdir installer_build | ||
cd installer_build | ||
qmake ..\installer\installer.pro | ||
jom | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// https://github.com/vinniefalco/LuaBridge | ||
// | ||
// Copyright 2018, Dmitry Tarakanov | ||
// SPDX-License-Identifier: MIT | ||
|
||
#pragma once | ||
|
||
#include <LuaBridge/detail/Stack.h> | ||
|
||
#include <list> | ||
|
||
namespace luabridge { | ||
|
||
template <class T> | ||
struct Stack <std::list <T> > | ||
{ | ||
static void push (lua_State* L, std::list <T> const& list) | ||
{ | ||
lua_createtable (L, static_cast <int> (list.size ()), 0); | ||
typename std::list <T>::const_iterator item = list.begin (); | ||
for (std::size_t i = 1; i <= list.size (); ++i) | ||
{ | ||
lua_pushinteger (L, static_cast <lua_Integer> (i)); | ||
Stack <T>::push (L, *item); | ||
lua_settable (L, -3); | ||
++item; | ||
} | ||
} | ||
|
||
static std::list <T> get (lua_State* L, int index) | ||
{ | ||
if (!lua_istable (L, index)) | ||
{ | ||
luaL_error (L, "#%d argument must be a table", index); | ||
} | ||
|
||
std::list <T> list; | ||
|
||
int const absindex = lua_absindex (L, index); | ||
lua_pushnil (L); | ||
while (lua_next (L, absindex) != 0) | ||
{ | ||
list.push_back (Stack <T>::get (L, -1)); | ||
lua_pop (L, 1); | ||
} | ||
return list; | ||
} | ||
|
||
static bool isInstance (lua_State* L, int index) | ||
{ | ||
return lua_istable (L, index); | ||
} | ||
}; | ||
|
||
} // namespace luabridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
//------------------------------------------------------------------------------ | ||
/* | ||
https://github.com/vinniefalco/LuaBridge | ||
Copyright 2019, Dmitry Tarakanov | ||
Copyright 2012, Vinnie Falco <[email protected]> | ||
Copyright 2007, Nathan Reed | ||
|
@@ -27,116 +28,32 @@ | |
*/ | ||
//============================================================================== | ||
|
||
#ifndef LUABRIDGE_LUABRIDGE_HEADER | ||
#define LUABRIDGE_LUABRIDGE_HEADER | ||
#pragma once | ||
|
||
// All #include dependencies are listed here | ||
// instead of in the individual header files. | ||
// | ||
#include <cassert> | ||
#include <sstream> | ||
#include <stdexcept> | ||
#include <string> | ||
#include <typeinfo> | ||
|
||
#define LUABRIDGE_MAJOR_VERSION 2 | ||
#define LUABRIDGE_MINOR_VERSION 0 | ||
#define LUABRIDGE_VERSION 200 | ||
|
||
namespace luabridge | ||
{ | ||
|
||
// Forward declaration | ||
// | ||
template <class T> | ||
struct Stack; | ||
|
||
#include "detail/LuaHelpers.h" | ||
|
||
#include "detail/TypeTraits.h" | ||
#include "detail/TypeList.h" | ||
#include "detail/FuncTraits.h" | ||
#include "detail/Constructor.h" | ||
#include "detail/Stack.h" | ||
#include "detail/ClassInfo.h" | ||
|
||
class LuaRef; | ||
|
||
#include "detail/LuaException.h" | ||
#include "detail/LuaRef.h" | ||
#include "detail/Iterator.h" | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
security options. | ||
*/ | ||
class Security | ||
{ | ||
public: | ||
static bool hideMetatables () | ||
{ | ||
return getSettings().hideMetatables; | ||
} | ||
|
||
static void setHideMetatables (bool shouldHide) | ||
{ | ||
getSettings().hideMetatables = shouldHide; | ||
} | ||
|
||
private: | ||
struct Settings | ||
{ | ||
Settings () : hideMetatables (true) | ||
{ | ||
} | ||
|
||
bool hideMetatables; | ||
}; | ||
#define LUABRIDGE_MINOR_VERSION 3 | ||
#define LUABRIDGE_VERSION 203 | ||
|
||
static Settings& getSettings () | ||
{ | ||
static Settings settings; | ||
return settings; | ||
} | ||
}; | ||
|
||
#include "detail/Userdata.h" | ||
#include "detail/CFunctions.h" | ||
#include "detail/Namespace.h" | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
Push an object onto the Lua stack. | ||
*/ | ||
template <class T> | ||
inline void push (lua_State* L, T t) | ||
{ | ||
Stack <T>::push (L, t); | ||
} | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
Set a global value in the lua_State. | ||
@note This works on any type specialized by `Stack`, including `LuaRef` and | ||
its table proxies. | ||
*/ | ||
template <class T> | ||
inline void setGlobal (lua_State* L, T t, char const* name) | ||
{ | ||
push (L, t); | ||
lua_setglobal (L, name); | ||
} | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
Change whether or not metatables are hidden (on by default). | ||
*/ | ||
inline void setHideMetatables (bool shouldHide) | ||
{ | ||
Security::setHideMetatables (shouldHide); | ||
} | ||
#ifndef LUA_VERSION_NUM | ||
#error "Lua headers must be included prior to LuaBridge ones" | ||
#endif | ||
|
||
} | ||
|
||
#endif | ||
#include <LuaBridge/detail/LuaHelpers.h> | ||
#include <LuaBridge/detail/TypeTraits.h> | ||
#include <LuaBridge/detail/TypeList.h> | ||
#include <LuaBridge/detail/FuncTraits.h> | ||
#include <LuaBridge/detail/Constructor.h> | ||
#include <LuaBridge/detail/ClassInfo.h> | ||
#include <LuaBridge/detail/LuaException.h> | ||
#include <LuaBridge/detail/LuaRef.h> | ||
#include <LuaBridge/detail/Iterator.h> | ||
#include <LuaBridge/detail/Userdata.h> | ||
#include <LuaBridge/detail/CFunctions.h> | ||
#include <LuaBridge/detail/Security.h> | ||
#include <LuaBridge/detail/Stack.h> | ||
#include <LuaBridge/detail/Namespace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// https://github.com/vinniefalco/LuaBridge | ||
// | ||
// Copyright 2018, Dmitry Tarakanov | ||
// SPDX-License-Identifier: MIT | ||
|
||
#pragma once | ||
|
||
#include <LuaBridge/detail/Stack.h> | ||
#include <LuaBridge/detail/dump.h> | ||
|
||
#include <map> | ||
|
||
namespace luabridge { | ||
|
||
template <class K, class V> | ||
struct Stack <std::map <K, V> > | ||
{ | ||
typedef std::map <K, V> Map; | ||
|
||
static void push (lua_State* L, const Map& map) | ||
{ | ||
lua_createtable (L, 0, static_cast <int> (map.size ())); | ||
typedef typename Map::const_iterator ConstIter; | ||
for (ConstIter i = map.begin (); i != map.end (); ++i) | ||
{ | ||
Stack <K>::push (L, i->first); | ||
Stack <V>::push (L, i->second); | ||
lua_settable (L, -3); | ||
} | ||
} | ||
|
||
static Map get (lua_State* L, int index) | ||
{ | ||
if (!lua_istable (L, index)) | ||
{ | ||
luaL_error (L, "#%d argument must be a table", index); | ||
} | ||
|
||
Map map; | ||
int const absindex = lua_absindex (L, index); | ||
lua_pushnil (L); | ||
while (lua_next (L, absindex) != 0) | ||
{ | ||
map.emplace (Stack <K>::get (L, -2), Stack <V>::get (L, -1)); | ||
lua_pop (L, 1); | ||
} | ||
return map; | ||
} | ||
|
||
static bool isInstance (lua_State* L, int index) | ||
{ | ||
return lua_istable (L, index); | ||
} | ||
}; | ||
|
||
} // namespace luabridge |
Oops, something went wrong.