Advertisement
Guest User

Untitled

a guest
Jan 27th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 9.29 KB | None | 0 0
  1. <Languages>
  2.     <Language>
  3.         <Name>D</Name>
  4.         <Extensions>
  5.             <Extension>d</Extension>
  6.             <Extension>di</Extension>
  7.         </Extensions>
  8.         <Compilers>
  9.             <Compiler>
  10.                 <Application>dmd</Application>
  11.                 <CompileCommand>{cmd} -c {source} -of{ObjectDir}/{source}.obj {includesArgument}</CompileCommand>
  12.                 <LinkCommand>{cmd} {objects} {libraries} -of{OuputDir}/{name}{extension} {includes}</LinkCommand>
  13.                 <IncludesArgument> -I{include}</IncludesArgument>
  14.                 <StaticLibraryArgument> -lib</StaticLibraryArgument>
  15.                 <DynamicLibraryArgument> -lib</DynamicLibraryArgument>
  16.                 <Platforms>
  17.                     <Platform>
  18.                         <Type>windows</Type>
  19.                         <Targets>
  20.                             <Target>win32</Target>
  21.                             <Target>win64</Target>
  22.                         </Targets>
  23.                         <CompilerLocation>C:/D/dmd2/windows/bin/</CompilerLocation>
  24.                         <StandardLibrary include="false">C:/D/dmd2/windows/lib/phobos.lib</StandardLibrary>
  25.                         <BinaryExtension>.exe</BinaryExtension>
  26.                         <DynamicLibraryExtension>.dll</DynamicLibraryExtension>
  27.                         <StaticLibraryExtension>.lib</StaticLibraryExtension>
  28.                         <Compatibility>
  29.                         </Compatibility>
  30.                     </Platform>
  31.                     <Platform>
  32.                         <Type>linux</Type>
  33.                         <BinaryExtension></BinaryExtension>
  34.                         <DynamicLibraryExtension>.so</DynamicLibraryExtension>
  35.                         <StaticLibraryExtension>.a</StaticLibraryExtension>
  36.                         <Compatibility>
  37.                             <Language objectsOnly="true">c</Language>
  38.                         </Compatibility>
  39.                     </Platform>
  40.                 </Platforms>
  41.                 <Profiles>
  42.                     <Profile default="true">
  43.                         <Name>Release</Name>
  44.                         <LinkCommand> -release</LinkCommand>
  45.                     </Profile>
  46.                     <Profile>
  47.                         <Name>Debug</Name>
  48.                         <CompileCommand> -debug -gc</CompileCommand>
  49.                         <LinkCommand> -debug -gc</LinkCommand>
  50.                     </Profile>
  51.                     <Profile>
  52.                         <Name>Unittest</Name>
  53.                         <CompileCommand> -unittest -gc</CompileCommand>
  54.                         <LinkCommand> -unittest -gc</LinkCommand>
  55.                     </Profile>
  56.                 </Profiles>
  57.                 <Project>
  58.                     <SourceDir>{project_dir}/src</SourceDir>
  59.                     <OutputDir clean="true">{project_dir}/bin/{target}</OutputDir>
  60.                     <ObjectDir clean="true">{project_dir}/obj/{target}</ObjectDir>
  61.                     <ResourceDir>{project_dir}/resources</ResourceDir>
  62.                     <Includes>
  63.                     </Includes>
  64.                     <ProvidesModules>
  65.                     </ProvidesModules>
  66.                     <target>{hostPlatform}</target>
  67.                 </Project>
  68.             </Compiler>
  69.         </Compilers>
  70.     </Language>
  71.     <Language>
  72.         <Name>C</Name>
  73.         <Extensions>
  74.             <Extension>c</Extension>
  75.         </Extensions>
  76.         <Compilers>
  77.             <Compiler>
  78.                 <Application>gcc</Application>
  79.                 <CompileCommand>{cmd} -c {source} -o{ObjectDir}/{source}.obj {includesArgument}</CompileCommand>
  80.                 <LinkCommand>{cmd} {objects} {libraries} -o{OuputDir}/{name}{extension} {includes}</LinkCommand>
  81.                 <IncludesArgument> -I{include}</IncludesArgument>
  82.                 <StaticLibraryArgument> -lib</StaticLibraryArgument>
  83.                 <DynamicLibraryArgument> -lib</DynamicLibraryArgument>
  84.                 <Platforms>
  85.                     <Platform>
  86.                         <Type>windows</Type>
  87.                         <Targets>
  88.                             <Target>win32</Target>
  89.                             <Target>win64</Target>
  90.                         </Targets>
  91.                         <CompilerLocation>C:/MinGW/bin/</CompilerLocation>
  92.                         <BinaryExtension>.exe</BinaryExtension>
  93.                         <DynamicLibraryExtension>.dll</DynamicLibraryExtension>
  94.                         <StaticLibraryExtension>.lib</StaticLibraryExtension>
  95.                         <Compatibility>
  96.                             <Language objectsOnly="true">C++</Language>
  97.                         </Compatibility>
  98.                     </Platform>
  99.                     <Platform>
  100.                         <Type>linux</Type>
  101.                         <BinaryExtension></BinaryExtension>
  102.                         <DynamicLibraryExtension>.so</DynamicLibraryExtension>
  103.                         <StaticLibraryExtension>.a</StaticLibraryExtension>
  104.                         <Compatibility>
  105.                             <Language objectsOnly="true">C++</Language>
  106.                             <Language objectsOnly="true" requireStandardLibrary="true">D</Language>
  107.                         </Compatibility>
  108.                     </Platform>
  109.                 </Platforms>
  110.                 <Profiles>
  111.                     <Profile default="true">
  112.                         <Name>Release</Name>
  113.                     </Profile>
  114.                     <Profile>
  115.                         <Name>Debug</Name>
  116.                         <CompileCommand> -ggdb</CompileCommand>
  117.                         <LinkCommand> -ggdb</LinkCommand>
  118.                     </Profile>
  119.                 </Profiles>
  120.                 <Project>
  121.                     <SourceDir>{project_dir}/src</SourceDir>
  122.                     <OutputDir clean="true">{project_dir}/bin/{target}</OutputDir>
  123.                     <ObjectDir clean="true">{project_dir}/obj/{target}</ObjectDir>
  124.                     <ResourceDir>{project_dir}/resources</ResourceDir>
  125.                     <Includes>
  126.                         <Include>{project_dir}/headers</Include>
  127.                     </Includes>
  128.                     <ProvidesModules>
  129.                     </ProvidesModules>
  130.                     <target>{hostPlatform}</target>
  131.                 </Project>
  132.             </Compiler>
  133.         </Compilers>
  134.     </Language>
  135.     <Language>
  136.         <Name>C++</Name>
  137.         <Extensions>
  138.             <Extension>cpp</Extension>
  139.         </Extensions>
  140.         <Compilers>
  141.             <Compiler>
  142.                 <Application>g++</Application>
  143.                 <CompileCommand>{cmd} -c {source} -o{ObjectDir}/{source}.obj {includesArgument}</CompileCommand>
  144.                 <LinkCommand>{cmd} {objects} {libraries} -o{OuputDir}/{name}{extension} {includes}</LinkCommand>
  145.                 <IncludesArgument> -I{include}</IncludesArgument>
  146.                 <StaticLibraryArgument> -lib</StaticLibraryArgument>
  147.                 <DynamicLibraryArgument> -lib</DynamicLibraryArgument>
  148.                 <Platforms>
  149.                     <Platform>
  150.                         <Type>windows</Type>
  151.                         <Targets>
  152.                             <Target>win32</Target>
  153.                             <Target>win64</Target>
  154.                         </Targets>
  155.                         <CompilerLocation>C:/MinGW/bin/</CompilerLocation>
  156.                         <BinaryExtension>.exe</BinaryExtension>
  157.                         <DynamicLibraryExtension>.dll</DynamicLibraryExtension>
  158.                         <StaticLibraryExtension>.lib</StaticLibraryExtension>
  159.                         <Compatibility>
  160.                             <Language>C</Language>
  161.                         </Compatibility>
  162.                     </Platform>
  163.                     <Platform>
  164.                         <Type>linux</Type>
  165.                         <BinaryExtension></BinaryExtension>
  166.                         <DynamicLibraryExtension>.so</DynamicLibraryExtension>
  167.                         <StaticLibraryExtension>.a</StaticLibraryExtension>
  168.                         <Compatibility>
  169.                             <CompatibilityLanguage>C</CompatibilityLanguage>
  170.                             <CompatibilityLanguage objectsOnly="true" requireStandardLibrary="true">D</CompatibilityLanguage>
  171.                         </Compatibility>
  172.                     </Platform>
  173.                 </Platforms>
  174.                 <Profiles>
  175.                     <Profile default="true">
  176.                         <Name>Release</Name>
  177.                     </Profile>
  178.                     <Profile>
  179.                         <Name>Debug</Name>
  180.                         <CompileCommand> -ggdb</CompileCommand>
  181.                         <LinkCommand> -ggdb</LinkCommand>
  182.                     </Profile>
  183.                 </Profiles>
  184.                 <Project>
  185.                     <SourceDir>{project_dir}/src</SourceDir>
  186.                     <OutputDir clean="true">{project_dir}/bin/{target}</OutputDir>
  187.                     <ObjectDir clean="true">{project_dir}/obj/{target}</ObjectDir>
  188.                     <ResourceDir>{project_dir}/resources</ResourceDir>
  189.                     <Includes>
  190.                         <Include>{project_dir}/headers</Include>
  191.                     </Includes>
  192.                     <ProvidesModules>
  193.                     </ProvidesModules>
  194.                     <Target>{hostPlatform}</Target>
  195.                     <Repositories>
  196.                         <Repository>
  197.                             <Name>Main Repository</Name>
  198.                             <BaseURL>http://example.com/repo</BaseURL>
  199.                         </Repository>
  200.                         <Repository>
  201.                             <Name>Local repository</Name>
  202.                             <Directory>{bspDataDir}/repo</Directory>
  203.                         </Repository>
  204.                     </Repositories>
  205.                 </Project>
  206.             </Compiler>
  207.         </Compilers>
  208.     </Language>
  209. </Languages>
  210.  
  211. If targets is not specified for a platform of a compiler then check
  212. against it's type.
  213. The type insignifies the binary of the compiler is in. Not the output it produces.
  214. The output of a compiler is the type.
  215. The type should match one of these:
  216.     windows
  217.     linux
  218.     osx
  219.     freeBSD
  220.     solaris
  221.     posix
  222. Targets are made up of the platform and a more specific information.
  223.     win32
  224.     win64
  225.  
  226. <Project>
  227.     <Name>ABC project</Name>
  228.     <Version>x.y.z</Version>
  229.     <Description>An amazing project!</Description>
  230.     <Profile>Release</Profile>
  231.     <ProvidesModules>
  232.         <Module>project.abc.test</Module>
  233.     </ProvidesModules>
  234.     <Developers>
  235.         <Developer>Person here [email protected]</Developer>
  236.     </Developers>
  237.     <VCS>https://example.com/repo/abc.git</VCS>
  238.     <URL>http://example.com/project/abc</URL>
  239.    
  240.     <Dependencies>
  241.         <Dependency>
  242.             <Name>DEF project</Name>
  243.             <Version>i.j.k</Version>
  244.             <Module>project.def.test</Module>
  245.             <Directory>{ProjectDir}/../DEF</Directory>
  246.         </Dependency>
  247.     </Dependencies>
  248. </Project>
  249.  
  250. Configuration 'flattening' occurs in these steps
  251. 1. Load all files and keep output seperate
  252. 2. Create list of all languages which have unique names
  253. 3. Add to list of languages a new version of each language that has conflicts
  254.     If append is available append to previous value for property otherwise overide.
  255.     Prefer the later files not the first ones.
  256. 4. For each project in languages create a new one and use it as the base then overlay the projects configuration.
  257. 5. For each project created in last step gather the application, compile command, link command, includes, dynamic library and static library arguments.
  258. 6. Create base command to be executed for each project for storage.
  259.  
  260. Make sure 1-4 can be made into a cached file. (Preferably a mmfile).
  261.  
  262. Folder structure
  263. ~/.bsp/languages.xml
  264. e.g. ~/.bsp/repo/m.o.d.u.l.e/v.e.r.s.i.o.n/project.xml
  265. e.g. ~/.bsp/repo/m.o.d.u.l.e/v.e.r.s.i.o.n/languages.xml
  266. e.g. ~/.bsp/repo/m.o.d.u.l.e/v.e.r.s.i.o.n/src
  267. e.g. ~/.bsp/repo/m.o.d.u.l.e/v.e.r.s.i.o.n/bin/win32/bin.dll
  268. e.g. ~/.bsp/repo/m.o.d.u.l.e/v.e.r.s.i.o.n/bin/win32/bin.lib
  269. project_dir/project.xml
  270. project_dir/languages.xml
  271. project_dir/project_cached.xml
  272. e.g. project_dir/bin/win32/bin.dll
  273. e.g. project_dir/src
  274. e.g. project_dir/obj/win32/bin.obj
  275. e.g. project_dir/obj/win32/dependencies/m.o.d.u.l.e/bin.lib
  276. e.g. project_dir/resources
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement