-
Notifications
You must be signed in to change notification settings - Fork 24
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
1 parent
b39da6e
commit a1c0f3d
Showing
259 changed files
with
24 additions
and
1,169 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,3 +1,10 @@ | ||
generated/ | ||
obj*/ | ||
objects*/ | ||
*.swp | ||
|
||
English.pdf | ||
Deutsch.pdf | ||
Español.pdf | ||
Italiano.pdf | ||
dist/BePDF | ||
xpdf/libxpdf.a |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,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.
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.
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.
Oops, something went wrong.