1 ///	
2 // Written in the D programming language.
3 /**
4 This is a build tool,compile *.d to exe or lib,and help to build dgui,dfl2 gui (or other you like).
5 now default DC is dmd ,default platform is windows.
6 
7 If your DC is dmd, dco can start only 'dco.ini' config file. 
8 
9 Compiler dco.d :dmd dco.d -release,and dco ↓,
10 
11 Usage:
12 Config some info to 'dco.ini' file,';' or '#' means you can do as it.Then copy dco.ini to your PATH: such as dmd's config file:sc.ini.
13 And dco.exe can auto copy itsself to EnvPath,that also is  dmd.exe 's path: dmd2\window\bin.
14 After that,you can run the 'dco.exe'  anywhere.
15 If not found 'dco.ini',run: dco -ini,please.
16 
17 For example:
18 to get the debug version( -release to get another)
19 
20 build some *.d to lib or exe 			 : dco ↓
21 build some *.d to lib or exe for 64 bit	 : dco -m64 ↓
22 build  one app.d in many *.d    		 : dco app or  dco app.d
23 build for libs 	such as dfl,dgui         : dco  -lib
24 build for app.d use dgui,dfl2			 : dco  -gui
25 build app.d use dfl2 for console		 : dco  -con
26 build lib and copy to libs				 : dco -lib -copy
27 build by custom	and copy to libs         : dco -arg -addlib -lib -copy
28 
29 if your exe's file works on console,you should add '-con' or '-console'. 
30 
31 Copyright: Copyright FrankLIKE 2014-.
32 
33 License:   $(LGPL-3.0).
34 
35 Authors:   FrankLIKE
36 
37 Source: $(dco.d)
38 
39 Created Time:2014-10-27
40 Modify Time:2014-10-31~2016-08-12
41 */
42 module dcoexe;
43 /// dco 
44 import dco.all;
45 
46 void main(string[] args)
47 {
48 	if(!findDCEnv()) return;
49 	// readInJson();
50 	
51 	if(!checkArgs(args))
52 	{
53 		if(bHelp)
54 		{
55 			ShowUsage();
56 			return;
57 		}
58 		
59 		if(bVersion)
60 		{
61 			ShowVersion();
62 			return;
63 		}
64 
65 		if(bInitINI)
66 		{
67 			initNewConfigFile();
68 			return;
69 		}
70 
71 		if(!findFiles())
72 		{
73 			ShowUsage();
74 			return;
75 		}
76 	}
77 	if(args.length ==1)
78 	{
79 		if(!CheckBinFolderAndCopy()) return;
80     }
81  
82 	if(strPackageName =="")
83 	{
84 		strPackageName = strTargetName;
85 	}
86 
87 	buildExe(args);
88 }