summaryrefslogtreecommitdiff
path: root/iup/srcconsole
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/srcconsole
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/srcconsole')
-rwxr-xr-xiup/srcconsole/config.mak155
-rwxr-xr-xiup/srcconsole/console5.lua7
-rwxr-xr-xiup/srcconsole/iup_lua51.c29
-rwxr-xr-xiup/srcconsole/iuplua3.mak90
-rwxr-xr-xiup/srcconsole/iuplua3.rc12
-rwxr-xr-xiup/srcconsole/iuplua5.rc12
-rwxr-xr-xiup/srcconsole/make_uname6
-rwxr-xr-xiup/srcconsole/make_uname.bat32
8 files changed, 32 insertions, 311 deletions
diff --git a/iup/srcconsole/config.mak b/iup/srcconsole/config.mak
deleted file mode 100755
index 568bed6..0000000
--- a/iup/srcconsole/config.mak
+++ /dev/null
@@ -1,155 +0,0 @@
-PROJNAME = iup
-APPNAME = iuplua51
-APPTYPE = CONSOLE
-
-ifdef GTK_DEFAULT
- ifdef USE_MOTIF
- # Build Motif version in Linux,Darwin,FreeBSD
- APPNAME = iuplua51mot
- endif
-else
- ifdef USE_GTK
- # Build GTK version in IRIX,SunOS,AIX,Win32
- APPNAME = iuplua51gtk
- endif
-endif
-
-LOHDIR = loh
-SRCLUA = console5.lua
-SRC = iup_lua51.c
-
-# Disable strip
-STRIP =
-# Optimize
-OPT = YES
-
-# IM and IupPPlot uses C++
-LINKER = $(CPPC)
-
-USE_MOTIF = Yes
-
-ifdef USE_GTK
- APPNAME = iuplua51gtk
-endif
-
-ifdef USE_MOTIF
- APPNAME = iuplua51mot
-endif
-
-DBG = Yes
-
-ifdef DBG
- # Statically link everything only when debugging
- IUP := ..
- USE_IUPLUA = Yes
- USE_IUP3 = Yes
- USE_STATIC = Yes
- USE_LUA51 = Yes
-
- ifdef DBG_DIR
- IUPLIB = $(IUP)/lib/$(TEC_UNAME)d
- CDLIB = $(CD)/lib/$(TEC_UNAME)d
- IMLIB = $(IM)/lib/$(TEC_UNAME)d
- else
- IUPLIB = $(IUP)/lib/$(TEC_UNAME)
- CDLIB = $(CD)/lib/$(TEC_UNAME)
- IMLIB = $(IM)/lib/$(TEC_UNAME)
- endif
-
- DEFINES = USE_STATIC
-
- USE_CDLUA = Yes
- USE_IUPCONTROLS = Yes
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += iuplua_pplot$(LIBLUASUFX) iup_pplot
- else
- SLIB += $(IUPLIB)/libiuplua_pplot$(LIBLUASUFX).a $(IUPLIB)/libiup_pplot.a
- endif
-
- ifndef IUPLUA_NO_IM
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += cdluaim$(LIBLUASUFX)
- else
- SLIB += $(CDLIB)/libcdluaim$(LIBLUASUFX).a
- endif
- endif
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- USE_GDIPLUS=Yes
- else
- # USE_XRENDER=Yes
- endif
-
- USE_IMLUA = Yes
-
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += imlua_process$(LIBLUASUFX) iupluaim$(LIBLUASUFX) im_process iupim
- else
- SLIB += $(IMLIB)/libimlua_process$(LIBLUASUFX).a $(IUPLIB)/libiupluaim$(LIBLUASUFX).a $(IMLIB)/libim_process.a $(IUPLIB)/libiupim.a
- endif
-
-
- IUPLUA_IMGLIB = Yes
- ifdef IUPLUA_IMGLIB
- DEFINES += IUPLUA_IMGLIB
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += iupluaimglib$(LIBLUASUFX) iupimglib
- else
- SLIB += $(IUPLIB)/libiupluaimglib$(LIBLUASUFX).a $(IUPLIB)/libiupimglib.a
- endif
- endif
-else
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- # Dinamically link in Windows, when not debugging
- # Must call "tecmake dll8" so USE_* will use the correct TEC_UNAME
- USE_LUA51 = Yes
- USE_DLL = Yes
- GEN_MANIFEST = No
- else
- # In UNIX Lua is always statically linked, late binding is used.
- # Except in Cygwin and MacOSX
- ifeq ($(findstring cygw, $(TEC_UNAME)), )
- ifeq ($(findstring Darwin, $(TEC_UNAME)), )
- USE_STATIC = Yes
- endif
- endif
- USE_LUA51 = Yes
- endif
-endif
-
-
-ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- SLIB += setargv.obj
- SRC += iuplua5.rc
-endif
-
-ifneq ($(findstring cygw, $(TEC_UNAME)), )
- LIBS += readline history
-endif
-
-ifneq ($(findstring Darwin, $(TEC_UNAME)), )
- LIBS += readline
-endif
-
-ifneq ($(findstring Linux, $(TEC_UNAME)), )
- LIBS += dl
- #To allow late binding
- LFLAGS = -Wl,-E
- LIBS += readline history curses ncurses
-endif
-
-ifneq ($(findstring BSD, $(TEC_UNAME)), )
- #To allow late binding
- LFLAGS = -Wl,-E
- LIBS += readline history curses ncurses
-endif
-
-ifneq ($(findstring SunOS, $(TEC_UNAME)), )
- LIBS += dl
-endif
-
-ifneq ($(findstring AIX, $(TEC_UNAME)), )
- FLAGS += -mminimal-toc
- OPTFLAGS = -mminimal-toc -ansi -pedantic
- LFLAGS = -Xlinker "-bbigtoc"
-endif
-
diff --git a/iup/srcconsole/console5.lua b/iup/srcconsole/console5.lua
index 0b93641..8373500 100755
--- a/iup/srcconsole/console5.lua
+++ b/iup/srcconsole/console5.lua
@@ -22,6 +22,9 @@ function iup_console.print_version_info()
local mot = iup.GetGlobal("MOTIFVERSION")
if (mot) then str = iup_console.concat(str, " Motif Version: ", mot) end
+
+ local gtk = iup.GetGlobal("GTKVERSION")
+ if (gtk) then str = iup_console.concat(str, " GTK Version: ", gtk) end
str = iup_console.concat(str, " Screen Size: " .. iup.GetGlobal("SCREENSIZE"))
str = iup_console.concat(str, " Screen Depth: " .. iup.GetGlobal("SCREENDEPTH"))
@@ -36,7 +39,7 @@ end
-- Console Dialog
iup_console.lastfilename = nil -- Last file open
-iup_console.mlCode = iup.multiline{expand="YES", size="200x120", font="COURIER_NORMAL_10"}
+iup_console.mlCode = iup.multiline{expand="YES", size="200x120", font="Courier, 10"}
iup_console.lblPosition = iup.label{title="0:0", size="50x"}
iup_console.lblFileName = iup.label{title="", size="50x", expand="HORIZONTAL"}
@@ -207,7 +210,7 @@ iup_console.dlgAbout = iup.dialog
iup_console.dlgMain:show()
iup.SetFocus(iup_console.mlCode)
-if (not iup.MainLoopLevel or iup.MainLoopLevel()==0) then
+if (iup.MainLoopLevel()==0) then
iup.MainLoop()
end
diff --git a/iup/srcconsole/iup_lua51.c b/iup/srcconsole/iup_lua51.c
index ed73ac0..c657363 100755
--- a/iup/srcconsole/iup_lua51.c
+++ b/iup/srcconsole/iup_lua51.c
@@ -113,7 +113,7 @@ static int report (lua_State *L, int status) {
static int traceback (lua_State *L) {
if (!lua_isstring(L, 1)) /* 'message' not a string? */
return 1; /* keep it intact */
- lua_getfield(L, LUA_GLOBALSINDEX, "debug");
+ lua_getglobal(L, "debug");
if (!lua_istable(L, -1)) {
lua_pop(L, 1);
return 1;
@@ -189,7 +189,7 @@ static int dolibrary (lua_State *L, const char *name) {
static const char *get_prompt (lua_State *L, int firstline) {
const char *p;
- lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2");
+ lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2");
p = lua_tostring(L, -1);
if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
lua_pop(L, 1); /* remove global */
@@ -410,24 +410,17 @@ static void iuplua_openlibs (lua_State *L) {
#endif
}
-static void iuplua_input (lua_State *L) {
-#ifdef TEC_BIGENDIAN
-#ifdef TEC_64
-#include "loh/console5_be64.loh"
+static void iuplua_input (lua_State *L)
+{
+#ifdef IUPLUA_USELOH
+#include "console5.loh"
#else
-#include "loh/console5_be32.loh"
-#endif
+#ifdef IUPLUA_USELZH
+#include "console5.lzh"
#else
-#ifdef TEC_64
-#ifdef WIN64
-#include "loh/console5_le64w.loh"
-#else
-#include "loh/console5_le64.loh"
-#endif
-#else
-#include "loh/console5.loh"
-#endif
-#endif
+ luaL_dofile(L, "console5.lua");
+#endif
+#endif
}
/******************* IUP *********************/
diff --git a/iup/srcconsole/iuplua3.mak b/iup/srcconsole/iuplua3.mak
deleted file mode 100755
index e892496..0000000
--- a/iup/srcconsole/iuplua3.mak
+++ /dev/null
@@ -1,90 +0,0 @@
-PROJNAME = iup
-APPNAME = iuplua3
-APPTYPE = console
-OPT = YES
-
-IUP := ..
-
-# IM is a C++ library with a C API
-LINKER = $(CPPC)
-
-SRC = iup_lua3.c
-SRCLUA = console3.lua
-LOHDIR = loh
-
-USE_LUA = Yes
-USE_IUPLUA = Yes
-USE_IUP3 = Yes
-
-USE_STATIC = Yes
-
-ifdef BUILD_64
- ifneq ($(findstring SunOS, $(TEC_UNAME)), )
- LINKER = cc
- IUPLUA_NO_IM = Yes
- endif
- ifneq ($(findstring AIX, $(TEC_UNAME)), )
- LINKER = cc
- IUPLUA_NO_IM = Yes
- endif
-endif
-
-ifeq "$(TEC_UNAME)" "SunOS510x86"
- IUPLUA_NO_GL = Yes
-endif
-
-#IUPLUA_NO_GL = Yes
-ifndef IUPLUA_NO_GL
- USE_OPENGL = Yes
-else
- DEFINES = IUPLUA_NO_GL
-endif
-
-#IUPLUA_NO_CD = Yes
-ifndef IUPLUA_NO_CD
- USE_CD = Yes
- USE_CDLUA = Yes
- USE_IUPCONTROLS = Yes
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += iup_pplot iuplua_pplot3
- else
- IUPLIB = $(IUP)/lib/$(TEC_UNAME)
- SLIB += $(IUPLIB)/libiuplua_pplot3.a $(IUPLIB)/libiup_pplot.a
- endif
-else
- DEFINES += IUPLUA_NO_CD
-endif
-
-#IUPLUA_NO_IM = Yes
-ifndef IUPLUA_NO_IM
- USE_IM = Yes
- USE_IMLUA = Yes
-
- ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- LIBS += iupim iupluaim3
- else
- IUPLIB = $(IUP)/lib/$(TEC_UNAME)
- SLIB += $(IUPLIB)/libiupluaim3.a $(IUPLIB)/libiupim.a
- endif
-else
- DEFINES += IUPLUA_NO_IM
-endif
-
-ifneq ($(findstring AIX, $(TEC_UNAME)), )
- FLAGS += -mminimal-toc
- OPTFLAGS = -mminimal-toc -ansi -pedantic
- LFLAGS = -Xlinker "-bbigtoc"
-endif
-
-ifneq ($(findstring Win, $(TEC_SYSNAME)), )
- SRC += iuplua3.rc
-endif
-
-ifeq ($(TEC_UNAME), vc8)
- ifdef DBG
- #debug info not working for vc8 linker
- define DBG
- endef
- endif
-endif
-
diff --git a/iup/srcconsole/iuplua3.rc b/iup/srcconsole/iuplua3.rc
index 9fcc280..67676d0 100755
--- a/iup/srcconsole/iuplua3.rc
+++ b/iup/srcconsole/iuplua3.rc
@@ -2,8 +2,8 @@
TECGRAF_ICON ICON "..\\etc\\tecgraf.ico"
1 VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
@@ -12,11 +12,11 @@ BEGIN
VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0"
VALUE "CompanyName", "Tecgraf/PUC-Rio\0"
VALUE "FileDescription", "Lua Windows Standalone Interpreter with IUP\0"
- VALUE "FileVersion", "3.0.0\0"
+ VALUE "FileVersion", "3.1.0\0"
VALUE "LegalCopyright", "Copyright © 1994-2010 Tecgraf, PUC-Rio.\0"
VALUE "OriginalFilename", "iuplua51.exe\0"
VALUE "ProductName", "IUP for Windows\0"
- VALUE "ProductVersion", "3.0.0\0"
+ VALUE "ProductVersion", "3.1.0\0"
END
END
END
@@ -42,4 +42,8 @@ BEGIN
END
/* The following line enable Windows XP Visual Styles */
+#ifdef TEC_64
+1 24 "..\\etc\\iup64.manifest"
+#else
1 24 "..\\etc\\iup.manifest"
+#endif
diff --git a/iup/srcconsole/iuplua5.rc b/iup/srcconsole/iuplua5.rc
index 70e40a4..22e81f7 100755
--- a/iup/srcconsole/iuplua5.rc
+++ b/iup/srcconsole/iuplua5.rc
@@ -2,8 +2,8 @@
TECGRAF_ICON ICON "..\\etc\\tecgraf.ico"
1 VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
@@ -12,11 +12,11 @@ BEGIN
VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0"
VALUE "CompanyName", "Tecgraf/PUC-Rio\0"
VALUE "FileDescription", "Lua Windows Standalone Interpreter with IUP\0"
- VALUE "FileVersion", "3.0.0\0"
+ VALUE "FileVersion", "3.1.0\0"
VALUE "LegalCopyright", "Copyright © 1994-2010 Tecgraf, PUC-Rio.\0"
VALUE "OriginalFilename", "iuplua51.exe\0"
VALUE "ProductName", "IUP for Windows\0"
- VALUE "ProductVersion", "3.0.0\0"
+ VALUE "ProductVersion", "3.1.0\0"
END
END
END
@@ -55,5 +55,9 @@ END
1 24 "wlua_dll9_x86.manifest"
#endif
#else
+#ifdef TEC_64
+1 24 "..\\etc\\iup64.manifest"
+#else
1 24 "..\\etc\\iup.manifest"
#endif
+#endif
diff --git a/iup/srcconsole/make_uname b/iup/srcconsole/make_uname
deleted file mode 100755
index 6263490..0000000
--- a/iup/srcconsole/make_uname
+++ /dev/null
@@ -1,6 +0,0 @@
-#This builds all the libraries of the folder for 1 uname
-
-tecmake relink $1 $2 $3 $4 $5 $6 $7 $8
-#tecmake USE_GTK=Yes relink $1 $2 $3 $4 $5 $6 $7 $8
-#tecmake USE_MOTIF=Yes relink $1 $2 $3 $4 $5 $6 $7 $8
-#tecmake MF=iuplua3 relink $1 $2 $3 $4 $5 $6 $7 $8
diff --git a/iup/srcconsole/make_uname.bat b/iup/srcconsole/make_uname.bat
deleted file mode 100755
index a0db110..0000000
--- a/iup/srcconsole/make_uname.bat
+++ /dev/null
@@ -1,32 +0,0 @@
-@echo off
-
-if "%1"=="" goto iupexe32
-if "%1"=="vc8" goto iupexe32
-if "%1"=="vc8_64" goto iupexe64
-if "%1"=="all" goto iupexe
-goto end
-
-REM Must use dll8 so USE_* will use the correct TEC_UNAME
-
-:iupexe32
-call tecmake dll8 relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7
-goto end
-
-:iupexe64
-call tecmake dll8_64 relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8_64 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8_64 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7
-goto end
-
-:iupexe
-call tecmake dll8 relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7
-call tecmake dll8_64 relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8_64 USE_GTK=Yes relink %2 %3 %4 %5 %6 %7
-REM call tecmake vc8_64 "MF=iuplua3" relink %2 %3 %4 %5 %6 %7
-goto end
-
-:end