summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_lua_module11
-rw-r--r--install52
-rw-r--r--install_dev54
-rw-r--r--tec_uname137
4 files changed, 168 insertions, 86 deletions
diff --git a/config_lua_module b/config_lua_module
index 4ce4220..d95e2f3 100644
--- a/config_lua_module
+++ b/config_lua_module
@@ -2,9 +2,10 @@
echo ' '
echo ' This script will configure the Tecgraf libraries in the system'
-echo ' to be used from Lua. It was tested only in Ubuntu.'
+echo ' to be used from Lua. It was tested only in Ubuntu and in Fedora.'
echo ' '
-echo ' The Run Time libraries must be already installed on the system.'
+echo ' The Run Time libraries must be already installed on the system (see the install script).'
+echo ' It assumes that Lua binaries are installed using system packages.'
echo ' '
echo ' Must be run with "sudo", or install will fail,'
echo ' for example:'
@@ -14,7 +15,11 @@ echo -n Press Enter to continue or Ctrl+C to abort...
read contscr
echo ' '
-SYSTEM_LIB=/usr/lib
+if [ -d /usr/lib64 ]; then
+ SYSTEM_LIB=/usr/lib64
+else
+ SYSTEM_LIB=/usr/lib
+fi
LUA_LIB=$SYSTEM_LIB/lua/5.1
Make_Lua_Link()
diff --git a/install b/install
index cf96c93..1c1e4bc 100644
--- a/install
+++ b/install
@@ -1,16 +1,24 @@
#!/bin/bash
+# Include TEC_UNAME definitions
+source tec_uname
+
+# System paths
+if [ -d /usr/lib64 ]; then
+ SYSTEM_LIB=/usr/lib64
+else
+ SYSTEM_LIB=/usr/lib
+fi
+
echo ' '
echo ' This script will install the >>Run Time<< libraries in the system'
echo ' from the build directories or from the unpacked download.'
-echo ' It was tested only in Ubuntu.'
+echo ' It was tested in Ubuntu and in Fedora.'
echo ' '
echo ' Must be run with "sudo" at the library folder, or install will fail:'
echo ' sudo ./install'
echo ' '
-SYSTEM_LIB=/usr/lib
-
EchoDownloadTip()
{
echo ' The downloaded package must already be unpacked in the current directory.'
@@ -22,44 +30,6 @@ EchoDownloadTip()
echo ' '
}
-Pause()
-{
- echo -n Press Enter to continue or Ctrl+C to abort...
- read contscr
- echo ' '
-}
-
-ComputeTecUname()
-{
- TEC_SYSNAME=`uname -s`
- TEC_SYSVERSION=`uname -r|cut -f1 -d.`
- TEC_SYSMINOR=`uname -r|cut -f2 -d.`
- TEC_SYSARCH=`uname -m`
-
- TEC_UNAME=$TEC_SYSNAME$TEC_SYSVERSION$TEC_SYSMINOR
-
- # Linux 2.4 and GCC 3.x
- if [ $TEC_UNAME == Linux24 ]; then
- GCCVER=`gcc -dumpversion|cut -f1 -d.`
- if [ $GCCVER == 3 ]; then
- TEC_UNAME=$TEC_UNAME'g3'
- fi
- fi
-
- # Linux 2.6 and GCC 4.x
- if [ $TEC_UNAME == Linux26 ]; then
- GCCVER=`gcc -dumpversion|cut -f1 -d.`
- if [ $GCCVER == 4 ]; then
- TEC_UNAME=$TEC_UNAME'g4'
- fi
- fi
-
- # 64-bits Linux
- if [ $TEC_SYSARCH == x64 ]; then
- TEC_UNAME=$TEC_UNAME'_64'
- fi
-}
-
Copy_RunTime_Extra_CD()
{
# Do NOT overwrite for FreeType
diff --git a/install_dev b/install_dev
index 859229c..db1938c 100644
--- a/install_dev
+++ b/install_dev
@@ -1,17 +1,25 @@
#!/bin/bash
+# Include TEC_UNAME definitions
+source tec_uname
+
+# System paths
+if [ -d /usr/lib64 ]; then
+ SYSTEM_LIB=/usr/lib64
+else
+ SYSTEM_LIB=/usr/lib
+fi
+SYSTEM_INC=/usr/include
+
echo ' '
echo ' This script will install the >>Development<< files in the system'
echo ' from the build directories or from the unpacked download.'
-echo ' It was tested only in Ubuntu.'
+echo ' It was tested in Ubuntu and in Fedora.'
echo ' '
echo ' Must be run with "sudo" at the library folder, or install will fail:'
echo ' sudo ./install_dev'
echo ' '
-SYSTEM_LIB=/usr/lib
-SYSTEM_INC=/usr/include
-
EchoDownloadTip()
{
echo ' The downloaded package must already be unpacked in the current directory.'
@@ -23,44 +31,6 @@ EchoDownloadTip()
echo ' '
}
-Pause()
-{
- echo -n Press Enter to continue or Ctrl+C to abort...
- read contscr
- echo ' '
-}
-
-ComputeTecUname()
-{
- TEC_SYSNAME=`uname -s`
- TEC_SYSVERSION=`uname -r|cut -f1 -d.`
- TEC_SYSMINOR=`uname -r|cut -f2 -d.`
- TEC_SYSARCH=`uname -m`
-
- TEC_UNAME=$TEC_SYSNAME$TEC_SYSVERSION$TEC_SYSMINOR
-
- # Linux 2.4 and GCC 3.x
- if [ $TEC_UNAME == Linux24 ]; then
- GCCVER=`gcc -dumpversion|cut -f1 -d.`
- if [ $GCCVER == 3 ]; then
- TEC_UNAME=$TEC_UNAME'g3'
- fi
- fi
-
- # Linux 2.6 and GCC 4.x
- if [ $TEC_UNAME == Linux26 ]; then
- GCCVER=`gcc -dumpversion|cut -f1 -d.`
- if [ $GCCVER == 4 ]; then
- TEC_UNAME=$TEC_UNAME'g4'
- fi
- fi
-
- # 64-bits Linux
- if [ $TEC_SYSARCH == x64 ]; then
- TEC_UNAME=$TEC_UNAME'_64'
- fi
-}
-
Copy_Dev_Extra_CD()
{
# Do NOT overwrite for FreeType
diff --git a/tec_uname b/tec_uname
new file mode 100644
index 0000000..acf22b0
--- /dev/null
+++ b/tec_uname
@@ -0,0 +1,137 @@
+#!/bin/bash
+
+Pause()
+{
+ echo -n Press Enter to continue or Ctrl+C to abort...
+ read contscr
+ echo ' '
+}
+
+ComputeTecUname()
+{
+ # Base Defintions
+ TEC_SYSNAME=`uname -s`
+ TEC_SYSVERSION=`uname -r|cut -f1 -d.`
+ TEC_SYSMINOR=`uname -r|cut -f2 -d.`
+ TEC_SYSARCH=`uname -m`
+
+ # Fixes
+ if [ $TEC_SYSNAME == SunOS ]; then
+ TEC_SYSARCH=`uname -p`
+ fi
+ if [ $TEC_SYSNAME == IRIX ]; then
+ TEC_SYSARCH=`uname -p`
+ fi
+ if [ $TEC_SYSNAME == FreeBSD ]; then
+ TEC_SYSMINOR=`uname -r|cut -f2 -d.|cut -f1 -d-`
+ fi
+ if [ $TEC_SYSNAME == AIX ]; then
+ TEC_SYSVERSION=`uname -v`
+ TEC_SYSMINOR=`uname -r`
+ TEC_SYSARCH=ppc
+ fi
+ if [ $TEC_SYSNAME == Darwin ]; then
+ TEC_SYSNAME=MacOS
+ TEC_SYSVERSION=`sw_vers -productVersion|cut -f1 -d.`
+ TEC_SYSMINOR=`sw_vers -productVersion|cut -f2 -d.`
+ TEC_SYSARCH=`uname -p`
+ fi
+
+ if [ $TEC_SYSARCH == i686 ]; then
+ TEC_SYSARCH=x86
+ fi
+ if [ $TEC_SYSARCH == i386 ]; then
+ TEC_SYSARCH=x86
+ fi
+ if [ $TEC_SYSARCH == powerpc ]; then
+ TEC_SYSARCH=ppc
+ fi
+ if [ $TEC_SYSARCH == x86_64 ]; then
+ TEC_SYSARCH=x64
+ fi
+ if [ $TEC_SYSARCH == amd64 ]; then
+ TEC_SYSARCH=x64
+ fi
+
+ # Compose
+ TEC_UNAME=$TEC_SYSNAME$TEC_SYSVERSION$TEC_SYSMINOR
+
+ # Cygwin
+ CYGW=`uname -s|cut -f1 -d-`
+ if [ $CYGW == CYGWIN_NT ]; then
+ TEC_SYSNAME=CYGWIN
+ TEC_UNAME='cygw'$TEC_SYSVERSION$TEC_SYSMINOR
+ fi
+
+ # Linux 2.4 and GCC 3.x
+ if [ $TEC_UNAME == Linux24 ]; then
+ GCCVER=`gcc -dumpversion|cut -f1 -d.`
+ if [ $GCCVER == 3 ]; then
+ TEC_UNAME=$TEC_UNAME'g3'
+ fi
+ fi
+
+ # Linux 2.6 and GCC 4.x
+ if [ $TEC_UNAME == Linux26 ]; then
+ GCCVER=`gcc -dumpversion|cut -f1 -d.`
+ if [ $GCCVER == 4 ]; then
+ TEC_UNAME=$TEC_UNAME'g4'
+ fi
+ fi
+
+ # Linux and PowerPC
+ if [ $TEC_SYSNAME == Linux ]; then
+ if [ $TEC_SYSARCH == ppc ]; then
+ TEC_UNAME=$TEC_UNAME'ppc'
+ fi
+ fi
+
+ # 64-bits Linux
+ if [ $TEC_SYSNAME == Linux ]; then
+ if [ $TEC_SYSARCH == x64 ]; then
+ BUILD_64=Yes
+ TEC_UNAME=$TEC_UNAME'_64'
+ fi
+
+ if [ $TEC_SYSARCH == ia64 ]; then
+ BUILD_64=Yes
+ TEC_UNAME=$TEC_UNAME'_ia64'
+ fi
+ fi
+
+ # 64-bits FreeBSD
+ if [ $TEC_SYSNAME == FreeBSD ]; then
+ if [ $TEC_SYSARCH == x64 ]; then
+ BUILD_64=Yes
+ TEC_UNAME=$TEC_UNAME'_64'
+ fi
+ fi
+
+ # Solaris and Intel
+ if [ $TEC_SYSNAME == SunOS ]; then
+ if [ $TEC_SYSARCH == x86 ]; then
+ TEC_UNAME=$TEC_UNAME'x86'
+ fi
+ fi
+
+ # MacOS and Intel
+ if [ $TEC_SYSNAME == MacOS ]; then
+ if [ $TEC_SYSMINOR == 6 ]; then
+ TEC_SYSARCH=x64
+ else
+ if [ $TEC_SYSARCH == x86 ]; then
+ TEC_UNAME=$TEC_UNAME'x86'
+ fi
+ fi
+ fi
+
+ TU_DEBUG=1
+ if [ $TU_DEBUG == 1 ]; then
+ echo ' '
+ echo ' Info:'
+ echo 'TEC_SYSNAME='$TEC_SYSNAME
+ echo 'TEC_SYSVERSION='$TEC_SYSVERSION
+ echo 'TEC_SYSMINOR='$TEC_SYSMINOR
+ echo 'TEC_SYSARCH='$TEC_SYSARCH
+ fi
+}