~drgeo-developers/drgeo/trunk

« back to all changes in this revision

Viewing changes to build/makeDrGeo.sh

  • Committer: Hilaire Fernandes
  • Date: 2022-08-16 20:20:24 UTC
  • Revision ID: hilaire.fernandes@gmail.com-20220816202024-9trlk02ioq73bo3z
WIP bundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
24
24
smalltalkImage="Cuis6.0-5399"
25
25
smalltalkSources="CuisV6.sources"
26
 
vmExec="`pwd`/vm/gnulinux/DrGeo/Contents/squeak"
 
26
vmExec="`pwd`/vm/gnulinux/DrGeo/VM/squeak"
27
27
installScript="$src/install-drgeo-workstation.st"
28
28
 
29
29
 
46
46
    bundlePath="$installationPath/$1"
47
47
    if [[ "$1" == "gnulinux" || "$1" == "windows" ]]
48
48
    then
49
 
        bundle="$bundlePath/DrGeo"
 
49
        bundleApp="$bundlePath/DrGeo"
50
50
    else
51
 
        bundle="$bundlePath/DrGeo.app"
 
51
        bundleApp="$bundlePath/DrGeo.app"
52
52
    fi
 
53
    bundleResources="$bundleApp/Resources"
53
54
    bundleTemplate="`pwd`/vm/$1"
54
55
    
55
56
    rm -rf $bundlePath
56
57
    # install template
57
58
    rsync -a --exclude '.bzr' --exclude '*~' $bundleTemplate $installationPath
58
 
    cp $resources/doc/ChangeLog $bundle
 
59
    cp $resources/doc/ChangeLog $bundleApp
59
60
    # install Example files
60
 
    rsync -a --exclude '.bzr' "$resources/examples" $bundle
61
 
    rsync -a --exclude '.bzr' "$resources/examplesKids/"* $bundle/examples
 
61
    rsync -a --exclude '.bzr' "$resources/examples" $bundleResources
 
62
    rsync -a --exclude '.bzr' "$resources/examplesKids/"* $bundleResources/examples
62
63
    # install Smalltalk sketches files
63
 
    rsync -a --exclude '.bzr' "$resources/SmalltalkSketches" $bundle
 
64
    rsync -a --exclude '.bzr' "$resources/SmalltalkSketches" $bundleResources
64
65
    # user sketches and exports folder, splash
65
 
    mkdir $bundle/MySketches
66
 
    mkdir $bundle/MyExports
67
 
    mkdir $bundle/MyShares
68
 
    mkdir $bundle/MyScripts
69
 
    rsync -a $resources/graphics/splash.bmp $bundle
 
66
    mkdir $bundleResources/MySketches
 
67
    mkdir $bundleResources/MyExports
 
68
    mkdir $bundleResources/MyScripts
 
69
    rsync -a $resources/graphics/splash.bmp $bundleResources/icons
70
70
    # install Smalltalk Image
71
 
    rsync -a $buildPath/drgeo.image $bundle/Contents/Resources
72
 
    rsync -a $buildPath/drgeo.changes $bundle/Contents/Resources
 
71
    rsync -a $buildPath/drgeo.{image,changes} $bundleResources/image
73
72
    # install Smalltalk Source
74
 
    rsync -a $buildPath/$smalltalkSources $bundle/Contents/Resources
 
73
    rsync -a $buildPath/$smalltalkSources $bundleResources/image
75
74
    # install fonts
76
 
    rsync -a $resources/fonts/*.tt? $bundle/Contents/Resources
 
75
    rsync -a $resources/fonts/*.tt? $bundleResources/fonts
77
76
    # install the locales
78
 
    rsync -a ../i18n/locale $bundle/Contents/Resources
 
77
    rsync -a ../i18n/locale $bundleResources/image
79
78
    # install doc
80
 
    mkdir $bundle/doc
81
 
    cp $resources/doc/README.*.txt $resources/doc/README.txt $bundle/doc
82
 
    mkdir $bundle/doc/userGuide
83
 
    cp $resources/doc/userGuide/fr/drgeoText/*.txt $bundle/doc/userGuide
 
79
    mkdir $bundleResources/doc
 
80
    cp $resources/doc/README.*.txt $resources/doc/README.txt $bundleResources/doc
 
81
    mkdir $bundleResources/doc/userGuide
 
82
    cp $resources/doc/userGuide/fr/drgeoText/*.txt $bundleResources/doc/userGuide
84
83
    
85
84
    # set exec flag
86
85
    if [[ "$1" == "gnulinux" ]]
87
86
    then
88
 
        chmod +x $bundle/DrGeo.sh
89
 
        chmod +x $bundle/Contents/squeak
 
87
        chmod +x $bundleApp/DrGeo.sh
 
88
        chmod +x $bundleApp/VM/squeak
90
89
    elif [[ "$1" == "mac" ]]
91
90
    then
92
 
        chmod +x $bundle/Contents/MacOS/squeak
 
91
        chmod +x $bundleApp/Contents/MacOS/squeak
93
92
    fi
94
93
 
95
94
    # Create an archive out of the bundle
96
95
    cd $bundlePath
97
 
    zip -r --symlinks -qdgds 5m DrGeo-$1-$rel.zip "`basename $bundle`" -x \*/.bzr/* \*~
 
96
    zip -r --symlinks -qdgds 5m DrGeo-$1-$rel.zip "`basename $bundleApp`" -x \*/.bzr/* \*~
98
97
    ls -sh DrGeo-$1-$rel.zip
99
98
    echo "--== DONE packaging DrGeo for $1 ==--"
100
99
    echo -n "Signing..."