Browse Source

Installer no longer requires whole project to be checked out.

If it cant guess the build type (ie the checkout is not in a folder called trunk/, branches/<foo>/  or tags/<foo>/) it will assume its a trunk build and build as normal (no special release flags etc)


git-svn-id: http://svn.dmdirc.com/trunk@2898 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Shane Mc Cormack 16 years ago
parent
commit
f1cec2c096

+ 11
- 2
installer/linux/makeInstallerLinux.sh View File

56
 	echo "-p, --plugins <plugins>   What plugins to add to the jar file"
56
 	echo "-p, --plugins <plugins>   What plugins to add to the jar file"
57
 	echo "-c, --compile             Recompile the .jar file"
57
 	echo "-c, --compile             Recompile the .jar file"
58
 	echo "    --jar <file>          use <file> as DMDirc.jar"
58
 	echo "    --jar <file>          use <file> as DMDirc.jar"
59
+	echo "    --current             Use the current folder as the base for the build"
59
 	echo "-t, --tag <tag>           Tag to add to final exe name to distinguish this build from a standard build"
60
 	echo "-t, --tag <tag>           Tag to add to final exe name to distinguish this build from a standard build"
60
 	echo "-k, --keep                Keep the existing source tree when compiling"
61
 	echo "-k, --keep                Keep the existing source tree when compiling"
61
 	echo "                          (don't svn update beforehand)"
62
 	echo "                          (don't svn update beforehand)"
72
 plugins=""
73
 plugins=""
73
 location="../../../"
74
 location="../../../"
74
 jarfile=""
75
 jarfile=""
76
+current=""
75
 while test -n "$1"; do
77
 while test -n "$1"; do
76
 	case "$1" in
78
 	case "$1" in
77
 		--plugins|-p)
79
 		--plugins|-p)
82
 			shift
84
 			shift
83
 			jarfile=${1}
85
 			jarfile=${1}
84
 			;;
86
 			;;
87
+		--current)
88
+			location="../../"
89
+			current="1"
90
+			;;
85
 		--compile|-c)
91
 		--compile|-c)
86
 			compileJar="true"
92
 			compileJar="true"
87
 			;;
93
 			;;
105
 	esac
111
 	esac
106
 	shift
112
 	shift
107
 done
113
 done
108
-
109
-jarPath="${location}trunk"
114
+if [ "" = "${current}" ]; then
115
+	jarPath="${location}trunk"
116
+else
117
+	jarPath="${location}"
118
+fi
110
 if [ "${isRelease}" != "" ]; then
119
 if [ "${isRelease}" != "" ]; then
111
 	if [ "${BRANCH}" != "0" ]; then
120
 	if [ "${BRANCH}" != "0" ]; then
112
 		if [ -e "${location}/${isRelease}" ]; then
121
 		if [ -e "${location}/${isRelease}" ]; then

+ 4
- 3
installer/release.sh View File

92
 			tempDIR=${PWD##*/}
92
 			tempDIR=${PWD##*/}
93
 			if [ "${tempDIR}" = "tags" ]; then
93
 			if [ "${tempDIR}" = "tags" ]; then
94
 				echo "Release of tag "${version}
94
 				echo "Release of tag "${version}
95
+				RELEASE="-r "${version}
95
 			elif [ "${tempDIR}" = "branches" ]; then
96
 			elif [ "${tempDIR}" = "branches" ]; then
96
 				echo "Release of branch "${version}
97
 				echo "Release of branch "${version}
97
 				BRANCH="-b "
98
 				BRANCH="-b "
99
+				RELEASE="-r "${version}
98
 			else
100
 			else
99
-				echo "Unknown release target."
100
-				exit 0;
101
+				echo "Unknown release target - Building as trunk build"
102
+				OPT="--current ${OPT}"
101
 			fi
103
 			fi
102
-			RELEASE="-r "${version}
103
 		fi;
104
 		fi;
104
 		cd ${thisDIR}
105
 		cd ${thisDIR}
105
 	elif [ "${BRANCH}" != "" -a ! -e "../../branches/"${LAST} ]; then
106
 	elif [ "${BRANCH}" != "" -a ! -e "../../branches/"${LAST} ]; then

+ 11
- 1
installer/windows/makeInstallerWindows.sh View File

96
 plugins=""
96
 plugins=""
97
 location="../../../"
97
 location="../../../"
98
 jarfile=""
98
 jarfile=""
99
+current=""
99
 
100
 
100
 showHelp() {
101
 showHelp() {
101
 	echo "This will generate a DMDirc installer for a windows based system."
102
 	echo "This will generate a DMDirc installer for a windows based system."
112
 	echo "-t, --tag <tag>           Tag to add to final exe name to distinguish this build from a standard build"
113
 	echo "-t, --tag <tag>           Tag to add to final exe name to distinguish this build from a standard build"
113
 	echo "-f, --flags <flags>       Extra flags to pass to the compiler"	
114
 	echo "-f, --flags <flags>       Extra flags to pass to the compiler"	
114
 	echo "    --jar <file>          use <file> as DMDirc.jar"
115
 	echo "    --jar <file>          use <file> as DMDirc.jar"
116
+	echo "    --current             Use the current folder as the base for the build"
115
 # This is not in the help cos its crappy really, and makes little/no difference to the
117
 # This is not in the help cos its crappy really, and makes little/no difference to the
116
 # exe size unless debugging information is added using --flags, in which case the person
118
 # exe size unless debugging information is added using --flags, in which case the person
117
 # probably is Dataforce and knows about this flag anyway
119
 # probably is Dataforce and knows about this flag anyway
133
 			shift
135
 			shift
134
 			jarfile=${1}
136
 			jarfile=${1}
135
 			;;
137
 			;;
138
+		--current)
139
+			location="../../"
140
+			current="1"
141
+			;;
136
 		--compile|-c)
142
 		--compile|-c)
137
 			compileJar="true"
143
 			compileJar="true"
138
 			;;
144
 			;;
173
 	shift	
179
 	shift	
174
 done
180
 done
175
 
181
 
176
-jarPath="${location}trunk"
182
+if [ "" = "${current}" ]; then
183
+	jarPath="${location}trunk"
184
+else
185
+	jarPath="${location}"
186
+fi
177
 if [ "${isRelease}" != "" ]; then
187
 if [ "${isRelease}" != "" ]; then
178
 	if [ "${BRANCH}" != "0" ]; then
188
 	if [ "${BRANCH}" != "0" ]; then
179
 		if [ -e "${location}/${isRelease}" ]; then
189
 		if [ -e "${location}/${isRelease}" ]; then

Loading…
Cancel
Save