-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sam Lantinga
committed
Sep 11, 1999
1 parent
4909728
commit 0f7a2a5
Showing
11 changed files
with
240 additions
and
11 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 |
---|---|---|
@@ -1,16 +1,38 @@ | ||
|
||
arch := $(shell ./print_arch) | ||
libc := $(shell ./print_libc) | ||
|
||
CC = gcc | ||
X11DIR = /usr/X11R6 | ||
CFLAGS = -g -I/usr/lib/glib/include -I$(X11DIR)/include | ||
OBJS = main.o console_ui.o install.o detect.o copy.o file.o log.o install_log.o gtk_ui.o | ||
LIBS = -lxml -lz -lgtk -lgdk -L$(X11DIR)/lib -lX11 | ||
|
||
all: testxml setup | ||
OPTIMIZE = -g -O2 -funroll-loops | ||
HEADERS = -I/usr/lib/glib/include -I/usr/X11R6/include | ||
OPTIONS = -DSTUB_UI | ||
CFLAGS += $(OPTIMIZE) $(HEADERS) $(OPTIONS) | ||
|
||
OBJS = main.o install.o detect.o copy.o file.o log.o install_log.o | ||
CONSOLE_OBJS = $(OBJS) console_ui.o | ||
GUI_OBJS = $(OBJS) gtk_ui.o | ||
|
||
LIBS = -Wl,-Bstatic -lxml -lz | ||
CONSOLE_LIBS = $(LIBS) | ||
GUI_LIBS = $(LIBS) -Wl,-Bdynamic -lgtk -lgdk | ||
|
||
all: setup setup.gtk | ||
|
||
testxml: testxml.o | ||
$(CC) -o $@ $^ $(LIBS) | ||
|
||
setup: $(OBJS) | ||
$(CC) -o $@ $^ $(LIBS) | ||
setup: $(CONSOLE_OBJS) | ||
$(CC) -o $@ $^ $(CONSOLE_LIBS) -static | ||
|
||
setup.gtk: $(GUI_OBJS) | ||
$(CC) -o $@ $^ $(GUI_LIBS) | ||
|
||
install: all | ||
strip setup | ||
cp -v setup image/setup.data/bin/$(arch) | ||
strip setup.gtk | ||
cp -v setup.gtk image/setup.data/bin/$(arch)/$(libc) | ||
|
||
clean: | ||
rm -f setup testxml foo.xml *.o | ||
rm -f setup setup.gtk testxml foo.xml *.o |
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,11 @@ | ||
/* Simple AUTORUN.EXE file to display a README file */ | ||
|
||
#include <windows.h> | ||
|
||
/* This is where execution begins [windowed apps] */ | ||
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) | ||
{ | ||
ShellExecute(GetDesktopWindow(), "open", "win32\\README.htm", | ||
NULL, NULL, SW_SHOWNORMAL); | ||
return(TRUE); | ||
} |
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,3 @@ | ||
[autorun] | ||
open = win32\autorun.exe | ||
icon = icon.bmp |
File renamed without changes.
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,104 @@ | ||
#!/bin/sh | ||
# | ||
# Product setup script - Loki Entertainment Software | ||
|
||
# Go to the proper setup directory (if not already there) | ||
cd `dirname $0` | ||
|
||
# Return the appropriate architecture string | ||
function DetectARCH { | ||
status=1 | ||
case `uname -m` in | ||
i?86) echo "x86" | ||
status=0;; | ||
ppc) echo "ppc" | ||
status=0;; | ||
alpha) echo "alpha" | ||
status=0;; | ||
*) echo "unknown";; | ||
esac | ||
return $status | ||
} | ||
|
||
# Return the appropriate version string | ||
function DetectLIBC { | ||
status=1 | ||
if [ -f /lib/libc.so.6 ]; then | ||
if fgrep GLIBC_2.1 /lib/libc.so.6 2>&1 >/dev/null; then | ||
echo "glibc-2.1" | ||
status=0 | ||
else | ||
echo "glibc-2.0" | ||
status=0 | ||
fi | ||
elif [ -f /lib/libc.so.5 ]; then | ||
echo "libc5" | ||
status=0 | ||
else | ||
echo "unknown" | ||
fi | ||
return $status | ||
} | ||
|
||
# Detect the Linux environment | ||
arch=`DetectARCH` | ||
libc=`DetectLIBC` | ||
|
||
# Find the installation program | ||
function try_run | ||
{ | ||
setup=$1 | ||
shift | ||
fatal=$1 | ||
if [ "$1" != "" ]; then | ||
shift | ||
fi | ||
|
||
# First find the binary we want to run | ||
failed=0 | ||
setup_bin="setup.data/bin/$arch/$libc/$setup" | ||
if [ ! -f "$setup_bin" ]; then | ||
setup_bin="setup.data/bin/$arch/$setup" | ||
if [ ! -f "$setup_bin" ]; then | ||
failed=1 | ||
fi | ||
fi | ||
if [ "$failed" -eq 1 ]; then | ||
if [ "$fatal" != "" ]; then | ||
cat <<__EOF__ | ||
This installation doesn't support $libc on $arch | ||
Please contact Loki Technical Support at [email protected] | ||
__EOF__ | ||
exit 1 | ||
fi | ||
return $failed | ||
fi | ||
|
||
# Try to run the binary | ||
# The executable is here but we can't execute it from CD | ||
setup="$HOME/.setup$$" | ||
cp "$setup_bin" "$setup" | ||
chmod 700 "$setup" | ||
if [ "$fatal" != "" ]; then | ||
"$setup" $* | ||
failed=$? | ||
else | ||
"$setup" $* 2>/dev/null | ||
failed=$? | ||
fi | ||
rm -f "$setup" | ||
return $failed | ||
} | ||
|
||
|
||
# Try to run the setup program | ||
status=0 | ||
rm -f "$setup" | ||
if ! try_run setup.gtk && ! try_run setup -fatal; then | ||
echo "The setup program seems to have failed on $arch/$libc" | ||
echo | ||
echo "Please contact Loki Technical Support at [email protected]" | ||
status=1 | ||
fi | ||
exit $status |
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,33 @@ | ||
<HTML> | ||
<HEAD> | ||
<TITLE>Welcome to Linux!</TITLE> | ||
</HEAD> | ||
|
||
<BODY BGCOLOR="#FFFFFF" LINK="#FF0000"> | ||
<H1>Welcome To Linux!</H1> | ||
|
||
<P> | ||
You have just bought a game that was specially written for Linux, a free | ||
operating system written by thousands of people all over the world. | ||
</P> | ||
|
||
<P> | ||
If you already have Linux installed, please reboot into it, mount your | ||
CD-ROM with the <EM>mount</EM> command (e.g. <B>mount /mnt/cdrom</B>) | ||
and then read the README file for instructions on installing this game. | ||
</P> | ||
|
||
<P> | ||
If you don't yet have Linux, you can buy it from your favorite software reseller or download it for | ||
free. You can find out more about Linux and where you can download it at | ||
<A HREF="http://www.linux.org/">http://www.linux.org/</A>. | ||
</P> | ||
|
||
<P> | ||
Thank you for supporting Linux, games, and free software! | ||
</P> | ||
- <A HREF="http://www.lokigames.com/">Loki Entertainment Software</A> | ||
|
||
</BODY> | ||
</HTML> | ||
|
Binary file not shown.
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,19 @@ | ||
#!/bin/sh | ||
|
||
# Return the appropriate architecture string | ||
function DetectARCH { | ||
status=1 | ||
case `uname -m` in | ||
i?86) echo "x86" | ||
status=0;; | ||
ppc) echo "ppc" | ||
status=0;; | ||
alpha) echo "alpha" | ||
status=0;; | ||
*) echo "unknown";; | ||
esac | ||
return $status | ||
} | ||
|
||
# Detect the Linux environment | ||
DetectARCH |
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,24 @@ | ||
#!/bin/sh | ||
|
||
# Return the appropriate version string | ||
function DetectLIBC { | ||
status=1 | ||
if [ -f /lib/libc.so.6 ]; then | ||
if fgrep GLIBC_2.1 /lib/libc.so.6 2>&1 >/dev/null; then | ||
echo "glibc-2.1" | ||
status=0 | ||
else | ||
echo "glibc-2.0" | ||
status=0 | ||
fi | ||
elif [ -f /lib/libc.so.5 ]; then | ||
echo "libc5" | ||
status=0 | ||
else | ||
echo "unknown" | ||
fi | ||
return $status | ||
} | ||
|
||
# Detect the Linux environment | ||
DetectLIBC |