From e96ecbd8ca8a1f6b6e0fd6c52ff6cca87897e831 Mon Sep 17 00:00:00 2001 From: pcrepieux Date: Sat, 28 Sep 2013 13:53:42 +0200 Subject: [PATCH 1/2] NSIS based installer for windows platform --- ARODataAnalyzer/installer/README | 10 ++ ARODataAnalyzer/installer/install.nsis | 134 +++++++++++++++++++++ ARODataAnalyzer/installer/launch4j_aro.xml | 26 ++++ ARODataAnalyzer/installer/license.txt | 34 ++++++ ARODataAnalyzer/installer/logo.ico | Bin 0 -> 2086 bytes 5 files changed, 204 insertions(+) create mode 100644 ARODataAnalyzer/installer/README create mode 100644 ARODataAnalyzer/installer/install.nsis create mode 100644 ARODataAnalyzer/installer/launch4j_aro.xml create mode 100644 ARODataAnalyzer/installer/license.txt create mode 100644 ARODataAnalyzer/installer/logo.ico diff --git a/ARODataAnalyzer/installer/README b/ARODataAnalyzer/installer/README new file mode 100644 index 00000000..df94a839 --- /dev/null +++ b/ARODataAnalyzer/installer/README @@ -0,0 +1,10 @@ +Requirements: +- NSIS (http://nsis.sourceforge.net/Main_Page) +- Intec (http://nsis.sourceforge.net/Inetc_plug-in) +- Launch4j (http://launch4j.sourceforge.net/) + +1) Generate the wrapper with launch4j and the laun4j_aro.xml configuration file + This will create the aro.exe file. +2) Build the installer with makensis by running "makensis install.nsis" from this + directory. + This will package the wrapper and all the required files in a setup.exe file. diff --git a/ARODataAnalyzer/installer/install.nsis b/ARODataAnalyzer/installer/install.nsis new file mode 100644 index 00000000..40b1e80e --- /dev/null +++ b/ARODataAnalyzer/installer/install.nsis @@ -0,0 +1,134 @@ +!include "FileFunc.nsh" +!include "MUI2.nsh" + +!define PRODUCT_NAME "ARO" +!define VERSION_MAJOR 2 +!define VERSION_MINOR 4 +!define PRODUCT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}" +!define COMPANY_NAME "AT&T" +!define DESCRIPTION "Application Resource Optimizer" +!define HELP_URL "http://developer.att.com/ARO" +!define ABOUT_URL "http://developer.att.com/ARO" +!define BINARY_PATH "bin" +!define BINARY_NAME "aro.exe" + +# This is the size (in kB) of all the files copied into install directory +!define INSTALL_SIZE 16000 + +SetCompressor lzma +# required to properly delete startup menu links on uninstall +RequestExecutionLevel user + +VIProductVersion ${VERSION_MAJOR}.${VERSION_MINOR}.0.0 +VIAddVersionKey ProductName ${PRODUCT_NAME} +VIAddVersionKey ProductVersion "${PRODUCT_VERSION}" +VIAddVersionKey FileVersion "${PRODUCT_VERSION}" +VIAddVersionKey CompanyName "${COMPANY_NAME}" +VIAddVersionKey CompanyWebsite "${ABOUT_URL}" +VIAddVersionKey FileDescription "DESCRIPTION" +VIAddVersionKey LegalCopyright "Copyright 2012 AT&T Intellectual Property" + +# see if /norun parameter has been set +Var runExe +!insertmacro GetParameters +!insertmacro GetOptions + +!define MUI_ABORTWARNING +!define MUI_ICON "logo.ico" +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE license.txt +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_FINISHPAGE_RUN "$runExe" +!define MUI_PAGE_CUSTOMFUNCTION_SHOW ShowFunction_Finish +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH +!insertmacro MUI_LANGUAGE "English" + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "setup-${PRODUCT_NAME}-${PRODUCT_VERSION}.exe" +InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" +ShowInstDetails show + +Section -SETTINGS + SetOutPath "$INSTDIR" + SetOverwrite ifnewer +SectionEnd + +# depending on /norun being present, the "run" screen +# is displayed or not. +# 1) We look for /norun in the command line arguments when +# onInit is called and set runExe accordingly. +# 2) When the "finish" page is about to be dispayed, we check +# the content of runExe to dismiss the "run" page if asked + +Function ShowFunction_Finish + ${If} $runExe == "" + ShowWindow $mui.FinishPage.Run 0 + ${EndIf} +FunctionEnd + +Function .onInit + var /GLOBAL cmdLineParams + Push $R0 + ${GetParameters} $cmdLineParams + ClearErrors + ${GetOptions} $cmdLineParams '/norun' $R0 + IfErrors 0 +2 + StrCpy $runExe "$INSTDIR\${BINARY_PATH}\${BINARY_NAME}" +FunctionEnd + + # the installer first checks if WinPcap is already installed by inspecting + # the registry. + # if not present, the winpcap installer is downloaded from winpcap.org and executed +Section "install" + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString" + IfFileExists $R0 InstallARO InstallWinPcap + +InstallWinPcap: + MessageBox MB_YESNO \ + "It looks like the WinPcap library required by ARO is missing. Would you like to install it now ?" IDNO InstallARO + inetc::get "http://www.winpcap.org/install/bin/WinPcap_4_1_3.exe" "$TEMP\WinPcap_4_1_3.exe" + ExecWait "$TEMP\WinPcap_4_1_3.exe" + +InstallARO: + SetOutPath $INSTDIR + File /r "..\bin" + File /r "..\lib" + SetOutPath $INSTDIR\${BINARY_PATH} + File ${BINARY_NAME} + + # Uninstaller - See function un.onInit and section "uninstall" for configuration + writeUninstaller "$INSTDIR\uninstall.exe" + + createDirectory "$SMPROGRAMS\${COMPANY_NAME}" + createShortCut "$SMPROGRAMS\${COMPANY_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${BINARY_PATH}\${BINARY_NAME}" "" "$INSTDIR\${BINARY_PATH}\${BINARY_NAME}" 0 + + # Registry information for add/remove programs + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "DisplayName" "${COMPANY_NAME} - ${PRODUCT_NAME} - ${DESCRIPTION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "QuietUninstallString" "$INSTDIR\uninstall.exe /S" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "InstallLocation" "$INSTDIR" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${BINARY_PATH}\${BINARY_NAME},0" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "Publisher" "${COMPANY_NAME}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "HelpLink" "${HELP_URL}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "URLInfoAbout" "${ABOUT_URL}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "DisplayVersion" "${VERSION_MAJOR}.${VERSION_MINOR}" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "VersionMajor" ${VERSION_MAJOR} + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "VersionMinor" ${VERSION_MINOR} + # There is no option for modifying or repairing the install + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "NoRepair" 1 + # Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" "EstimatedSize" ${INSTALL_SIZE} +SectionEnd + +Section "uninstall" + rmDir /r $INSTDIR + delete "$SMPROGRAMS\${COMPANY_NAME}\${PRODUCT_NAME}.lnk" + rmDir "$SMPROGRAMS\${COMPANY_NAME}" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANY_NAME} ${PRODUCT_NAME}" +SectionEnd \ No newline at end of file diff --git a/ARODataAnalyzer/installer/launch4j_aro.xml b/ARODataAnalyzer/installer/launch4j_aro.xml new file mode 100644 index 00000000..5cb718fa --- /dev/null +++ b/ARODataAnalyzer/installer/launch4j_aro.xml @@ -0,0 +1,26 @@ + + true + gui + + aro.exe + + + . + normal + http://java.com/download + + false + false + + logo.ico + + com.att.aro.main.Launch + ..\lib\* + + + + 1.6.0 + + preferJre + + \ No newline at end of file diff --git a/ARODataAnalyzer/installer/license.txt b/ARODataAnalyzer/installer/license.txt new file mode 100644 index 00000000..a6d076d7 --- /dev/null +++ b/ARODataAnalyzer/installer/license.txt @@ -0,0 +1,34 @@ +All works distributed in this package are covered by the Apache 2.0 License unless otherwise stated. + +Copyright 2012 AT&T Intellectual Property + +Licensed 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. + + +AT&T Application Resource Optimizer contains the following open source libraries or binaries within its distribution package. For more information on any item listed below, please contact developer.program@att.com. + + +- JFreeChart +The AT&T Application Resource Optimizer(ARO) uses Open Source Software that is licensed under the GNU Lesser General Public License (LGPL) version 3 (the "License"), and you may not use this file except in compliance with the License. You may obtain a copy of the Licenses at: http://www.jfree.org/jfreechart/. 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 Licenses for the specific language governing permissions and limitations under the Licenses. + +- JCommon +The AT&T Application Resource Optimizer(ARO) uses Open Source Software that is licensed under the GNU Lesser General Public License (LGPL) version 2.1 (the "License"), and you may not use this file except in compliance with the License. You may obtain a copy of the Licenses at: http://www.jfree.org/jcommon/. 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 Licenses for the specific language governing permissions and limitations under the Licenses. + +- FFmpeg +The AT&T Application Resource Optimizer(ARO) uses Open Source Software that is licensed under the GNU Lesser General Public License (LGPL) version 2.1 (the "License"), and you may not use this file except in compliance with the License. You may obtain a copy of the Licenses at: http://ffmpeg.org/download.html. 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 Licenses for the specific language governing permissions and limitations under the Licenses. + +- TCPDUMP/LIBPCAP +The AT&T Application Resource Optimizer(ARO) uses Open Source Software that is licensed under the following BSD (the "License"), and you may not use this file except in compliance with the License. You may obtain a copy of the Licenses at: http://www.tcpdump.org/#contribute. 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 Licenses for the specific language governing permissions and limitations under the Licenses. License: BSD Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditionsare met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/o> rials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS ORIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +- Android Open Source Project +The AT&T Application Resource Optimizer(ARO) uses Open Source Software that is licensed under the Apache Software License 2.0 (the "License"), and you may not use this file except in compliance with the License. You may obtain a copy of the Licenses at: http://source.android.com/source/licenses.html. 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 Licenses for the specific language governing permissions and limitations under the Licenses. diff --git a/ARODataAnalyzer/installer/logo.ico b/ARODataAnalyzer/installer/logo.ico new file mode 100644 index 0000000000000000000000000000000000000000..6c72ab4baa7e873a89d5b579ad56e965d0382201 GIT binary patch literal 2086 zcmbW2c~BH*8i#uTXJ7^mS_Y9LWsHIc@kCu#W0}=h>n4C06BRF1ZUrwGU?$uQq8y5x zqJV&i2ZTdl5WLolSfz$<3^OAyFxwNV;^WcB^B4VIgeW~#*&2Wuk7XwbgGT8^(_w3=`y zGs2yRp#6ciMDKiYY-7{Tge{QY<09Ic8ca<+*I|0Xcsk~O;98Ei*CFc z-8f6+zT~KSmFs04`HmR|Pj?RO%cb6Eq`IMrnnokX4p)#FxB}h8!RTF7=*Mf&yIS2h z%(fCSldXuGW<~5IbCM=W?3iXjs+%RLGptCRt|ESdIcX~w(A0W{g3?2*T)l=l@6E-- z(+fj-CiSP!QJ@PUW{O(&P?0dpO6+`JDH3N|l00h=8H+}d>g$6(Ae``^IJN~PvBg(U zvVRc9hFbJ-3D^!F&KqwGVbZ&I96A8v%Vw?L&s(DKJi9fL`B>{VTd){(# zWXg1Rw(M!7sbs0Aclggg5+z z@6kS19)E#f*;9(^I?2l1!F0D7Eco3#Cc4eT#-o7IuCtgjaV%rUj3Fd!J7-UwBzu_? zdlpF|Z>hN`@KlkJ7|#gVcigTXexLi8`FVfi{oE(aN$w%Ps*}dLBX}=ag8zD77I>{< ztamCOd3fWq>=PDyd68RG!RfkkauyFE$6Fx^d=%oq5*0g>lW|Fh^3$FCaPJm(yY6!L z?j5?i?$LSkCf|H>gT%xHmVWGwUr0Eg2E`D%F@#ksR}i*&3zx68Q?tW|Y%g>6Ei)7Q zS1UyEauw-25}BC`mDjG5bTNyNfO`D)AKU+otquxWM{EyUm0jyuY zftdJYuH3jqTU|c;RtzP7xy1g}W};}VLX@sjv3qAM?gdcv)mN-JnZoi}&3q8P8~Yj` zf-k3Y_R60LDtyj^?ru6dZgBd18&|H~;9i&DYF#=-zQbf+lcz+nuRGMtUuh`3h5`S$P8MD%kYBc3mF|G?F%7~0B1sg9l|&n70kO0v`SxF3MB>$gd}eTw!U|4K?nBcodkY;UjPV(0fbr1w)0 zAIL#ZNq#mGxgSdu$a9x$kiGn6{Qi}f`YS|vu(_!8SCXHpV@46QbUxzm1HHUtfXI#} zrd}u@OI+a6tsijA?58YE?oqzKG*Cf#kU8bS7O!GipgAT=1LRteg*Xzb6vu;=6zz?| zy%hd<=P}SP1F7GgBd@ECo`F6t-F}4A-hL`GLZ}UtsMx6F@Fo?9H>#-o4<;QV>rEma^gn;X<7a(*{rD00dY;hV_l&yshdAZ+b1W;EhK&+OHd}LS z>wj}}i$<=iMYVQ_sNb&SXrUJ8N|@95j7=Awpl$2HaP_GidkH!BBeR=&aoG2g>g-^Q zTP3O@Z1`OJI)+lCwGp+^!$hN2$%)b^MwNq92%6&%c=;a`f7{C^7y2=i=a5R|?~wd{ z8w*2eiIAv?9!|aPHAKJ3iRj^?DR#ueM%`e}UTGEm{va==G@!`qD zH$`iLjX0C|OHRwWHDRb|k=I)cjzZom Date: Tue, 19 Nov 2013 09:19:28 +0100 Subject: [PATCH 2/2] typo --- ARODataAnalyzer/installer/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARODataAnalyzer/installer/README b/ARODataAnalyzer/installer/README index df94a839..bcbc88a3 100644 --- a/ARODataAnalyzer/installer/README +++ b/ARODataAnalyzer/installer/README @@ -1,6 +1,6 @@ Requirements: - NSIS (http://nsis.sourceforge.net/Main_Page) -- Intec (http://nsis.sourceforge.net/Inetc_plug-in) +- Inetc (http://nsis.sourceforge.net/Inetc_plug-in) - Launch4j (http://launch4j.sourceforge.net/) 1) Generate the wrapper with launch4j and the laun4j_aro.xml configuration file