You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2012/08/30 12:18:05 UTC

svn commit: r1378876 - in /incubator/flex/utilities/trunk/installer: ./ src/

Author: bigosmallm
Date: Thu Aug 30 10:18:05 2012
New Revision: 1378876

URL: http://svn.apache.org/viewvc?rev=1378876&view=rev
Log:
Fixed build.xml to support release
Fixed auto-update logic

Added:
    incubator/flex/utilities/trunk/installer/steps_to_release.txt
Removed:
    incubator/flex/utilities/trunk/installer/certificate.p12
Modified:
    incubator/flex/utilities/trunk/installer/   (props changed)
    incubator/flex/utilities/trunk/installer/.actionScriptProperties
    incubator/flex/utilities/trunk/installer/.flexProperties
    incubator/flex/utilities/trunk/installer/build.number
    incubator/flex/utilities/trunk/installer/build.properties
    incubator/flex/utilities/trunk/installer/build.xml
    incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml
    incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
    incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml

Propchange: incubator/flex/utilities/trunk/installer/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Aug 30 10:18:05 2012
@@ -1,6 +1,7 @@
 bin-debug
+bin-release-temp
 build
+certificate.p12
 libs
-release
 rat.report
-bin-release-temp
+release

Modified: incubator/flex/utilities/trunk/installer/.actionScriptProperties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/.actionScriptProperties?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/.actionScriptProperties (original)
+++ incubator/flex/utilities/trunk/installer/.actionScriptProperties Thu Aug 30 10:18:05 2012
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<actionScriptProperties analytics="false" mainApplicationPath="InstallApacheFlex.mxml" projectUUID="151f0ac8-8811-45cd-b935-d7c2b0949fa3" version="10">
-  <compiler additionalCompilerArguments="-define=INSTALLER::buildNumber,3 -define=INSTALLER::releaseVersion,'0.8'" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Apache Flex 4.8.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
-    <compilerSourcePath>
-      <compilerSourcePathEntry kind="1" linkType="1" path="/common/src"/>
-    </compilerSourcePath>
-    <libraryPath defaultLinkType="0">
-      <libraryPathEntry kind="4" path="">
-        <excludedEntries>
-          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
-          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
-        </excludedEntries>
-      </libraryPathEntry>
-      <libraryPathEntry kind="1" linkType="1" path="libs"/>
-      <libraryPathEntry kind="3" linkType="1" path="/common/bin/common.swc" useDefaultLinkType="false"/>
-    </libraryPath>
-    <sourceAttachmentPath/>
-  </compiler>
-  <applications>
-    <application path="InstallApacheFlex.mxml">
-      <airExcludes/>
-    </application>
-  </applications>
-  <modules/>
-  <buildCSSFiles/>
-  <flashCatalyst validateFlashCatalystCompatibility="false"/>
-  <buildTargets>
-    <buildTarget buildTargetName="default">
-      <airSettings airCertificatePath="C:/p/flex_os/workspace/MakeApacheFlexForFlashBuilder/certificate.p12" airTimestamp="true" anePathSet="true" version="1">
-        <airExcludes/>
-        <anePaths/>
-      </airSettings>
-      <actionScriptSettings version="1"/>
-    </buildTarget>
-  </buildTargets>
-</actionScriptProperties>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="InstallApacheFlex.mxml" projectUUID="151f0ac8-8811-45cd-b935-d7c2b0949fa3" version="10">
+  <compiler additionalCompilerArguments="-define=INSTALLER::buildNumber,3 -define=INSTALLER::releaseVersion,'0.8'" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Apache Flex 4.8.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+    <compilerSourcePath>
+      <compilerSourcePathEntry kind="1" linkType="1" path="/common/src"/>
+    </compilerSourcePath>
+    <libraryPath defaultLinkType="0">
+      <libraryPathEntry kind="4" path="">
+        <excludedEntries>
+          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+        </excludedEntries>
+      </libraryPathEntry>
+      <libraryPathEntry kind="1" linkType="1" path="libs"/>
+      <libraryPathEntry kind="3" linkType="1" path="/common/bin/common.swc" useDefaultLinkType="false"/>
+    </libraryPath>
+    <sourceAttachmentPath/>
+  </compiler>
+  <applications>
+    <application path="InstallApacheFlex.mxml">
+      <airExcludes/>
+    </application>
+  </applications>
+  <modules/>
+  <buildCSSFiles/>
+  <flashCatalyst validateFlashCatalystCompatibility="false"/>
+  <buildTargets>
+    <buildTarget buildTargetName="default">
+      <airSettings airCertificatePath="C:/p/documents/certificates/installapacheflex_self.p12" airTimestamp="true" anePathSet="true" version="1">
+        <airExcludes/>
+        <anePaths/>
+      </airSettings>
+      <actionScriptSettings version="1"/>
+    </buildTarget>
+  </buildTargets>
+</actionScriptProperties>

Modified: incubator/flex/utilities/trunk/installer/.flexProperties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/.flexProperties?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/.flexProperties (original)
+++ incubator/flex/utilities/trunk/installer/.flexProperties Thu Aug 30 10:18:05 2012
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>

Modified: incubator/flex/utilities/trunk/installer/build.number
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/build.number?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/build.number (original)
+++ incubator/flex/utilities/trunk/installer/build.number Thu Aug 30 10:18:05 2012
@@ -1,3 +1,5 @@
+#Copyright 2012 The Apache Software Foundation.
+#Thu, 30 Aug 2012 02:40:30 -0700
 #Build Number for ANT. Do not edit!
 #Sat Aug 11 23:37:41 PDT 2012
 build.number=0

Modified: incubator/flex/utilities/trunk/installer/build.properties
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/build.properties?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/build.properties (original)
+++ incubator/flex/utilities/trunk/installer/build.properties Thu Aug 30 10:18:05 2012
@@ -19,7 +19,7 @@
 -->
 
 #nano version number is added by build script
-release.version=0.9
+release.version=1.0
 
 #The URLs for the IDE Installer Apps
 installer.url.win=http://people.apache.org/~bigosmallm/installapacheflex/InstallApacheFlex.exe
@@ -38,7 +38,7 @@ AIR_HOME_MAC=${FLEX_HOME_MAC}
 #App Settings
 APP_NAME=InstallApacheFlex
 APP_EXTENSION=mxml
-APP_CONFIG_XML_NAME=ApacheFlexConfig
+APP_CONFIG_XML_NAME=sdk-installer-config
 SOURCE_DIR=${basedir}/src
 ASSETS_DIR=${basedir}/src/assets
 LIBRARY_DIR=${basedir}/libs
@@ -51,10 +51,12 @@ DEBUG_FLAG=false
 
 #certificate
 STORETYPE=pkcs12
-KEYSTORE=certificate.p12
-CERT_NAME=ApacheFlexSelfSignedCertificate
-CERT_ORG_UNIT=Apache Flex
-CERT_ORG_NAME=Apache
+KEYSTORE_DIR=C:/p/documents/certificates
+KEYSTORE=installapacheflex_self.p12
+CERT_PASSWORD_DIR=C:/p/documents/certificates
+CERT_PASSWORD_FILE=installapacheflex.password
+CERT_NAME=Apache Flex
+CERT_ORG_UNIT=
+CERT_ORG_NAME=
 CERT_COUNTRY=US
-CERT_KEY_TYPE=2048-RSA
-CERT_PASSWORD=apacheflex
\ No newline at end of file
+CERT_KEY_TYPE=2048-RSA
\ No newline at end of file

Modified: incubator/flex/utilities/trunk/installer/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/build.xml?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/build.xml (original)
+++ incubator/flex/utilities/trunk/installer/build.xml Thu Aug 30 10:18:05 2012
@@ -26,6 +26,7 @@
     <!--location of property file -->
     <property file="${basedir}/build.properties" description="Properties for MakeApacheFlexForFlashBuilder project" />
     <property file="${basedir}/build.number"/>
+	<property file="${CERT_PASSWORD_DIR}/${CERT_PASSWORD_FILE}"/>
 
     <property name="installer.version" value="${release.version}.${build.number}"/>
     <property name="kit.prefix" value="apache-flex-sdk-installer-${installer.version}-incubating"/>
@@ -86,13 +87,13 @@
     </condition>
     <property name="extension" value="dmg"/>
 
-    <target name="build" depends="init,compile,packagenative,cleanup" 
+    <target name="build" depends="init,compile,packagenative,copy-config,cleanup" 
         description="Compiles and packages application"/>
 
     <target name="release" depends="clean,build,source-package,binary-package,rat-report"
         description="Build the application and package up the distros for release."/>
         
-    <target name="init" depends="clean,createDirs,update-app-xml,create-version-xml" 
+    <target name="init" depends="clean,createDirs,update-version-in-xml-files" 
         description="Creates the deploy folders and sets app extension"/>
         
     <target name="clean" description="Cleans up old files.">
@@ -118,7 +119,7 @@
     </target>
 
     <!-- Make sure version, esp, build.number, in APP_NAME-app.xml is in sync.  -->
-    <target name="update-app-xml" description="Update version in APP_NAME-app.xml.">
+    <target name="update-version-in-xml-files" description="Update version in APP_NAME-app.xml.">
         <echo message="version in ${APP_NAME}-app.xml will be ${installer.version}"/>
         <replaceregexp byline="true">
             <regexp pattern="&lt;versionNumber&gt;(\d+\.)?(\d+\.)?(\d+)&lt;/versionNumber&gt;"/>
@@ -127,6 +128,13 @@
                 <include name="${APP_NAME}-app.xml"/>
             </fileset>
         </replaceregexp>
+		<replaceregexp byline="true">
+            <regexp pattern="&lt;latest&gt;(\d+\.)?(\d+\.)?(\d+)&lt;/latest&gt;"/>
+            <substitution expression="&lt;latest&gt;${installer.version}&lt;/latest&gt;"/>
+            <fileset dir="${SOURCE_DIR}">
+                <include name="${APP_CONFIG_XML_NAME}.xml"/>
+            </fileset>
+        </replaceregexp>
     </target>
     
     <!-- 
@@ -148,7 +156,7 @@
 
     </target>
     
-    <target name="packagenative" depends="certificate,packageair"
+    <target name="packagenative" depends="packageair"
        description="Packages the AIR file from the build directory to create a native installer (exe/dmg) file">
 
        <java jar="${ADT}" fork="true"
@@ -158,7 +166,7 @@
            <arg value="-target"/>
            <arg value="native"/>
            <arg value="${RELEASE_DIR}/${APP_NAME}.${extension}"/>
-           <arg value="${RELEASE_DIR}/${APP_NAME}.air"/>
+           <arg value="${BUILD_DIR}/${APP_NAME}.air"/>
        </java>
    </target>
     
@@ -216,7 +224,7 @@
 
     <!-- Make sure to use the same certificate each time so we can update the app. -->
     <target name="certificate">
-        <available file="${KEYSTORE}" property="certificate.exists"/>
+        <available file="${KEYSTORE_DIR}/${KEYSTORE}" property="certificate.exists"/>
         <antcall target="generate-certificate"/>
     </target>
 
@@ -247,10 +255,10 @@
             <arg value="-storetype"/>
             <arg value="${STORETYPE}"/>
             <arg value="-keystore"/>
-            <arg value="${KEYSTORE}"/>
+            <arg value="${KEYSTORE_DIR}/${KEYSTORE}"/>
             <arg value="-storepass"/>
             <arg value="${CERT_PASSWORD}"/>
-            <arg value="${RELEASE_DIR}/${APP_NAME}.air"/>
+            <arg value="${BUILD_DIR}/${APP_NAME}.air"/>
             <arg value="${SOURCE_DIR}/${APP_NAME}-app.xml"/>
             <arg value="-C"/>
             <arg value="${BUILD_DIR}"/>
@@ -261,47 +269,16 @@
             <arg value="${ASSETS_DIR}"/>
         </java>
     </target>
+	
+	<target name="copy-config" description="Copy config files to release directory">
+		<copy file="${SOURCE_DIR}/${APP_CONFIG_XML_NAME}.xml" todir="${RELEASE_DIR}"/>
+	</target>
     
-    <target name="create-version-xml" description="Creates version.xml file for update">
-        <echo message="version in version.xml will be ${installer.version}"/>
-        <echo file="${RELEASE_DIR}/version.xml">&lt;?xml version="1.0"?&gt;
-&lt;!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
---&gt;
-&lt;update&gt;
-    &lt;!-- The URL to download the Windows installer from --&gt;
-    &lt;urlWindows&gt;${installer.url.win}&lt;/urlWindows&gt;
-    &lt;!-- The URL to download the Mac installer from --&gt;
-    &lt;urlMac&gt;${installer.url.mac}&lt;/urlMac&gt;
-    &lt;!-- The version from ${APP_NAME}-app.xml --&gt;
-    &lt;version&gt;${installer.version}&lt;/version&gt;
-    &lt;description&gt;Latest release&lt;/description&gt;
-    &lt;required&gt;true&lt;/required&gt;
-&lt;/update&gt;
-        </echo>
-    </target>
-
     <!-- 
         Packages the source distribution with ZIP and TAR_GZIP.
         The source file line endings match the package type.
     -->
     <target name="source-package" description="Package source files.">
-        
         <mkdir dir="${BUILD_DIR}/temp"/>
         <copy todir="${BUILD_DIR}/temp" includeEmptyDirs="false">
             <fileset dir="${basedir}">

Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex-app.xml Thu Aug 30 10:18:05 2012
@@ -45,7 +45,7 @@
 	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
 	Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
 	An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
-	<versionNumber>0.9.0</versionNumber>
+	<versionNumber>1.0.0</versionNumber>
 		         
 	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
 	<!-- <versionLabel></versionLabel> -->

Modified: incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/InstallApacheFlex.mxml Thu Aug 30 10:18:05 2012
@@ -413,6 +413,7 @@ variables are not required because the l
 		
 		protected function checkVersion():void
 		{
+			var shouldUpdate:Boolean = false;
 			//Current version
 			var applicationDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
 			var xmlns:Namespace = new Namespace(applicationDescriptor.namespace());
@@ -424,12 +425,24 @@ variables are not required because the l
 			{
 				if (parseInt(availBuildNumbers[i]) > parseInt(currentBuildNumbers[i]))
 				{
-					var updaterDialog:UpdaterDialog = UpdaterDialog(PopUpManager.createPopUp(this,UpdaterDialog,true));
-					updaterDialog.addEventListener("close",handleUpdaterDialogClose);
-					updaterDialog.latestVersion = _latestVersion;
-					
-					PopUpManager.centerPopUp(updaterDialog);
+					shouldUpdate = true;
 				}
+				else if(parseInt(availBuildNumbers[i]) == parseInt(currentBuildNumbers[i]))
+				{
+					continue;
+				}
+				else
+				{
+					return;
+				}
+			}
+			
+			if(shouldUpdate)
+			{
+				var updaterDialog:UpdaterDialog = UpdaterDialog(PopUpManager.createPopUp(this,UpdaterDialog,true));
+				updaterDialog.addEventListener("close",handleUpdaterDialogClose);
+				updaterDialog.latestVersion = _latestVersion;
+				PopUpManager.centerPopUp(updaterDialog);
 			}
 		}
 		

Modified: incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml?rev=1378876&r1=1378875&r2=1378876&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml (original)
+++ incubator/flex/utilities/trunk/installer/src/sdk-installer-config.xml Thu Aug 30 10:18:05 2012
@@ -18,7 +18,7 @@ limitations under the License.
 -->
 <config>
 	<version>
-		<latest>0.8.3</latest>
+		<latest>1.0.0</latest>
 	</version>
 	<files>
 	

Added: incubator/flex/utilities/trunk/installer/steps_to_release.txt
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/steps_to_release.txt?rev=1378876&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/installer/steps_to_release.txt (added)
+++ incubator/flex/utilities/trunk/installer/steps_to_release.txt Thu Aug 30 10:18:05 2012
@@ -0,0 +1,44 @@
+1.    Check out the code from https://svn.apache.org/repos/asf/incubator/flex/utilities/trunk
+
+2.a.  If it is a major release, 
+		- bump up the "release.version" property in the build.properties file 
+		- reset the build.number property in the build.number file to 0
+
+2.b.  If it is a minor release, run: ant update-version
+
+3.  Open build.properties and update the following:
+	- Modify the KEYSTORE_DIR and CERT_PASSWORD_DIR variables with the correct directory paths
+	(You need to obtain theinstallapacheflex_self.p12 file and its password from the previous release manager for InstallApacheFlex)
+	
+4.  Run: 
+ant build
+
+This step 
+	- downloads all the necessary files, 
+	- updates the version numbers in InstallApacheFlex-app.xml and sdk-installer-config.xml
+	- creates the .exe or .dmg file depending on the OS you are working on
+	
+5.  Run: 
+ant source-package
+
+This step creates the source release files as a .zip file and a tar.gz file 
+
+
+6.  Run:
+
+cd release
+
+gpg --armor --output InstallApacheFlex.exe.asc --detach-sig InstallApacheFlex.exe
+gpg --armor --output apache-flex-sdk-installer-1.0.0-incubating-src.tar.gz.asc --detach-sig apache-flex-sdk-installer-1.0.0-incubating-src.tar.gz
+gpg --armor --output apache-flex-sdk-installer-1.0.0-incubating-src.zip.asc --detach-sig apache-flex-sdk-installer-1.0.0-incubating-src.zip
+
+This step creates the release artifacts InstallApacheFlex.exe.asc, apache-flex-sdk-installer-1.0.0-incubating-src.tar.gz.asc and apache-flex-sdk-installer-1.0.0-incubating-src.zip.asc
+
+7.  Run:
+gpg --print-md MD5 InstallApacheFlex.exe > InstallApacheFlex.exe.md5
+gpg --print-md MD5 apache-flex-sdk-installer-1.0.0-incubating-src.tar.gz > apache-flex-sdk-installer-1.0.0-incubating-src.tar.gz.md5
+gpg --print-md MD5 apache-flex-sdk-installer-1.0.0-incubating-src.zip > apache-flex-sdk-installer-1.0.0-incubating-src.zip.md5
+
+8.
+
+Upload all these artifacts to the release manager's personal space at people.apache.org and call out a vote
\ No newline at end of file