Home » Developing U++ » UppHub » GetUppFromDir - Creates Upp package for given directory 
	
		
		
			| GetUppFromDir - Creates Upp package for given directory [message #24479] | 
			Tue, 19 January 2010 00:01   | 
		 
		
			
				
				
				
					
						  
						Sender Ghost
						 Messages: 301 Registered: November 2008 
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		Some time ago I made U++ package for Boost include files with special command line utility. Here I contribute this utility. 
 
Description: 
This program creates simple *.upp file to use with TheIDE (e.g. uppsrc\Core\Core.upp). So, you can use it in batch processing of directories. Important feature is recursive creation of separators if given directory has subdirectories with files. Its an alternative for "TheIDE->Special->Import directory tree sources.." function. 
 
Examples of usage: 
Get file extensions in directories: 
GetUppFromDir path\to\upp\uppsrc\Core -e -r
Extensions from "path\to\upp\uppsrc\Core" directory:
*.aux *.cpp *.dli *.h *.hpp *.i *.icpp *.t *.tpp *.txt *.upp *.upt Copying ignorelist init
  
Get file extensions in directory: 
GetUppFromDir path\to\upp\uppsrc\CtrlCore -e
Extensions from "path\to\upp\uppsrc\CtrlCore" directory:
*.aux *.cpp *.dli *.h *.i *.icpp *.iml *.t *.upp Copying init
  
Get Upp package from directory: 
GetUppFromDir -r -p "*.h *.c *.cpp" -d "BZ2 compressor/decompressor" -u "Core" -c ""
	-c "MT,Multithreading configuration" path\to\upp\uppsrc\plugin\bz2 -o bz2.upp
  
The bz2.upp output: 
description "BZ2 compressor/decompressor";
uses Core;
file
	bz2.h,
	bz2upp.cpp,
	lib readonly separator,
	lib/blocksort.c,
	lib/bzip2.c,
	lib/bzip2recover.c,
	lib/bzlib.c,
	lib/bzlib.h,
	lib/bzlib_private.h,
	lib/compress.c,
	lib/crctable.c,
	lib/decompress.c,
	lib/dlltest.c,
	lib/huffman.c,
	lib/mk251.c,
	lib/randtable.c,
	lib/spewG.c,
	lib/unzcrash.c;
mainconfig
	"" = "",
	"Multithreading configuration" = "MT";
  
Print help: 
GetUppFromDir -h
Creates Upp package for given directory
Syntax:
GetUppFromDir [--help] [--recursive] [--extensions] [--description text] [--use [flags,]rpath]
		[--config "flags,name"] [--pattern text] [--output file] [--version] [Directory]
Options:
-c, --config flags,name	 Main package configuration(s) with flags and optional name
-d, --description text	 Description text for package
-e, --extensions	 Print file extensions for given directory
-h, --help, /?		 Print this help
-o, --output file	 Place the output into file
-p, --pattern text	 Pattern text to find files (use: *, ?). Default: *
-r, --recursive		 Enable recursive processing of subdirectories
-u, --use [flags,]rpath	 Relative path(s) (and/or optional flags) to directory with package
--version		 Print out version information
Directory		 Path from where create Upp package
  
		
		
		[Updated on: Mon, 09 September 2019 19:10] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	
		
		
			| Re: GetUppFromDir - Creates Upp package for given directory [message #24488 is a reply to message #24479] | 
			Tue, 19 January 2010 18:39   | 
		 
		
			
				
				
				
					
						  
						Sender Ghost
						 Messages: 301 Registered: November 2008 
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		Archive with source code was updated. 
 
Changelog: 
2019.09.09 Adapted for newer pick transfer semantics. 
2011.02.12 Added parsing for optional flags to uses of relative path. Fixed parsing of main package configuration(s). 
2011.02.10 Added sorting of directories and/or files for package. 
2010.06.11 Fixed some define macros to compile with GNU C preprocessor. 
2010.03.21 Added [--use rpath] option to specify referenced package from relative directory. 
2010.02.02 Some refactoring. 
2010.01.21 Added [--version] option to print out version information. 
2010.01.19 Added [--output file] option to output stream into specified file. 
2010.01.19 First public release.
		
		
		[Updated on: Mon, 09 September 2019 19:11] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 06:45:47 CET 2025 
 Total time taken to generate the page: 0.06249 seconds 
 |