[Title] Support '-help' option, more information.
authoryongsung1.kim <yongsung1.kim@samsung.com>
Fri, 31 May 2013 05:05:39 +0000 (14:05 +0900)
committeryongsung1.kim <yongsung1.kim@samsung.com>
Fri, 31 May 2013 05:05:39 +0000 (14:05 +0900)
[Desc.]
[Issue] redmine #9506

Change-Id: I05d409b3529539e7a636359452a774f7e9d44be3

InstallManager_java/src/org/tizen/installmanager/cli/InstallManagerNoUI.java
InstallManager_java/src/org/tizen/installmanager/core/Options.java
InstallManager_java/src/org/tizen/installmanager/ui/InstallManagerWindow.java

index 8201236..1e9d7a5 100644 (file)
@@ -181,6 +181,43 @@ public class InstallManagerNoUI {
                }
        }
        
+       public static void cliShowHelp() {
+               System.out.println("Usage");
+               System.out.println("Network install          : InstallManager.bin(exe, sh) -install" +
+                               " [-x proxy host:proxy port] -r repository -d distribution [-l SDK target directory]" +
+                               " -p meta package ....");
+               System.out.println("SDK Image install        : InstallManager.bin(exe, sh) -install" +
+                               " -f SDK image file path -d distribution [-l SDK target directory]" +
+                               " -p meta package ....");
+               System.out.println("Uninstall                : InstallManager.bin(exe, sh) -remove" +
+                               " -p meta packages... or all");
+               System.out.println("Installation information : InstallManager.bin(exe, sh) -status");
+               System.out.println("Repository information   : InstallManager.bin(exe, sh)" +
+                               " -repoinfo -r repository");
+               System.out.println("Package information      : InstallManager.bin(exe, sh)" +
+                               " -packageinfo -r repository -d distribution");
+               System.out.println();
+               System.out.println("Details");
+               System.out.println("-install      : If input packages are not installed, installation works properly.");
+               System.out.println("                Input packages are installed alredy,");
+               System.out.println("                    1. If installed packages are older than packages in server, the install manager updates them.");
+               System.out.println("                    2. If installed packages are the newest, the install manager will finish with error message.");
+               System.out.println("-remove       : If input packages are installed, the install manager can remove them.");
+               System.out.println("                If input packages are not installed, the install manager will finish with error message.");
+               System.out.println("-status       : If SDK is not installed, information is not displayed.");
+               System.out.println("                If SDK is installed, information such as installed repository, distribution and installed packages are displayed.");
+               System.out.println("-repoinfo     : The install manager can display distribution(s) in repository.");
+               System.out.println("-packageinfo  : The install manager can display information such as repository, distribution and packages(installable, updatable and removable).");
+               System.out.println();
+               System.out.println("Constraints");
+               System.out.println("1. Input packages must be meta package.(You can know it using '-packageinfo').");
+               System.out.println("2. Input packages name must be real package name not label(ex, tizen-web-cli, TYPICAL, etc....).");
+               System.out.println("3. If you want to install additional SDK packages, input arguments must be same as before input arguments.");
+               System.out.println("4. If install target location is under home, the home path must start '/' or '/home', not 'home'(ubuntu, mac)");
+               System.out.println("5. If not use a target location argument, SDK will be installed default location such as '/home/<account>/tizen-sdk' at ubuntu and mac os, 'c:\tizen-sdk' at windows.");
+               System.out.println("6. If you use proxy setting, do not need to 'http://' just host:prot");
+       }
+       
        public static void cliShowInstallInformation() {
                CliShowInformation.showInstallInfo();
        }
index 21eee37..c768b97 100644 (file)
@@ -59,6 +59,7 @@ public class Options {
        public static boolean doShowDistListNoUI = false;
        public static boolean doShowPackageListNoUI = false;
        public static boolean doShowSDKInstallStatus = false;
+       public static boolean doShowHelp = false;
        
        /**
         * Do download package file.
@@ -238,12 +239,9 @@ public class Options {
                        } else if (arg.equalsIgnoreCase("-status")) {
                                doShowSDKInstallStatus = true;
                                break;
-                       } else if (arg.equals("-help")) {
-                               System.out.println("Usage : InstallManager.bin(exe, sh) [-install]" +
-                                               " [-r repository] [-d distribution] [-l SDK target directory(optional)]" +
-                                               " [-p meta package ....]");
-                               System.out.println("Usage : InstallManager.bin(exe, sh) [-remove] [-p meta package... | all]");
-                               throw new IMFatalException(ErrorCode.WRONG_OPTION);
+                       } else if (arg.equalsIgnoreCase("-help")) {
+                               doShowHelp = true;
+                               break;
                        } else if(arg.equals("-conf")) {
                                if(iter.hasNext()) {
                                        userConfPath = iter.next();
index 4988a52..eb7e6d4 100644 (file)
@@ -834,6 +834,8 @@ public class InstallManagerWindow extends ApplicationWindow {
                                InstallManagerNoUI.cliShowPackageList();
                        } else if (Options.doShowSDKInstallStatus) {
                                InstallManagerNoUI.cliShowInstallInformation();
+                       } else if (Options.doShowHelp) {
+                               InstallManagerNoUI.cliShowHelp();
                        } else {
                                window.open();
                                if (Display.getCurrent() != null