forked from redo/BlockLua
Compare commits
2 Commits
74745108b6
...
43e1370c7c
| Author | SHA1 | Date | |
|---|---|---|---|
| 43e1370c7c | |||
| a910204363 |
Binary file not shown.
BIN
BlockLua.dll
BIN
BlockLua.dll
Binary file not shown.
15
compile.sh
15
compile.sh
@@ -1,17 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
|
||||||
# BlockLua build script for MSYS2/MinGW32
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# 1. Open the MSYS2 MinGW32 shell.
|
|
||||||
# 2. Install the required compiler with:
|
|
||||||
# pacman -S mingw-w64-i686-gcc
|
|
||||||
# 3. Run this script:
|
|
||||||
# ./compile.sh
|
|
||||||
#
|
|
||||||
# If your MSYS2 installation is not on C:, adjust the g++ path below as needed.
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
@@ -19,7 +6,7 @@ cd "$(dirname "$0")"
|
|||||||
buildargs="-Wall -Werror -m32 -shared -Isrc -Iinc/tsfuncs -Iinc/lua -lpsapi -L. -llua5.1 -static-libgcc -static-libstdc++"
|
buildargs="-Wall -Werror -m32 -shared -Isrc -Iinc/tsfuncs -Iinc/lua -lpsapi -L. -llua5.1 -static-libgcc -static-libstdc++"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
/mingw32/bin/g++ src/bllua4.cpp $buildargs -o BlockLua.dll && /mingw32/bin/g++ -DBLLUA_UNSAFE src/bllua4.cpp $buildargs -o BlockLua-Unsafe.dll
|
g++ src/bllua4.cpp $buildargs -o BlockLua.dll && g++ -DBLLUA_UNSAFE src/bllua4.cpp $buildargs -o BlockLua-Unsafe.dll
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
# objdump -d BlockLua.dll > BlockLua.dll.dump.txt
|
# objdump -d BlockLua.dll > BlockLua.dll.dump.txt
|
||||||
|
|||||||
@@ -653,7 +653,7 @@ function bl.unhook(pkg, name, time)
|
|||||||
if bl._hooks[pkg][name] then
|
if bl._hooks[pkg][name] then
|
||||||
if not time then
|
if not time then
|
||||||
bl._hooks[pkg][name] = nil
|
bl._hooks[pkg][name] = nil
|
||||||
if table.empty(bl._hooks[pkg]) then
|
if table.isempty(bl._hooks[pkg]) then
|
||||||
bl._hooks[pkg] = nil
|
bl._hooks[pkg] = nil
|
||||||
deactivatePackage(pkg)
|
deactivatePackage(pkg)
|
||||||
end
|
end
|
||||||
@@ -663,7 +663,7 @@ function bl.unhook(pkg, name, time)
|
|||||||
error('bl.unhook: argument #3: time must be nil or one of '..
|
error('bl.unhook: argument #3: time must be nil or one of '..
|
||||||
'\'before\' \'after\' \'override\'', 2) end
|
'\'before\' \'after\' \'override\'', 2) end
|
||||||
bl._hooks[pkg][name][time] = nil
|
bl._hooks[pkg][name][time] = nil
|
||||||
if table.empty(bl._hooks[pkg][name]) and table.empty(bl._hooks[pkg]) then
|
if table.isempty(bl._hooks[pkg][name]) and table.empty(bl._hooks[pkg]) then
|
||||||
bl._hooks[pkg] = nil
|
bl._hooks[pkg] = nil
|
||||||
deactivatePackage(pkg)
|
deactivatePackage(pkg)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user