-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathmake-distribution.sh
140 lines (114 loc) · 4.05 KB
/
make-distribution.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#! /usr/bin/sh
if [ $# -ne 1 ]
then
echo "Usage: make-distribution.sh <tag>"
exit 1
fi
opensimdir=../diva-distribution
midir=../MIAddons
toolsdir=Tools
libdir=Library
wd=`pwd`
# Get the tag
#cd $opensimdir
#tag=`C:/Program\ Files/Git/bin/git show-ref --tags | tail -1`
#tag=`"C:/Program Files (86)/Git/bin/git" show-ref --tags | tail -1`
#tag=`echo ${tag:53}`
tag=$1
distdir=diva-r$tag
# Create language satellite assemblies for localization
echo Generating language files
cd $opensimdir/addon-modules/21Wifi/Localization
./make_languages.sh
# Create distribution directory and start filling it
cd $wd
echo Making Diva Distribution $distdir from $opensimdir
mkdir $distdir
mkdir $distdir/doc
cp -r $opensimdir/bin $distdir
#cp -r $opensimdir/WifiPages $distdir
cp $opensimdir/bin/Wifi.ini $distdir/bin
cp $opensimdir/README.txt $distdir/OSREADME.txt
cp $opensimdir/CONTRIBUTORS.txt $distdir/OSCONTRIBUTORS.txt
cp $opensimdir/LICENSE.txt $distdir/OSLICENSE.txt
cp -r $opensimdir/ThirdPartyLicenses $distdir
# Copy proprietary addons from MI
echo Adding Metaverse Ink addons from $midir
cp $midir/bin/Diva.TOS.dll $distdir/bin
cp $midir/bin/DivaTOS.ini $distdir/bin
cp $midir/bin/Diva.MISearchModules.dll $distdir/bin
cp $midir/bin/MISearch.ini $distdir/bin
# Clean up
echo Cleaning up
cd $wd
chmod +rwx $distdir -R
rm $distdir/WifiPages/*~
rm $distdir/WifiPages/*/*~
cd $distdir/bin
rm Robust* SimpleApp*
rm OpenSim.TestSuite* Prebuild.exe* OpenSim.Tests.Clients*
rm SubversionSharp.* svn_client-1.dll
rm OpenSim.Grid.*
# Unsed DBs
rm libdb_dotNET43.dll libdb44d.dll System.Data.SQLite.dll OpenSim.Data.SQLiteLegacy.dll OpenSim.Data.MSSQL.dll* *.Data.SQLite.dll* Castle* mssql_connection.ini
# Unused Physics
rm Physics/OpenSim.Region.Physics.Basic* Physics/OpenSim.Region.Physics.PhysX* Physics/OpenSim.Region.Physics.POS* Physics/OpenSim.Region.Physics.ODE*
# Unused plugins
rm OpenSim.ApplicationPlugins.Rest.dll* OpenSim.ApplicationPlugins.Rest.Inventory* OpenSim.ApplicationPlugins.Rest.Regions.dll*
rm *AddinExample.*
# Unused script engines
# Unfortunately there's some dependency...
#rm OpenSim.Region.ScriptEngine.Shared.YieldProlog.dll*
# Unused clients
rm *MXP* *VWoHTTP*
# Unused Diva components
rm Diva.LoginService.* Diva.Wifi.ProcessorTest.* Diva.Data.SQLite*
# Misc
rm OpenSim.Tools.lslc.*
rm *.pdb *.log *.jpg *.JPG *.tiff *.TIFF *.png *.PNG *.bpm *.BMP *.oar *.iar *~ *.db
rm -rf addin-db-* *.Tests.dll *.Tests.*.dll TestResult.* *.Tests.dll.* config-include/storage
rm config-include/* j2kDecodeCache/* Regions/* DataSnapshot/*
rm -rf assetcache/*
rm maptiles/*
rm -rf ScriptEngines/*
# Copy config, license and doc files
echo Copying config and doc files
cd $wd
cp Configs/README.txt $distdir
cp Configs/RELEASENOTES.txt $distdir
cp Configs/RELEASENOTESWIFI.txt $distdir
cp Configs/LICENSE.txt $distdir
cp Configs/LICENSEWIFI.txt $distdir
cp Configs/LICENSEIMAGES.txt $distdir
cp Configs/LICENSEDIVA.txt $distdir
cp Configs/PRIVACYNOTICE.txt $distdir
cp Configs/DotNetZip.txt $distdir/ThirdPartyLicenses
cp Configs/IMPORTANT.txt $distdir
cp Configs/OpenSim.ini $distdir/bin
cp Configs/OpenSim.exe.config $distdir/bin
cp Configs/DivaPreferences.ini $distdir/bin/config-include
cp Configs/MyWorld.ini.example $distdir/bin/config-include
cp Configs/RegionConfig.ini.example $distdir/bin/Regions
cp Configs/INSTALL.txt $distdir
cp Configs/doc/ADVANCED.txt $distdir/doc
cp Configs/doc/DNS.txt $distdir/doc
cp Configs/doc/MYSQL.txt $distdir/doc
cp Configs/doc/MONO.txt $distdir/doc
cp Configs/doc/OSQUESTIONS.txt $distdir/doc
cp Configs/doc/TROUBLESHOOTING.txt $distdir/doc
cp Configs/doc/WIFI.txt $distdir/doc
# Copy tools
echo Copying tools
cp $toolsdir/bin/Configure.exe $distdir/bin
cp $toolsdir/bin/Update.exe $distdir/bin
# Copy Library
echo Copying library
cp $libdir/"Clothing Library (small).iar" $distdir/bin/Library
cp $libdir/"Objects Library (small).iar" $distdir/bin/Library
# Zip it
echo Zipping...
chmod +rwx $distdir -R
#/c/OptPrograms/cygwin/bin/zip -r $distdir.zip $distdir > out
#/c/cygwin/bin/zip -r $distdir.zip $distdir > out
zip -r $distdir.zip $distdir > out
rm out