--- /dev/null
+<project name="InstallManager" default="make_installmanager" basedir=".">\r
+ <description>\r
+ Install Manager for MacOS\r
+ </description>\r
+\r
+ <!--\r
+ set taskdef for jarbundler\r
+ You must :\r
+ - get this library at sourceforge.net/projects/jarbundler\r
+ - copy jarbundler-2.2.0.jar to /usr/share/ant/lib of your Mac\r
+ -->\r
+ <taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" />\r
+\r
+ <property name="IM_NAME" value="Tizen_SDK_Install"/>\r
+ <property name="MAC_ICON" value="mac_installer_icon.icns"/>\r
+ <property name="MAC_BACKGROUND" value="dmg_background_01.png"/>\r
+ <property name="IMAGE_PATH" value="../InstallManager_java/src/res/icons"/>\r
+ <condition property="ISFILE">\r
+ <available file="installmanager.conf"/>\r
+ </condition>\r
+\r
+ <target name="clean">\r
+ <delete dir="${APP_NAME}.app"/>\r
+ <delete file="${INSTALL_NAME}.dmg"/>\r
+ </target>\r
+\r
+ <target name="make_bundle">\r
+ <!--\r
+ Important option\r
+ - startOnMainThread must be 'true'\r
+ - workingdirectory must be set. Default must be '$APP_PACKAGE/Contents/Resources/Java' for installmanager.conf\r
+ - installmanager.conf must be located at workingdirectory.\r
+ --> \r
+ <!-- to do later\r
+ Add dmg ICON\r
+ <copy file="${IMAGE_PATH}/${MAC_BACKGROUND}" todir="${basedir}" />\r
+ --> \r
+ <copy file="${IMAGE_PATH}/${MAC_ICON}" todir="${basedir}" />\r
+ <jarbundler dir="." name="${APP_NAME}" mainclass="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" jar="InstallManager.jar"\r
+ verbose="true" startOnMainThread="true"\r
+ workingdirectory="$APP_PACKAGE/Contents/Resources/Java" icon ="${MAC_ICON}"\r
+ arguments="${ARGUMENT}"\r
+ > \r
+ <resourcefileset dir="." includes="*.conf"/>\r
+ </jarbundler>\r
+ </target>\r
+ \r
+ <target name="make_dmg">\r
+ <exec executable="hdiutil">\r
+ <arg line="create ./${DMG_NAME}.dmg -srcfolder ./"${APP_NAME}.app" -ov"/>\r
+ </exec>\r
+ </target>\r
+ \r
+ <target name="make_public">\r
+ <property name="ARGUMENT" value=""/>\r
+ <property name="APP_NAME" value="${IM_NAME}"/>\r
+ <property name="DMG_NAME" value="${INSTALL_NAME}"/>\r
+ <antcall target="clean"/>\r
+ <antcall target="make_bundle"/>\r
+ <antcall target="make_dmg"/>\r
+ </target>\r
+\r
+ <target name="make_installmanager">\r
+ <antcall target="make_public"/>\r
+ </target>\r
+\r
+</project>\r
+\r
#!/bin/bash -ex
buildDir="${SRCDIR}/build"
+bundleDir="${SRCDIR}/bundle"
targetBinary="inst-manager"
##make config file
buildInstallManager() {
cd ${buildDir}
case ${TARGET_OS} in
- ubuntu-32|fedora-32|tizen-32)
- $SRCDIR/build.sh "linux-32"
- ;;
- ubuntu-64|fedora-64|tizen-64)
- $SRCDIR/build.sh "linux-64"
- ;;
- windows-32)
- $SRCDIR/build.sh "windows-32"
- ;;
- windows-64)
- $SRCDIR/build.sh "windows-64"
- ;;
macos-64)
- $SRCDIR/build.sh "macos-64"
+ $SRCDIR/build.sh "macos"
;;
*)
echo "The OS \"${TARGET_OS}\" is not supported yet!"
}
##build installmanager.bin
-copyBinary() {
+buildExecutable() {
case ${TARGET_OS} in
- ubuntu-32|fedora-32|tizen-32)
- cp -rf $SRCDIR/InstallManager_java/dist/linux32/InstallManager.jar ${buildDir}/
- ;;
- ubuntu-64|fedora-64|tizen-64)
- cp -rf $SRCDIR/InstallManager_java/dist/linux64/InstallManager.jar ${buildDir}/
- ;;
- windows-32)
- cp -rf $SRCDIR/InstallManager_java/dist/windows32/InstallManager.jar ${buildDir}/
- ;;
- windows-64)
- cp -rf $SRCDIR/InstallManager_java/dist/windows64/InstallManager.jar ${buildDir}/
- ;;
macos-64)
cp -rf $SRCDIR/InstallManager_java/dist/macos/InstallManager.jar ${buildDir}/
;;
}
+buildBundle() {
+ case ${TARGET_OS} in
+ macos-64)
+ cp -rf $SRCDIR/InstallManager_java/dist/macos/InstallManager.jar ${bundleDir}/
+ ;;
+ *)
+ echo "The OS \"${TARGET_OS}\" is not supported yet!"
+ exit 1
+ ;;
+ esac
+ cp -rf ${SRCDIR}/macos/build.xml ${bundleDir}/
+ cp -rf ${buildDir}/installmanager.conf ${bundleDir}/
+
+ cd ${bundleDir}
+ ${SRCDIR}/makeDmg
+ cd ${SRCDIR}
+}
+
+
clean()
{
rm -rf $SRCDIR/*.zip
rm -rf $SRCDIR/*.tar.gz
rm -rf $SRCDIR/InstallManager_java/dist
- rm -rf $buildDir/*.bin
- rm -rf $buildDir/*.conf
- rm -rf $buildDir/*.jar
+ rm -rf $buildDir
+ rm -rf $bundleDir
}
mkdir -p ${buildDir}
buildConfigFile
buildInstallManager
- copyBinary
+ buildExecutable
+ rm -rf ${bundleDir}
+ mkdir -p ${bundleDir}
+ buildBundle
}
install()
mkdir -p $BINDIR
cp -r ${buildDir}/${targetBinary}.bin ${BINDIR}
+ cp -r ${bundleDir}/${targetBinary}.dmg ${BINDIR}
}