Revision 27455
tags/tmp_build/install/CD_ROM/buildCD.properties | ||
---|---|---|
1 |
version=1.2 |
|
0 | 2 |
tags/tmp_build/install/CD_ROM/buildCD.xml | ||
---|---|---|
1 |
<project name="CD_gvSIG" default="main"> |
|
2 |
|
|
3 |
<property file="buildCD.properties"/> |
|
4 |
<property file="../../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number"/> |
|
5 |
<property file="../build.properties" prefix="install."/> |
|
6 |
<property name="OUTPUT_DIR" value="${install.OUTPUT_DIR}"/> |
|
7 |
|
|
8 |
<propertyfile file="temp.properties"> |
|
9 |
<entry key="bversion" value="${version}"/> |
|
10 |
</propertyfile> |
|
11 |
|
|
12 |
<property name="JRE_Zip" value="./JRE.zip"/> |
|
13 |
<property name="Extructure_Zip" value="./CD_extructure.zip"/> |
|
14 |
<property name="Andami" location="../../_fwAndami"/> |
|
15 |
<property name="binaries" location="../../binaries"/> |
|
16 |
<property name="base.dir" location="cd_gvSIG"/> |
|
17 |
<property name="nombreISO" value="gvSIG"/> |
|
18 |
<property name="Etiqueta" value="gvSIG-1_2_Build_${build.number}" /> |
|
19 |
|
|
20 |
<replace file="temp.properties" token="." value="_"/> |
|
21 |
<property file="temp.properties"/> |
|
22 |
|
|
23 |
<available file="${OUTPUT_DIR}/gvSIG-${bversion}-src.zip" property="src.present"/> <!--Verificar que los fuentes esten con los instalables --> |
|
24 |
|
|
25 |
<condition property="we.linux"> |
|
26 |
<os family="unix"/> |
|
27 |
</condition> |
|
28 |
|
|
29 |
<target name="main" depends="FilesCopy,detectSRC,FilesReplace,moveInstalables,makeISO"> <!-- el target makeInstalables no se realiza por defecto--> |
|
30 |
<delete file="temp.properties"/> |
|
31 |
<echo message="*******************************"/> |
|
32 |
<echo message="******* DONE ********"/> |
|
33 |
<echo message="*******************************"/> |
|
34 |
|
|
35 |
</target> |
|
36 |
<target name="FilesCopy"> |
|
37 |
<delete dir="${base.dir}" failonerror="false"/> |
|
38 |
<mkdir dir="${base.dir}"/> |
|
39 |
<unzip src="${JRE_Zip}" dest="${base.dir}"/> |
|
40 |
<unzip src="${Extructure_Zip}" dest="${base.dir}"/> |
|
41 |
<copy todir="${base.dir}/gvSIG/bin" file="${Andami}/andami.jar"/> |
|
42 |
<copy todir="${base.dir}/gvSIG/bin" file="${Andami}/castor.properties"/> |
|
43 |
<copy todir="${base.dir}/gvSIG/bin" file="${Andami}/schemas/andami-config.xml"/> |
|
44 |
|
|
45 |
<copy todir="${base.dir}/gvSIG/bin/lib" > |
|
46 |
<fileset dir="${Andami}/lib"/> |
|
47 |
</copy> |
|
48 |
<copy todir="${base.dir}/gvSIG/bin/theme" > |
|
49 |
<fileset dir="${Andami}/theme"/> |
|
50 |
</copy> |
|
51 |
<copy todir="${base.dir}/gvSIG/bin/gvSIG" > |
|
52 |
<fileset dir="${Andami}/gvSIG"/> |
|
53 |
</copy> |
|
54 |
<copy todir="${base.dir}/cachedir"> |
|
55 |
<fileset dir="${Andami}/cachedir"/> |
|
56 |
</copy> |
|
57 |
|
|
58 |
<copy todir="${base.dir}/gvSIG/cachedir"> |
|
59 |
<fileset dir="${Andami}/cachedir"/> |
|
60 |
</copy> |
|
61 |
<copy todir="${base.dir}/gvSIG/bin/cachedir"> |
|
62 |
<fileset dir="${Andami}/cachedir"/> |
|
63 |
</copy> |
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
<move file="${base.dir}/r_0.txt" tofile="${base.dir}/r_${build.number}.txt"/> |
|
68 |
|
|
69 |
<!-- updating dlls --> |
|
70 |
|
|
71 |
<copy todir="${base.dir}/gvSIG/JRE/windows/bin" overwrite="true"> |
|
72 |
<fileset dir="${binaries}/w32/3D" includes="*.dll,**/*.dll"/> |
|
73 |
<fileset dir="${binaries}/w32/crs" includes="*.dll"/> |
|
74 |
<fileset dir="${binaries}/w32/raster" includes="*.dll"/> |
|
75 |
<fileset dir="${binaries}/w32/system" includes="*.dll"/> |
|
76 |
</copy> |
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
</target> |
|
81 |
|
|
82 |
<target name="detectSRC" depends="withSRC,noSRC"> |
|
83 |
</target> |
|
84 |
|
|
85 |
<target name="withSRC" if="src.present"> |
|
86 |
<move file="${base.dir}/leeme_conSRC.htm" tofile="${base.dir}/leeme.htm"/> |
|
87 |
<move file="${base.dir}/readme_conSRC.htm" tofile="${base.dir}/readme.htm"/> |
|
88 |
<delete file="${base.dir}/leeme_sinSRC.htm"/> |
|
89 |
<delete file="${base.dir}/readme_sinSRC.htm"/> |
|
90 |
|
|
91 |
</target> |
|
92 |
|
|
93 |
<target name="noSRC" unless="src.present"> |
|
94 |
<move file="${base.dir}/leeme_sinSRC.htm" tofile="${base.dir}/leeme.htm"/> |
|
95 |
<move file="${base.dir}/readme_sinSRC.htm" tofile="${base.dir}/readme.htm"/> |
|
96 |
<delete file="${base.dir}/leeme_conSRC.htm"/> |
|
97 |
<delete file="${base.dir}/readme_conSRC.htm"/> |
|
98 |
</target> |
|
99 |
|
|
100 |
<target name="FilesReplace"> |
|
101 |
|
|
102 |
|
|
103 |
<replace file="${base.dir}/r_${build.number}.txt" token="%VERSION%" value="${version}"/> |
|
104 |
<replace file="${base.dir}/r_${build.number}.txt" token="%BVERSION%" value="${bversion}"/> |
|
105 |
<replace file="${base.dir}/r_${build.number}.txt" token="%BUILDNUMBER%" value="${build.number}"/> |
|
106 |
|
|
107 |
<replace file="${base.dir}/autorun.inf" token="%VERSION%" value="${bversion}"/> |
|
108 |
<replace file="${base.dir}/autorun.inf" token="%BVERSION%" value="${bversion}"/> |
|
109 |
<replace file="${base.dir}/autorun.inf" token="%BUILDNUMBER%" value="${build.number}"/> |
|
110 |
|
|
111 |
<replace file="${base.dir}/leeme.htm" token="%VERSION%" value="${version}"/> |
|
112 |
<replace file="${base.dir}/leeme.htm" token="%BVERSION%" value="${bversion}"/> |
|
113 |
<replace file="${base.dir}/leeme.htm" token="%BUILDNUMBER%" value="${build.number}"/> |
|
114 |
|
|
115 |
<replace file="${base.dir}/readme.htm" token="%VERSION%" value="${version}"/> |
|
116 |
<replace file="${base.dir}/readme.htm" token="%BVERSION%" value="${bversion}"/> |
|
117 |
<replace file="${base.dir}/readme.htm" token="%BUILDNUMBER%" value="${build.number}"/> |
|
118 |
|
|
119 |
|
|
120 |
</target> |
|
121 |
|
|
122 |
<target name="makeInstalables"> |
|
123 |
|
|
124 |
<ant antfile="build.xml" dir="../" /> <!--Esto de momento en el branch no se usa--> |
|
125 |
|
|
126 |
</target> |
|
127 |
<target name="moveInstalables"> |
|
128 |
<!-- Se debe pensar si se mantienen esos instalabes que se acaban de generar o se borran --> |
|
129 |
|
|
130 |
<copy todir="${base.dir}/instalar"> |
|
131 |
<fileset dir="${OUTPUT_DIR}" includes="*.bin,*.exe,*mac*.zip"/> |
|
132 |
</copy> |
|
133 |
|
|
134 |
<chmod dir="${base.dir}/instalar" perm="ugo+rx" |
|
135 |
includes="*.bin"/> |
|
136 |
<chmod dir="${base.dir}/gvSIG.sh" perm="ugo+rx" /> |
|
137 |
<chmod dir="${base.dir}/gvSIG/bin/gvSIG.sh" perm="ugo+rx" /> |
|
138 |
<chmod dir="${base.dir}/gvSIG/JRE/linux/bin/java" perm="ugo+rx" /> |
|
139 |
|
|
140 |
</target> |
|
141 |
|
|
142 |
<target name="makeISO" depends="makeISO_LIN,makeISO_WIN"> |
|
143 |
<echo message="CD GENERATOR DONE" /> |
|
144 |
</target> |
|
145 |
|
|
146 |
<target name="makeISO_LIN" if="we.linux"> |
|
147 |
<exec executable="mkisofs"> |
|
148 |
<arg line="-udf -r -J -T -hide-joliet-trans-tbl -hide-rr-moved -V ${Etiqueta} -o ${nombreISO}-${bversion}_Build_${build.number}.iso ${base.dir}"/> |
|
149 |
</exec> |
|
150 |
|
|
151 |
</target> |
|
152 |
|
|
153 |
<target name="makeISO_WIN" unless="we.linux"> |
|
154 |
<echo message="El sistema operativo no es Linux, se deberá generar un iso de la carpeta ${base.dir}"/> |
|
155 |
</target> |
|
156 |
|
|
157 |
|
|
158 |
</project> |
|
0 | 159 |
tags/tmp_build/install/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>install</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
</buildSpec> |
|
9 |
<natures> |
|
10 |
</natures> |
|
11 |
</projectDescription> |
|
0 | 12 |
tags/tmp_build/install/distribucion.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
# Si se produce un error, salimos inmediatamente |
|
4 |
set -e |
|
5 |
|
|
6 |
# Obtenemos el locale |
|
7 |
LOC=`echo $LANG | sed 's/_.*//'` |
|
8 |
|
|
9 |
# Comprobar que estamos en el directorio adecuado |
|
10 |
if [ "$LOC" = "es" ] ; then |
|
11 |
ERROR_BASEDIR="Este script debe invocarse desde el directorio raiz del workspace o desde el directorio \'install\'" |
|
12 |
else |
|
13 |
ERROR_BASEDIR="This script must be run from the workspace\'s root directory or from the \'install\' directory" |
|
14 |
fi |
|
15 |
[ -d _fwAndami ] && [ -d install ] && cd install |
|
16 |
if [ ! -d instalador-gvSIG-lin ] || [ ! -d instalador-gvSIG-win ] || [ ! -d ../_fwAndami ] ; then |
|
17 |
echo $ERROR_BASEDIR |
|
18 |
exit 1 ; |
|
19 |
fi |
|
20 |
|
|
21 |
DIR_BASE=`pwd` |
|
22 |
|
|
23 |
source variables.sh |
|
24 |
# Get a version with format 1_0_alpha |
|
25 |
UNDERSCORE_VERSION=`echo $FULLVERSION | sed 'y/./_/'` |
|
26 |
# Get a version with format 10_alpha |
|
27 |
BRIEFVERSION=`echo $FULLVERSION | sed 's/\.//'` |
|
28 |
# The name of the dir which will be ZIPed, containing the resulting installer |
|
29 |
INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer |
|
30 |
JARNAME="$APPNAME"-"$FULLVERSION".jar |
|
31 |
# The extension targets on the this version of gvSIG: |
|
32 |
GVSIG_VERSION=1.0 |
|
33 |
|
|
34 |
BUILDNUMBER=`sed -n 's/build.number=//p' ../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number` |
|
35 |
|
|
36 |
#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip |
|
37 |
DIR_LIN=instalador-gvSIG-lin |
|
38 |
DIR_WIN=instalador-gvSIG-win |
|
39 |
DIR_MAC=instalador-gvSIG-mac |
|
40 |
WINDOWSZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.7z |
|
41 |
LINUXZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.tgz |
|
42 |
|
|
43 |
LINUXBIN="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.bin |
|
44 |
LINUXBINWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586-withjre.bin |
|
45 |
|
|
46 |
WINDOWSEXE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.exe |
|
47 |
WINDOWSEXEWITHJRE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586-withjre.exe |
|
48 |
|
|
49 |
MAC_10_ZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-mac-10_3.zip |
|
50 |
|
|
51 |
#Directorios |
|
52 |
#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER" |
|
53 |
OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER" |
|
54 |
PATH_SOURCE_EXT=../_fwAndami/gvSIG/extensiones |
|
55 |
PATH_SOURCE_MANDAT_EXT=../../../../../_fwAndami/gvSIG/extensiones |
|
56 |
|
|
57 |
|
|
58 |
echo "*****************" |
|
59 |
echo " BASE " |
|
60 |
echo "*****************" |
|
61 |
# Para Linux |
|
62 |
echo -n "$DIR_BASE"/"$DIR_LIN" "-- " |
|
63 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
64 |
rm bin -rf |
|
65 |
mkdir -p bin/gvSIG/extensiones |
|
66 |
cp installer_files/LEEME installer_files/LLIG-ME installer_files/README bin |
|
67 |
cp resources/gpl.txt bin |
|
68 |
# No enlazamos directamente el directorio lib para no incluir el directorio CVS |
|
69 |
mkdir -p bin/lib |
|
70 |
cd "$DIR_BASE"/"$DIR_LIN"/bin/lib |
|
71 |
for i in ../../../../_fwAndami/lib/*.jar ; do |
|
72 |
ln -s "$i" . |
|
73 |
done |
|
74 |
for i in ../../../../_fwAndami/lib/*.zip ; do |
|
75 |
ln -s "$i" . |
|
76 |
done |
|
77 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
78 |
ln -s ../../../_fwAndami/andami.jar bin/ |
|
79 |
ln -s ../../../_fwAndami/castor.properties bin/ |
|
80 |
#cp resources/andami-config.xml bin |
|
81 |
echo OK. |
|
82 |
|
|
83 |
|
|
84 |
# Para Windows |
|
85 |
echo -n "$DIR_BASE"/"$DIR_WIN" "-- " |
|
86 |
cd "$DIR_BASE"/"$DIR_WIN" |
|
87 |
rm bin -rf |
|
88 |
mkdir -p bin/gvSIG/extensiones |
|
89 |
cp installer_files/LEEME.txt installer_files/LLIG-ME.txt installer_files/README.txt bin |
|
90 |
cp resources/gpl.txt bin |
|
91 |
# No enlazamos directamente el directorio lib para no incluir el directorio CVS |
|
92 |
mkdir -p bin/lib |
|
93 |
cd "$DIR_BASE"/"$DIR_WIN"/bin/lib |
|
94 |
for i in ../../../../_fwAndami/lib/*.jar ; do |
|
95 |
ln -s "$i" . |
|
96 |
done |
|
97 |
for i in ../../../../_fwAndami/lib/*.zip ; do |
|
98 |
ln -s "$i" . |
|
99 |
done |
|
100 |
cd "$DIR_BASE"/"$DIR_WIN" |
|
101 |
ln -s ../../../_fwAndami/andami.jar bin |
|
102 |
ln -s ../../../_fwAndami/castor.properties bin/ |
|
103 |
#cp resources/andami-config.xml bin |
|
104 |
|
|
105 |
#Copiamos el lanzador y sus tracuciones al tmpResources |
|
106 |
rm -Rf tmpResources |
|
107 |
mkdir tmpResources |
|
108 |
cp -R ../launcher/izpack-launcher-1.3/dist/* ./tmpResources |
|
109 |
mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe |
|
110 |
#Quitamos el ini, manifest y los CVS |
|
111 |
rm ./tmpResources/*.ini ./tmpResources/*.manifest |
|
112 |
find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true |
|
113 |
cp ./resources/gvSIG.ini ./tmpResources/gvSIG.ini |
|
114 |
echo OK. |
|
115 |
|
|
116 |
# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar |
|
117 |
# opcion a no instalarlas, son obligatorias |
|
118 |
cd "$DIR_BASE" |
|
119 |
i=0 |
|
120 |
while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ] |
|
121 |
do |
|
122 |
echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones |
|
123 |
ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_LIN"/bin/gvSIG/extensiones |
|
124 |
echo ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones |
|
125 |
ln -s "$PATH_SOURCE_MANDAT_EXT"/${MANDATORY_EXTENSIONS[$i]} "$DIR_WIN"/bin/gvSIG/extensiones |
|
126 |
i=`expr $i + 1` |
|
127 |
done |
|
128 |
|
|
129 |
## Eliminamos el driver de oracle |
|
130 |
find . -name ojdbc14.jar -type f -exec rm -rf {} 2> /dev/null ';' || true |
|
131 |
find . -name gt2-oracle-spatial-2.2.1.jar -type f -exec rm -rf {} 2> /dev/null ';' || true |
|
132 |
find . -name sdoapi.jar -type f -exec rm -rf {} 2> /dev/null ';' || true |
|
133 |
|
|
134 |
echo "*****************" |
|
135 |
[ $LOC = "es" ] && echo " EXTENSIONES " |
|
136 |
[ $LOC != "es" ] && echo " EXTENSIONS " |
|
137 |
echo "*****************" |
|
138 |
|
|
139 |
rm -rf $DIR_LIN/extensiones |
|
140 |
mkdir $DIR_LIN/extensiones |
|
141 |
rm -rf $DIR_WIN/extensiones |
|
142 |
mkdir $DIR_WIN/extensiones |
|
143 |
|
|
144 |
i=0 |
|
145 |
while [ ! -z ${EXTENSIONS[$i]} ] |
|
146 |
do |
|
147 |
[ $LOC = "es" ] && echo "Copiando "${EXTENSIONS[$i]} |
|
148 |
[ $LOC != "es" ] && echo "Copying "${EXTENSIONS[$i]} |
|
149 |
echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf |
|
150 |
cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_LIN"/extensiones -rf |
|
151 |
echo cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf |
|
152 |
cp "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} "$DIR_WIN"/extensiones -rf |
|
153 |
i=`expr $i + 1` |
|
154 |
done |
|
155 |
|
|
156 |
|
|
157 |
echo "*****************" |
|
158 |
echo " INST-WIN " |
|
159 |
echo "*****************" |
|
160 |
# Generar el instalador (jar) para windows |
|
161 |
cd "$DIR_BASE"/"$DIR_WIN" |
|
162 |
rm "$JARNAME" -f |
|
163 |
ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME" |
|
164 |
|
|
165 |
echo "*****************" |
|
166 |
echo " INST-LIN " |
|
167 |
echo "*****************" |
|
168 |
# Generar el instalador (jar) para Linux |
|
169 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
170 |
rm "$JARNAME" -f |
|
171 |
ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME" |
|
172 |
|
|
173 |
|
|
174 |
echo "******************" |
|
175 |
[ $LOC = "es" ] && echo " GENERAR DISTRIB " |
|
176 |
[ $LOC != "es" ] && echo " GENERATE DISTRIB " |
|
177 |
echo "******************" |
|
178 |
# Generar el tar.gz para Linux y el EXE para Windows |
|
179 |
|
|
180 |
mkdir -p "$OUTPUT_DIR" |
|
181 |
echo "- Linux" |
|
182 |
## Para Linux |
|
183 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
184 |
rm -Rf "$INSTALLER_DIR" |
|
185 |
cp -a installer_files "$INSTALLER_DIR" |
|
186 |
rm -R "$INSTALLER_DIR"/CVS 2> /dev/null && true |
|
187 |
# Set the correct version number in the scripts and files |
|
188 |
if [ -f "$INSTALLER_DIR"/install.sh ] ; then |
|
189 |
sed "s/JARNAME/$JARNAME/" "$INSTALLER_DIR"/install.sh > "$INSTALLER_DIR"/install.sh.bak |
|
190 |
mv "$INSTALLER_DIR"/install.sh.bak "$INSTALLER_DIR"/install.sh ; |
|
191 |
chmod +x "$INSTALLER_DIR"/install.sh |
|
192 |
fi |
|
193 |
#mv "$JARNAME" "$INSTALLER_DIR" |
|
194 |
cp "$JARNAME" "$INSTALLER_DIR" |
|
195 |
tar -cvzf "$LINUXZIP" "$INSTALLER_DIR" |
|
196 |
rm -Rf "$INSTALLER_DIR" |
|
197 |
mv "$LINUXZIP" "$OUTPUT_DIR" |
|
198 |
|
|
199 |
## Nueva instalacion para linux |
|
200 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
201 |
rm -Rf "$INSTALLER_DIR" |
|
202 |
mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall |
|
203 |
cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall |
|
204 |
cd "$INSTALLER_DIR" |
|
205 |
cp -R "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall |
|
206 |
find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true |
|
207 |
|
|
208 |
sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak |
|
209 |
mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini; |
|
210 |
|
|
211 |
tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall |
|
212 |
cp "$DIR_BASE"/"$DIR_LIN"/jre/*-1_4_2_*.gz ./tmp_gvSIGInstall |
|
213 |
tar -cvzf ./tmp_wjre.tgz ./tmp_gvSIGInstall |
|
214 |
echo '#!/bin/sh' > xx.tmp |
|
215 |
lcount=`cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l` |
|
216 |
lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio |
|
217 |
echo "lcount=$lcount" >> xx.tmp |
|
218 |
cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz > "$LINUXBIN" |
|
219 |
cat xx.tmp "$DIR_BASE"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp_wjre.tgz > "$LINUXBINWITHJRE" |
|
220 |
rm xx.tmp |
|
221 |
chmod a+x "$LINUXBIN" "$LINUXBINWITHJRE" |
|
222 |
mv "$LINUXBINWITHJRE" "$LINUXBIN" "$OUTPUT_DIR" |
|
223 |
cd "$DIR_BASE"/"$DIR_LIN" |
|
224 |
rm -Rf "$INSTALLER_DIR" |
|
225 |
## Fin Nueva instalacion para linux |
|
226 |
rm "$JARNAME" |
|
227 |
|
|
228 |
|
|
229 |
|
|
230 |
|
|
231 |
## Para Windows |
|
232 |
echo "- Windows" |
|
233 |
#set -x |
|
234 |
cd "$DIR_BASE"/"$DIR_WIN" |
|
235 |
rm -Rf "$INSTALLER_DIR" |
|
236 |
cp -a installer_files "$INSTALLER_DIR" |
|
237 |
|
|
238 |
cp -aR ../launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR" |
|
239 |
rm -f "$INSTALLER_DIR"/install.bat |
|
240 |
|
|
241 |
find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true |
|
242 |
|
|
243 |
## hacemos las sustituciones de la variable |
|
244 |
sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak |
|
245 |
mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini; |
|
246 |
|
|
247 |
|
|
248 |
mv "$JARNAME" "$INSTALLER_DIR" |
|
249 |
cd "$INSTALLER_DIR" |
|
250 |
|
|
251 |
if [ -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" ] ; then |
|
252 |
rm -f "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" |
|
253 |
fi |
|
254 |
"$DIR_BASE"/launcher/7z/7za a -r "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" * |
|
255 |
cd - |
|
256 |
sed "s/%TITLE%/$APPNAME-$BRIEFVERSION\_$BUILDNUMBER/" ../launcher/7z/dist_config.txt > dist_config.txt |
|
257 |
cat ../launcher/7z/7zS.sfx dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE" |
|
258 |
|
|
259 |
### paquete con los instalables de JRE, Jai y Jai i/o |
|
260 |
"$DIR_BASE"/launcher/7z/7za a "$DIR_BASE"/"$DIR_WIN"/"$WINDOWSZIP" "$DIR_BASE"/"$DIR_WIN"/jre_installers/*.exe |
|
261 |
cat ../launcher/7z/7zS.sfx dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXEWITHJRE" |
|
262 |
|
|
263 |
### |
|
264 |
|
|
265 |
|
|
266 |
rm dist_config.txt |
|
267 |
rm "$WINDOWSZIP" |
|
268 |
|
|
269 |
rm -Rf "$INSTALLER_DIR" |
|
270 |
|
|
271 |
mv "$WINDOWSEXE" "$OUTPUT_DIR" |
|
272 |
mv "$WINDOWSEXEWITHJRE" "$OUTPUT_DIR" |
|
273 |
|
|
274 |
# Limpiamos tmpResources |
|
275 |
cd "$DIR_BASE"/"$DIR_WIN" |
|
276 |
rm -r ./tmpResources |
|
277 |
cd - |
|
278 |
|
|
279 |
|
|
280 |
## Para Mac |
|
281 |
echo "- Mac" |
|
282 |
if type ant 2>/dev/null >/dev/null; then |
|
283 |
cd "$DIR_BASE"/"$DIR_MAC" |
|
284 |
if ant -Dbuild.number="$BUILDNUMBER" -Djvmversion="1.4+" -f build.xml; then |
|
285 |
zip -r "$MAC_10_ZIP" gvSIG*.app |
|
286 |
rm -r gvSIG*.app |
|
287 |
mv "$MAC_10_ZIP" "$OUTPUT_DIR" |
|
288 |
else |
|
289 |
echo "No se ha generado el paquete para Mac 10 . Compruebe que su ant tiene jarbundler instalado |
|
290 |
|
|
291 |
Nota: debemos tener incluido en el ANT_HOME/lib el |
|
292 |
jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/ |
|
293 |
" |
|
294 |
|
|
295 |
fi |
|
296 |
|
|
297 |
else |
|
298 |
echo "No se ha encontrado el ant en el path de ejecucion: |
|
299 |
Es necesario para poder generar la distribucion para el Mac. |
|
300 |
|
|
301 |
Nota: debemos tener tambien incluido en el ANT_HOME/lib el |
|
302 |
jar jarbundler-1.9.jar que se puede encontrar en http://jarbundler.sourceforge.net/ |
|
303 |
" |
|
304 |
fi |
|
305 |
|
|
306 |
|
|
307 |
## Limpiamos |
|
308 |
|
|
309 |
rm -rf $DIR_LIN/extensiones |
|
310 |
rm -rf $DIR_LIN/bin |
|
311 |
rm -rf $DIR_WIN/extensiones |
|
312 |
rm -rf $DIR_WIN/bin |
|
313 |
|
|
314 |
echo "*****************" |
|
315 |
echo " FIN " |
|
316 |
echo "*****************" |
|
317 |
|
|
318 |
echo "" |
|
319 |
echo "Generados los ficheros:" |
|
320 |
echo "$OUTPUT_DIR" |
|
321 |
ls -lh "$OUTPUT_DIR" |
|
322 |
cd "$DIR_BASE" |
|
0 | 323 |
tags/tmp_build/install/instalador-gvSIG-win/Notas_asociaciacion_archivos.txt | ||
---|---|---|
1 |
|
|
2 |
Pareceser que hay que a?adir unas claves al registro... |
|
3 |
puede hacerse generando un fichero .reg |
|
4 |
con las claves preparadas y usando el regedit en modo silencioso |
|
5 |
|
|
6 |
el comando es: |
|
7 |
regedit /s fichero.reg |
|
8 |
|
|
9 |
|
|
10 |
la claves son: |
|
11 |
HKCR\{ext} = {typeAbr} |
|
12 |
HKCR\{typeAbr}\ = {typeName} |
|
13 |
HKCR\{typeAbr}\DefaultIcon = {FileIcon} |
|
14 |
HKCR\{typeAbr}\shell\open\command = {exeCommand} |
|
15 |
|
|
16 |
|
|
17 |
estas no parecen necesarias: |
|
18 |
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\{ext}\Application = {exeName} |
|
19 |
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\{ext}\OpenWithList\a = {exeName} |
|
20 |
|
|
21 |
donde: |
|
22 |
{ext} = ".gvp" |
|
23 |
{typeAbr} ="gvSIGProject" |
|
24 |
{typeName} ="gvSIG Project file" |
|
25 |
{FileIcon} = "gvSIG.ico" || "gvSIG.exe" |
|
26 |
{exeCommand} = "gvSIG.exe %L" |
|
27 |
{exeName} = "gvSIG.exe" |
|
28 |
|
|
29 |
|
|
30 |
Ejeplo de fichero .reg: |
|
31 |
REGEDIT4 |
|
32 |
|
|
33 |
[HKEY_CLASSES_ROOT\.gvp] |
|
34 |
@="gvSIGProject" |
|
35 |
|
|
36 |
[HKEY_CLASSES_ROOT\gvSIGProject] |
|
37 |
@="gvSIG Project file" |
|
38 |
|
|
39 |
[HKEY_CLASSES_ROOT\gvSIGProject\DefaultIcon] |
|
40 |
@="C:\\Archivos de programas\\gvSIG_1.0\\bin\\ico-gvSIG.ico,0" |
|
41 |
|
|
42 |
|
|
43 |
[HKEY_CLASSES_ROOT\gvSIGProject\shell\open] |
|
44 |
@="Abrir" |
|
45 |
|
|
46 |
[HKEY_CLASSES_ROOT\gvSIGProject\shell\open\command] |
|
47 |
@="C:\\Archivos de programas\\gvSIG_1.0\\bin\\gvSIG.exe \"%1\"" |
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
******************************************************************* |
|
62 |
URL's y recortes: |
|
63 |
|
|
64 |
|
|
65 |
http://en.wikipedia.org/wiki/Windows_registry |
|
66 |
|
|
67 |
http://www.akadia.com/services/windows_registry_tutorial.html |
|
68 |
|
|
69 |
http://webtools.live2support.com/windows/ |
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
http://www.freevbcode.com/ShowCode.asp?ID=2799 |
|
78 |
****************** |
|
79 |
usando VB |
|
80 |
|
|
81 |
|
|
82 |
Public Sub associate(EXT As String, FileType As String, _ |
|
83 |
FileName As String) |
|
84 |
On Error Resume Next |
|
85 |
Dim b As Object |
|
86 |
Set b = CreateObject("wscript.shell") |
|
87 |
b.regwrite "HKCR\" & EXT & "\", FileType |
|
88 |
b.regwrite "HKCR\" & FileType & "\", "MY file" |
|
89 |
b.regwrite "HKCR\" & FileType & "\DefaultIcon\", FileName |
|
90 |
b.regwrite "HKCR\" & FileType & "\shell\open\command\", _ |
|
91 |
FileName & " %L" |
|
92 |
b.regdelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\Application" |
|
93 |
b.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\Application", FileName |
|
94 |
b.regdelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\OpenWithList\" |
|
95 |
b.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\OpenWithList\a", FileName |
|
96 |
|
|
97 |
End Sub |
|
98 |
|
|
99 |
'Sample Usage |
|
100 |
Private Sub Form_Load() |
|
101 |
associate ".jpg", "JPGFile", _ |
|
102 |
"C:\Program Files\Accessories\MSPAINT.EXE" |
|
103 |
Unload Me |
|
104 |
End Sub |
|
105 |
|
|
106 |
|
|
107 |
**************** |
|
108 |
|
|
109 |
|
|
110 |
http://www.ss64.com/nt/: |
|
111 |
http://www.ss64.com/nt/ftype.html |
|
112 |
************************************************************************** |
|
113 |
FTYPE |
|
114 |
|
|
115 |
Display or change the link between a FileType and an executable program |
|
116 |
|
|
117 |
Syntax |
|
118 |
FTYPE fileType=executable_path |
|
119 |
|
|
120 |
FTYPE |
|
121 |
|
|
122 |
FTYPE fileType |
|
123 |
|
|
124 |
FTYPE fileType= |
|
125 |
|
|
126 |
Key |
|
127 |
fileType : The type of file |
|
128 |
|
|
129 |
executable_path : The executable program including any command line parameters |
|
130 |
|
|
131 |
More than one file extension may be associated with the same File Type. |
|
132 |
e.g. both the extension .JPG and the extension .JPEG may be associated with the File Type "jpegfile" |
|
133 |
|
|
134 |
File Types can be displayed in the Windows Explorer GUI: [View, Options, File Types] however the spelling is usually different to that expected by the FTYPE command e.g. the File Type "txtfile" is displayed in the GUI as "Text Document"and "jpegfile" is displayed as "image/jpeg" |
|
135 |
|
|
136 |
Several FileTypes can be linked to the same executable application, but |
|
137 |
one FileType cannot be linked to more than one executable application. |
|
138 |
|
|
139 |
FTYPE file type will display the current executable program for that file type. |
|
140 |
|
|
141 |
FTYPE without any parameters will display all FileTypes and the executable program for each. |
|
142 |
|
|
143 |
Defining command line parameters |
|
144 |
|
|
145 |
It is almost always necessary to supply command line parameters so that when a document is opened not only is the relevant application loaded into memory but the document itself also loaded into the application. To make this happen the filename of the document must be passed back to the application. |
|
146 |
|
|
147 |
Command line parameters are exactly like batch file parameters, %0 is the executable program and %1 will reference the document filename |
|
148 |
|
|
149 |
so a simple command line might be: |
|
150 |
|
|
151 |
MyApplication.exe "%1" |
|
152 |
|
|
153 |
If any further parameters are required by the application they can be passed as %2, %3. To pass ALL parameters to an application use %*. To pass all the remaining parameters starting with the nth parameter, use %~n where n is between 2 and 9. |
|
154 |
|
|
155 |
The FileType should always be created before making a File Association |
|
156 |
|
|
157 |
For example: |
|
158 |
|
|
159 |
FTYPE htmlfile="C:\PROGRA~1\Plus!\MICROS~1\iexplore.exe" -nohome |
|
160 |
ASSOC .html=htmlfile |
|
161 |
|
|
162 |
FTYPE pagemill.html=C:\PROGRA~1\Adobe\PAGEMI~1.0\PageMill.exe "%1" |
|
163 |
ASSOC .html=pagemill.html |
|
164 |
|
|
165 |
FTYPE rtffile="C:\Program Files\Windows NT\Accessories\WORDPAD.EXE" "%1" |
|
166 |
ASSOC .rtf=rtffile |
|
167 |
|
|
168 |
FTYPE word.rtf.8="C:\Program Files\Microsoft Office\Office\winword.exe" /n |
|
169 |
ASSOC .rtf=word.rtf.8 |
|
170 |
|
|
171 |
Switching a File Association between multiple applications |
|
172 |
|
|
173 |
If you have multiple applications that use the same file extension, the ASSOC command can be used to switch the file extension between the different FileTypes. |
|
174 |
|
|
175 |
Deleting a FileType |
|
176 |
|
|
177 |
Specify executable_path=nothing and the FTYPE command will delete the executable_path for that FileType. |
|
178 |
For example: |
|
179 |
FTYPE htmlfile= |
|
180 |
|
|
181 |
Backing up your FileTypes |
|
182 |
|
|
183 |
FTYPE >backup_types.txt |
|
184 |
ASSOC >backup_ext.txt |
|
185 |
|
|
186 |
Restoring your FileTypes from a Backup |
|
187 |
|
|
188 |
FOR /F "tokens=* delims=" %G IN (backup_types.txt) DO FTYPE %G |
|
189 |
FOR /F "tokens=* delims=" %G IN (backup_ext.txt) DO ASSOC %G |
|
190 |
|
|
191 |
This will recreate the CLASS id's in the registry at HKey_Classes_Root\.<file extension> |
|
192 |
If you put the commands above in a batch file change the %G to be %%G |
|
193 |
|
|
194 |
Using File associations at the command line |
|
195 |
|
|
196 |
If you have a file association between .DOC and Word for Windows then at a command prompt you can open a document with any of the following commands: |
|
197 |
|
|
198 |
Start "My Document.doc" |
|
199 |
"Monthly Report.doc" |
|
200 |
JULY.DOC |
|
201 |
|
|
202 |
note that the file extension must be supplied for this to work |
|
203 |
|
|
204 |
"True to type - Of a plant, or group of plants, which matches the accepted description of the cultivar to which it is assumed to belong" |
|
205 |
|
|
206 |
Related Commands: |
|
207 |
|
|
208 |
ASSOC - Change file extension associations |
|
209 |
Batch file to list the application associated with a file extension |
|
210 |
ASSOCIAT - One step file association (Resource Kit) |
|
211 |
|
|
212 |
************************************************************************** |
|
213 |
|
|
214 |
http://www.ss64.com/nt/assoc.html |
|
215 |
************************************************************************* |
|
216 |
|
|
217 |
ASSOC |
|
218 |
|
|
219 |
Display or change the association between a file extension and a fileType |
|
220 |
|
|
221 |
Syntax |
|
222 |
ASSOC .ext = [fileType] |
|
223 |
ASSOC |
|
224 |
ASSOC .ext |
|
225 |
ASSOC .ext = |
|
226 |
|
|
227 |
Key |
|
228 |
.ext : The file extension |
|
229 |
fileType : The type of file |
|
230 |
|
|
231 |
A file extension is the last few characters in a FileName after the period. |
|
232 |
So a file called JANUARY.HTML has the file extension .HTML |
|
233 |
|
|
234 |
The File extension is used by Windows NT to determine the type of information stored in the file and therefore which application(s) will be able to display the information in the file. File extensions are not case sensitive and are not limited to 3 characters. |
|
235 |
|
|
236 |
More than one file extension may be associated with the same File Type. |
|
237 |
e.g. both the extension .JPG and the extension .JPEG may be associated with the File Type "jpegfile" |
|
238 |
|
|
239 |
At any one time a given file extension may only be associated with one File Type. |
|
240 |
e.g. If you change the extension .JPG so it is associated with the File Type "txtfile" then it's normal association with "jpegfile" will disappear. Removing the association to "txtfile" does not restore the association to "jpegfile" |
|
241 |
|
|
242 |
File Types can be displayed in the Windows Explorer GUI: [View, Options, File Types] however the spelling is usually different to that expected by the ASSOC command e.g. the File Type "txtfile" is displayed in the GUI as "Text Document"and "jpegfile" is displayed as "image/jpeg" |
|
243 |
|
|
244 |
The command ASSOC followed by just a file extension will display the current File Type for that extension. |
|
245 |
|
|
246 |
ASSOC without any parameters will display all the current file associations. |
|
247 |
|
|
248 |
ASSOC with ".ext=" will delete the association for that file extension. |
|
249 |
|
|
250 |
Did you leave the Always Use This Program To Open This File option turned on? |
|
251 |
To change it back so it prompts you to specify a program each time, just delete the association for that file type |
|
252 |
ASSOC .ext= |
|
253 |
[where .ext is the file extension]. |
|
254 |
Now when you double-click on a file of that type, the system will ask you what program you want to use. |
|
255 |
|
|
256 |
Using the ASSOC command will edit values stored in the registry at HKey_Classes_Root\.<file extension> |
|
257 |
Therefore it's possible to use registry permissions to protect a file extension and prevent any file association changes. |
|
258 |
|
|
259 |
Examples: |
|
260 |
|
|
261 |
Viewing file associations: |
|
262 |
|
|
263 |
ASSOC .txt |
|
264 |
ASSOC .doc |
|
265 |
ASSOC >backup.txt |
|
266 |
|
|
267 |
Editing file associations: |
|
268 |
|
|
269 |
ASSOC .txt=txtfile |
|
270 |
ASSOC .DIC=txtfile |
|
271 |
ASSOC .html=Htmlfile |
|
272 |
|
|
273 |
Deleting a file association: |
|
274 |
|
|
275 |
ASSOC .html= |
|
276 |
|
|
277 |
Repair .REG and .EXE file associations: |
|
278 |
|
|
279 |
ASSOC .EXE=exefile |
|
280 |
ASSOC .REG=regfile |
|
281 |
|
|
282 |
Digging through CLASSES_ROOT entries often reveals more than one shell for the same application, for example the Apple Quick Time player has two entries, one to "open" (which gives an annoying nag screen) and one to just "play" the QT file: |
|
283 |
[HKEY_CLASSES_ROOT\MOVFile\shell\open] and [play] |
|
284 |
|
|
285 |
In cases like this you can change the default action e.g. |
|
286 |
[HKEY_CLASSES_ROOT\MOVFile\shell] |
|
287 |
@="play" |
|
288 |
|
|
289 |
"Of all forms of caution, caution in love is perhaps the most fatal to true happiness" - Bertrand Russell |
|
290 |
|
|
291 |
Related: |
|
292 |
|
|
293 |
FTYPE - Edit file types (used in file extension associations) |
|
294 |
Batch file to list the application associated with a file extension |
|
295 |
ASSOCIAT - One step file association (Resource Kit) |
|
296 |
Q162059 - Associate Internet Explorer with MS Office files |
|
297 |
JSIFAQ - Tip 9715 - List File Types with executable path |
|
298 |
|
|
299 |
**************************************************************** |
|
300 |
|
|
301 |
|
|
302 |
http://www.ss64.com/nt/associate.html |
|
303 |
********************************************************************** |
|
304 |
ASSOCIATE.exe (Resource Kit) |
|
305 |
|
|
306 |
One step file association. |
|
307 |
|
|
308 |
This utility does the job of both ASSOC and FTYPE, in one step. ASSOCIATE assigns an extension directly with an executable application. This is done by automatically adding a new FileType to the system registry. |
|
309 |
|
|
310 |
Syntax |
|
311 |
ASSOCIATE .ext filename [/q /d /f] |
|
312 |
|
|
313 |
Key |
|
314 |
.ext : Extension to be associated. |
|
315 |
filename : Executable program to associate .ext with. |
|
316 |
/q : Quiet - Suppress interactive prompts. |
|
317 |
/f : Force - Force overwrite or delete without questions. |
|
318 |
/d : Delete - Delete the association. |
|
319 |
|
|
320 |
A file extension is the last few characters in a FileName after the period. |
|
321 |
So a file called JANUARY.HTML has the file extension .HTML |
|
322 |
|
|
323 |
The File extension is used by Windows NT to determine the type of information stored in the file and therefore which application(s) will be able to display the information in the file. File extensions are not case sensitive and are not limited to 3 characters. |
|
324 |
|
|
325 |
Example: adding a File Association |
|
326 |
|
|
327 |
To add the File Type "SQLfile"=Notepad.exe and also set the File Association of .SQL="SQLfile" run this command: |
|
328 |
|
|
329 |
ASSOCIATE .SQL Notepad.exe |
|
330 |
|
|
331 |
Example: Removing a File Association |
|
332 |
|
|
333 |
ASSOCIATE .SQL /d |
|
334 |
|
|
335 |
Note that /d will delete the File Association but will NOT delete the File Type. |
|
336 |
|
|
337 |
File types created by Associate.exe are always given a name in the form xxxfile, where xxx is the file extension. |
|
338 |
|
|
339 |
"There are three roads to ruin; women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians" - Georges Pompidou |
|
340 |
|
|
341 |
Related Commands: |
|
342 |
|
|
343 |
ASSOC Change file extension associations |
|
344 |
FTYPE Display or modify file types used in file extension associations |
|
345 |
********************************************************************** |
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
350 |
WINDOWS 98 |
|
351 |
|
|
352 |
|
|
353 |
http://groups.google.com/group/alt.msdos.batch/browse_thread/thread/556321da29c9ca2e/e60e3330cd284b99?lnk=gst&q=file+association&rnum=2#e60e3330cd284b99 |
|
354 |
*************************************************************************** |
|
355 |
|
|
356 |
|
|
357 |
De: William Allen - ver perfil |
|
358 |
Fecha: Mi? 26 mar 2003 14:28 |
|
359 |
Correo electr?nico: "William Allen" <_inval...@mayfly13.fsnet.co.uk> |
|
360 |
Grupos: alt.msdos.batch |
|
361 |
Sin calificar |
|
362 |
Valoraci?n: |
|
363 |
mostrar opciones |
|
364 |
Responder | Responder al autor | Reenviar | Imprimir | Mensaje individual | Mostrar mensaje original | Notificar abuso | Buscar mensajes de este autor |
|
365 |
|
|
366 |
"Robert Mark Bram" wrote in message |
|
367 |
> I recently asked this question in alt.msdos.batch.nt -- but I need an answer |
|
368 |
> for Win 98.. |
|
369 |
|
|
370 |
> Can use a batch file to create a windows file association? |
|
371 |
|
|
372 |
Yes. Windows 95/98/ME users can use the Windows 98 Resource Kit |
|
373 |
utility ASSOCIAT.EXE (cloned from the NT4 Resource Kit), which will |
|
374 |
operate with the Windows 95/98/ME registries to create file associations |
|
375 |
very easily. ASSOCIAT.EXE provides an informative ERRORLEVEL and |
|
376 |
is designed for use in Batch files. Downloadable free from the Microsoft FTP site: |
|
377 |
ftp://ftp.microsoft.com/Services/TechNet/samples/ps/win98/Reskit/FILE/ |
|
378 |
|
|
379 |
and click on file: ASSOCIAT.EXE |
|
380 |
|
|
381 |
For syntax help with using ASSOCIAT.EXE, use the /? switch |
|
382 |
associat /? |
|
383 |
|
|
384 |
Full documentation, usage instructions, and syntax examples for Batch |
|
385 |
usage of all the Windows 98 Resource Kit Batch tools (which you can |
|
386 |
use in Windows 95 and ME, too): |
|
387 |
ftp://ftp.microsoft.com/Services/TechNet/samples/ps/win98/reskit/help... |
|
388 |
This is a fully indexed and searchable compiled help file. Although |
|
389 |
each utility responds to the usual /? for brief help, this main file has |
|
390 |
huge detail. When you have the file, look in the Contents section |
|
391 |
under "Scripting Tools". |
|
392 |
|
|
393 |
|
|
394 |
************************************************************************* |
|
395 |
|
|
396 |
PARA TODOS LOS WINDOWS |
|
397 |
|
|
398 |
http://www.robvanderwoude.com/index.html |
|
399 |
http://www.robvanderwoude.com/files/defopen.txt |
|
400 |
|
|
401 |
defopen.bat |
|
402 |
|
|
403 |
Create a default file association to Notepad and add "Open with Notepad", "Print with Notepad" and "Command Prompt Here" options to popup menus |
|
404 |
|
|
405 |
************************************************************************ |
|
406 |
@ECHO OFF |
|
407 |
:: No parameters required |
|
408 |
IF NOT [%1]==[] GOTO Syntax |
|
409 |
|
|
410 |
:: Choose the correct command processor for the current operating system |
|
411 |
SET _cmd= |
|
412 |
:: Variable to add shortcut to menu entry (NT only, |
|
413 |
:: since COMMAND.COM cannot echo an ampersand) |
|
414 |
SET _= |
|
415 |
ECHO.%COMSPEC% | FIND /I "command.com" >NUL |
|
416 |
IF NOT ERRORLEVEL 1 SET _cmd=command.com /e:4096 |
|
417 |
ECHO.%COMSPEC% | FIND /I "cmd.exe" >NUL |
|
418 |
IF NOT ERRORLEVEL 1 SET _cmd=cmd.exe |
|
419 |
IF [%_cmd%]==[cmd.exe] SET _=^& |
|
420 |
|
|
421 |
:: Create a temporary .REG file |
|
422 |
> "%Temp%.\DefOpen.reg" ECHO REGEDIT4 |
|
423 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
424 |
ECHO Adding "Open with Notepad" entry |
|
425 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\open] |
|
426 |
>>"%Temp%.\DefOpen.reg" ECHO @="%_%Open with Notepad" |
|
427 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
428 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\open\command] |
|
429 |
>>"%Temp%.\DefOpen.reg" ECHO @="notepad.exe \"%%1\"" |
|
430 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
431 |
ECHO Adding "Print with Notepad" entry |
|
432 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\print] |
|
433 |
>>"%Temp%.\DefOpen.reg" ECHO @="%_%Print with Notepad" |
|
434 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
435 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\print\command] |
|
436 |
>>"%Temp%.\DefOpen.reg" ECHO @="notepad.exe /p \"%%1\"" |
|
437 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
438 |
|
|
439 |
:: If neither COMMAND.COM nor CMD.EXE then skip this step |
|
440 |
IF [%_cmd%]==[] ECHO Skipping "Command Prompt Here" entry |
|
441 |
IF [%_cmd%]==[] GOTO Merge |
|
442 |
|
|
443 |
ECHO Adding "Command Prompt Here" entry |
|
444 |
:: Add Command Prompt Here for files |
|
445 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\prompt] |
|
446 |
>>"%Temp%.\DefOpen.reg" ECHO @="Command Prompt Here" |
|
447 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
448 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\prompt\command] |
|
449 |
>>"%Temp%.\DefOpen.reg" ECHO @="%_cmd% /k cd \"%%1\\..\"" |
|
450 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
451 |
:: Add Command Prompt Here for directories |
|
452 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\Directory\shell\prompt] |
|
453 |
>>"%Temp%.\DefOpen.reg" ECHO @="Command Prompt Here" |
|
454 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
455 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\Directory\shell\prompt\command] |
|
456 |
>>"%Temp%.\DefOpen.reg" ECHO @="%_cmd% /k cd \"%%1\"" |
|
457 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
458 |
:: Add Command Prompt Here for drives |
|
459 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\Drive\shell\prompt] |
|
460 |
>>"%Temp%.\DefOpen.reg" ECHO @="Command Prompt Here" |
|
461 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
462 |
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_CLASSES_ROOT\Drive\shell\prompt\command] |
|
463 |
>>"%Temp%.\DefOpen.reg" ECHO @="%_cmd% /k cd \"%%1\"" |
|
464 |
>>"%Temp%.\DefOpen.reg" ECHO. |
|
465 |
|
|
466 |
:: Merge the temporary .REG file |
|
467 |
:Merge |
|
468 |
START /WAIT REGEDIT /S "%Temp%.\DefOpen.reg" |
|
469 |
|
|
470 |
:: Delete the temporary .REG file |
|
471 |
DEL "%Temp%.\DefOpen.reg" |
|
472 |
|
|
473 |
:: Ready |
|
474 |
GOTO End |
|
475 |
|
|
476 |
:Syntax |
|
477 |
ECHO. |
|
478 |
ECHO DefOpen.bat, Version 3.00 for Windows 95/98/NT 4/2000/XP |
|
479 |
ECHO Adds a default association: when a file without a file association |
|
480 |
ECHO is double-clicked, it will be opened with Notepad. |
|
481 |
ECHO Adds three new entries to the right mouse button menu as well: |
|
482 |
ECHO "Open with Notepad", "Print with Notepad" and "Command Prompt Here". |
|
483 |
ECHO. |
|
484 |
ECHO Usage: DEFOPEN |
|
485 |
ECHO. |
|
486 |
ECHO Written by Rob van der Woude |
|
487 |
ECHO http://www.robvanderwoude.com |
|
488 |
ECHO Notepad registry tip courtesy of Regedit.com |
|
489 |
ECHO http://www.regedit.com |
|
490 |
|
|
491 |
:: Clean up variables and quit |
|
492 |
:End |
|
493 |
SET _cmd= |
|
494 |
SET _= |
|
495 |
***************************** |
|
496 |
|
|
0 | 497 |
tags/tmp_build/install/instalador-gvSIG-win/libs/w32/mrsid/jmrsid.dll | ||
---|---|---|
1 |
MZ? ?? ? @ ? ? ?!?L?!This program cannot be run in DOS mode. + |
|
2 |
$ F,?M?EM?EM?EA?E M?EA?EM?EA?EM?EA?EM?E?m?EM?E?E?E M?EM?E3M?EA?EM?EA?EM?EA?EM?ERichM?E PE L ?AkC ? ! |
|
3 |