~ubuntu-branches/ubuntu/intrepid/enigma/intrepid

« back to all changes in this revision

Viewing changes to etc/mingw32-dist.sh.in

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# This file creates a w32 binary release
4
 
#
5
 
VERSION=@VERSION@
6
 
DDIR="`pwd`/Enigma-$VERSION"
7
 
SDIR=@top_srcdir@
8
 
BDIR=@top_builddir@
9
 
 
10
 
function cptext {
11
 
    $NLCVT unix2dos $SDIR/$1 >$DDIR/$2
12
 
}
13
 
 
14
 
function cpfile {
15
 
        cp $SDIR/$1 $DDIR/$2
16
 
}
17
 
 
18
 
function cpbuiltfile {
19
 
        cp $BDIR/$1 $DDIR/$2
20
 
}
21
 
 
22
 
#
23
 
# Copy levels
24
 
#
25
 
function copy_levels
26
 
{
27
 
    echo "... copying levels"
28
 
    mkdir $DDIR/data/levels
29
 
    cp -p $SDIR/data/levels/*.{png,txt,lua,xml} $DDIR/data/levels
30
 
    for folder in `(cd $SDIR/data/levels && ls -F)| grep / | grep -v CVS`; do 
31
 
        mkdir $DDIR/data/levels/$folder; 
32
 
        cp -p $SDIR/data/levels/$folder/*.{png,lua,txt} $DDIR/data/levels/$folder
33
 
    done
34
 
}
35
 
 
36
 
function copy_data
37
 
{
38
 
    echo "... copying data files"
39
 
    mkdir $DDIR/data
40
 
    cp -p $SDIR/data/*.lua $DDIR/data/
41
 
    for folder in `(cd $SDIR && ls -F data)| grep / | grep gfx`; do 
42
 
        mkdir $DDIR/data/$folder; 
43
 
        cp -p $SDIR/data/$folder/*.{png,jpg} $DDIR/data/$folder
44
 
    done
45
 
    copy_levels
46
 
    mkdir $DDIR/data/fonts
47
 
    cp -p $SDIR/data/fonts/*.{bmf,png,txt,ttf} $DDIR/data/fonts
48
 
    mkdir $DDIR/data/sound 
49
 
    cp -p $SDIR/data/sound/*.{wav,s3m} $DDIR/data/sound
50
 
    mkdir $DDIR/data/thumbs
51
 
    cp -p $SDIR/data/thumbs/README $DDIR/data/thumbs
52
 
    
53
 
    echo "... copying locales:"
54
 
    mkdir $DDIR/data/locale
55
 
    for lang in @ALL_LINGUAS@; do
56
 
        echo "$lang.gmo"
57
 
        mkdir "$DDIR/data/locale/$lang"
58
 
        mkdir "$DDIR/data/locale/$lang/LC_MESSAGES"
59
 
        cp -p $SDIR/po/$lang.gmo $DDIR/data/locale/$lang/LC_MESSAGES/enigma.mo
60
 
    done
61
 
}
62
 
 
63
 
#
64
 
# Copy documentation files
65
 
#
66
 
function copy_doc
67
 
{
68
 
    echo "... copying documentation"
69
 
    mkdir $DDIR/doc
70
 
    cptext README               README.txt
71
 
    cptext NEWS                 NEWS.txt
72
 
    cptext COPYING              doc/COPYING.txt
73
 
    cptext CHANGES              doc/CHANGES.txt
74
 
    cptext etc/README-SDL.txt   doc/README-SDL.txt
75
 
    cptext doc/ant_lua.txt      doc/ant_lua.txt
76
 
    cptext doc/sounds.txt       doc/sounds.txt
77
 
    cptext doc/objects.txt      doc/objects.txt
78
 
    cptext doc/README.mingw32   doc/README-mingw32.txt
79
 
    cptext doc/sound.lua        doc/sound.lua
80
 
    cpbuiltfile doc/refman/enigma-ref.html doc/
81
 
    cpfile doc/functions.html   doc/
82
 
    cpfile doc/functions.css    doc/
83
 
}
84
 
 
85
 
#
86
 
# Copy user manual
87
 
#
88
 
function copy_manual
89
 
{
90
 
    echo "... copying user manual"
91
 
    mkdir $DDIR/manual $DDIR/manual/images
92
 
    cpfile doc/manual/images/*.png manual/images
93
 
    cpbuiltfile doc/manual/*.html manual
94
 
}
95
 
 
96
 
#
97
 
# Copy windows DLLs
98
 
#
99
 
function copy_dlls
100
 
{
101
 
    echo "... copying DLLs"
102
 
    for f in SDL SDL_image SDL_mixer SDL_ttf jpeg libpng libpng1 zlib zlib-1; do
103
 
        ff="$f.dll"
104
 
        if [ -f $ff ]; then
105
 
            cp $ff $DDIR/
106
 
        else
107
 
            echo "*** DLL missing: $ff ***"
108
 
        fi
109
 
    done
110
 
}
111
 
 
112
 
################
113
 
# Build Enigma #
114
 
################
115
 
(cd .. ; make all) >/dev/null
116
 
 
117
 
echo "----------------------------------------------------------------"
118
 
echo "                 Building Enigma-$VERSION.zip"
119
 
echo "----------------------------------------------------------------"
120
 
 
121
 
###############
122
 
# Find programs
123
 
###############
124
 
 
125
 
UPX=`which upx`
126
 
STRIP=`which i586-mingw32msvc-strip`
127
 
NLCVT="perl $SDIR/etc/nlcvt.pl"
128
 
 
129
 
if [ ! ${UPX} ]; then
130
 
  echo "*** Program not found: upx" 
131
 
  UPX="echo"
132
 
fi
133
 
 
134
 
if [ ! ${STRIP} ]; then
135
 
  echo "*** Program not found: strip"
136
 
  STRIP="echo"
137
 
fi
138
 
 
139
 
###################
140
 
# Copy everything #
141
 
###################
142
 
rm -rf $DDIR
143
 
mkdir $DDIR
144
 
 
145
 
copy_data
146
 
copy_manual
147
 
copy_doc
148
 
 
149
 
cp $BDIR/etc/enigma.nsi $DDIR/enigma.nsi
150
 
cp -p $BDIR/src/enigma.exe $DDIR/enigma.exe
151
 
 
152
 
copy_dlls
153
 
$STRIP "$DDIR/enigma.exe"
154
 
$UPX $DDIR/enigma.exe >/dev/null
155
 
 
156
 
rm -f Enigma-w32-$VERSION.zip
157
 
zip -r Enigma-w32-$VERSION.zip "Enigma-$VERSION" >/dev/null
158
 
rm -rf $DDIR
159
 
 
160
 
echo "----------------------------------------------------------------"
161
 
echo "                           DONE"
162
 
echo "----------------------------------------------------------------"