Skip to content

Commit

Permalink
Complete directory restructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlesplash committed Jan 13, 2016
1 parent b39da6e commit a1c0f3d
Show file tree
Hide file tree
Showing 259 changed files with 24 additions and 1,169 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
generated/
obj*/
objects*/
*.swp

English.pdf
Deutsch.pdf
Español.pdf
Italiano.pdf
dist/BePDF
xpdf/libxpdf.a
388 changes: 0 additions & 388 deletions ChangeLog.md

This file was deleted.

68 changes: 0 additions & 68 deletions HOW_TO_BUILD.md

This file was deleted.

5 changes: 3 additions & 2 deletions bepdf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# specify the name of the binary
NAME= BePDF
TARGET_DIR= ../dist

# specify the type of binary
# APP: Application
Expand Down Expand Up @@ -99,7 +100,7 @@ textencoding \
tracker \
translation \
columnlistview \
../generated/libxpdf.a
../xpdf/libxpdf.a

# specify additional paths to directories following the standard
# libXXX.so or libXXX.a naming scheme. You can specify full paths
Expand Down Expand Up @@ -129,7 +130,7 @@ beos/utils

# specify the level of optimization that you desire
# NONE, SOME, FULL
OPTIMIZE=FULL
OPTIMIZE=SOME

# specify any preprocessor symbols to be defined. The symbols
# will be set to a value of 1. For example specify DEBUG if you want
Expand Down
File renamed without changes
File renamed without changes.
26 changes: 0 additions & 26 deletions bepdf/license/locale DevKit/LICENSE

This file was deleted.

31 changes: 0 additions & 31 deletions bepdf/license/locale DevKit/Open Tracker License

This file was deleted.

45 changes: 0 additions & 45 deletions bepdf/locale/appendMissing.sh

This file was deleted.

24 changes: 0 additions & 24 deletions bepdf/locale/diffCatalogs.sh

This file was deleted.

111 changes: 12 additions & 99 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,103 +1,16 @@
#!/bin/sh
cd $(dirname "$0")

shopt -s extglob

INFO_SHORT="PDF Reader"
INFO_LONG="The PDF Reader for Haiku."

DESTINATION="$(pwd)/generated"

CC_VER=$(gcc -dumpversion | head -c 1)
OBJDIR=objects.x86-gcc$CC_VER-release
echo $OBJDIR

# Setup directories and symbolic links
function setupBinFolder {
arch="$1"
folder="$DESTINATION"

rm -rf "$folder/$arch"
for dir in encodings locale license ; do
mkdir -p "$folder/$arch/$dir"
cp -R "bepdf/$dir" "$folder/$arch/"
done

mkdir -p "$folder/$arch/fonts"
cp -R bepdf/fonts/ "$folder/$arch/"
}

function buildProject {
debug="$1"
shift
folder="$1"
shift

echo "Building files in folder '$folder'..."
current=$(pwd)
cd "$folder"
export DEBUGGER=$debug
make
if [ $? -ne 0 ] ; then
echo "Make failed in folder '$folder'."
exit 1
else
if [ "$folder" == 'xpdf' ] ; then
cp "$OBJDIR/libxpdf.a" "../generated/"
fi
fi
cd "$current"
}

function copyDocs {
arch="$1"

(
mkdir "$DESTINATION/$arch/docs"
cp bepdf/docs/*.pdf "$DESTINATION/$arch/docs/"

cd "$DESTINATION/$arch/docs"
wget http://haikuarchives.github.io/BePDF/English.pdf
wget http://haikuarchives.github.io/BePDF/Deutsch.pdf
wget http://haikuarchives.github.io/BePDF/Español.pdf
wget http://haikuarchives.github.io/BePDF/Italiano.pdf
cd -
)
}

function clean {
rm -rf $DESTINATION/BePDF

rm -rf xpdf/$OBJDIR
rm -rf bepdf/$OBJDIR
}

option="$1"
if [ "$option" == "clean" ] ; then
clean
exit 0
fi

if [ ! -d "$DESTINATION/BePDF" ] ; then
setupBinFolder BePDF
fi

if [ ! -d "$DESTINATION/BePDF/docs" ] ; then
copyDocs BePDF
fi

debug="FALSE"
if [ "$option" == "debug" ] ; then
debug=TRUE
shift
fi

# Build projects
if [ "$option" == "bepdf" ] ; then
buildProject $debug bepdf
else
buildProject $debug xpdf
buildProject $debug bepdf
if [ ! -f "dist/docs/English.pdf" ]; then
cd dist/docs/
wget https://haikuarchives.github.io/BePDF/English.pdf
wget https://haikuarchives.github.io/BePDF/Deutsch.pdf
wget https://haikuarchives.github.io/BePDF/Español.pdf
wget https://haikuarchives.github.io/BePDF/Italiano.pdf
cd ../..
fi

mv bepdf/$OBJDIR/BePDF "$DESTINATION/BePDF/"
cd xpdf
make $@
cd ../bepdf
make $@
cd ..
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a1c0f3d

Please sign in to comment.