Commits

Anonymous committed 3461807

jl158 #i114008# HelpIndexerTool -extension ... implemented. This allows processing of the extension help files by using the java class in the build environment

Comments (0)

Files changed (1)

l10ntools/source/help/HelpIndexerTool.java

     public static void main( String[] args )
 	{
 		boolean bExtensionMode = false;
-		mainImpl( args, bExtensionMode );
+		mainImpl( args, bExtensionMode ); 
 	}
 
     public static void mainImpl( String[] args, boolean bExtensionMode )
         String aSegmentName = "";
 
         // Scan arguments
+        //If this tool is invoked in the build process for extensions help,
+        //then -extension must be set.
+        boolean bExtension = false;
         boolean bLang = false;
         boolean bMod = false;
         boolean bZipDir = false;
         int nArgCount = args.length;
         for( int i = 0 ; i < nArgCount ; i++ )
 		{
-            if( "-lang".equals(args[i]) )
+            if( "-extension".equals(args[i]) )
+			{
+                bExtension = true;
+            }            
+            else if( "-lang".equals(args[i]) )
 			{
                 if( i + 1 < nArgCount )
 				{
                     bSegmentName = true;
                 }
                 i++;
-		if (!(bCfsName && bSegmentName))
-		{
-			System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
-			System.exit( -1 );
-		}
+                if (!(bCfsName && bSegmentName))
+                {
+                    System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
+                    System.exit( -1 );
+                }
             }
         }
 
-        if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode) )
+        if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode && !bExtension) )
 		{
 			if( bExtensionMode )
 				return;
 
 			System.out.println("Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -zipdir TempZipDir -o OutputZipFile");
+            System.out.println("Usage: HelpIndexer -extension -lang ISOLangCode -mod HelpModule -zipdir PathToLangDir");
 			System.exit( -1 );
         }
 
 				System.out.println( "Checking segment file " + aSegmentName+ ": " + (bSegmentFileOk ? "Found" : "Not found") );
 			}
 
-			if( bExtensionMode )
+			if( bExtensionMode || bExtension)
 			{
 				if( !bSrcDir )
 				{