mirror of
https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
synced 2024-11-21 06:26:09 -07:00
Generate csproj files for the new Money Modules.
This commit is contained in:
parent
e9e1a747ba
commit
cb434061e4
137 changed files with 458 additions and 21795 deletions
219
OpenSim.sln
219
OpenSim.sln
|
@ -1,194 +1,203 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 19
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gloebit", "addon-modules\Gloebit\GloebitMoneyModule\Gloebit.csproj", "{4C8A6BF4-0000-0000-0000-000000000000}"
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31229.75
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gloebit", "addon-modules\Gloebit\GloebitMoneyModule\Gloebit.csproj", "{4C8A6BF4-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\Region\Application\OpenSim.csproj", "{AC9EB8AB-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim", "OpenSim\Region\Application\OpenSim.csproj", "{AC9EB8AB-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Addons.Groups", "OpenSim\Addons\Groups\OpenSim.Addons.Groups.csproj", "{77DEC20C-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Addons.Groups", "OpenSim\Addons\Groups\OpenSim.Addons.Groups.csproj", "{77DEC20C-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Addons.OfflineIM", "OpenSim\Addons\OfflineIM\OpenSim.Addons.OfflineIM.csproj", "{E6B51395-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Addons.OfflineIM", "OpenSim\Addons\OfflineIM\OpenSim.Addons.OfflineIM.csproj", "{E6B51395-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.ApplicationPlugins.LoadRegions", "OpenSim\ApplicationPlugins\LoadRegions\OpenSim.ApplicationPlugins.LoadRegions.csproj", "{E4BEC9DC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.ApplicationPlugins.LoadRegions", "OpenSim\ApplicationPlugins\LoadRegions\OpenSim.ApplicationPlugins.LoadRegions.csproj", "{E4BEC9DC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.ApplicationPlugins.RegionModulesController", "OpenSim\ApplicationPlugins\RegionModulesController\OpenSim.ApplicationPlugins.RegionModulesController.csproj", "{9EC3C654-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.ApplicationPlugins.RegionModulesController", "OpenSim\ApplicationPlugins\RegionModulesController\OpenSim.ApplicationPlugins.RegionModulesController.csproj", "{9EC3C654-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.ApplicationPlugins.RemoteController", "OpenSim\ApplicationPlugins\RemoteController\OpenSim.ApplicationPlugins.RemoteController.csproj", "{B6A4EEC3-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.ApplicationPlugins.RemoteController", "OpenSim\ApplicationPlugins\RemoteController\OpenSim.ApplicationPlugins.RemoteController.csproj", "{B6A4EEC3-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Capabilities", "OpenSim\Capabilities\OpenSim.Capabilities.csproj", "{FF56527B-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Capabilities", "OpenSim\Capabilities\OpenSim.Capabilities.csproj", "{FF56527B-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Capabilities.Handlers", "OpenSim\Capabilities\Handlers\OpenSim.Capabilities.Handlers.csproj", "{002BDDF6-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Capabilities.Handlers", "OpenSim\Capabilities\Handlers\OpenSim.Capabilities.Handlers.csproj", "{002BDDF6-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Capabilities.Handlers.Tests", "OpenSim\Capabilities\Handlers\OpenSim.Capabilities.Handlers.Tests.csproj", "{507CDB79-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Capabilities.Handlers.Tests", "OpenSim\Capabilities\Handlers\OpenSim.Capabilities.Handlers.Tests.csproj", "{507CDB79-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.ConsoleClient", "OpenSim\ConsoleClient\OpenSim.ConsoleClient.csproj", "{CB348113-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.ConsoleClient", "OpenSim\ConsoleClient\OpenSim.ConsoleClient.csproj", "{CB348113-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data", "OpenSim\Data\OpenSim.Data.csproj", "{7E218E2D-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data", "OpenSim\Data\OpenSim.Data.csproj", "{7E218E2D-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data.MySQL", "OpenSim\Data\MySQL\OpenSim.Data.MySQL.csproj", "{1E894ECD-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.MySQL", "OpenSim\Data\MySQL\OpenSim.Data.MySQL.csproj", "{1E894ECD-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data.Null", "OpenSim\Data\Null\OpenSim.Data.Null.csproj", "{8D314DCC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.Null", "OpenSim\Data\Null\OpenSim.Data.Null.csproj", "{8D314DCC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data.PGSQL", "OpenSim\Data\PGSQL\OpenSim.Data.PGSQL.csproj", "{10024C78-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.PGSQL", "OpenSim\Data\PGSQL\OpenSim.Data.PGSQL.csproj", "{10024C78-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data.SQLite", "OpenSim\Data\SQLite\OpenSim.Data.SQLite.csproj", "{675096A5-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.SQLite", "OpenSim\Data\SQLite\OpenSim.Data.SQLite.csproj", "{675096A5-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Data.Tests", "OpenSim\Data\Tests\OpenSim.Data.Tests.csproj", "{37FD59A6-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.Tests", "OpenSim\Data\Tests\OpenSim.Data.Tests.csproj", "{37FD59A6-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "OpenSim\Framework\OpenSim.Framework.csproj", "{BCCDBB55-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework", "OpenSim\Framework\OpenSim.Framework.csproj", "{BCCDBB55-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.AssetLoader.Filesystem", "OpenSim\Framework\AssetLoader\Filesystem\OpenSim.Framework.AssetLoader.Filesystem.csproj", "{384A4FAB-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.AssetLoader.Filesystem", "OpenSim\Framework\AssetLoader\Filesystem\OpenSim.Framework.AssetLoader.Filesystem.csproj", "{384A4FAB-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "OpenSim\Framework\Console\OpenSim.Framework.Console.csproj", "{0ED8EBE8-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Console", "OpenSim\Framework\Console\OpenSim.Framework.Console.csproj", "{0ED8EBE8-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Monitoring", "OpenSim\Framework\Monitoring\OpenSim.Framework.Monitoring.csproj", "{69AB1BC7-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Monitoring", "OpenSim\Framework\Monitoring\OpenSim.Framework.Monitoring.csproj", "{69AB1BC7-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Serialization", "OpenSim\Framework\Serialization\OpenSim.Framework.Serialization.csproj", "{BD63E665-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Serialization", "OpenSim\Framework\Serialization\OpenSim.Framework.Serialization.csproj", "{BD63E665-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Serialization.Tests", "OpenSim\Framework\Serialization\Tests\OpenSim.Framework.Serialization.Tests.csproj", "{B3B5B07A-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Serialization.Tests", "OpenSim\Framework\Serialization\Tests\OpenSim.Framework.Serialization.Tests.csproj", "{B3B5B07A-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Servers", "OpenSim\Framework\Servers\OpenSim.Framework.Servers.csproj", "{726D540D-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Servers", "OpenSim\Framework\Servers\OpenSim.Framework.Servers.csproj", "{726D540D-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Servers.HttpServer", "OpenSim\Framework\Servers\HttpServer\OpenSim.Framework.Servers.HttpServer.csproj", "{159EC5C2-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Servers.HttpServer", "OpenSim\Framework\Servers\HttpServer\OpenSim.Framework.Servers.HttpServer.csproj", "{159EC5C2-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Servers.Tests", "OpenSim\Framework\Servers\Tests\OpenSim.Framework.Servers.Tests.csproj", "{743E90C2-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Servers.Tests", "OpenSim\Framework\Servers\Tests\OpenSim.Framework.Servers.Tests.csproj", "{743E90C2-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Tests", "OpenSim\Framework\Tests\OpenSim.Framework.Tests.csproj", "{FA62D900-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Framework.Tests", "OpenSim\Framework\Tests\OpenSim.Framework.Tests.csproj", "{FA62D900-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ClientStack.LindenCaps", "OpenSim\Region\ClientStack\Linden\Caps\OpenSim.Region.ClientStack.LindenCaps.csproj", "{574BCA63-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ClientStack.LindenCaps", "OpenSim\Region\ClientStack\Linden\Caps\OpenSim.Region.ClientStack.LindenCaps.csproj", "{574BCA63-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ClientStack.LindenCaps.Tests", "OpenSim\Region\ClientStack\Linden\Caps\OpenSim.Region.ClientStack.LindenCaps.Tests.csproj", "{A461C3AC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ClientStack.LindenCaps.Tests", "OpenSim\Region\ClientStack\Linden\Caps\OpenSim.Region.ClientStack.LindenCaps.Tests.csproj", "{A461C3AC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ClientStack.LindenUDP", "OpenSim\Region\ClientStack\Linden\UDP\OpenSim.Region.ClientStack.LindenUDP.csproj", "{E7F1E4AB-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ClientStack.LindenUDP", "OpenSim\Region\ClientStack\Linden\UDP\OpenSim.Region.ClientStack.LindenUDP.csproj", "{E7F1E4AB-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ClientStack.LindenUDP.Tests", "OpenSim\Region\ClientStack\Linden\UDP\Tests\OpenSim.Region.ClientStack.LindenUDP.Tests.csproj", "{6E5280E2-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ClientStack.LindenUDP.Tests", "OpenSim\Region\ClientStack\Linden\UDP\Tests\OpenSim.Region.ClientStack.LindenUDP.Tests.csproj", "{6E5280E2-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.CoreModules", "OpenSim\Region\CoreModules\OpenSim.Region.CoreModules.csproj", "{B60B8DCD-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.CoreModules", "OpenSim\Region\CoreModules\OpenSim.Region.CoreModules.csproj", "{B60B8DCD-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.CoreModules.Tests", "OpenSim\Region\CoreModules\OpenSim.Region.CoreModules.Tests.csproj", "{3B99D6D0-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.CoreModules.Tests", "OpenSim\Region\CoreModules\OpenSim.Region.CoreModules.Tests.csproj", "{3B99D6D0-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.Framework", "OpenSim\Region\Framework\OpenSim.Region.Framework.csproj", "{C98F6D97-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.Framework", "OpenSim\Region\Framework\OpenSim.Region.Framework.csproj", "{C98F6D97-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.Framework.Tests", "OpenSim\Region\Framework\OpenSim.Region.Framework.Tests.csproj", "{BEF3BCBC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.Framework.Tests", "OpenSim\Region\Framework\OpenSim.Region.Framework.Tests.csproj", "{BEF3BCBC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.OptionalModules", "OpenSim\Region\OptionalModules\OpenSim.Region.OptionalModules.csproj", "{BAF8E8F2-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.OptionalModules", "OpenSim\Region\OptionalModules\OpenSim.Region.OptionalModules.csproj", "{BAF8E8F2-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.BasicPhysics", "OpenSim\Region\PhysicsModules\BasicPhysics\OpenSim.Region.PhysicsModule.BasicPhysics.csproj", "{BAC989A5-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.BasicPhysics", "OpenSim\Region\PhysicsModules\BasicPhysics\OpenSim.Region.PhysicsModule.BasicPhysics.csproj", "{BAC989A5-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.BulletS", "OpenSim\Region\PhysicsModules\BulletS\OpenSim.Region.PhysicsModule.BulletS.csproj", "{223BC46D-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.BulletS", "OpenSim\Region\PhysicsModules\BulletS\OpenSim.Region.PhysicsModule.BulletS.csproj", "{223BC46D-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.BulletS.Tests", "OpenSim\Region\PhysicsModules\BulletS\Tests\OpenSim.Region.PhysicsModule.BulletS.Tests.csproj", "{7364753A-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.BulletS.Tests", "OpenSim\Region\PhysicsModules\BulletS\Tests\OpenSim.Region.PhysicsModule.BulletS.Tests.csproj", "{7364753A-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.Meshing", "OpenSim\Region\PhysicsModules\Meshing\OpenSim.Region.PhysicsModule.Meshing.csproj", "{5ECE503F-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.Meshing", "OpenSim\Region\PhysicsModules\Meshing\OpenSim.Region.PhysicsModule.Meshing.csproj", "{5ECE503F-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.Ode", "OpenSim\Region\PhysicsModules\Ode\OpenSim.Region.PhysicsModule.Ode.csproj", "{BD76F0CA-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.Ode", "OpenSim\Region\PhysicsModules\Ode\OpenSim.Region.PhysicsModule.Ode.csproj", "{BD76F0CA-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.Ode.Tests", "OpenSim\Region\PhysicsModules\Ode\Tests\OpenSim.Region.PhysicsModule.Ode.Tests.csproj", "{968D2EA9-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.Ode.Tests", "OpenSim\Region\PhysicsModules\Ode\Tests\OpenSim.Region.PhysicsModule.Ode.Tests.csproj", "{968D2EA9-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.POS", "OpenSim\Region\PhysicsModules\POS\OpenSim.Region.PhysicsModule.POS.csproj", "{2400666E-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.POS", "OpenSim\Region\PhysicsModules\POS\OpenSim.Region.PhysicsModule.POS.csproj", "{2400666E-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.ubOde", "OpenSim\Region\PhysicsModules\ubOde\OpenSim.Region.PhysicsModule.ubOde.csproj", "{AC52DE31-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.ubOde", "OpenSim\Region\PhysicsModules\ubOde\OpenSim.Region.PhysicsModule.ubOde.csproj", "{AC52DE31-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModule.ubOdeMeshing", "OpenSim\Region\PhysicsModules\ubOdeMeshing\OpenSim.Region.PhysicsModule.ubOdeMeshing.csproj", "{E7DA5126-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModule.ubOdeMeshing", "OpenSim\Region\PhysicsModules\ubOdeMeshing\OpenSim.Region.PhysicsModule.ubOdeMeshing.csproj", "{E7DA5126-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet", "OpenSim\Region\PhysicsModules\ConvexDecompositionDotNet\OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet.csproj", "{A1CC4ADF-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet", "OpenSim\Region\PhysicsModules\ConvexDecompositionDotNet\OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet.csproj", "{A1CC4ADF-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.PhysicsModules.SharedBase", "OpenSim\Region\PhysicsModules\SharedBase\OpenSim.Region.PhysicsModules.SharedBase.csproj", "{EFA63A0B-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.PhysicsModules.SharedBase", "OpenSim\Region\PhysicsModules\SharedBase\OpenSim.Region.PhysicsModules.SharedBase.csproj", "{EFA63A0B-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Shared", "OpenSim\Region\ScriptEngine\Shared\OpenSim.Region.ScriptEngine.Shared.csproj", "{F93F91AD-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Shared", "OpenSim\Region\ScriptEngine\Shared\OpenSim.Region.ScriptEngine.Shared.csproj", "{F93F91AD-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Shared.Api", "OpenSim\Region\ScriptEngine\Shared\Api\Implementation\OpenSim.Region.ScriptEngine.Shared.Api.csproj", "{C18E3417-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Shared.Api", "OpenSim\Region\ScriptEngine\Shared\Api\Implementation\OpenSim.Region.ScriptEngine.Shared.Api.csproj", "{C18E3417-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Shared.Api.Runtime", "OpenSim\Region\ScriptEngine\Shared\Api\Runtime\OpenSim.Region.ScriptEngine.Shared.Api.Runtime.csproj", "{FC92C9C9-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Shared.Api.Runtime", "OpenSim\Region\ScriptEngine\Shared\Api\Runtime\OpenSim.Region.ScriptEngine.Shared.Api.Runtime.csproj", "{FC92C9C9-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Shared.CodeTools", "OpenSim\Region\ScriptEngine\Shared\CodeTools\OpenSim.Region.ScriptEngine.Shared.CodeTools.csproj", "{1A7CAB35-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Shared.CodeTools", "OpenSim\Region\ScriptEngine\Shared\CodeTools\OpenSim.Region.ScriptEngine.Shared.CodeTools.csproj", "{1A7CAB35-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Shared.Instance", "OpenSim\Region\ScriptEngine\Shared\Instance\OpenSim.Region.ScriptEngine.Shared.Instance.csproj", "{B185E548-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Shared.Instance", "OpenSim\Region\ScriptEngine\Shared\Instance\OpenSim.Region.ScriptEngine.Shared.Instance.csproj", "{B185E548-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.Tests", "OpenSim\Region\ScriptEngine\OpenSim.Region.ScriptEngine.Tests.csproj", "{CBDD2219-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.Tests", "OpenSim\Region\ScriptEngine\OpenSim.Region.ScriptEngine.Tests.csproj", "{CBDD2219-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.XEngine", "OpenSim\Region\ScriptEngine\XEngine\OpenSim.Region.ScriptEngine.XEngine.csproj", "{798F0488-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.XEngine", "OpenSim\Region\ScriptEngine\XEngine\OpenSim.Region.ScriptEngine.XEngine.csproj", "{798F0488-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.XEngine.Api.Runtime", "OpenSim\Region\ScriptEngine\XEngine\Api\Runtime\OpenSim.Region.ScriptEngine.XEngine.Api.Runtime.csproj", "{4A4B6F6C-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.XEngine.Api.Runtime", "OpenSim\Region\ScriptEngine\XEngine\Api\Runtime\OpenSim.Region.ScriptEngine.XEngine.Api.Runtime.csproj", "{4A4B6F6C-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Region.ScriptEngine.YEngine", "OpenSim\Region\ScriptEngine\YEngine\OpenSim.Region.ScriptEngine.YEngine.csproj", "{798B4867-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.ScriptEngine.YEngine", "OpenSim\Region\ScriptEngine\YEngine\OpenSim.Region.ScriptEngine.YEngine.csproj", "{798B4867-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Server.Base", "OpenSim\Server\Base\OpenSim.Server.Base.csproj", "{2E0569BB-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Server.Base", "OpenSim\Server\Base\OpenSim.Server.Base.csproj", "{2E0569BB-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Server.Handlers", "OpenSim\Server\Handlers\OpenSim.Server.Handlers.csproj", "{ED041501-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Server.Handlers", "OpenSim\Server\Handlers\OpenSim.Server.Handlers.csproj", "{ED041501-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Server.Handlers.Tests", "OpenSim\Server\Handlers\OpenSim.Server.Handlers.Tests.csproj", "{AC0DDB9E-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Server.Handlers.Tests", "OpenSim\Server\Handlers\OpenSim.Server.Handlers.Tests.csproj", "{AC0DDB9E-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.AssetService", "OpenSim\Services\AssetService\OpenSim.Services.AssetService.csproj", "{7FDD1B76-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.AssetService", "OpenSim\Services\AssetService\OpenSim.Services.AssetService.csproj", "{7FDD1B76-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.AuthenticationService", "OpenSim\Services\AuthenticationService\OpenSim.Services.AuthenticationService.csproj", "{76495B84-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.AuthenticationService", "OpenSim\Services\AuthenticationService\OpenSim.Services.AuthenticationService.csproj", "{76495B84-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.AuthorizationService", "OpenSim\Services\AuthorizationService\OpenSim.Services.AuthorizationService.csproj", "{60CDDAF3-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.AuthorizationService", "OpenSim\Services\AuthorizationService\OpenSim.Services.AuthorizationService.csproj", "{60CDDAF3-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.AvatarService", "OpenSim\Services\AvatarService\OpenSim.Services.AvatarService.csproj", "{77095B91-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.AvatarService", "OpenSim\Services\AvatarService\OpenSim.Services.AvatarService.csproj", "{77095B91-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.Base", "OpenSim\Services\Base\OpenSim.Services.Base.csproj", "{A54AE47C-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.Base", "OpenSim\Services\Base\OpenSim.Services.Base.csproj", "{A54AE47C-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.Connectors", "OpenSim\Services\Connectors\OpenSim.Services.Connectors.csproj", "{B16DF9C1-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.Connectors", "OpenSim\Services\Connectors\OpenSim.Services.Connectors.csproj", "{B16DF9C1-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.EstateService", "OpenSim\Services\EstateService\OpenSim.Services.EstateService.csproj", "{8020C608-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.EstateService", "OpenSim\Services\EstateService\OpenSim.Services.EstateService.csproj", "{8020C608-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.FreeswitchService", "OpenSim\Services\FreeswitchService\OpenSim.Services.FreeswitchService.csproj", "{78D8DF46-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.FreeswitchService", "OpenSim\Services\FreeswitchService\OpenSim.Services.FreeswitchService.csproj", "{78D8DF46-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.FriendsService", "OpenSim\Services\Friends\OpenSim.Services.FriendsService.csproj", "{CDF575DD-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.FriendsService", "OpenSim\Services\Friends\OpenSim.Services.FriendsService.csproj", "{CDF575DD-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.FSAssetService", "OpenSim\Services\FSAssetService\OpenSim.Services.FSAssetService.csproj", "{327D1745-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.FSAssetService", "OpenSim\Services\FSAssetService\OpenSim.Services.FSAssetService.csproj", "{327D1745-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.GridService", "OpenSim\Services\GridService\OpenSim.Services.GridService.csproj", "{D3312580-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.GridService", "OpenSim\Services\GridService\OpenSim.Services.GridService.csproj", "{D3312580-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.HypergridService", "OpenSim\Services\HypergridService\OpenSim.Services.HypergridService.csproj", "{CD92222C-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.HypergridService", "OpenSim\Services\HypergridService\OpenSim.Services.HypergridService.csproj", "{CD92222C-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.Interfaces", "OpenSim\Services\Interfaces\OpenSim.Services.Interfaces.csproj", "{08ECE473-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.Interfaces", "OpenSim\Services\Interfaces\OpenSim.Services.Interfaces.csproj", "{08ECE473-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.InventoryService", "OpenSim\Services\InventoryService\OpenSim.Services.InventoryService.csproj", "{0066981A-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.InventoryService", "OpenSim\Services\InventoryService\OpenSim.Services.InventoryService.csproj", "{0066981A-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.InventoryService.Tests", "OpenSim\Services\InventoryService\Tests\OpenSim.Services.InventoryService.Tests.csproj", "{D4979419-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.InventoryService.Tests", "OpenSim\Services\InventoryService\Tests\OpenSim.Services.InventoryService.Tests.csproj", "{D4979419-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.LLLoginService", "OpenSim\Services\LLLoginService\OpenSim.Services.LLLoginService.csproj", "{84F83E53-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.LLLoginService", "OpenSim\Services\LLLoginService\OpenSim.Services.LLLoginService.csproj", "{84F83E53-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.MapImageService", "OpenSim\Services\MapImageService\OpenSim.Services.MapImageService.csproj", "{B03715E7-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.MapImageService", "OpenSim\Services\MapImageService\OpenSim.Services.MapImageService.csproj", "{B03715E7-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.MuteListService", "OpenSim\Services\MuteListService\OpenSim.Services.MuteListService.csproj", "{456B7ED3-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.MuteListService", "OpenSim\Services\MuteListService\OpenSim.Services.MuteListService.csproj", "{456B7ED3-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.PresenceService", "OpenSim\Services\PresenceService\OpenSim.Services.PresenceService.csproj", "{9A29E8CD-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.PresenceService", "OpenSim\Services\PresenceService\OpenSim.Services.PresenceService.csproj", "{9A29E8CD-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.SimulationService", "OpenSim\Services\SimulationService\OpenSim.Services.SimulationService.csproj", "{CB1C903F-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.SimulationService", "OpenSim\Services\SimulationService\OpenSim.Services.SimulationService.csproj", "{CB1C903F-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.UserAccountService", "OpenSim\Services\UserAccountService\OpenSim.Services.UserAccountService.csproj", "{C87C3128-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.UserAccountService", "OpenSim\Services\UserAccountService\OpenSim.Services.UserAccountService.csproj", "{C87C3128-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.UserProfilesService", "OpenSim\Services\UserProfilesService\OpenSim.Services.UserProfilesService.csproj", "{B4C57E7D-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Services.UserProfilesService", "OpenSim\Services\UserProfilesService\OpenSim.Services.UserProfilesService.csproj", "{B4C57E7D-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests", "OpenSim\Tests\OpenSim.Tests.csproj", "{CCCB2DA6-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests", "OpenSim\Tests\OpenSim.Tests.csproj", "{CCCB2DA6-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests.Clients.AssetClient", "OpenSim\Tests\Clients\Assets\OpenSim.Tests.Clients.AssetClient.csproj", "{5BC4E133-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests.Clients.AssetClient", "OpenSim\Tests\Clients\Assets\OpenSim.Tests.Clients.AssetClient.csproj", "{5BC4E133-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests.Common", "OpenSim\Tests\Common\OpenSim.Tests.Common.csproj", "{CC43930F-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests.Common", "OpenSim\Tests\Common\OpenSim.Tests.Common.csproj", "{CC43930F-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests.Performance", "OpenSim\Tests\Performance\OpenSim.Tests.Performance.csproj", "{24A774FE-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests.Performance", "OpenSim\Tests\Performance\OpenSim.Tests.Performance.csproj", "{24A774FE-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests.Permissions", "OpenSim\Tests\Permissions\OpenSim.Tests.Permissions.csproj", "{E0DDF05C-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests.Permissions", "OpenSim\Tests\Permissions\OpenSim.Tests.Permissions.csproj", "{E0DDF05C-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tests.Stress", "OpenSim\Tests\Stress\OpenSim.Tests.Stress.csproj", "{660D26BC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tests.Stress", "OpenSim\Tests\Stress\OpenSim.Tests.Stress.csproj", "{660D26BC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tools.Configger", "OpenSim\Tools\Configger\OpenSim.Tools.Configger.csproj", "{2F0C334A-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tools.Configger", "OpenSim\Tools\Configger\OpenSim.Tools.Configger.csproj", "{2F0C334A-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Tools.lslc", "OpenSim\Tools\Compiler\OpenSim.Tools.lslc.csproj", "{12EC22DE-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Tools.lslc", "OpenSim\Tools\Compiler\OpenSim.Tools.lslc.csproj", "{12EC22DE-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSimMutelist.Modules", "addon-modules\OpenSimMutelist\Modules\OpenSimMutelist.Modules.csproj", "{87C4E6E3-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSimMutelist.Modules", "addon-modules\OpenSimMutelist\Modules\OpenSimMutelist.Modules.csproj", "{87C4E6E3-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSimSearch.Modules", "addon-modules\OpenSimSearch\Modules\OpenSimSearch.Modules.csproj", "{BE5D1132-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSimSearch.Modules", "addon-modules\OpenSimSearch\Modules\OpenSimSearch.Modules.csproj", "{BE5D1132-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pCampBot", "OpenSim\Tools\pCampBot\pCampBot.csproj", "{AF52AEDC-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "pCampBot", "OpenSim\Tools\pCampBot\pCampBot.csproj", "{AF52AEDC-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust", "OpenSim\Server\Robust.csproj", "{6E64F01D-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Robust", "OpenSim\Server\Robust.csproj", "{6E64F01D-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Tests", "OpenSim\Tests\Robust\Robust.Tests.csproj", "{D2E26E14-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Robust.Tests", "OpenSim\Tests\Robust\Robust.Tests.csproj", "{D2E26E14-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartThreadPool", "ThirdParty\SmartThreadPool\SmartThreadPool.csproj", "{8C618053-0000-0000-0000-000000000000}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmartThreadPool", "ThirdParty\SmartThreadPool\SmartThreadPool.csproj", "{8C618053-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Data.MySQL.MoneyData", "addon-modules\OpenSim.Data.MySQL.MoneyData\OpenSim.Data.MySQL.MoneyData\OpenSim.Data.MySQL.MoneyData.csproj", "{A9CF27A6-3E23-4A10-82DA-604CA8C577D9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.OptionalModules.Currency", "addon-modules\OpenSim.Region.OptionalModules.Currency\OpenSim.Region.OptionalModules.Currency\OpenSim.Region.OptionalModules.Currency.csproj", "{2B6DD15C-0B5D-41CA-B713-71B60147114D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Server.MoneyServer", "addon-modules\OpenSim.Server.MoneyServer\OpenSim.Server.MoneyServer\OpenSim.Server.MoneyServer.csproj", "{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -576,5 +585,23 @@ Global
|
|||
{8C618053-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8C618053-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8C618053-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A9CF27A6-3E23-4A10-82DA-604CA8C577D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A9CF27A6-3E23-4A10-82DA-604CA8C577D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A9CF27A6-3E23-4A10-82DA-604CA8C577D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A9CF27A6-3E23-4A10-82DA-604CA8C577D9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2B6DD15C-0B5D-41CA-B713-71B60147114D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2B6DD15C-0B5D-41CA-B713-71B60147114D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2B6DD15C-0B5D-41CA-B713-71B60147114D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2B6DD15C-0B5D-41CA-B713-71B60147114D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A40AD54B-8BC7-41E4-B241-19B59EA65D2A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.Data" Version="8.0.24" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net">
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<EmbeddedResource Include="Resources\XAssetStore.migrations" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.Data" Version="8.0.24" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -46,7 +46,7 @@
|
|||
<EmbeddedResource Include="Resources\TestDataConnections.ini" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.Data" Version="8.0.24" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -114,7 +114,7 @@
|
|||
<Compile Remove="World\Media\Moap\Tests\MoapTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.Data" Version="8.0.24" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,10 +0,0 @@
|
|||
Dave Hudson (jendave@yahoo.com),
|
||||
Matthew Holmes (matthew@wildfiregames.com)
|
||||
Dan Moorehead (dan05a@gmail.com)
|
||||
Rob Loach (http://www.robloach.net)
|
||||
C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Patch Contributers
|
||||
lbsa71
|
||||
chi11ken
|
||||
sdague
|
|
@ -1,65 +0,0 @@
|
|||
BSD License
|
||||
Copyright (c)2004-2008
|
||||
|
||||
See AUTHORS file for list of copyright holders
|
||||
|
||||
Dave Hudson (jendave@yahoo.com),
|
||||
Matthew Holmes (matthew@wildfiregames.com)
|
||||
Dan Moorehead (dan05a@gmail.com)
|
||||
Rob Loach (http://www.robloach.net)
|
||||
C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
http://dnpb.sourceforge.net
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of the authors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
---
|
||||
|
||||
Portions of src/Core/Targets/AutotoolsTarget.cs
|
||||
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,480 +0,0 @@
|
|||
2017, August Unit Umarov
|
||||
* add Freak Tech patch for prefer32bit default to false
|
||||
* fix comand line target override
|
||||
* fix CSharp target assembly name
|
||||
|
||||
2015, June Fly-Man- <fly.man.opensim@gmail.com>
|
||||
* V2.0.7 (WhiteCore Build)
|
||||
* Added the VS2012/VS2013 targets so .Net 4.5 can be used for WhiteCore
|
||||
* Cleaned up the SharpDevelop2 code part
|
||||
|
||||
2015, April rowan Deppeler <greythane@gmail.com>
|
||||
* V2.0.6w (WhiteCore build
|
||||
* No changes to the code as it appears development has now stalled at 1.10
|
||||
- Incorporated (Rev's, I think) patches from Aurora to provide for passing the framework
|
||||
and additional conditionals in the Prebuild.xml spec
|
||||
- Re-built using Net 4.0 framework to provide for use on unmodified Windows 8 systems (No Net 3.5)
|
||||
- Included Solution and project files to assist building if required
|
||||
|
||||
|
||||
2008-12-09T02:15 D. Moonfire <d.moonfire@mfgames.com>
|
||||
* src/Core/Kernel.cs
|
||||
- Added a /ppi target to get the results of processing but before
|
||||
processing the actual results.
|
||||
* src/Core/Preprocessor.cs
|
||||
- Applied the patch from kanato with formatting changes.
|
||||
- Uses the <?include file="" ?> format.
|
||||
* tests/
|
||||
- Added some lightweight tests to test the functionality of the
|
||||
include patch.
|
||||
|
||||
2008-06-19T09:37 John Anderson <sontek@gmail.com>
|
||||
* src/Core/Kernel.cs
|
||||
- Only Loop through targets that are not abstract.
|
||||
* src/Core/Targets/VSGenericTarget.cs
|
||||
- Marked abstract and removed the Target attribute.
|
||||
|
||||
2008-06-16T17:37 John Anderson <sontek@gmail.com>
|
||||
* src/Core/Nodes/ProjectNode.cs,data/prebuild-1.7.xsd
|
||||
- Added the ability to hardcode guid's in the projects
|
||||
|
||||
2008-05-21T0737 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- catch exception when unable to compile AssemblyInfo.cs
|
||||
|
||||
2008-05-07T17:29 John Anderson <sontek@gmail.com>
|
||||
* src/Core/Targets/VSGenericTarget.cs
|
||||
- Generate asp.net output in bin\ folder (asp.net requires it there)
|
||||
|
||||
2008-04-30T17:29 John Anderson <sontek@gmail.com>
|
||||
* src/Core/Nodes/DatabaseReferenceNode.cs,
|
||||
src/Core/Nodes/Datanode.cs,
|
||||
src/Core/Nodes/FileNode.cs,
|
||||
src/Core/Nodes/FileNodes.cs,
|
||||
src/Core/Nodes/MatchNode.cs,
|
||||
src/Core/Targets/VS2008Target.cs,
|
||||
src/data/prebuild-1.7.xsd
|
||||
- Refactored the project generation code to handle web projects and more
|
||||
logically handle embedded resources and designer files.
|
||||
|
||||
2008-04-30T17:29 Joseph Lombrozo <digitaljeebus@gmail.com>
|
||||
* src/Core/Nodes/SolutionNode.cs
|
||||
- Had solutions inherit Configurations in the same way that Projects do.
|
||||
|
||||
2008-04-29T06:35 Joseph Lombrozo <digitaljeebus@gmail.com>
|
||||
* src/Core/Targets/VS2008Target.cs,
|
||||
src/Core/Nodes/DatabaseProjectNode.cs,
|
||||
src/Core/Nodes/DatabaseReferenceNode.cs,
|
||||
src/data/prebuild-1.7.xsd
|
||||
- Added database references to database projects.
|
||||
- Prevented nested solutions from being written to disk.
|
||||
|
||||
2008-04-29T05:43 Joseph Lombrozo <digitaljeebus@gmail.com>
|
||||
* src/Core/Targets/VS2008Target.cs
|
||||
- Enabled embedded solutions to contain Files.
|
||||
|
||||
2008-04-29T04:13 Joseph Lombrozo <digitaljeebus@gmail.com>
|
||||
* src/Core/VSVersion.cs
|
||||
- Fixed spelling mistake in enum comment.
|
||||
* src/Core/Attributes/DataNodeAttribute.cs
|
||||
- Allowed the DataNodeAttribute to be attached to a single class
|
||||
more than once, allowing one class to be used to parse more than
|
||||
one node at a time.
|
||||
* src/Core/Kernel.cs
|
||||
- Changed CacheNodeTypes() to allow for multiple DataNodeAttribute
|
||||
instances in one class. Refactored ProcessFile(...) to return Solutions,
|
||||
rather than adding them to the Kernel.
|
||||
* src/Core/Nodes/SolutionNode.cs
|
||||
- Added Guid (for embedded folders)
|
||||
- Added DatabaseProjects, Solutions and Processes to the SolutionNode
|
||||
when parsing.
|
||||
* src/Core/Nodes/ProjectNode.cs
|
||||
- Added FrameworkVersion property to allow for 2.0/3.0/3.5 differentiation.
|
||||
* src/Core/Targets/VS2008Target.cs, src/data/prebuild-1.7.xsd
|
||||
- Added ability to have embedded solutions, and externally referenced
|
||||
prebuild scripts.
|
||||
|
||||
2008-04-24T04:33 John M. Anderson <sontek@gmail.com>
|
||||
* src/Core/Targets/VS2003Target.cs, src/Core/Targets/VSVersion.cs
|
||||
- Moved the VSVersion enum into its own file.
|
||||
* src/Core/Targets/VS2008Target.cs
|
||||
- added support for VS2008
|
||||
* src/Core/Nodes/ProjectNode.cs
|
||||
- Added initial support for ASP.NET projects
|
||||
* src/Core/Nodes/DatabaseProjectNode.cs
|
||||
- Added support for Visual Studio database projects
|
||||
|
||||
2008-02-19T07:08 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* TODO
|
||||
- added some tasks from Sam Hocevar
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- added a missing end paren
|
||||
* COPYING
|
||||
- Removed Randy Ridge's name from the copyright. Looks to me like
|
||||
his name was present only because the file was nabbed from Tao
|
||||
|
||||
2008-02-09T20:29 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* COPYING
|
||||
- added MIT/X11 license due to inclusion of code from Monodevelop
|
||||
* THANKS
|
||||
- added Lluis Sanchez Gual and Todd Berman - I yoinked code from
|
||||
their pkg-config .pc file parser to build AutotoolsTarget.cs.
|
||||
Sorry it took me so long to remember to add mention of you guys!
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- added MIT/X11 license. see above.
|
||||
|
||||
2008-02-07T08:27 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* AUTHORS
|
||||
- consolidated names and contact info found laying around the
|
||||
source
|
||||
* src/Core/Kernel.cs
|
||||
- updated copyright date
|
||||
- re-formatted license for 80-column editor
|
||||
- updated log banner to indicate new date, new authors
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- clarified reasoning behind use of constants in
|
||||
AutotoolsTarget.ParsePCFile
|
||||
- reduced length of some long lines using newline/indent
|
||||
- added log messages for parsing .pc files, emitting solutions,
|
||||
projects
|
||||
- robustified the inter-package dependency resolution target
|
||||
- log warning when we can't find assembly for <Reference />
|
||||
- clarified code for case of inability to find embedded
|
||||
autotools.xml
|
||||
* src/data/autotools.xml
|
||||
- adding system lookup of resgen2 to configure.ac
|
||||
- fixed .resource -> .resources typo
|
||||
- added a rule to create <foo>.response file containing all sources
|
||||
- using @<foo>.response on $(CSC) command line instead of listing
|
||||
all source files
|
||||
* src/Properties/AssemblyInfo.cs
|
||||
- re-formatted license for an 80-column editor
|
||||
- added more authors to the AssemblyCopyright attribute
|
||||
- bumped version to 2.0.3
|
||||
* prebuild.xml
|
||||
- bumped version to 2.0.3
|
||||
* scripts/autotools.sh
|
||||
- if 'mono' is in the path, run Prebuild.exe with it
|
||||
- using dirname to capture correct path to prebuild.xml &c
|
||||
|
||||
2008-02-06T17:18 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/NAntTarget.cs
|
||||
- re-formatted the license for an 80-column editor
|
||||
- added myself to the copyright
|
||||
- added a fix submitted by Gryc Ueusp <gryc.ueusp@gmail.com>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- updated copyright to include 2008
|
||||
* THANKS
|
||||
- created file, added Gryc Ueusp <gryc.ueusp@gmail.com>
|
||||
|
||||
2008-01-01T14:50 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
- fixed .resx -> .resource compilation
|
||||
- fixed failing edge case where Project is an unsigned Library
|
||||
- added $(RESOURCE_SRC) to list of extra dist files
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- removed embeddedResources from extraDistFiles list
|
||||
|
||||
2007-04-18T07:49 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- removed default version from references
|
||||
|
||||
2007-04-06T12:42 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
- added support for /doc: output when XmlDocFile is not empty
|
||||
- not printing \t \\n on lines that have no content
|
||||
- gacutil now installs the root assembly instead of the one under
|
||||
bin/Debug or whatever
|
||||
|
||||
2007-04-04T22:12 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- removed debugging Console.WriteLine()
|
||||
* src/data/autotools.xml
|
||||
- ensuring that install-sh and missing get distributed
|
||||
- explicitly stating that the sources, snk, resources and binary
|
||||
references live under $(srcdir)
|
||||
- corrected uninstall target
|
||||
- verified distcheck completes successfully
|
||||
|
||||
2007-04-03T21:56 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- added a using for System.Diagnostics
|
||||
- added enum ClrVersion for use with the pkg-config parser
|
||||
- added class SystemPackage for use with the pkg-config parser
|
||||
- removed explicit "private" property of members since it is implied
|
||||
- flushing the stream-writer before it's closed
|
||||
- removed excess braces around an if statement
|
||||
! NormalizeAsmName(), AddAssembly(), GetAssembliesWithLibInfo(),
|
||||
GetAssembliesWithoutLibInfo(), ProcessPiece(),
|
||||
GetVariableFromPkgConfig(), ParsePCFile(),
|
||||
RegisterSystemAssemblies(), RunInitialization()
|
||||
- pulled the above from MonoDevelop to parse the system pkgconfig
|
||||
files and determine /pkg: arguments. Original sources are here:
|
||||
http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
|
||||
http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/ClrVersion.cs
|
||||
! WriteProject()
|
||||
- now gathering project version from AssemblyInfo.cs if it is part
|
||||
of the project
|
||||
- changed the declaration of the ArrayList's in the method
|
||||
- now copying assembly .config files to the project, distributing,
|
||||
installing
|
||||
- making sure all needed files live under the Project directory
|
||||
- copying strongname keys to project directory
|
||||
- parsing AssemblyInfo.cs to determine assembly version
|
||||
- removing all references to ".."
|
||||
- removed superfluous if(project.References.Count > 0) around
|
||||
for(int refNum = 0; refNum < project.References.Count; refNum++)
|
||||
- removed use of runtimeLibs
|
||||
- adding hook to copy sibling project's generated assemblies to
|
||||
this project during Make time
|
||||
- added extra dist target to ensure all files required to build
|
||||
get distributed during "make dist"
|
||||
- added new xslt processing args:
|
||||
-- assemblyName
|
||||
-- extraDistFiles
|
||||
-- pkgLibs (/pkg:foo)
|
||||
-- localCopyTargets (to copy sibling assemblies at Make time)
|
||||
-- projectVersion (if determined from AssemblyInfo.cs)
|
||||
-- hasAssemblyConfig (if there's a assembly.exe.config present)
|
||||
! Write()
|
||||
- calling RunInitialization() to gather pkg-config data
|
||||
* src/data/autotools.xml
|
||||
- accepting new args passed from AutotoolsTarget.cs
|
||||
- modernized configure.ac a bit
|
||||
- using a version of tar that allows >99-char filenames
|
||||
- added ASSEMBLY_NAME variable
|
||||
- using assembly name rather than project name for gac installation
|
||||
- generated assembly is now assembly name and not project name
|
||||
- accepting /pkg: flags gathered from AutotoolsTarget.cs
|
||||
- adding Makefile targets to copy sibling project assemblies to .
|
||||
- fixed Debug, Release targets
|
||||
- adding support for strongname key signing
|
||||
- adding /unsafe support
|
||||
- adding a clean make target
|
||||
- only running gacutil /u if the assembly being uninstalled is in gac
|
||||
- added some templates to determine each Configuration's .snk
|
||||
- added explanation as to why .exe assemblies live in $prefix/lib
|
||||
* src/Properties/AssemblyInfo.cs
|
||||
- bumped assembly version
|
||||
* prebuild.xml
|
||||
- bumped assembly version
|
||||
|
||||
2007-03-29T18:03 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
! WriteProject()
|
||||
- re-named incorrectly-named variable gacLibs to systemLibs
|
||||
- added another reference list, runtimeLibs which contains the
|
||||
libs we will need at runtime. we use this to build a MONO_PATH
|
||||
- added monoPath to the xslt args list
|
||||
* src/data/autotools.xml
|
||||
! <ProjectMakefileAm />
|
||||
- renamed gacLibs to systemLibs
|
||||
- added the sources to the dist list
|
||||
- added logic to install libs that aren't strongnamed
|
||||
! <ProjectWrapperScriptIn />
|
||||
- accepting a param to update the MONO_PATH
|
||||
|
||||
2007-03-28T19:46 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/MonoDevelopTarget.cs
|
||||
! CleanProject()
|
||||
- using Assembly.LoadWithPartialName to locate the assembly
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
! WriteCombine()
|
||||
- no longer using $PWD to determine a project's source dir; this
|
||||
doesn't work with <Process /> elements
|
||||
- passing the solution name to all templates - fixes
|
||||
multi-solution prebuild systems
|
||||
! WriteProject()
|
||||
- no longer using $PWD to determine a project's source dir; this
|
||||
doesn't work with <Process /> elements
|
||||
- passing the solution name to all templates - fixes
|
||||
multi-solution prebuild systems
|
||||
- copying strongname key to the autotools directory
|
||||
- using Assembly.LoadWithPartialName to locate assemblies
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
- fixed the .pc AC_CONFIG_FILES macro
|
||||
! <ProjectMakefileAm />
|
||||
- added solution name param
|
||||
- wrapping if type=exe check around script install macro
|
||||
- added type=lib check and .pc file install macro
|
||||
- added support for Configuration-specific builds (Debug, Release, etc)
|
||||
- added strongname keyfile code
|
||||
- TODO: support non-strongnamed library installation
|
||||
! <ProjectWrapperScriptIn />
|
||||
- added space preservation attribute to stylesheet element
|
||||
- added a lower-case project name variable
|
||||
- added solution name param
|
||||
- made for-each template more specific
|
||||
! <SolutionAutogenSh />
|
||||
- added solution name param
|
||||
! <SolutionConfigureAc />
|
||||
- added solution name param
|
||||
! <SolutionMakefileAm />
|
||||
- added solution name param
|
||||
! <ProjectPcIn />
|
||||
- added solution name param
|
||||
|
||||
2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- now processing the wrapper script if type is "Exe" or "WinExe"
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
- being more exact about where text escaping is used
|
||||
- using the correct variable name for the GACUTIL_FLAGS template
|
||||
- using correct test="" for the AC_CONFIG_FILES macros
|
||||
! <ProjectMakefileAm />
|
||||
- uncommented the bin_SCRIPTS section now that the script is being
|
||||
generated correctly
|
||||
! <ProjectWrapperScriptIn />
|
||||
- fixed whitespace at beginning of file, before #!
|
||||
- using lower-case packageName to indicate installation location
|
||||
|
||||
2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
* added a lcProjectName which is $projectName lower-cased
|
||||
* moved autoconf template specifier near AC_OUTPUT
|
||||
* AC_OUTPUT with args is deprecated. now using AC_CONFIG_FILES
|
||||
* placed AC_CONFIG_FILES() calls for wrapper script or pkg-config
|
||||
file in xslt project type checks
|
||||
! <ProjectMakefileAm />
|
||||
* commented out bin_SCRIPTS
|
||||
* added a lcProjectName which is $projectName lower-cased
|
||||
* using $lcProjectName instead of the longer version
|
||||
|
||||
2007-03-27T08:39 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectMakefileAm />
|
||||
- added whitespace-preservation
|
||||
- added the missing projectName param
|
||||
- replaced bin_SCRIPTS with something that worked
|
||||
|
||||
2007-03-27T07:56 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
- cleaned up duplicate checks
|
||||
- placed initialization macros above system check macros
|
||||
- added some more messages about what's going on
|
||||
- added GACUTIL_FLAGS variable including /package option
|
||||
! <ProjectMakefileAm />
|
||||
- added an incomplete bin_SCRIPTS
|
||||
- RCS check says "building" instead of "compiling"
|
||||
! <SolutionConfigureAc />
|
||||
- removed macros that are useful only for projects
|
||||
! <ProjectWrapperScriptIn />
|
||||
- created this element on this revision
|
||||
- this is a wrapper shell script that lives in the $PATH and runs
|
||||
the CIL assembly
|
||||
|
||||
2007-03-26T20:18 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- creating new template arguments to contain the list of libs to
|
||||
reference: source, binary & GAC
|
||||
- source libs are included as part of this solution (untested)
|
||||
- binary libs are distributed with the source (untested)
|
||||
- GAC libs are assumed to be in the GAC or other lib path (tested)
|
||||
* src/data/autotools.xml
|
||||
- created new params through which to accept reference info
|
||||
- created a working $(CSC) line
|
||||
- added a TODO item for ordering project dependency for
|
||||
AC_CONFIG_SUBDIRS code
|
||||
|
||||
2007-03-26T08:41 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- now creating list of source files in managed code and passing
|
||||
them to the template via <xsl:param>s
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- updated the header comment to 2007
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc>
|
||||
- copied checks from Solution-level configure.ac
|
||||
- copied solution-level config status
|
||||
! <ProjectMakefileAm>
|
||||
- added <xsl:param> elements for file list to be passed through
|
||||
- made a temporary target for the assembly we're building
|
||||
- added this target to the deps of "all:"
|
||||
! <SolutionConfigureAc>
|
||||
- changed status header/footer from "- - -" to "==="
|
||||
|
||||
2007-03-23T08:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
Added version attribute handling code for Property element
|
||||
Added description element handling code
|
||||
* prebuild.xml
|
||||
- added /Prebuild/Solution/Property/@version attribute
|
||||
- added /Prebuild/Solution/Property/Description element
|
||||
* src/Core/Nodes/ProjectNode.cs
|
||||
- added some docs where they were missing and obvious
|
||||
- added code to handle @version
|
||||
* src/Core/Nodes/DescriptionNode.cs
|
||||
- new file. Used to handle /Prebuild/Solution/Property/Description
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- added mkdirDashP(), a recursive directory creation method
|
||||
- WriteProject() now copies the files to autotools/
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- added /Prebuild/Solution/Property/Description element
|
||||
- added /Prebuild/Solution/Property/@version attribute
|
||||
* src/data/autotools.xml
|
||||
- removed excess <xsl:value-of select="$projectName"/>
|
||||
- explicitly using dnpb: prefix
|
||||
|
||||
2007-03-23T04:31 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
Merged code from my stripped-down test
|
||||
Adding support for the /Prebuild/Solution/Project/Author element
|
||||
* prebuild.xml
|
||||
- added Author elements
|
||||
- cleaned up the really long Project element
|
||||
* src/Core/Nodes/ProjectNode.cs
|
||||
- added Author tag processing code
|
||||
* src/Core/Nodes/AuthorNode.cs
|
||||
- Created to process Author elements
|
||||
- based off of ReferencePathNode.cs
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- merged code from https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/test.cs
|
||||
- renamed old WriteCombine to WriteCombineOld
|
||||
- renamed old WriteProject to WriteProjectOld
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- added Author element to Project
|
||||
* src/data/autotools.xml
|
||||
- lower-cased utf
|
||||
|
||||
|
||||
2007-03-22T13:58 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
Exposing an XmlDocument that represents the prebuild.xml file
|
||||
passed to the program
|
||||
|
||||
* src/Core/Kernel.cs
|
||||
- created an object member called XmlDocument m_CurrentDoc
|
||||
- created a property to access its value
|
||||
- using m_CurrentDoc to load up the prebuild.xml file rather than
|
||||
a local variable called "doc"
|
||||
|
||||
2007-03-22 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* prebuild.xml
|
||||
- added autotools.xml created at https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/autotools.xml
|
||||
* src/data/autotools.xml
|
||||
- the same
|
||||
* src/Core/Targets/MonoDevelopTarget.cs
|
||||
- fixed bug introduced in r206
|
||||
|
||||
2007-03-07 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- added version attribute to Solution and Project elements
|
||||
|
||||
2006-11-04T00:38 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* placing AssemblyInfo.cs into Properties/
|
||||
* Fixed double-mention of the package name
|
||||
|
||||
2006-11-03T15:23 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* corrected a problem in the Include.am generation code
|
||||
* created the new .exe
|
||||
* copied it to the root of the build
|
||||
|
||||
2006-11-03T14:57 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* Updated the .exe file
|
||||
|
||||
2006-11-03 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* Added a TODO file
|
||||
* Added a ChangeLog file
|
||||
* applied some fixes for autotools gac and pkg-config installation
|
||||
problems
|
236
Prebuild/INSTALL
236
Prebuild/INSTALL
|
@ -1,236 +0,0 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script). Here is a another example:
|
||||
|
||||
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||
configuration-related scripts to be executed by `/bin/bash'.
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
200
Prebuild/NEWS
200
Prebuild/NEWS
|
@ -1,200 +0,0 @@
|
|||
Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, MonoDevelop, and NAnt.
|
||||
|
||||
Documentation and downloads are available at http://dnpb.sourceforge.net.
|
||||
|
||||
Prebuild is licensed under the BSD license.
|
||||
|
||||
[ XXXXXXX XX, XXX - 1.3.2 ]
|
||||
+ Added Keyfile signing to NAnt target and VS2005 target
|
||||
+ Updated XSD file to 1.7
|
||||
+ Boo and VisualBasic Language support in VS2005 target
|
||||
+ Added basic Autotools target. It creates a non-recursive Autotools system.
|
||||
! Multiple files can be excluded from the Match node
|
||||
! VS2005 now handles .resx files correctly.
|
||||
! NAnt and Autotools now handle defines
|
||||
! NAnt and Autotools now handle resources
|
||||
+ Conditional XML variables can be passed through the command line.
|
||||
+ Added /install and /remove command line flags to install and remove assemblies from the GAC
|
||||
+ Many fixes to VS2005 target
|
||||
|
||||
[ July 21, 2006 - 1.3.1 ]
|
||||
! VS2005 fixes from Rob Loach
|
||||
! NAnt fixes from Rob Loach and David Hudson
|
||||
! XML doc fixes from Rob Loach
|
||||
+ Added SharpDevelop2 target (really just uses VS2005 target)
|
||||
! Fixed bug with BuildEvents in Monodevelop target
|
||||
+ Passing /yes will default to answering yes to any warnings
|
||||
|
||||
[ February 28, 2006 - 1.3 ]
|
||||
+ Added MonoDevelop target.
|
||||
+ Added NAnt target.
|
||||
+ Lots of fixes to all targets.
|
||||
* Cleaned up the code using FXCop.
|
||||
* Updated schema to 1.6 to fix a typo and add a new parameter.
|
||||
* jendave is now the maintainer of the project. RobLoach has been added as a developer.
|
||||
* Removed references to 'dnpb'.
|
||||
+ Added rudimentary support for pre- and post- build scripts
|
||||
* Updated examples.
|
||||
|
||||
[ August 5, 2004 - 1.2 ]
|
||||
+ Added Visual Studio Express (vs2005express) target contributed by Borrillis and modified for use with different languages
|
||||
+ Added the allowedgroups command line option followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags
|
||||
+ Added the filterGroups XML attribute to the project node and updated the scheme to v1.5 for this addition, it is used to specified the delimited list of filter groups to which a project belongs
|
||||
* Modified the removedir command line option to allow for a pipe-delimited list of directory names
|
||||
! Modified the resource loading code to search for resourced without the prepended namespace (as Visual Studio .NET does it) to allow for it to be compiled with SharpDevelop as well
|
||||
+ Added the GenerateXmlDocFile boolean option to the Options XML element
|
||||
* Changed the behavior of the XmlDocFile option so that if not specified it uses the assemblyName (without file extension) + .xml for the file name instead of just not generating the file since the new GenerateXmlDocFile takes care of this
|
||||
|
||||
[ January 3, 2004 - 1.1 ]
|
||||
! Replaced regex use for more efficient manual parsing to allow use on non-windows platforms with Mono which has Regex problems
|
||||
+ Added the checkOsVars attribute to the root element for enabling interpolation for Enviroment variables in the form ${var}, otherwise no checking is performed for efficiency-sake
|
||||
* Make the version attribute on the root element optional as it isn't used and not needed since the schema url contains the version
|
||||
|
||||
[ December 30, 2004 - 1.1 ]
|
||||
! Applied Leed's fix for SharpDevelop references
|
||||
+ Rewrote much of the processing for better validation and without the use of a temp file
|
||||
+ Added support for configurations at the project level which are named All. They now apply changes to all Solution level defined configs
|
||||
* Changed all spaces into tabs
|
||||
+ Added support for the None build action
|
||||
* Replaced all sequence's in the XML schema for all's because the order doesn't matter since the xml file is loaded into an XmlDocument
|
||||
|
||||
[ December 25, 2004 - 1.0 ]
|
||||
+ Added the /removedir option for cleaning directories like obj before file releases
|
||||
+ Changed WriteTempXml() and the new DeleteTempXml() methods to be compiled only in DEBUG builds
|
||||
* Made path optional for Match elements (defaults to current directory) and updates schema for it
|
||||
! Fixed XML example in the readme.txt
|
||||
+ Added example xml files to docs directory
|
||||
* Updated license.txt to add Dan Moorehead and update copyright years
|
||||
+ Updated prebuild.xml to take advantage of the default path attribute for match elements
|
||||
+ Updated Clean to delete the obj directories
|
||||
|
||||
[ December 25, 2004 - 0.13 ]
|
||||
+ Added dnpb.exe so that it can be used to generate the project files
|
||||
+ Added dnpb.ico
|
||||
* Added parameterless Write statement to Log for writing a single line
|
||||
* Changed scehema to version 1.3 for support of icon attribute
|
||||
* Added support for All configuration name under a Project node signifying common settings for all configurations
|
||||
! Fixed the SupressWarnings by adding the corresponding field to OptionsNode
|
||||
* Wrote documentation in docs/readme.txt
|
||||
* Added Dan Moorehead to copyrights and extended date from 2004 to 2004-2005
|
||||
* Updated prebuild.xml
|
||||
* Optimized Log class
|
||||
* Updated OutputUsage()
|
||||
* /clean targets all by default
|
||||
* No log file is used by default, /log without value specified uses default file name
|
||||
+ Added support for the /pause which pauses the utility after execution to observe output
|
||||
|
||||
|
||||
[ September 27, 2004 - 0.12.2a ]
|
||||
! Fixed a nasty bug when trying to delete our temp file for pre-processing.
|
||||
|
||||
[ September 15, 2004 - 0.12.2 ]
|
||||
+ Expanded platform identification, thanks to the NAnt guys for shedding some
|
||||
light on how to properly check for UNIX platforms! Thanks guys!
|
||||
* POSIX OS identifier changed to UNIX. Valid OS names are now "Win32", "UNIX",
|
||||
and "Unknown".
|
||||
! Fixed SharpDevelop target to properly use the 'rootNamespace' attribute of
|
||||
the Project tag.
|
||||
+ New command-line switch, /ppo, forces DNPB to pre-process the file and write
|
||||
the pre-processed file. This allows you to test/debug your pre-processor
|
||||
macros. No other processing will be done. You can specify a target file as
|
||||
a paramter for the /ppo switch, or DNPB will write the file 'preprocessed.xml'
|
||||
if you do not specify a file.
|
||||
+ The Match tag now has a 'buildAction' attribute which functions exactly like
|
||||
the attribute of the same name for the File tag.
|
||||
|
||||
[ August 5, 2004 - 0.12.1 ]
|
||||
+ Added environment variable expansion for all values. Environment variables
|
||||
should be listed in the form ${VAR}.
|
||||
|
||||
[ July 30, 2004 - 0.12.0 ]
|
||||
+ Added preprocessing via XML processing information tags. Available tags
|
||||
are: <?if <exp> ?>, <?elseif <exp> ?>, <?else ?> and <?endif ?>. The
|
||||
current expression parser is very basic, but will be replaced with a more
|
||||
capable parser over time. Current operators available are: =, !=, <, >,
|
||||
<=, >=. Current test variables available: OS, RuntimeVersion, RuntimeMajor,
|
||||
RuntimeMinor, RuntimeRevision.
|
||||
|
||||
[ July 27, 2004 - 0.11.4 ]
|
||||
+ Added 'useRegex' attribute to the Match tag. Matches can now use regular
|
||||
expressions to match filenames.
|
||||
+ Added the 'assemblyName' attribute to the Project tag. Projects can now
|
||||
set their output assembly name.
|
||||
! Fixed several bugs in the way that Project tags inheirt their parent
|
||||
Solutions configuration options. This operation should now work fully as
|
||||
intended.
|
||||
! Due to some wierdness, Project Guid's are now stored as part of the Project
|
||||
node and created at parse time.
|
||||
|
||||
[ May 11, 2004 - 0.11.3 ]
|
||||
! Fixed a bug where I was writing the wrong property name for a projects root
|
||||
namespace.
|
||||
! Removed a DEBUG statement I had left in the code in 0.11.2.
|
||||
! Fixed a bug in the VS2002 writer which caused the version variables to not
|
||||
be overriden correctly.
|
||||
+ Added the rootNamespace property to the <Project> element, allowing you to
|
||||
specify the root namespace.
|
||||
* /target and /clean are now mutually exclusive command line switches, and
|
||||
they both now take the all option. In the case of /target all, all build
|
||||
file for all targets will be created. In the case of /clean all, the user
|
||||
will be prompted to make sure they want to do it, and if so, will clean
|
||||
all build files for all targets.
|
||||
|
||||
[ April 22, 2004 - 0.11.2 ]
|
||||
! Fixed a bug with the /file command-line operator. Was using the unresolved
|
||||
file path rather then the resolved one, was making the attempt to open the
|
||||
dnpb file fail.
|
||||
! Fixed a bug in the schema that required at least 1 solution and 1 reference
|
||||
path. We can do just fine with 0 of either of these. Some files may be all
|
||||
<Process> statements and not have any <Solution> tags.
|
||||
! Fixed a bug that caused the project references not to be written with the
|
||||
SharpDevelop target.
|
||||
* Changed the schema to version 1.2, allowing for Configuration nodes to exist
|
||||
under project nodes. The inheritance of values is hierarchical. Meaning, if
|
||||
you define a configuration named Debug at the Soltion level, and one by the
|
||||
same name at the Project level, the one at the Project level will first
|
||||
inherit the options of the Solution level configuration, then set it's own
|
||||
options. If you define a configuration at the Project level and it does not
|
||||
exist at the Solution level, it will be created at the Solution level.
|
||||
* Project references should now work correctly across the board. Note that due
|
||||
to a restriction in Visual Studio, you can only reference projects in the same
|
||||
solution.
|
||||
|
||||
[ April 21, 2004 - 0.11.1 ]
|
||||
! Fixed a problem with resolving paths in various targets. Was not properly
|
||||
setting the CWD.
|
||||
* Schema updated to 1.1, moving the ReferencePath element from the Options
|
||||
element to the Project element. This makes more logical sense, given that
|
||||
reference paths are resolved relative to the project path. Any prebuild.xml
|
||||
file referecning verison 1.0 will fail! Please update to the 1.1 schema.
|
||||
|
||||
[ April 19, 2004 - 0.11.0 ]
|
||||
* Added several attributes across the code to make FxCop happy
|
||||
! Fixed bugs in reference paths being written in the VS targets.
|
||||
! Fixed a bug in ProjectNode which was doing two CWDStack.Push() calls instead of
|
||||
a Push/Pop pair. Was wreaking havoc with <Process> tags.
|
||||
! Fixed some bugs in the path tracking, both the Project and Solution nodes now
|
||||
have a FullPath property, which is the full path to the file resolved at load
|
||||
time. This should fix all path relativity problems.
|
||||
+ Added new /clean switch, allowing the target to clean up any files it generated.
|
||||
in accordance, the ITarget interface has been updated to support a new Clean()
|
||||
method.
|
||||
+ Completed addition of the <Process> tag, to allow the referencing of external
|
||||
prebuild.xml files.
|
||||
+ Added the runtime attribute to the Project element. This allows the developer
|
||||
to specify which runtime a project should target (Mono or Microsoft). This is
|
||||
of course ignored in certain targets like the Visual Studio targets.
|
||||
+ Added the SharpDevelop target.
|
||||
|
||||
[ April 13, 2004 - 0.10.1a ]
|
||||
+ Added the buildAction attribute to the File node. This is needed for dnpb
|
||||
to even be able to bootstrap itself (dnpb-1.0.xsd must be an embedded resource)
|
||||
|
||||
[ April 13, 2004 - 0.10.1 ]
|
||||
* First Release
|
||||
|
||||
[ Key ]
|
||||
* = Change or information
|
||||
+ = Addition
|
||||
! = Bug Fix
|
||||
|
274
Prebuild/README
274
Prebuild/README
|
@ -1,274 +0,0 @@
|
|||
Prebuild Instructions
|
||||
|
||||
Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt.
|
||||
|
||||
_______________________________________________________________________________
|
||||
Overview
|
||||
|
||||
Prebuild can be either be run from the command line to generate the
|
||||
project and make files or you can execute the included batch (*.bat)
|
||||
and Unix Shell script (*.sh) files.
|
||||
|
||||
_______________________________________________________________________________
|
||||
The currently supported developement tools and their associated batch
|
||||
and shell script files.
|
||||
|
||||
Visual Studio .NET 2005 (VS2005.bat)
|
||||
Visual Studio .NET 2003 (VS2003.bat)
|
||||
Visual Studio .NET 2002 (VS2002.bat)
|
||||
SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
|
||||
SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
|
||||
MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/
|
||||
NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/
|
||||
Autotools (autotools.bat and autotools.sh) - http://en.wikipedia.org/wiki/GNU_build_system
|
||||
|
||||
Notes:
|
||||
|
||||
A Unix Shell script is provided for MonoDevelop, as it does not run on
|
||||
Windows at this time.
|
||||
|
||||
Visual Studio .NET 2005 and the Visual Express IDE's can import
|
||||
solutions from older versions of Visual Studio .NET.
|
||||
|
||||
Makefiles are not currently supported.
|
||||
|
||||
_______________________________________________________________________________
|
||||
Command Line Syntax:
|
||||
|
||||
Example:
|
||||
> Prebuild /target vs2003
|
||||
|
||||
This will generate the project files for Visual Studio.NET 2003 and
|
||||
place the redirect the log to a file named PrebuildLog.txt in the
|
||||
parent directory
|
||||
|
||||
|
||||
The syntax structure is as below, where commandParameter is optional
|
||||
depending on the command and you can provide several option-value
|
||||
pairs.
|
||||
|
||||
Note: The '> ' signifies the command prompt, do not enter this literally
|
||||
|
||||
> Prebuild /<option> <commandParameter>
|
||||
|
||||
> Prebuild /target vs2003 /pause
|
||||
|
||||
> Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml
|
||||
|
||||
> Prebuild /target sharpdev /log
|
||||
|
||||
> Prebuild /removedir obj|bin
|
||||
|
||||
> Prebuild /target vs2003 /allowedgroups Group1|Group2
|
||||
|
||||
> Prebuild /clean
|
||||
|
||||
> Prebuild /clean /yes
|
||||
|
||||
> Prebuild /clean vs2003
|
||||
|
||||
_______________________________________________________________________________
|
||||
Command Line Options:
|
||||
|
||||
/usage - Shows the help information on how to use Prebuild and what
|
||||
the different options are and what they do
|
||||
|
||||
/clean - The project files generated for the target type specified as
|
||||
a parameter for this option will be deleted. If no value is specified
|
||||
or if 'all' is specified, then project files for all the target types
|
||||
will be deleted.
|
||||
|
||||
/target - Specified the name of the development tool for which project
|
||||
or make files will be generated. Possible parameter values include:
|
||||
vs2003, vs2002, sharpdev
|
||||
|
||||
/file - Specifies the name of the XML which defines what files are to
|
||||
be referenced by the generated project files as well as configures the
|
||||
options for them. If not specified, prebuild.xml in the current
|
||||
directory will be used as the default.
|
||||
|
||||
/log - Specified the log file that should be written to for build
|
||||
errors. If this option is not specified, no log file is generated,
|
||||
but if just no value is specified, then the defaul filename will be
|
||||
used for the log (Prebuild.log).
|
||||
|
||||
/ppo - Preprocesses the xml file to test for syntax errors or problems
|
||||
but doesn't generate the files
|
||||
|
||||
/pause - Shows the console until you press a key so that you can view
|
||||
the messages written while performing the specified actions.
|
||||
|
||||
This allows you to check if an errors occurred and - if so - what it
|
||||
was.
|
||||
|
||||
/showtargets - Shows a list of all the targets that can be specified
|
||||
as values for the /clean and /target commands.
|
||||
|
||||
/allowedgroups - This is followed by a pipe-delimited list of project
|
||||
group filter flags (eg. Group1|Group2) allow optional filtering of all
|
||||
projects that dont have at least one of these flags
|
||||
|
||||
/removedir - This is followed by a pipe-delimited list of directory
|
||||
names that will be deleted while recursivly searching the directory of
|
||||
the prebuild application and its child directories (eg. use obj|bin to
|
||||
delete all output and temporary directories before file releases)
|
||||
|
||||
/yes - Answer yes to any warnings (e.g. when cleaning all projects).
|
||||
|
||||
_______________________________________________________________________________
|
||||
Example Batch Files and Shell Scripts
|
||||
|
||||
NOTE: Common batch and shell script files are included with Prebuild source and file releases.
|
||||
______________________________
|
||||
MonoDevelop
|
||||
|
||||
#!/bin/sh
|
||||
# Generates a solution (.mds) and a set of project files (.mdp)
|
||||
|
||||
# for MonoDevelop, a Mono port of SharpDevelop
|
||||
# (http://icsharpcode.net/OpenSource/SD/Default.aspx)
|
||||
|
||||
./Prebuild /target monodev /pause
|
||||
|
||||
______________________________
|
||||
Visual Studio .NET 2003
|
||||
|
||||
@rem Generates a solution (.sln) and a set of project files (.csproj)
|
||||
@rem for Microsoft Visual Studio .NET 2002
|
||||
Prebuild /target vs2003 /pause
|
||||
|
||||
Notes:
|
||||
Text after lines that start with @rem are comments and are not evaluated
|
||||
You can also place pause on the last line instead of specifing the /pause command.
|
||||
|
||||
_______________________________________________________________________________
|
||||
Example XML Configuration File
|
||||
|
||||
Note:
|
||||
|
||||
XML Comments (<!-- Comment -->) are used to markup the prebuild.xml
|
||||
file with notes
|
||||
|
||||
The below file may be out-of-date, however the RealmForge Prebuild
|
||||
file serves as an up-to-date and extensive example.
|
||||
|
||||
It can be viewed using Tigris.org's WebSVN
|
||||
(http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml)
|
||||
by just clicking on the "view file" link for the latest revision.
|
||||
|
||||
_________________________________
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.3 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
|
||||
<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
|
||||
<Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
|
||||
<!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<!-The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
|
||||
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
|
||||
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<GenerateXmlDocFile>true</GenerateXmlDocFile>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<!-- One of the projects that is included in the Solution -->
|
||||
<Project name="RealmForge.Utility" Language="VisualBasic" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Runtime.Serialization.Formatters.Soap"/>
|
||||
<Reference name="ICSharpCode.SharpZipLib"/>
|
||||
<Files>
|
||||
<Match path="." pattern="*.vb" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<!-- Another projects that is included in the Solution -->
|
||||
<Project name="DemoGame" Language="C#" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
|
||||
<!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
|
||||
<!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
|
||||
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
|
||||
<Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
|
||||
<Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
<Match path="." pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
|
||||
<Match path="." pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
|
||||
|
||||
<!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
|
||||
<!--EmbeddedResource, Content, and Compile are valid buildAction's-->
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
</Solution>
|
||||
</Prebuild>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
Gryc Ueusp <gryc.ueusp@gmail.com>
|
||||
|
||||
caught a problem with the NAnt target's .build output which caused
|
||||
the Ubuntu build servers to choke on prebuild-generated packages
|
||||
|
||||
Todd Berman <tberman@sevenl.net>
|
||||
Lluis Sanchez Gual <lluis@novell.com>
|
||||
|
||||
pkg-config .pc file parser used in AutotoolsTarget.cs was ripped off
|
||||
from work contributed to MonoDevelop by Lluis and Todd. It came
|
||||
from
|
||||
|
||||
src/core/MonoDevelop.Core/MonoDevelop.Core/SystemPackage.cs (Lluis)
|
||||
|
||||
and
|
||||
|
||||
src/core/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
|
||||
(Lluis && Todd)
|
|
@ -1,43 +0,0 @@
|
|||
* monodev target should be able to detect whether the project is 1.x
|
||||
or 2.x runtime
|
||||
|
||||
* remove target which links ../project/foo.dll to each project's build
|
||||
root
|
||||
|
||||
* generate .config files
|
||||
|
||||
* Fix the autotools target so that
|
||||
sub generate_project_files { ... }
|
||||
sub generate_solution_files { ... }
|
||||
sub generate_multi_solution_files { ... }
|
||||
sub generate_project {
|
||||
...
|
||||
generate_project_files();
|
||||
}
|
||||
sub generate_solution {
|
||||
foreach $project ( @projects ){
|
||||
mkdir "$project/";
|
||||
pushd "$project/";
|
||||
generate_project();
|
||||
popd;
|
||||
}
|
||||
generate_solution_files();
|
||||
}
|
||||
sub generate_multi_solution {
|
||||
foreach $solution ( @solutions ){
|
||||
mkdir "$solution/";
|
||||
pushd "$solution/";
|
||||
generate_solution();
|
||||
popd;
|
||||
}
|
||||
generate_multi_solution_files();
|
||||
}
|
||||
|
||||
if(numProjects == 1){
|
||||
generate_project();
|
||||
}elsif(numSolutions == 1){
|
||||
generate_solution();
|
||||
}else{
|
||||
generate_multi_solution();
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
NAnt.exe clean
|
|
@ -1 +0,0 @@
|
|||
nant clean
|
|
@ -1,300 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
|
||||
<Solution name="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;DEBUG</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Runtime.Serialization.Formatters.Soap"/>
|
||||
<Reference name="ICSharpCode.SharpZipLib"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="RealmForge.Framework" path="Framework" type="Library" assemblyName="RealmForge.Framework" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Framework</OutputPath>
|
||||
<XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Framework</OutputPath>
|
||||
<XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Windows.Forms"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="Axiom.MathLib"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Reference name="Tao.OpenAl"/>
|
||||
<Reference name="ICSharpCode.SharpZipLib"/>
|
||||
<Reference name="csogg"/>
|
||||
<Reference name="csvorbis"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
<Match pattern="*.txt" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="RealmForge.Genres" path="Genres" type="Library" assemblyName="RealmForge.Genres" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Genres</OutputPath>
|
||||
<XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Genres</OutputPath>
|
||||
<XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Windows.Forms"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="Axiom.MathLib"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="RealmForge.UI.Forms" path="Forms" type="Library" assemblyName="RealmForge.UI.Forms" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Forms</OutputPath>
|
||||
<XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Forms</OutputPath>
|
||||
<XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Design"/>
|
||||
<Reference name="System.Windows.Forms"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="Axiom.MathLib"/>
|
||||
<Reference name="wx.NET"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionIDE.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionPlain.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesMenuControl.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesPopupMenu.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesTabbedGroups.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\ImagesTabControl.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\LibraryIcon.ico</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\TabbedInvalid.cur</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\TabbedValid.cur</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Resources\WizardPicture.bmp</File>
|
||||
<File buildAction="EmbeddedResource">Controls\Trees\tv_minus.bmp</File>
|
||||
<File buildAction="EmbeddedResource">Controls\Trees\tv_plus.bmp</File>
|
||||
<File buildAction="EmbeddedResource">Controls\Trees\treeview.bmp</File>
|
||||
<File buildAction="EmbeddedResource">Controls\Trees\listview.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Menus\MenuControl.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Controls\InertButton.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Controls\TabbedGroups.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Controls\TabCOntrol.bmp</File>
|
||||
<File buildAction="EmbeddedResource">IDE\Controls\WizardControl.bmp</File>
|
||||
<File buildAction="EmbeddedResource">Forms\IDETest.resx</File>
|
||||
<File buildAction="EmbeddedResource">Forms\IDEWindow.resx</File>
|
||||
<File buildAction="EmbeddedResource">Forms\Launcher.resx</File>
|
||||
<File buildAction="EmbeddedResource">Forms\MainRenderFrame.resx</File>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<Project name="RealmForge.RAGE" path="RAGE" type="Library" assemblyName="RealmForge.RAGE" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\RAGE</OutputPath>
|
||||
<XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\RAGE</OutputPath>
|
||||
<XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.XML"/>
|
||||
<Reference name="System.Windows.Forms"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="Axiom.Plugins.CgProgramManager"/>
|
||||
<Reference name="Axiom.Engine"/>
|
||||
<Reference name="Axiom.MathLib"/>
|
||||
<Reference name="Axiom.Plugins.ParticleFX"/>
|
||||
<Reference name="Axiom.Platforms.Win32"/>
|
||||
<Reference name="Axiom.RenderSystems.DirectX9"/>
|
||||
<Reference localCopy="false" name="Axiom.RenderSystems.OpenGL"/>
|
||||
<Reference name="Axiom.SceneManagers.Octree"/>
|
||||
<Reference name="ICSharpCode.SharpZipLib"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Reference name="ode"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
|
||||
<Project name="RealmForge.ScriptLibrary" path="ScriptLibrary" type="Library" assemblyName="RealmForge.ScriptLibrary" rootNamespace="RSL">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\ScriptLibrary</OutputPath>
|
||||
<XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\ScriptLibrary</OutputPath>
|
||||
<XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.XML"/>
|
||||
<Reference name="System.Windows.Forms"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="Axiom.MathLib"/>
|
||||
<Reference name="wx.NET"/>
|
||||
<Reference name="RealmForge.UI.Forms"/>
|
||||
<Reference name="RealmForge.RAGE"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
|
||||
<Project name="Updater" path="Updater" type="WinExe" icon="..\bin\Updater.ico" assemblyName="Updater" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Updater</OutputPath>
|
||||
<XmlDocFile>Updater.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Updater</OutputPath>
|
||||
<XmlDocFile>Updater.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="RealmForge.UI.Forms"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
|
||||
<Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="RealmForge.UI.Forms"/>
|
||||
<Reference name="RealmForge.ScriptLibrary"/>
|
||||
<Reference name="RealmForge.RAGE"/>
|
||||
<Reference name="RealmForge.Framework"/>
|
||||
<Reference name="RealmForge.Utility"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
</Solution>
|
||||
</Prebuild>
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
|
||||
<Solution name="Prebuild">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Files>
|
||||
<File>prebuild.xml</File>
|
||||
<Match path="doc" pattern="*.txt"/>
|
||||
</Files>
|
||||
<Project name="Prebuild" path="src" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>Prebuild.xml</XmlDocFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>Prebuild.xml</XmlDocFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System.Xml" />
|
||||
<Reference name="System" />
|
||||
<Files>
|
||||
<Match pattern="App.ico" buildAction="EmbeddedResource"/>
|
||||
<Match path="data" pattern="prebuild-1.6.xsd" buildAction="EmbeddedResource"/>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -1,113 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.6 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
|
||||
<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
|
||||
<Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
|
||||
<!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
|
||||
<?if OS = "Win32" ?>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<?else ?>
|
||||
<CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
|
||||
<?endif ?>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<!--The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
|
||||
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
|
||||
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<CheckUnderflowOverflow>false</CheckUnderflowOverflow>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningsAsErrors>false</WarningsAsErrors>
|
||||
<SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<RegisterComInterop>false</RegisterComInterop>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<XmlDocFile>Docs.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<!-- One of the projects that is included in the Solution -->
|
||||
<Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin\lib\Utility</OutputPath>
|
||||
<XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Data"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Runtime.Serialization.Formatters.Soap"/>
|
||||
<Reference name="ICSharpCode.SharpZipLib"/>
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<!-- Another projects that is included in the Solution -->
|
||||
<Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
|
||||
<!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
|
||||
<!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
|
||||
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>..\bin</OutputPath>
|
||||
<XmlDocFile>DemoGame.xml</XmlDocFile>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<ReferencePath>../bin</ReferencePath>
|
||||
<Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
|
||||
<Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
|
||||
<Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
|
||||
<Files>
|
||||
<!-- path defaults to . or the directory that prebuild.exe resides in -->
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
<Match pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
|
||||
<Match pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
|
||||
|
||||
<!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
|
||||
<!--EmbeddedResource, Content, and Compile are valid buildAction's-->
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -1,715 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6">
|
||||
<Solution name="SdlDotNet">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Files>
|
||||
<File buildAction="Content">SdlDotNet.build</File>
|
||||
<File buildAction="Content">prebuild.xml</File>
|
||||
</Files>
|
||||
<Project name="SdlDotNet" path="src" language="C#" type="Library" assemblyName="SdlDotNet" rootNamespace="SdlDotNet">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<XmlDocFile>SdlDotNet.xml</XmlDocFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
|
||||
<Files>
|
||||
<Match path="." pattern="SurfaceControl.cs" subType="Component" recurse="true"/>
|
||||
<Match path="." pattern="*.bmp" buildAction="EmbeddedResource" recurse="true"/>
|
||||
<Match path="." pattern="*.cs" recurse="true">
|
||||
<Exclude name="SurfaceControl.cs"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Rectangles" path="examples\\Rectangles" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Rectangles.Rectangles" assemblyName="Rectangles" rootNamespace="SdlDotNet.Examples.Rectangles" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>Rectangles.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>Rectangles.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Gears" path="examples\\Gears" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Gears.Gears" assemblyName="Gears" rootNamespace="SdlDotNet.Examples.Gears" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>Gears.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>Gears.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="CDPlayer" path="examples\\CDPlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.CDPlayer.CDPlayer" assemblyName="CDPlayer" rootNamespace="SdlDotNet.Examples.CDPlayer" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>CDPlayer.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>CDPlayer.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<File subType="Form">CDPlayer.cs</File>
|
||||
<Match path="." pattern="*.cs" recurse="true">
|
||||
<Exclude name="CDPlayer.cs"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="MoviePlayer" path="examples\\MoviePlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.MoviePlayer.MoviePlayer" assemblyName="MoviePlayer" rootNamespace="SdlDotNet.Examples.MoviePlayer" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>MoviePlayer.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>MoviePlayer.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SimpleGame" path="examples\\SimpleGame" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SimpleGame.GameMain" assemblyName="SimpleGame" rootNamespace="SdlDotNet.Examples.SimpleGame" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SimpleGame.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SimpleGame.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="BombRun" path="examples\\BombRun" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BombRun.BombRun" assemblyName="BombRun" rootNamespace="SdlDotNet.Examples.BombRun" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>BombRun.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>BombRun.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SnowDemo" path="examples\\SnowDemo" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SnowDemo.SnowDemo" assemblyName="SnowDemo" rootNamespace="SdlDotNet.Examples.SnowDemo" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SnowDemo.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SnowDemo.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="BounceSprites" path="examples\\BounceSprites" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BounceSprites.BounceSprites" assemblyName="BounceSprites" rootNamespace="SdlDotNet.Examples.BounceSprites" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>BounceSprites.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>BounceSprites.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Triad" path="examples\\Triad" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Triad.MainObject" assemblyName="Triad" rootNamespace="SdlDotNet.Examples.Triad" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>Triad.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>Triad.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="nunit.framework" localCopy="true" path="..\\..\\lib"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="GuiExample" path="examples\\GuiExample" language="C#" type="Library" assemblyName="GuiExample" rootNamespace="SdlDotNet.Examples.GuiExample">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>GuiExample.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>GuiExample.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SpriteGuiDemos" path="examples\\SpriteGuiDemos" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SpriteGuiDemos.SdlDemo" assemblyName="SpriteGuiDemo" rootNamespace="SdlDotNet.Examples.SpriteGuiDemos" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="GuiExample" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SdlDotNet.Tests" rootNamespace="SdlDotNet.Tests">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
|
||||
<Reference name="GuiExample" localCopy="true"/>
|
||||
<Reference name="nunit.framework" localCopy="true" path="..\\lib"/>
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="AudioExample" path="examples\\AudioExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.AudioExample.AudioExample" assemblyName="AudioExample" rootNamespace="SdlDotNet.Examples.AudioExample" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>AudioExample.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>AudioExample.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SdlDotNet.Particles" path="extras\\Particles" language="C#" type="Library" assemblyName="SdlDotNet.Particles" rootNamespace="SdlDotNet.Particles">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="ParticlesExample" path="examples\\ParticlesExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.ParticlesExample.ParticlesExample" assemblyName="ParticlesExample" rootNamespace="SdlDotNet.Examples.ParticlesExample" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>ParticlesExample.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>ParticlesExample.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="SdlDotNet.Particles" localCopy="true"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<!--<Project name="SdlDotNet.Gui" path="extras\\Gui" language="C#" type="Library" assemblyName="SdlDotNet.Gui" rootNamespace="SdlDotNet.Gui">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>-->
|
||||
<Project name="NeHe" path="examples\\NeHe" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.NeHe.NeHe" assemblyName="NeHe" rootNamespace="SdlDotNet.Examples.NeHe" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>NeHe.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>NeHe.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
|
||||
<Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
|
||||
<Reference name="Tao.Platform.Windows" localCopy="true" path="..\\..\\lib"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<File subType="Form">NeHe.cs</File>
|
||||
<Match path="." pattern="*.cs" recurse="true">
|
||||
<Exclude name="NeHe.cs"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="RedBook" path="examples\\RedBook" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.RedBook.RedBook" assemblyName="RedBook" rootNamespace="SdlDotNet.Examples.RedBook" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>RedBook.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>RedBook.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
|
||||
<Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
|
||||
<Reference name="Tao.FreeGlut" localCopy="true" path="..\\..\\lib"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<File subType="Form">RedBook.cs</File>
|
||||
<Match path="." pattern="*.cs" recurse="true">
|
||||
<Exclude name="RedBook.cs" />
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="PhysFsTest" path="examples\\PhysFsTest" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.PhysFsTest.PhysFsTest" assemblyName="PhysFsTest" rootNamespace="SdlDotNet.Examples.PhysFsTest" icon="App.ico">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<XmlDocFile>PhysFsTest.xml</XmlDocFile>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<XmlDocFile>PhysFsTest.xml</XmlDocFile>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="SdlDotNet" localCopy="true"/>
|
||||
<Reference name="Tao.PhysFs" localCopy="true" path="..\\..\\lib"/>
|
||||
<Files>
|
||||
<File buildAction="EmbeddedResource">App.ico</File>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -1,187 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6">
|
||||
<Solution name="Tao.Sdl">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<XmlDocFile>Tao.Sdl.xml</XmlDocFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<XmlDocFile>Tao.Sdl.xml</XmlDocFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Files>
|
||||
<File>Tao.Sdl.License.txt</File>
|
||||
<File>Tao.Sdl.Readme.txt</File>
|
||||
<File>Tao.Sdl.snk</File>
|
||||
<File>Tao.Sdl.dll.config</File>
|
||||
</Files>
|
||||
<Project name="Tao.Sdl" path="." language="C#" type="Library">
|
||||
<Reference name="System" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>Sdl.cs</File>
|
||||
<File>SdlImage.cs</File>
|
||||
<File>SdlMixer.cs</File>
|
||||
<File>SdlTtf.cs</File>
|
||||
<File>SdlNet.cs</File>
|
||||
<File>SdlGfx.cs</File>
|
||||
<File>Smpeg.cs</File>
|
||||
<File>DelegateCallingConventionCdeclAttribute.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Tao.Sdl.Tests" path="..\\..\\tests\\Sdl\\" language="C#" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="nunit.framework.dll"/>
|
||||
<Reference name="Tao.Sdl" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>SdlTest.cs</File>
|
||||
<File>SdlTestVideo.cs</File>
|
||||
<File>SdlTestImage.cs</File>
|
||||
<File>SdlTestTtf.cs</File>
|
||||
<File>SdlTestMixer.cs</File>
|
||||
<File>SdlTestGfx.cs</File>
|
||||
<File>SmpegTest.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SdlExamples.Rectangles" path="..\\..\\examples\\SdlExamples\\Rectangles" language="C#" type="WinExe" startupObject="SdlExamples.Rectangles">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.Sdl" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>Rectangles.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SdlExamples.SmpegPlayer" path="..\\..\\examples\\SdlExamples\\SmpegPlayer" language="C#" type="WinExe" startupObject="SdlExamples.SmpegPlayer">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.Sdl" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>SmpegPlayer.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="SdlExamples.GfxPrimitives" path="..\\..\\examples\\SdlExamples\\GfxPrimitives" language="C#" type="WinExe" startupObject="SdlExamples.GfxPrimitives">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="Tao.Sdl" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>GfxPrimitives.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Tao.PostProcess" path="..\\Tao.PostProcess\\" language="C#" type="Exe">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<AllowUnsafe>false</AllowUnsafe>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Files>
|
||||
<File>AssemblyInfo.cs</File>
|
||||
<File>AppMain.cs</File>
|
||||
<File>BuildProcessor.cs</File>
|
||||
<File>Options.cs</File>
|
||||
<File>ReleaseBuildProcessor.cs</File>
|
||||
<File>UsageHelp.cs</File>
|
||||
</Files>
|
||||
</Project>
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec mono [PREFIX]/prebuild.exe "$@"
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd" version="1.10">
|
||||
<Solution name="Prebuild" version="2.0.7">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Files>
|
||||
<File>prebuild.xml</File>
|
||||
</Files>
|
||||
<Project name="Prebuild"
|
||||
path="src"
|
||||
language="C#"
|
||||
assemblyName="prebuild"
|
||||
icon="App.ico"
|
||||
type="Exe"
|
||||
rootNamespace="Prebuild"
|
||||
startupObject="Prebuild.Prebuild"
|
||||
version="2.0.7"
|
||||
frameworkVersion="v4_8"
|
||||
>
|
||||
<Author>Matthew Holmes (matthew@wildfiregames.com)</Author>
|
||||
<Author>Dan Moorehead (dan05a@gmail.com)</Author>
|
||||
<Author>Dave Hudson (jendave@yahoo.com)</Author>
|
||||
<Author>Rob Loach (http://robloach.net)</Author>
|
||||
<Author>C.J. Adams-Collier (cjac@colliertech.org)</Author>
|
||||
<Author>John Hurliman (john.hurliman@intel.com)</Author>
|
||||
<Author>WhiteCore build (2015) Rowan Deppeler (greythan@gmail.com)</Author>
|
||||
<Author>OpenSimulator build (2017) AJLDuarte</Author>
|
||||
<Description>The Prebuild project generator</Description>
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<KeyFile>Prebuild.snk</KeyFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<KeyFile>Prebuild.snk</KeyFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System.EnterpriseServices" />
|
||||
<Reference name="System.Xml" />
|
||||
<Reference name="System" />
|
||||
<Files>
|
||||
<Match pattern="App.ico" buildAction="EmbeddedResource"/>
|
||||
<Match path="data" pattern="prebuild-1.10.xsd" buildAction="EmbeddedResource"/>
|
||||
<Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/>
|
||||
<Match pattern="*.cs" recurse="true">
|
||||
<Exclude name="obj" pattern="obj"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -1,128 +0,0 @@
|
|||
|
||||
|
||||
rem Prebuild.exe /target VS2010
|
||||
|
||||
@ECHO OFF
|
||||
|
||||
echo ==========================================
|
||||
echo ==== WhiteCore Prebuild Configuration ====
|
||||
echo ==========================================
|
||||
echo.
|
||||
echo If you wish to customize the configuration, re-run with the switch '-p'
|
||||
echo e.g. runprebuild -p
|
||||
echo.
|
||||
|
||||
rem ## Default "configuration" choice ((r)elease, (d)ebug)
|
||||
set configuration=d
|
||||
|
||||
rem ## Default Visual Studio edition
|
||||
set vstudio=2019
|
||||
|
||||
rem ## Default Framework
|
||||
set framework=4_8
|
||||
|
||||
rem ## Default architecture (86 (for 32bit), 64)
|
||||
:CheckArch
|
||||
set bits=AnyCPU
|
||||
rem if exist "%PROGRAMFILES(X86)%" (set bits=x64)
|
||||
rem if %bits% == x64 (
|
||||
rem echo Found 64bit architecture
|
||||
rem )
|
||||
rem if %bits% == x86 (
|
||||
rem echo Found 32 bit architecture
|
||||
rem )
|
||||
|
||||
rem ## Determine native framework
|
||||
:CheckOS
|
||||
set framework=4_5
|
||||
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
|
||||
if %version% == 10.0 (
|
||||
set framework=4_8
|
||||
echo Windows 10
|
||||
)
|
||||
if %version% == 6.3 (
|
||||
set framework=4_5
|
||||
echo Windows 8.1 or Server 2012 R2
|
||||
)
|
||||
if %version% == 6.2 (
|
||||
set framework=4_5
|
||||
echo Windows 8 or Server 2012
|
||||
)
|
||||
if %version% == 6.1 (
|
||||
set framework=4_0
|
||||
echo Windows 7 or Server 2008 R2
|
||||
)
|
||||
if %version% == 6.0 (
|
||||
set framework=3_5
|
||||
echo hmmm... Windows Vista or Server 2008
|
||||
)
|
||||
if %version% == 5.2 (
|
||||
set framework=3_5
|
||||
echo hmmm... Windows XP x64 or Server 2003
|
||||
)
|
||||
if %version% == 5.1 (
|
||||
set framework=3_5
|
||||
echo hmmm... Windows XP
|
||||
)
|
||||
|
||||
|
||||
rem ## If not requested, skip the prompting
|
||||
if "%1" =="" goto final
|
||||
if %1 == -p goto prompt
|
||||
if %1 == --prompt goto prompt
|
||||
goto final
|
||||
|
||||
:prompt
|
||||
echo I will now ask you four questions regarding your build.
|
||||
echo However, if you wish to build for:
|
||||
echo %bits% Architecture
|
||||
echo .NET %framework%
|
||||
echo Visual Studio %vstudio%
|
||||
|
||||
echo.
|
||||
echo Simply tap [ENTER] three times.
|
||||
echo.
|
||||
echo Note that you can change these defaults by opening this
|
||||
echo batch file in a text editor.
|
||||
echo.
|
||||
|
||||
:bits
|
||||
set /p bits="Choose your architecture (x86, x64, AnyCPU) [%bits%]: "
|
||||
if %bits%==86 goto configuration
|
||||
if %bits%==x86 goto configuration
|
||||
if %bits%==64 goto configuration
|
||||
if %bits%==x64 goto configuration
|
||||
if %bits%==AnyCPU goto configuration
|
||||
if %bits%==anycpu goto configuration
|
||||
echo "%bits%" isn't a valid choice!
|
||||
goto bits
|
||||
|
||||
:configuration
|
||||
set /p configuration="Choose your configuration ((r)elease or (d)ebug)? [%configuration%]: "
|
||||
if %configuration%==r goto framework
|
||||
if %configuration%==d goto framework
|
||||
if %configuration%==release goto framework
|
||||
if %configuration%==debug goto framework
|
||||
echo "%configuration%" isn't a valid choice!
|
||||
goto configuration
|
||||
|
||||
:framework
|
||||
set /p framework="Choose your .NET framework (4_0 or 4_5)? [%framework%]: "
|
||||
if %framework%==4_0 goto final
|
||||
if %framework%==4_5 goto final
|
||||
echo "%framework%" isn't a valid choice!
|
||||
goto framework
|
||||
|
||||
:final
|
||||
echo.
|
||||
echo Configuring for %bits% architecture using %framework% .NET framework
|
||||
echo.
|
||||
echo.
|
||||
|
||||
|
||||
if %framework%==4_5 set %vstudio%=2012
|
||||
|
||||
echo Calling Prebuild for target %vstudio% with framework %framework%...
|
||||
echo ..\bin\prebuild.exe /target vs%vstudio% /targetframework v%framework% /conditionals ISWIN;NET_%framework%
|
||||
.\src\bin\Debug\prebuild.exe /target vs%vstudio% /targetframework v%framework% /conditionals ISWIN;NET_%framework%
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
#exec mono [PREFIX]/prebuild.exe "$@"
|
||||
exec mono Prebuild.exe /target VS2010
|
|
@ -1,2 +0,0 @@
|
|||
cd ..
|
||||
Prebuild.exe /clean /yes /removedir obj /file prebuild.xml /build NET_2_0 /pause
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
./prebuild /clean /removedir obj /file ../prebuild.xml /pause
|
||||
rm -rf ../Makefile
|
|
@ -1,2 +0,0 @@
|
|||
cd ..
|
||||
Prebuild.exe /usage /pause
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
prebuild /target monodev /file ../prebuild.xml /build NET_1_1 /pause
|
|
@ -1,231 +0,0 @@
|
|||
!verbose 3
|
||||
|
||||
!define PRODUCT_NAME "Prebuild"
|
||||
!define PRODUCT_VERSION "1.3.1"
|
||||
!define PRODUCT_PUBLISHER "Prebuild"
|
||||
!define PRODUCT_PACKAGE "prebuild"
|
||||
!define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net"
|
||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild"
|
||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild"
|
||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||
!define PRODUCT_PATH ".."
|
||||
|
||||
;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
|
||||
;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
||||
;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
|
||||
;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
||||
|
||||
BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/"
|
||||
SetCompressor lzma
|
||||
CRCCheck on
|
||||
|
||||
; File Association defines
|
||||
;!include "fileassoc.nsh"
|
||||
|
||||
; MUI 1.67 compatible ------
|
||||
!include "MUI.nsh"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
;--------------------------------
|
||||
;Installer Pages
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; License page
|
||||
!insertmacro MUI_PAGE_LICENSE "..\doc\license.txt"
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Finish page
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
;------------------------------------
|
||||
; Uninstaller pages
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
;------------------------------------
|
||||
|
||||
; Language files
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
; Reserve files
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||
|
||||
; MUI end ------
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\Prebuild"
|
||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
; .NET Framework check
|
||||
; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp
|
||||
; Section "Detecting that the .NET Framework 1.1 is installed"
|
||||
Function .onInit
|
||||
ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install
|
||||
StrCmp $R0 "" 0 CheckPreviousVersion
|
||||
MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation."
|
||||
Abort
|
||||
|
||||
CheckPreviousVersion:
|
||||
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName"
|
||||
StrCmp $R0 "" CheckOSVersion 0
|
||||
MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation."
|
||||
Abort
|
||||
|
||||
CheckOSVersion:
|
||||
Call IsSupportedWindowsVersion
|
||||
Pop $R0
|
||||
StrCmp $R0 "False" NoAbort 0
|
||||
MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)."
|
||||
Abort
|
||||
|
||||
NoAbort:
|
||||
FunctionEnd
|
||||
|
||||
Section "Source" SecSource
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR\src"
|
||||
File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.*
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Runtime" SecRuntime
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR"
|
||||
File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Documentation" SecDocs
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR\doc"
|
||||
File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.*
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
|
||||
SectionEnd
|
||||
|
||||
Section "Scripts" SecScripts
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR\scripts"
|
||||
File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.*
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
|
||||
SectionEnd
|
||||
|
||||
;Language strings
|
||||
|
||||
Section -AdditionalIcons
|
||||
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
||||
SectionEnd
|
||||
|
||||
Section -Post
|
||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
||||
SectionEnd
|
||||
|
||||
Section Uninstall
|
||||
|
||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; GetWindowsVersion, taken from NSIS help, modified for our purposes
|
||||
Function IsSupportedWindowsVersion
|
||||
|
||||
Push $R0
|
||||
Push $R1
|
||||
|
||||
ReadRegStr $R0 HKLM \
|
||||
"SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
|
||||
IfErrors 0 lbl_winnt
|
||||
|
||||
; we are not NT
|
||||
ReadRegStr $R0 HKLM \
|
||||
"SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
|
||||
|
||||
StrCpy $R1 $R0 1
|
||||
StrCmp $R1 '4' 0 lbl_error
|
||||
|
||||
StrCpy $R1 $R0 3
|
||||
|
||||
StrCmp $R1 '4.0' lbl_win32_95
|
||||
StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
|
||||
|
||||
lbl_win32_95:
|
||||
StrCpy $R0 'False'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_win32_98:
|
||||
StrCpy $R0 'False'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_win32_ME:
|
||||
StrCpy $R0 'False'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt:
|
||||
|
||||
StrCpy $R1 $R0 1
|
||||
|
||||
StrCmp $R1 '3' lbl_winnt_x
|
||||
StrCmp $R1 '4' lbl_winnt_x
|
||||
|
||||
StrCpy $R1 $R0 3
|
||||
|
||||
StrCmp $R1 '5.0' lbl_winnt_2000
|
||||
StrCmp $R1 '5.1' lbl_winnt_XP
|
||||
StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
|
||||
|
||||
lbl_winnt_x:
|
||||
StrCpy $R0 'False'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_2000:
|
||||
Strcpy $R0 'True'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_XP:
|
||||
Strcpy $R0 'True'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_2003:
|
||||
Strcpy $R0 'True'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_error:
|
||||
Strcpy $R0 'False'
|
||||
lbl_done:
|
||||
|
||||
Pop $R1
|
||||
Exch $R0
|
||||
|
||||
FunctionEnd
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a combine (.cmbx) and a set of project files (.prjx)
|
||||
@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
|
||||
cd ..
|
||||
Prebuild.exe /target sharpdev /file prebuild.xml /build NET_1_1 /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a combine (.cmbx) and a set of project files (.prjx)
|
||||
@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
|
||||
cd ..
|
||||
Prebuild.exe /target sharpdev2 /file prebuild.xml /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a solution (.sln) and a set of project files (.csproj)
|
||||
@rem for Microsoft Visual Studio .NET 2002
|
||||
cd ..
|
||||
Prebuild.exe /target vs2002 /file prebuild.xml /build NET_1_1 /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a solution (.sln) and a set of project files (.csproj)
|
||||
@rem for Microsoft Visual Studio .NET 2002
|
||||
cd ..
|
||||
Prebuild.exe /target vs2003 /file prebuild.xml /build NET_1_1 /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.)
|
||||
@rem for Microsoft Visual Studio .NET 2005
|
||||
cd ..
|
||||
Prebuild.exe /target vs2005 /file prebuild.xml /build NET_2_0 /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.)
|
||||
@rem for Microsoft Visual Studio .NET 2008
|
||||
cd ..
|
||||
Prebuild.exe /target vs2008 /file prebuild.xml /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.)
|
||||
@rem for Microsoft Visual Studio .NET 2010
|
||||
cd ..
|
||||
Prebuild.exe /target vs2010 /file prebuild.xml /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates Makefiles
|
||||
@rem for autotools
|
||||
cd ..
|
||||
Prebuild.exe /target autotools /file prebuild.xml /pause
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
RUNTIME=`which mono`
|
||||
|
||||
SCRIPTDIR=`dirname $0`
|
||||
${RUNTIME} ${SCRIPTDIR}/../Prebuild.exe /target autotools /file ${SCRIPTDIR}/../prebuild.xml /build NET_2_0
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates makefiles
|
||||
@rem for make
|
||||
cd ..
|
||||
Prebuild.exe /target makefile /file prebuild.xml /pause
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
./prebuild /target makefile /file ../prebuild.xml /pause
|
||||
|
||||
if [ -f ../Makefile ]
|
||||
then
|
||||
rm -rf ../Makefile
|
||||
fi
|
||||
|
||||
mv ../Prebuild.make ../Makefile
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a .build files
|
||||
@rem for NAnt
|
||||
cd ..
|
||||
Prebuild.exe /target nant /file prebuild.xml /pause
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
prebuild /target nant /file ../prebuild.xml /pause
|
|
@ -1,4 +0,0 @@
|
|||
@rem Generates a Xcode files
|
||||
@rem for NAnt
|
||||
cd ..
|
||||
Prebuild.exe /target xcode /file prebuild.xml /pause
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
prebuild /target xcode /file ../prebuild.xml /pause
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -1,72 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Prebuild.Core.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=true)]
|
||||
public sealed class DataNodeAttribute : Attribute
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataNodeAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
public DataNodeAttribute(string name)
|
||||
{
|
||||
m_Name = name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Prebuild.Core.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public sealed class OptionNodeAttribute : Attribute
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_NodeName;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="nodeName">Name of the node.</param>
|
||||
public OptionNodeAttribute(string nodeName)
|
||||
{
|
||||
m_NodeName = nodeName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the node.
|
||||
/// </summary>
|
||||
/// <value>The name of the node.</value>
|
||||
public string NodeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_NodeName;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Prebuild.Core.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
||||
public sealed class TargetAttribute : Attribute
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TargetAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
public TargetAttribute(string name)
|
||||
{
|
||||
m_Name = name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Prebuild.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class FatalException : Exception
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FatalException"/> class.
|
||||
/// </summary>
|
||||
public FatalException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FatalException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
public FatalException(string format, params object[] args)
|
||||
: base(String.Format(format, args))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exception with specified string
|
||||
/// </summary>
|
||||
/// <param name="message">Exception message</param>
|
||||
public FatalException(string message): base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public FatalException(string message, Exception exception) : base(message, exception)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context )
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
namespace Prebuild.Core.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface IDataNode
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the parent.
|
||||
/// </summary>
|
||||
/// <value>The parent.</value>
|
||||
IDataNode Parent { get; set; }
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
void Parse(XmlNode node);
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Prebuild.Core.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ITarget
|
||||
{
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
void Write(Kernel kern);
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
void Clean(Kernel kern);
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
|
@ -1,848 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2008
|
||||
Matthew Holmes (matthew@wildfiregames.com),
|
||||
Dan Moorehead (dan05a@gmail.com),
|
||||
Rob Loach (http://www.robloach.net),
|
||||
C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#define NO_VALIDATE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Kernel : IDisposable
|
||||
{
|
||||
#region Inner Classes
|
||||
|
||||
private struct NodeEntry
|
||||
{
|
||||
public Type Type;
|
||||
public DataNodeAttribute Attribute;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
private static readonly Kernel m_Instance = new Kernel();
|
||||
|
||||
/// <summary>
|
||||
/// This must match the version of the schema that is embeeded
|
||||
/// </summary>
|
||||
private const string m_SchemaVersion = "1.10";
|
||||
private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
|
||||
private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
|
||||
bool disposed;
|
||||
private Version m_Version;
|
||||
private const string m_Revision = "w";
|
||||
private CommandLineCollection m_CommandLine;
|
||||
private Log m_Log;
|
||||
private CurrentDirectory m_CurrentWorkingDirectory;
|
||||
private XmlSchemaCollection m_Schemas;
|
||||
|
||||
private readonly Dictionary<string, ITarget> m_Targets = new Dictionary<string, ITarget>();
|
||||
private readonly Dictionary<string, NodeEntry> m_Nodes = new Dictionary<string, NodeEntry>();
|
||||
|
||||
readonly List<SolutionNode> m_Solutions = new List<SolutionNode>();
|
||||
string m_Target;
|
||||
bool cmdlineTargetFramework;
|
||||
FrameworkVersion m_TargetFramework; //Overrides all project settings
|
||||
string m_Conditionals; //Adds to all project settings
|
||||
public string ForcedConditionals { get { return m_Conditionals; } }
|
||||
string m_Clean;
|
||||
string[] m_RemoveDirectories;
|
||||
XmlDocument m_CurrentDoc;
|
||||
bool m_PauseAfterFinish;
|
||||
string[] m_ProjectGroups;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
private Kernel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [pause after finish].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value>
|
||||
public bool PauseAfterFinish
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PauseAfterFinish;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the instance.
|
||||
/// </summary>
|
||||
/// <value>The instance.</value>
|
||||
public static Kernel Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Instance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the command line.
|
||||
/// </summary>
|
||||
/// <value>The command line.</value>
|
||||
public CommandLineCollection CommandLine
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CommandLine;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the targets.
|
||||
/// </summary>
|
||||
/// <value>The targets.</value>
|
||||
public Dictionary<string, ITarget> Targets
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Targets;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the log.
|
||||
/// </summary>
|
||||
/// <value>The log.</value>
|
||||
public Log Log
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Log;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current working directory.
|
||||
/// </summary>
|
||||
/// <value>The current working directory.</value>
|
||||
public CurrentDirectory CurrentWorkingDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurrentWorkingDirectory;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the solutions.
|
||||
/// </summary>
|
||||
/// <value>The solutions.</value>
|
||||
public List<SolutionNode> Solutions
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Solutions;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XmlDocument object representing the prebuild.xml
|
||||
/// being processed
|
||||
/// </summary>
|
||||
/// <value>The XmlDocument object</value>
|
||||
public XmlDocument CurrentDoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurrentDoc;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static void RemoveDirectories(string rootDir, string[] dirNames)
|
||||
{
|
||||
foreach(string dir in Directory.GetDirectories(rootDir))
|
||||
{
|
||||
string simpleName = Path.GetFileName(dir);
|
||||
|
||||
if(Array.IndexOf(dirNames, simpleName) != -1)
|
||||
{
|
||||
//delete if the name matches one of the directory names to delete
|
||||
string fullDirPath = Path.GetFullPath(dir);
|
||||
Directory.Delete(fullDirPath,true);
|
||||
}
|
||||
else//not a match, so check children
|
||||
{
|
||||
RemoveDirectories(dir,dirNames);
|
||||
//recurse, checking children for them
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// private void RemoveDirectoryMatches(string rootDir, string dirPattern)
|
||||
// {
|
||||
// foreach(string dir in Directory.GetDirectories(rootDir))
|
||||
// {
|
||||
// foreach(string match in Directory.GetDirectories(dir))
|
||||
// {//delete all child directories that match
|
||||
// Directory.Delete(Path.GetFullPath(match),true);
|
||||
// }
|
||||
// //recure through the rest checking for nested matches to delete
|
||||
// RemoveDirectoryMatches(dir,dirPattern);
|
||||
// }
|
||||
// }
|
||||
|
||||
private void LoadSchema()
|
||||
{
|
||||
Assembly assembly = GetType().Assembly;
|
||||
Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema);
|
||||
if(stream == null)
|
||||
{
|
||||
//try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET
|
||||
stream = assembly.GetManifestResourceStream(m_Schema);
|
||||
if(stream == null)
|
||||
{
|
||||
throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema));
|
||||
}
|
||||
}
|
||||
XmlReader schema = new XmlTextReader(stream);
|
||||
|
||||
m_Schemas = new XmlSchemaCollection();
|
||||
m_Schemas.Add(m_SchemaURI, schema);
|
||||
}
|
||||
|
||||
private void CacheVersion()
|
||||
{
|
||||
m_Version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
private void CacheTargets(Assembly assm)
|
||||
{
|
||||
foreach(Type t in assm.GetTypes())
|
||||
{
|
||||
TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget));
|
||||
|
||||
if(ta == null)
|
||||
continue;
|
||||
|
||||
if (t.IsAbstract)
|
||||
continue;
|
||||
|
||||
ITarget target = (ITarget)assm.CreateInstance(t.FullName);
|
||||
if (target == null)
|
||||
{
|
||||
throw new MissingMethodException("Could not create ITarget instance");
|
||||
}
|
||||
|
||||
m_Targets[ta.Name] = target;
|
||||
}
|
||||
}
|
||||
|
||||
private void CacheNodeTypes(Assembly assm)
|
||||
{
|
||||
foreach(Type t in assm.GetTypes())
|
||||
{
|
||||
foreach (DataNodeAttribute dna in t.GetCustomAttributes(typeof(DataNodeAttribute), true))
|
||||
{
|
||||
NodeEntry ne = new NodeEntry();
|
||||
ne.Type = t;
|
||||
ne.Attribute = dna;
|
||||
m_Nodes[dna.Name] = ne;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LogBanner()
|
||||
{
|
||||
m_Log.Write("Prebuild v" + Version);
|
||||
m_Log.Write("Copyright (c) 2004-2010");
|
||||
m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),");
|
||||
m_Log.Write("Dan Moorehead (dan05a@gmail.com),");
|
||||
m_Log.Write("David Hudson (jendave@yahoo.com),");
|
||||
m_Log.Write("Rob Loach (http://www.robloach.net),");
|
||||
m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),");
|
||||
m_Log.Write("John Hurliman (john.hurliman@intel.com),");
|
||||
m_Log.Write("WhiteCore build 2015 (greythane@gmail.com),");
|
||||
m_Log.Write("OpenSimulator build 2017 Ubit Umarov,");
|
||||
m_Log.Write ("");
|
||||
m_Log.Write("See 'prebuild /usage' for help");
|
||||
m_Log.Write();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ProcessFile(string file)
|
||||
{
|
||||
ProcessFile(file, m_Solutions);
|
||||
}
|
||||
|
||||
public void ProcessFile(ProcessNode node, SolutionNode parent)
|
||||
{
|
||||
if (node.IsValid)
|
||||
{
|
||||
List<SolutionNode> list = new List<SolutionNode>();
|
||||
ProcessFile(node.Path, list);
|
||||
|
||||
foreach (SolutionNode solution in list)
|
||||
parent.SolutionsTable[solution.Name] = solution;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="solutions"></param>
|
||||
/// <returns></returns>
|
||||
public void ProcessFile(string file, IList<SolutionNode> solutions)
|
||||
{
|
||||
m_CurrentWorkingDirectory.Push();
|
||||
|
||||
string path = file;
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
path = Helper.ResolvePath(path);
|
||||
}
|
||||
catch(ArgumentException)
|
||||
{
|
||||
m_Log.Write("Could not open Prebuild file: " + path);
|
||||
m_CurrentWorkingDirectory.Pop();
|
||||
return;
|
||||
}
|
||||
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(path));
|
||||
|
||||
XmlTextReader reader = new XmlTextReader(path);
|
||||
|
||||
Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor();
|
||||
|
||||
//register command line arguments as XML variables
|
||||
IEnumerator<KeyValuePair<string, string>> dict = m_CommandLine.GetEnumerator();
|
||||
while (dict.MoveNext())
|
||||
{
|
||||
string name = dict.Current.Key.Trim();
|
||||
if (name.Length > 0)
|
||||
pre.RegisterVariable(name, dict.Current.Value);
|
||||
}
|
||||
|
||||
string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML
|
||||
|
||||
// See if the user put into a pseudo target of "prebuild:preprocessed-input" to indicate they want to see the
|
||||
// output before the system processes it.
|
||||
if (m_CommandLine.WasPassed("ppi"))
|
||||
{
|
||||
// Get the filename if there is one, otherwise use a default.
|
||||
string ppiFile = m_CommandLine["ppi"];
|
||||
if (ppiFile == null || ppiFile.Trim().Length == 0)
|
||||
{
|
||||
ppiFile = "preprocessed-input.xml";
|
||||
}
|
||||
|
||||
// Write out the string to the given stream.
|
||||
try
|
||||
{
|
||||
using (StreamWriter ppiWriter = new StreamWriter(ppiFile))
|
||||
{
|
||||
ppiWriter.WriteLine(xml);
|
||||
}
|
||||
}
|
||||
catch(IOException ex)
|
||||
{
|
||||
Console.WriteLine("Could not write PPI file '{0}': {1}", ppiFile, ex.Message);
|
||||
}
|
||||
|
||||
// Finish processing this special tag.
|
||||
return;
|
||||
}
|
||||
|
||||
m_CurrentDoc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
#if NO_VALIDATE
|
||||
XmlReader validator = XmlReader.Create(new StringReader(xml));
|
||||
m_CurrentDoc.Load(validator);
|
||||
#else
|
||||
XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
|
||||
|
||||
//validate while reading from string into XmlDocument DOM structure in memory
|
||||
foreach(XmlSchema schema in m_Schemas)
|
||||
{
|
||||
validator.Schemas.Add(schema);
|
||||
}
|
||||
m_CurrentDoc.Load(validator);
|
||||
#endif
|
||||
}
|
||||
catch(XmlException e)
|
||||
{
|
||||
throw new XmlException(e.ToString());
|
||||
}
|
||||
|
||||
//is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details
|
||||
if(m_CommandLine.WasPassed("ppo"))
|
||||
{
|
||||
string ppoFile = m_CommandLine["ppo"];
|
||||
if(ppoFile == null || ppoFile.Trim().Length < 1)
|
||||
{
|
||||
ppoFile = "preprocessed.xml";
|
||||
}
|
||||
|
||||
StreamWriter writer = null;
|
||||
try
|
||||
{
|
||||
writer = new StreamWriter(ppoFile);
|
||||
writer.Write(xml);
|
||||
}
|
||||
catch(IOException ex)
|
||||
{
|
||||
Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(writer != null)
|
||||
{
|
||||
writer.Close();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
//start reading the xml config file
|
||||
XmlElement rootNode = m_CurrentDoc.DocumentElement;
|
||||
//string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
|
||||
Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
|
||||
|
||||
foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions
|
||||
{
|
||||
IDataNode dataNode = ParseNode(node, null);
|
||||
if(dataNode is ProcessNode)
|
||||
{
|
||||
ProcessNode proc = (ProcessNode)dataNode;
|
||||
if(proc.IsValid)
|
||||
{
|
||||
ProcessFile(proc.Path);
|
||||
}
|
||||
}
|
||||
else if(dataNode is SolutionNode)
|
||||
{
|
||||
solutions.Add((SolutionNode)dataNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(XmlSchemaException xse)
|
||||
{
|
||||
m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}",
|
||||
xse.LineNumber, path, xse.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Allows the project.
|
||||
/// </summary>
|
||||
/// <param name="projectGroupsFlags">The project groups flags.</param>
|
||||
/// <returns></returns>
|
||||
public bool AllowProject(string projectGroupsFlags)
|
||||
{
|
||||
if(m_ProjectGroups != null && m_ProjectGroups.Length > 0)
|
||||
{
|
||||
if(projectGroupsFlags != null && projectGroupsFlags.Length == 0)
|
||||
{
|
||||
foreach(string group in projectGroupsFlags.Split('|'))
|
||||
{
|
||||
if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;//not included in the list or no groups specified for the project
|
||||
}
|
||||
return true;//no filter specified in the command line args
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <returns></returns>
|
||||
public Type GetNodeType(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
if(!m_Nodes.ContainsKey(node.Name))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NodeEntry ne = m_Nodes[node.Name];
|
||||
return ne.Type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
/// <param name="parent"></param>
|
||||
/// <returns></returns>
|
||||
public IDataNode ParseNode(XmlNode node, IDataNode parent)
|
||||
{
|
||||
return ParseNode(node, parent, null);
|
||||
}
|
||||
|
||||
//Create an instance of the data node type that is mapped to the name of the xml DOM node
|
||||
/// <summary>
|
||||
/// Parses the node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="parent">The parent.</param>
|
||||
/// <param name="preNode">The pre node.</param>
|
||||
/// <returns></returns>
|
||||
public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode)
|
||||
{
|
||||
IDataNode dataNode;
|
||||
|
||||
try
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
if(preNode == null)
|
||||
{
|
||||
if(!m_Nodes.ContainsKey(node.Name))
|
||||
{
|
||||
Console.WriteLine("WARNING: Unknown XML node: " + node.Name);
|
||||
return null;
|
||||
}
|
||||
|
||||
NodeEntry ne = m_Nodes[node.Name];
|
||||
Type type = ne.Type;
|
||||
//DataNodeAttribute dna = ne.Attribute;
|
||||
|
||||
dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName);
|
||||
if(dataNode == null)
|
||||
{
|
||||
throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName);
|
||||
}
|
||||
}
|
||||
else
|
||||
dataNode = preNode;
|
||||
|
||||
dataNode.Parent = parent;
|
||||
if (cmdlineTargetFramework && dataNode is ProjectNode)
|
||||
{
|
||||
((ProjectNode)dataNode).FrameworkVersion = m_TargetFramework;
|
||||
}
|
||||
dataNode.Parse(node);
|
||||
}
|
||||
catch(WarningException wex)
|
||||
{
|
||||
m_Log.Write(LogType.Warning, wex.Message);
|
||||
return null;
|
||||
}
|
||||
catch(FatalException fex)
|
||||
{
|
||||
m_Log.WriteException(LogType.Error, fex);
|
||||
throw;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
m_Log.WriteException(LogType.Error, ex);
|
||||
throw;
|
||||
}
|
||||
|
||||
return dataNode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the specified target.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
public void Initialize(LogTargets target, string[] args)
|
||||
{
|
||||
CacheTargets(GetType().Assembly);
|
||||
CacheNodeTypes(GetType().Assembly);
|
||||
CacheVersion();
|
||||
|
||||
m_CommandLine = new CommandLineCollection(args);
|
||||
|
||||
string logFile = null;
|
||||
if(m_CommandLine.WasPassed("log"))
|
||||
{
|
||||
logFile = m_CommandLine["log"];
|
||||
|
||||
if(logFile != null && logFile.Length == 0)
|
||||
{
|
||||
logFile = "Prebuild.log";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target = target & ~LogTargets.File; //dont output to a file
|
||||
}
|
||||
|
||||
m_Log = new Log(target, logFile);
|
||||
LogBanner();
|
||||
|
||||
m_CurrentWorkingDirectory = new CurrentDirectory();
|
||||
|
||||
m_Target = m_CommandLine["target"];
|
||||
m_Conditionals = m_CommandLine["conditionals"];
|
||||
if(m_CommandLine["targetframework"] != null)
|
||||
{
|
||||
m_TargetFramework = (FrameworkVersion)Enum.Parse (typeof (FrameworkVersion), m_CommandLine["targetframework"]);
|
||||
cmdlineTargetFramework = true;
|
||||
}
|
||||
m_Clean = m_CommandLine["clean"];
|
||||
string removeDirs = m_CommandLine["removedir"];
|
||||
if(removeDirs != null && removeDirs.Length == 0)
|
||||
{
|
||||
m_RemoveDirectories = removeDirs.Split('|');
|
||||
}
|
||||
|
||||
string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include
|
||||
if(flags != null && flags.Length == 0)
|
||||
{
|
||||
m_ProjectGroups = flags.Split('|');
|
||||
}
|
||||
m_PauseAfterFinish = m_CommandLine.WasPassed("pause");
|
||||
|
||||
LoadSchema();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes this instance.
|
||||
/// </summary>
|
||||
public void Process()
|
||||
{
|
||||
bool perfomedOtherTask = false;
|
||||
if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
RemoveDirectories(".",m_RemoveDirectories);
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
|
||||
m_Log.WriteException(LogType.Error,e);
|
||||
}
|
||||
catch(UnauthorizedAccessException e)
|
||||
{
|
||||
m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
|
||||
m_Log.WriteException(LogType.Error,e);
|
||||
}
|
||||
perfomedOtherTask = true;
|
||||
}
|
||||
|
||||
if(m_Target != null && m_Clean != null)
|
||||
{
|
||||
m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together");
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_Target == null && m_Clean == null)
|
||||
{
|
||||
if(perfomedOtherTask) //finished
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file");
|
||||
return;
|
||||
}
|
||||
|
||||
string file = "./prebuild.xml";
|
||||
if(m_CommandLine.WasPassed("file"))
|
||||
{
|
||||
file = m_CommandLine["file"];
|
||||
}
|
||||
|
||||
ProcessFile(file);
|
||||
|
||||
string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower());
|
||||
bool clean = (m_Target == null);
|
||||
if(clean && target != null && target.Length == 0)
|
||||
{
|
||||
target = "all";
|
||||
}
|
||||
if(clean && target == "all")//default to all if no target was specified for clean
|
||||
{
|
||||
//check if they passed yes
|
||||
if (!m_CommandLine.WasPassed("yes"))
|
||||
{
|
||||
Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):");
|
||||
string ret = Console.ReadLine();
|
||||
if(ret == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ret = ret.Trim().ToLower();
|
||||
if((ret.ToLower() != "y" && ret.ToLower() != "yes"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
//clean all targets (just cleaning vs2002 target didn't clean nant)
|
||||
foreach(ITarget targ in m_Targets.Values)
|
||||
{
|
||||
targ.Clean(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_Targets.ContainsKey(target)) {
|
||||
m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target);
|
||||
return;
|
||||
}
|
||||
ITarget targ = m_Targets[target];
|
||||
|
||||
if(clean)
|
||||
{
|
||||
targ.Clean(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
targ.Write(this);
|
||||
}
|
||||
}
|
||||
|
||||
m_Log.Flush();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose objects
|
||||
/// </summary>
|
||||
/// <param name="disposing">
|
||||
/// If true, it will dispose close the handle
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// Will dispose managed and unmanaged resources.
|
||||
/// </remarks>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
GC.SuppressFinalize(this);
|
||||
if (m_Log != null)
|
||||
{
|
||||
m_Log.Close();
|
||||
m_Log = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
~Kernel()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes and destroys this object
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Same as Dispose(true)
|
||||
/// </remarks>
|
||||
public void Close()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Author")]
|
||||
public class AuthorNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Signature;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the signature.
|
||||
/// </summary>
|
||||
/// <value>The signature.</value>
|
||||
public string Signature
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Signature;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Signature == null)
|
||||
{
|
||||
m_Signature = "";
|
||||
}
|
||||
|
||||
m_Signature = m_Signature.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
[DataNode("CleanFiles")]
|
||||
public class CleanFilesNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Pattern;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the signature.
|
||||
/// </summary>
|
||||
/// <value>The signature.</value>
|
||||
public string Pattern
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Pattern = Helper.AttributeValue(node, "pattern", String.Empty); ;
|
||||
m_Pattern = m_Pattern.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
[DataNode("Cleanup")]
|
||||
public class CleanupNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private List<CleanFilesNode> m_CleanFiles = new List<CleanFilesNode>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the signature.
|
||||
/// </summary>
|
||||
/// <value>The signature.</value>
|
||||
public List<CleanFilesNode> CleanFiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CleanFiles;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
foreach (XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if (dataNode is CleanFilesNode)
|
||||
{
|
||||
m_CleanFiles.Add((CleanFilesNode)dataNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,225 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Configuration")]
|
||||
public class ConfigurationNode : DataNode, ICloneable, IComparable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
private string m_Platform = "AnyCPU";
|
||||
private OptionsNode m_Options;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
|
||||
/// </summary>
|
||||
public ConfigurationNode()
|
||||
{
|
||||
m_Options = new OptionsNode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent.
|
||||
/// </summary>
|
||||
/// <value>The parent.</value>
|
||||
public override IDataNode Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Parent;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Parent = value;
|
||||
if(base.Parent is SolutionNode)
|
||||
{
|
||||
SolutionNode node = (SolutionNode)base.Parent;
|
||||
if(node != null && node.Options != null)
|
||||
{
|
||||
node.Options.CopyTo(m_Options);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the platform for this specific configuration.
|
||||
/// </summary>
|
||||
public string Platform
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Platform;
|
||||
}
|
||||
set
|
||||
{
|
||||
switch ((value + "").ToLower())
|
||||
{
|
||||
case "x86":
|
||||
case "x64":
|
||||
m_Platform = value;
|
||||
break;
|
||||
case "itanium":
|
||||
m_Platform = "Itanium";
|
||||
break;
|
||||
default:
|
||||
m_Platform = "AnyCPU";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name and platform for the configuration.
|
||||
/// </summary>
|
||||
/// <value>The name and platform.</value>
|
||||
public string NameAndPlatform
|
||||
{
|
||||
get
|
||||
{
|
||||
string platform = m_Platform;
|
||||
if (platform == "AnyCPU")
|
||||
platform = "Any CPU";
|
||||
|
||||
return String.Format("{0}|{1}", m_Name, platform);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the options.
|
||||
/// </summary>
|
||||
/// <value>The options.</value>
|
||||
public OptionsNode Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Options;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Options = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
Platform = Helper.AttributeValue(node, "platform", m_Platform);
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if(dataNode is OptionsNode)
|
||||
{
|
||||
((OptionsNode)dataNode).CopyTo(m_Options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies to.
|
||||
/// </summary>
|
||||
/// <param name="conf">The conf.</param>
|
||||
public void CopyTo(ConfigurationNode conf)
|
||||
{
|
||||
m_Options.CopyTo(conf.m_Options);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ICloneable Members
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new object that is a copy of the current instance.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A new object that is a copy of this instance.
|
||||
/// </returns>
|
||||
public object Clone()
|
||||
{
|
||||
ConfigurationNode ret = new ConfigurationNode();
|
||||
ret.m_Name = m_Name;
|
||||
ret.m_Platform = m_Platform;
|
||||
m_Options.CopyTo(ret.m_Options);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable Members
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
ConfigurationNode that = (ConfigurationNode) obj;
|
||||
return this.m_Name.CompareTo(that.m_Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a specialized list of configuration nodes which allows for lookup via
|
||||
/// configuration name and platform.
|
||||
/// </summary>
|
||||
public class ConfigurationNodeCollection : List<ConfigurationNode>
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public ConfigurationNode this[string nameAndPlatform]
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (ConfigurationNode configurationNode in this)
|
||||
{
|
||||
if (configurationNode.NameAndPlatform == nameAndPlatform)
|
||||
{
|
||||
return configurationNode;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
// See if the node
|
||||
ConfigurationNode configurationNode = this[nameAndPlatform];
|
||||
|
||||
if (configurationNode != null)
|
||||
{
|
||||
this[IndexOf(configurationNode)] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
Add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,117 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using System.IO;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public abstract class DataNode : IDataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private IDataNode parent;
|
||||
string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" };
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDataNode Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent.
|
||||
/// </summary>
|
||||
/// <value>The parent.</value>
|
||||
public virtual IDataNode Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
set
|
||||
{
|
||||
parent = value;
|
||||
}
|
||||
}
|
||||
public string[] WebTypes
|
||||
{
|
||||
get { return m_WebTypes; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public virtual void Parse(XmlNode node)
|
||||
{
|
||||
}
|
||||
public BuildAction GetBuildActionByFileName(string fileName)
|
||||
{
|
||||
string extension = Path.GetExtension(fileName).ToLower();
|
||||
foreach (string type in WebTypes)
|
||||
{
|
||||
if (extension == type)
|
||||
return BuildAction.Content;
|
||||
}
|
||||
return BuildAction.Compile;
|
||||
}
|
||||
/// <summary>
|
||||
/// Parses the file type to figure out what type it is
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SubType GetSubTypeByFileName(string fileName)
|
||||
{
|
||||
string extension = System.IO.Path.GetExtension(fileName).ToLower();
|
||||
string designer = String.Format(".designer{0}", extension);
|
||||
string path = fileName.ToLower();
|
||||
if (extension == ".resx")
|
||||
{
|
||||
return SubType.Designer;
|
||||
}
|
||||
else if (path.EndsWith(".settings"))
|
||||
{
|
||||
return SubType.Settings;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
foreach (string type in WebTypes)
|
||||
{
|
||||
if (path.EndsWith(type))
|
||||
{
|
||||
return SubType.CodeBehind;
|
||||
}
|
||||
}
|
||||
}
|
||||
return SubType.Code;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
[DataNode("DatabaseProject")]
|
||||
public class DatabaseProjectNode : DataNode
|
||||
{
|
||||
string name;
|
||||
string path;
|
||||
string fullpath;
|
||||
Guid guid = Guid.NewGuid();
|
||||
readonly List<AuthorNode> authors = new List<AuthorNode>();
|
||||
readonly List<DatabaseReferenceNode> references = new List<DatabaseReferenceNode>();
|
||||
|
||||
public Guid Guid
|
||||
{
|
||||
get { return guid; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public string Path
|
||||
{
|
||||
get { return path; }
|
||||
}
|
||||
|
||||
public string FullPath
|
||||
{
|
||||
get { return fullpath; }
|
||||
}
|
||||
|
||||
public IEnumerable<DatabaseReferenceNode> References
|
||||
{
|
||||
get { return references; }
|
||||
}
|
||||
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
name = Helper.AttributeValue(node, "name", name);
|
||||
path = Helper.AttributeValue(node, "path", name);
|
||||
|
||||
try
|
||||
{
|
||||
fullpath = Helper.ResolvePath(path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new WarningException("Could not resolve Solution path: {0}", path);
|
||||
}
|
||||
|
||||
Kernel.Instance.CurrentWorkingDirectory.Push();
|
||||
|
||||
try
|
||||
{
|
||||
Helper.SetCurrentDir(fullpath);
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
foreach (XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
|
||||
if (dataNode == null)
|
||||
continue;
|
||||
|
||||
if (dataNode is AuthorNode)
|
||||
authors.Add((AuthorNode)dataNode);
|
||||
else if (dataNode is DatabaseReferenceNode)
|
||||
references.Add((DatabaseReferenceNode)dataNode);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Kernel.Instance.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
base.Parse(node);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
using System;
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
[DataNode("DatabaseReference")]
|
||||
public class DatabaseReferenceNode : DataNode
|
||||
{
|
||||
string name;
|
||||
Guid providerId;
|
||||
string connectionString;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public Guid ProviderId
|
||||
{
|
||||
get { return providerId; }
|
||||
}
|
||||
|
||||
public string ConnectionString
|
||||
{
|
||||
get { return connectionString; }
|
||||
}
|
||||
|
||||
public override void Parse(System.Xml.XmlNode node)
|
||||
{
|
||||
name = Helper.AttributeValue(node, "name", name);
|
||||
|
||||
string providerName = Helper.AttributeValue(node, "providerName", string.Empty);
|
||||
if (providerName != null)
|
||||
{
|
||||
switch (providerName)
|
||||
{
|
||||
// digitaljeebus: pulled from HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\DataProviders\*
|
||||
// Not sure if these will help other operating systems, or if there's a better way.
|
||||
case "Microsoft.SqlServerCe.Client.3.5":
|
||||
providerId = new Guid("7C602B5B-ACCB-4acd-9DC0-CA66388C1533"); break;
|
||||
case "System.Data.OleDb":
|
||||
providerId = new Guid("7F041D59-D76A-44ed-9AA2-FBF6B0548B80"); break;
|
||||
case "System.Data.OracleClient":
|
||||
providerId = new Guid("8F5C5018-AE09-42cf-B2CC-2CCCC7CFC2BB"); break;
|
||||
case "System.Data.SqlClient":
|
||||
providerId = new Guid("91510608-8809-4020-8897-FBA057E22D54"); break;
|
||||
case "System.Data.Odbc":
|
||||
providerId = new Guid("C3D4F4CE-2C48-4381-B4D6-34FA50C51C86"); break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException("providerName", providerName, "Could not provider name to an id.");
|
||||
}
|
||||
}
|
||||
else
|
||||
providerId = new Guid(Helper.AttributeValue(node, "providerId", Guid.Empty.ToString("B")));
|
||||
|
||||
connectionString = Helper.AttributeValue(node, "connectionString", connectionString);
|
||||
|
||||
base.Parse(node);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
/// The object representing the /Prebuild/Solution/Project/Description element
|
||||
/// </summary>
|
||||
[DataNode("Description")]
|
||||
public class DescriptionNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Value;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description Value.
|
||||
/// </summary>
|
||||
/// <value>The description Value.</value>
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Value == null)
|
||||
{
|
||||
m_Value = "";
|
||||
}
|
||||
|
||||
m_Value = m_Value.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Exclude")]
|
||||
public class ExcludeNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Pattern = "";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pattern.
|
||||
/// </summary>
|
||||
/// <value>The pattern.</value>
|
||||
public string Pattern
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Pattern = Helper.AttributeValue( node, "name", m_Pattern );
|
||||
m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern );
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,292 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
using Prebuild.Core.Targets;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum BuildAction
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Compile,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Content,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
EmbeddedResource,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
ApplicationDefinition,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Page,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Copy
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum SubType
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Code,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Component,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Designer,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Form,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Settings,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
UserControl,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
CodeBehind,
|
||||
}
|
||||
|
||||
public enum CopyToOutput
|
||||
{
|
||||
Never,
|
||||
Always,
|
||||
PreserveNewest
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("File")]
|
||||
public class FileNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Path;
|
||||
private string m_ResourceName = "";
|
||||
private BuildAction? m_BuildAction;
|
||||
private bool m_Valid;
|
||||
private SubType? m_SubType;
|
||||
private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
|
||||
private bool m_Link = false;
|
||||
private string m_LinkPath = string.Empty;
|
||||
private bool m_PreservePath = false;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ResourceName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ResourceName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public BuildAction BuildAction
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_BuildAction != null)
|
||||
return m_BuildAction.Value;
|
||||
else
|
||||
return GetBuildActionByFileName(this.Path);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public CopyToOutput CopyToOutput
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_CopyToOutput;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Link;
|
||||
}
|
||||
}
|
||||
|
||||
public string LinkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_LinkPath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SubType SubType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_SubType != null)
|
||||
return m_SubType.Value;
|
||||
else
|
||||
return GetSubTypeByFileName(this.Path);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IsValid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Valid;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
public bool PreservePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreservePath;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty);
|
||||
if (buildAction != string.Empty)
|
||||
m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction);
|
||||
string subType = Helper.AttributeValue(node, "subType", string.Empty);
|
||||
if (subType != String.Empty)
|
||||
m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
|
||||
|
||||
Console.WriteLine("[FileNode]:BuildAction is {0}", buildAction);
|
||||
|
||||
|
||||
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
|
||||
this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
|
||||
if ( this.m_Link == true )
|
||||
{
|
||||
this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
|
||||
}
|
||||
this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
|
||||
this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
|
||||
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Path == null)
|
||||
{
|
||||
m_Path = "";
|
||||
}
|
||||
|
||||
m_Path = m_Path.Trim();
|
||||
m_Valid = true;
|
||||
if(!File.Exists(m_Path))
|
||||
{
|
||||
m_Valid = false;
|
||||
Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path);
|
||||
}
|
||||
|
||||
if (System.IO.Path.GetExtension(m_Path) == ".settings")
|
||||
{
|
||||
m_SubType = SubType.Settings;
|
||||
m_BuildAction = BuildAction.None;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using System.IO;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Files")]
|
||||
public class FilesNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly List<string> m_Files = new List<string>();
|
||||
private readonly Dictionary<string,BuildAction> m_BuildActions = new Dictionary<string, BuildAction>();
|
||||
private readonly Dictionary<string, SubType> m_SubTypes = new Dictionary<string, SubType>();
|
||||
private readonly Dictionary<string, string> m_ResourceNames = new Dictionary<string, string>();
|
||||
private readonly Dictionary<string, CopyToOutput> m_CopyToOutputs = new Dictionary<string, CopyToOutput>();
|
||||
private readonly Dictionary<string, bool> m_Links = new Dictionary<string, bool>();
|
||||
private readonly Dictionary<string, string> m_LinkPaths = new Dictionary<string, string>();
|
||||
private readonly Dictionary<string, bool> m_PreservePaths = new Dictionary<string, bool>();
|
||||
private readonly Dictionary<string, string> m_DestinationPath = new Dictionary<string, string>();
|
||||
private readonly NameValueCollection m_CopyFiles = new NameValueCollection();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Files.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public string[] Destinations
|
||||
{
|
||||
get { return m_CopyFiles.AllKeys; }
|
||||
}
|
||||
|
||||
public int CopyFiles
|
||||
{
|
||||
get { return m_CopyFiles.Count; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public BuildAction GetBuildAction(string file)
|
||||
{
|
||||
if(!m_BuildActions.ContainsKey(file))
|
||||
{
|
||||
return BuildAction.Compile;
|
||||
}
|
||||
|
||||
return m_BuildActions[file];
|
||||
}
|
||||
|
||||
public string GetDestinationPath(string file)
|
||||
{
|
||||
if( !m_DestinationPath.ContainsKey(file))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return m_DestinationPath[file];
|
||||
}
|
||||
|
||||
public string[] SourceFiles(string dest)
|
||||
{
|
||||
return m_CopyFiles.GetValues(dest);
|
||||
}
|
||||
|
||||
public CopyToOutput GetCopyToOutput(string file)
|
||||
{
|
||||
if (!m_CopyToOutputs.ContainsKey(file))
|
||||
{
|
||||
return CopyToOutput.Never;
|
||||
}
|
||||
return m_CopyToOutputs[file];
|
||||
}
|
||||
|
||||
public bool GetIsLink(string file)
|
||||
{
|
||||
if (!m_Links.ContainsKey(file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return m_Links[file];
|
||||
}
|
||||
|
||||
public bool Contains(string file)
|
||||
{
|
||||
return m_Files.Contains(file);
|
||||
}
|
||||
|
||||
public string GetLinkPath( string file )
|
||||
{
|
||||
if ( !m_LinkPaths.ContainsKey( file ) )
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return m_LinkPaths[ file ];
|
||||
}
|
||||
|
||||
public SubType GetSubType(string file)
|
||||
{
|
||||
if(!m_SubTypes.ContainsKey(file))
|
||||
{
|
||||
return SubType.Code;
|
||||
}
|
||||
|
||||
return m_SubTypes[file];
|
||||
}
|
||||
|
||||
public string GetResourceName(string file)
|
||||
{
|
||||
if(!m_ResourceNames.ContainsKey(file))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return m_ResourceNames[file];
|
||||
}
|
||||
|
||||
public bool GetPreservePath( string file )
|
||||
{
|
||||
if ( !m_PreservePaths.ContainsKey( file ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return m_PreservePaths[ file ];
|
||||
}
|
||||
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if(dataNode is FileNode)
|
||||
{
|
||||
FileNode fileNode = (FileNode)dataNode;
|
||||
if(fileNode.IsValid)
|
||||
{
|
||||
if (!m_Files.Contains(fileNode.Path))
|
||||
{
|
||||
m_Files.Add(fileNode.Path);
|
||||
m_BuildActions[fileNode.Path] = fileNode.BuildAction;
|
||||
m_SubTypes[fileNode.Path] = fileNode.SubType;
|
||||
m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
|
||||
m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath;
|
||||
m_Links[ fileNode.Path ] = fileNode.IsLink;
|
||||
m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath;
|
||||
m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(dataNode is MatchNode)
|
||||
{
|
||||
foreach(string file in ((MatchNode)dataNode).Files)
|
||||
{
|
||||
MatchNode matchNode = (MatchNode)dataNode;
|
||||
if (!m_Files.Contains(file))
|
||||
{
|
||||
m_Files.Add(file);
|
||||
if (matchNode.BuildAction == null)
|
||||
m_BuildActions[file] = GetBuildActionByFileName(file);
|
||||
else
|
||||
m_BuildActions[file] = matchNode.BuildAction.Value;
|
||||
|
||||
if (matchNode.BuildAction == BuildAction.Copy)
|
||||
{
|
||||
m_CopyFiles.Add(matchNode.DestinationPath, file);
|
||||
m_DestinationPath[file] = matchNode.DestinationPath;
|
||||
}
|
||||
|
||||
m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value;
|
||||
m_ResourceNames[ file ] = matchNode.ResourceName;
|
||||
m_PreservePaths[ file ] = matchNode.PreservePath;
|
||||
m_Links[ file ] = matchNode.IsLink;
|
||||
m_LinkPaths[ file ] = matchNode.LinkPath;
|
||||
m_CopyToOutputs[ file ] = matchNode.CopyToOutput;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Check in to why StringCollection's enumerator doesn't implement
|
||||
// IEnumerator?
|
||||
public IEnumerator<string> GetEnumerator()
|
||||
{
|
||||
return m_Files.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -1,378 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Match")]
|
||||
public class MatchNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly List<string> m_Files = new List<string>();
|
||||
private Regex m_Regex;
|
||||
private BuildAction? m_BuildAction;
|
||||
private SubType? m_SubType;
|
||||
string m_ResourceName = "";
|
||||
private CopyToOutput m_CopyToOutput;
|
||||
private bool m_Link;
|
||||
private string m_LinkPath;
|
||||
private bool m_PreservePath;
|
||||
private string m_Destination = "";
|
||||
private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IEnumerable<string> Files
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Files;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public BuildAction? BuildAction
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BuildAction;
|
||||
}
|
||||
}
|
||||
|
||||
public string DestinationPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Destination;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SubType? SubType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SubType;
|
||||
}
|
||||
}
|
||||
|
||||
public CopyToOutput CopyToOutput
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CopyToOutput;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Link;
|
||||
}
|
||||
}
|
||||
|
||||
public string LinkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LinkPath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ResourceName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ResourceName;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PreservePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreservePath;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Recurses the directories.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="pattern">The pattern.</param>
|
||||
/// <param name="recurse">if set to <c>true</c> [recurse].</param>
|
||||
/// <param name="useRegex">if set to <c>true</c> [use regex].</param>
|
||||
private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions)
|
||||
{
|
||||
Match match;
|
||||
try
|
||||
{
|
||||
string[] files;
|
||||
|
||||
Boolean excludeFile;
|
||||
if(!useRegex)
|
||||
{
|
||||
try
|
||||
{
|
||||
files = Directory.GetFiles(path, pattern);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
// swallow weird IOException error when running in a virtual box
|
||||
// guest OS on a network share when the host OS is not Windows.
|
||||
// This seems to happen on network shares
|
||||
// when no files match, and may be related to this report:
|
||||
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254546
|
||||
|
||||
files = null;
|
||||
}
|
||||
|
||||
if(files != null)
|
||||
{
|
||||
foreach (string file in files)
|
||||
{
|
||||
excludeFile = false;
|
||||
string fileTemp;
|
||||
if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
|
||||
{
|
||||
fileTemp = file.Substring(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileTemp = file;
|
||||
}
|
||||
|
||||
// Check all excludions and set flag if there are any hits.
|
||||
foreach ( ExcludeNode exclude in exclusions )
|
||||
{
|
||||
Regex exRegEx = new Regex( exclude.Pattern );
|
||||
match = exRegEx.Match( file );
|
||||
excludeFile |= match.Success;
|
||||
}
|
||||
|
||||
if ( !excludeFile )
|
||||
{
|
||||
m_Files.Add( fileTemp );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// don't call return here, because we may need to recursively search directories below
|
||||
// this one, even if no matches were found in this directory.
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
files = Directory.GetFiles(path);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
// swallow weird IOException error when running in a virtual box
|
||||
// guest OS on a network share.
|
||||
files = null;
|
||||
}
|
||||
|
||||
if (files != null)
|
||||
{
|
||||
foreach (string file in files)
|
||||
{
|
||||
excludeFile = false;
|
||||
|
||||
match = m_Regex.Match(file);
|
||||
if (match.Success)
|
||||
{
|
||||
// Check all excludions and set flag if there are any hits.
|
||||
foreach (ExcludeNode exclude in exclusions)
|
||||
{
|
||||
Regex exRegEx = new Regex(exclude.Pattern);
|
||||
match = exRegEx.Match(file);
|
||||
excludeFile |= !match.Success;
|
||||
}
|
||||
|
||||
if (!excludeFile)
|
||||
{
|
||||
m_Files.Add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(recurse)
|
||||
{
|
||||
string[] dirs = Directory.GetDirectories(path);
|
||||
if(dirs != null && dirs.Length > 0)
|
||||
{
|
||||
foreach (string str in dirs)
|
||||
{
|
||||
// hack to skip subversion folders. Not having this can cause
|
||||
// a significant performance hit when running on a network drive.
|
||||
if (str.EndsWith(".svn"))
|
||||
continue;
|
||||
|
||||
RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(DirectoryNotFoundException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
catch(ArgumentException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
string path = Helper.AttributeValue(node, "path", ".");
|
||||
string pattern = Helper.AttributeValue(node, "pattern", "*");
|
||||
string destination = Helper.AttributeValue(node, "destination", string.Empty);
|
||||
bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
|
||||
bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
|
||||
string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty);
|
||||
if (buildAction != string.Empty)
|
||||
m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction);
|
||||
|
||||
|
||||
//TODO: Figure out where the subtype node is being assigned
|
||||
//string subType = Helper.AttributeValue(node, "subType", string.Empty);
|
||||
//if (subType != String.Empty)
|
||||
// m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
|
||||
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName);
|
||||
m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", m_CopyToOutput.ToString()));
|
||||
m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
|
||||
if ( m_Link )
|
||||
{
|
||||
m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
|
||||
}
|
||||
m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
|
||||
|
||||
if ( buildAction == "Copy")
|
||||
m_Destination = destination;
|
||||
|
||||
if(path != null && path.Length == 0)
|
||||
path = ".";//use current directory
|
||||
|
||||
//throw new WarningException("Match must have a 'path' attribute");
|
||||
|
||||
if(pattern == null)
|
||||
{
|
||||
throw new WarningException("Match must have a 'pattern' attribute");
|
||||
}
|
||||
|
||||
path = Helper.NormalizePath(path);
|
||||
if(!Directory.Exists(path))
|
||||
{
|
||||
throw new WarningException("Match path does not exist: {0}", path);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if(useRegex)
|
||||
{
|
||||
m_Regex = new Regex(pattern);
|
||||
}
|
||||
}
|
||||
catch(ArgumentException ex)
|
||||
{
|
||||
throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
|
||||
}
|
||||
|
||||
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if(dataNode is ExcludeNode)
|
||||
{
|
||||
ExcludeNode excludeNode = (ExcludeNode)dataNode;
|
||||
m_Exclusions.Add( excludeNode );
|
||||
}
|
||||
}
|
||||
|
||||
RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions );
|
||||
|
||||
if (m_Files.Count < 1)
|
||||
{
|
||||
// Include the project name when the match node returns no matches to provide extra
|
||||
// debug info.
|
||||
ProjectNode project = Parent.Parent as ProjectNode;
|
||||
string projectName = "";
|
||||
|
||||
if (project != null)
|
||||
projectName = " in project " + project.AssemblyName;
|
||||
|
||||
throw new WarningException("Match" + projectName + " returned no files: {0}{1}", Helper.EndPath(path), pattern);
|
||||
}
|
||||
m_Regex = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,652 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Options")]
|
||||
public class OptionsNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private static readonly Dictionary<string,FieldInfo> m_OptionFields = new Dictionary<string, FieldInfo>();
|
||||
|
||||
[OptionNode("CompilerDefines")]
|
||||
private string m_CompilerDefines = "";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string CompilerDefines
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CompilerDefines;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_CompilerDefines = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("OptimizeCode")]
|
||||
private bool m_OptimizeCode;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool OptimizeCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptimizeCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OptimizeCode = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("CheckUnderflowOverflow")]
|
||||
private bool m_CheckUnderflowOverflow;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool CheckUnderflowOverflow
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CheckUnderflowOverflow;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_CheckUnderflowOverflow = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("AllowUnsafe")]
|
||||
private bool m_AllowUnsafe;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool AllowUnsafe
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AllowUnsafe;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AllowUnsafe = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("PreBuildEvent")]
|
||||
private string m_PreBuildEvent;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PreBuildEvent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreBuildEvent;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PreBuildEvent = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("PostBuildEvent")]
|
||||
private string m_PostBuildEvent;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PostBuildEvent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PostBuildEvent;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PostBuildEvent = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("PreBuildEventArgs")]
|
||||
private string m_PreBuildEventArgs;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PreBuildEventArgs
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreBuildEventArgs;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PreBuildEventArgs = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("PostBuildEventArgs")]
|
||||
private string m_PostBuildEventArgs;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PostBuildEventArgs
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PostBuildEventArgs;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PostBuildEventArgs = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("RunPostBuildEvent")]
|
||||
private string m_RunPostBuildEvent;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RunPostBuildEvent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RunPostBuildEvent;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_RunPostBuildEvent = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("RunScript")]
|
||||
private string m_RunScript;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RunScript
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RunScript;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_RunScript = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("WarningLevel")]
|
||||
private int m_WarningLevel = 4;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int WarningLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_WarningLevel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_WarningLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("WarningsAsErrors")]
|
||||
private bool m_WarningsAsErrors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool WarningsAsErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_WarningsAsErrors;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_WarningsAsErrors = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("SuppressWarnings")]
|
||||
private string m_SuppressWarnings = "";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string SuppressWarnings
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SuppressWarnings;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SuppressWarnings = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("Prefer32Bit")]
|
||||
private bool m_Prefer32Bit;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool Prefer32Bit
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Prefer32Bit;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Prefer32Bit = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("OutputPath")]
|
||||
private string m_OutputPath = "bin/";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OutputPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OutputPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OutputPath = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("GenerateDocumentation")]
|
||||
private bool m_GenerateDocumentation;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool GenerateDocumentation
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GenerateDocumentation;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_GenerateDocumentation = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("GenerateXmlDocFile")]
|
||||
private bool m_GenerateXmlDocFile;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool GenerateXmlDocFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GenerateXmlDocFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_GenerateXmlDocFile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("XmlDocFile")]
|
||||
private string m_XmlDocFile = "";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string XmlDocFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_XmlDocFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_XmlDocFile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("KeyFile")]
|
||||
private string m_KeyFile = "";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string KeyFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_KeyFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_KeyFile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("DebugInformation")]
|
||||
private bool m_DebugInformation;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool DebugInformation
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DebugInformation;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_DebugInformation = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("RegisterComInterop")]
|
||||
private bool m_RegisterComInterop;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool RegisterComInterop
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RegisterComInterop;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_RegisterComInterop = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("RemoveIntegerChecks")]
|
||||
private bool m_RemoveIntegerChecks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool RemoveIntegerChecks
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RemoveIntegerChecks;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_RemoveIntegerChecks = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("IncrementalBuild")]
|
||||
private bool m_IncrementalBuild;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IncrementalBuild
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IncrementalBuild;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_IncrementalBuild = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("BaseAddress")]
|
||||
private string m_BaseAddress = "285212672";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string BaseAddress
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BaseAddress;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_BaseAddress = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("FileAlignment")]
|
||||
private int m_FileAlignment = 4096;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int FileAlignment
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FileAlignment;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_FileAlignment = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("NoStdLib")]
|
||||
private bool m_NoStdLib;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool NoStdLib
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_NoStdLib;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_NoStdLib = value;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<string> m_FieldsDefined = new List<string>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="OptionsNode"/> class.
|
||||
/// </summary>
|
||||
static OptionsNode()
|
||||
{
|
||||
Type t = typeof(OptionsNode);
|
||||
|
||||
foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance))
|
||||
{
|
||||
object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false);
|
||||
if(attrs == null || attrs.Length < 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0];
|
||||
m_OptionFields[ona.NodeName] = f;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Object"/> at the specified index.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public object this[string index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!m_OptionFields.ContainsKey(index))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
FieldInfo f = m_OptionFields[index];
|
||||
return f.GetValue(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Object"/> at the specified index.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public object this[string index, object defaultValue]
|
||||
{
|
||||
get
|
||||
{
|
||||
object valueObject = this[index];
|
||||
if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
return valueObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void FlagDefined(string name)
|
||||
{
|
||||
if(!m_FieldsDefined.Contains(name))
|
||||
{
|
||||
m_FieldsDefined.Add(name);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetOption(string nodeName, string val)
|
||||
{
|
||||
lock(m_OptionFields)
|
||||
{
|
||||
if(!m_OptionFields.ContainsKey(nodeName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FieldInfo f = m_OptionFields[nodeName];
|
||||
f.SetValue(this, Helper.TranslateValue(f.FieldType, val));
|
||||
FlagDefined(f.Name);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies to.
|
||||
/// </summary>
|
||||
/// <param name="opt">The opt.</param>
|
||||
public void CopyTo(OptionsNode opt)
|
||||
{
|
||||
if(opt == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(FieldInfo f in m_OptionFields.Values)
|
||||
{
|
||||
if(m_FieldsDefined.Contains(f.Name))
|
||||
{
|
||||
f.SetValue(opt, f.GetValue(this));
|
||||
opt.m_FieldsDefined.Add(f.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Process")]
|
||||
public class ProcessNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Path;
|
||||
private bool m_IsValid = true;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is valid.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
|
||||
public bool IsValid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IsValid;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Path == null)
|
||||
{
|
||||
m_Path = "";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
m_Path = Helper.ResolvePath(m_Path);
|
||||
}
|
||||
catch(ArgumentException)
|
||||
{
|
||||
Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path);
|
||||
m_IsValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,629 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of values that the Project's type can be
|
||||
/// </summary>
|
||||
public enum ProjectType
|
||||
{
|
||||
/// <summary>
|
||||
/// The project is a console executable
|
||||
/// </summary>
|
||||
Exe,
|
||||
/// <summary>
|
||||
/// The project is a windows executable
|
||||
/// </summary>
|
||||
WinExe,
|
||||
/// <summary>
|
||||
/// The project is a library
|
||||
/// </summary>
|
||||
Library,
|
||||
/// <summary>
|
||||
/// The project is a website
|
||||
/// </summary>
|
||||
Web,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ClrRuntime
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Microsoft,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Mono
|
||||
}
|
||||
/// <summary>
|
||||
/// The version of the .NET framework to use (Required for VS2008)
|
||||
/// <remarks>We don't need .NET 1.1 in here, it'll default when using vs2003.</remarks>
|
||||
/// </summary>
|
||||
public enum FrameworkVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// .NET 2.0
|
||||
/// </summary>
|
||||
v2_0,
|
||||
/// <summary>
|
||||
/// .NET 3.0
|
||||
/// </summary>
|
||||
v3_0,
|
||||
/// <summary>
|
||||
/// .NET 3.5
|
||||
/// </summary>
|
||||
v3_5,
|
||||
/// <summary>
|
||||
/// .NET 4.0
|
||||
/// </summary>
|
||||
v4_0,
|
||||
/// <summary>
|
||||
/// .NET 4.5
|
||||
/// </summary>
|
||||
v4_5,
|
||||
/// <summary>
|
||||
/// .NET 4.5.1
|
||||
/// </summary>
|
||||
v4_5_1,
|
||||
v4_5_2,
|
||||
/// <summary>
|
||||
/// .NET 4.6
|
||||
/// </summary>
|
||||
v4_6,
|
||||
/// <summary>
|
||||
/// .NET 4.6.1
|
||||
/// </summary>
|
||||
v4_6_1,
|
||||
v4_6_2,
|
||||
/// <summary>
|
||||
/// .NET 4.7
|
||||
/// </summary>
|
||||
v4_7,
|
||||
v4_7_1,
|
||||
v4_7_2,
|
||||
/// <summary>
|
||||
/// .NET 4.8
|
||||
/// </summary>
|
||||
v4_8
|
||||
}
|
||||
/// <summary>
|
||||
/// The Node object representing /Prebuild/Solution/Project elements
|
||||
/// </summary>
|
||||
[DataNode("Project")]
|
||||
public class ProjectNode : DataNode, IComparable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
private string m_Path = "";
|
||||
private string m_FullPath = "";
|
||||
private string m_AssemblyName;
|
||||
private string m_AppIcon = "";
|
||||
private string m_ApplicationManifest = "";
|
||||
private string m_ConfigFile = "";
|
||||
private string m_DesignerFolder = "";
|
||||
private string m_Language = "C#";
|
||||
private ProjectType m_Type = ProjectType.Exe;
|
||||
private ClrRuntime m_Runtime = ClrRuntime.Microsoft;
|
||||
private FrameworkVersion m_Framework = FrameworkVersion.v2_0;
|
||||
private bool m_useFramework = true;
|
||||
private string m_StartupObject = "";
|
||||
private string m_RootNamespace;
|
||||
private string m_FilterGroups = "";
|
||||
private string m_Version = "";
|
||||
private Guid m_Guid;
|
||||
private string m_DebugStartParameters;
|
||||
|
||||
private readonly Dictionary<string, ConfigurationNode> m_Configurations = new Dictionary<string, ConfigurationNode>();
|
||||
private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>();
|
||||
private readonly List<ReferenceNode> m_References = new List<ReferenceNode>();
|
||||
private readonly List<AuthorNode> m_Authors = new List<AuthorNode>();
|
||||
private FilesNode m_Files;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// The version of the .NET Framework to compile under
|
||||
/// </summary>
|
||||
public FrameworkVersion FrameworkVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Framework;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Framework = value;
|
||||
m_useFramework = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the filter groups.
|
||||
/// </summary>
|
||||
/// <value>The filter groups.</value>
|
||||
public string FilterGroups
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FilterGroups;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the project's version
|
||||
/// </summary>
|
||||
/// <value>The project's version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the full path.
|
||||
/// </summary>
|
||||
/// <value>The full path.</value>
|
||||
public string FullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FullPath;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the assembly.
|
||||
/// </summary>
|
||||
/// <value>The name of the assembly.</value>
|
||||
public string AssemblyName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the app icon.
|
||||
/// </summary>
|
||||
/// <value>The app icon.</value>
|
||||
public string AppIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AppIcon;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Application Manifest.
|
||||
/// </summary>
|
||||
/// <value>The Application Manifest.</value>
|
||||
public string ApplicationManifest
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ApplicationManifest;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the app icon.
|
||||
/// </summary>
|
||||
/// <value>The app icon.</value>
|
||||
public string ConfigFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ConfigFile;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DesignerFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DesignerFolder;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the language.
|
||||
/// </summary>
|
||||
/// <value>The language.</value>
|
||||
public string Language
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Language;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public ProjectType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the runtime.
|
||||
/// </summary>
|
||||
/// <value>The runtime.</value>
|
||||
public ClrRuntime Runtime
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Runtime;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_GenerateAssemblyInfoFile;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool GenerateAssemblyInfoFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GenerateAssemblyInfoFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_GenerateAssemblyInfoFile = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the startup object.
|
||||
/// </summary>
|
||||
/// <value>The startup object.</value>
|
||||
public string StartupObject
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_StartupObject;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the root namespace.
|
||||
/// </summary>
|
||||
/// <value>The root namespace.</value>
|
||||
public string RootNamespace
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RootNamespace;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configurations.
|
||||
/// </summary>
|
||||
/// <value>The configurations.</value>
|
||||
public List<ConfigurationNode> Configurations
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ConfigurationNode> tmp = new List<ConfigurationNode>(ConfigurationsTable.Values);
|
||||
tmp.Sort();
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configurations table.
|
||||
/// </summary>
|
||||
/// <value>The configurations table.</value>
|
||||
public Dictionary<string, ConfigurationNode> ConfigurationsTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Configurations;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the reference paths.
|
||||
/// </summary>
|
||||
/// <value>The reference paths.</value>
|
||||
public List<ReferencePathNode> ReferencePaths
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths);
|
||||
tmp.Sort();
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the references.
|
||||
/// </summary>
|
||||
/// <value>The references.</value>
|
||||
public List<ReferenceNode> References
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ReferenceNode> tmp = new List<ReferenceNode>(m_References);
|
||||
tmp.Sort();
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Authors list.
|
||||
/// </summary>
|
||||
/// <value>The list of the project's authors.</value>
|
||||
public List<AuthorNode> Authors
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Authors;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the files.
|
||||
/// </summary>
|
||||
/// <value>The files.</value>
|
||||
public FilesNode Files
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Files;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent.
|
||||
/// </summary>
|
||||
/// <value>The parent.</value>
|
||||
public override IDataNode Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Parent;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Parent = value;
|
||||
if(base.Parent is SolutionNode && m_Configurations.Count < 1)
|
||||
{
|
||||
SolutionNode parent = (SolutionNode)base.Parent;
|
||||
foreach(ConfigurationNode conf in parent.Configurations)
|
||||
{
|
||||
m_Configurations[conf.NameAndPlatform] = (ConfigurationNode) conf.Clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the GUID.
|
||||
/// </summary>
|
||||
/// <value>The GUID.</value>
|
||||
public Guid Guid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Guid;
|
||||
}
|
||||
}
|
||||
|
||||
public string DebugStartParameters
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DebugStartParameters;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void HandleConfiguration(ConfigurationNode conf)
|
||||
{
|
||||
if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first,
|
||||
//so it *may* override changes to the same properties for configurations defines at the project level
|
||||
{
|
||||
foreach(ConfigurationNode confNode in m_Configurations.Values)
|
||||
{
|
||||
conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides
|
||||
}
|
||||
}
|
||||
if(m_Configurations.ContainsKey(conf.NameAndPlatform))
|
||||
{
|
||||
ConfigurationNode parentConf = m_Configurations[conf.NameAndPlatform];
|
||||
conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Configurations[conf.NameAndPlatform] = conf;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_Path = Helper.AttributeValue(node, "path", m_Path);
|
||||
m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
|
||||
m_ApplicationManifest = Helper.AttributeValue(node, "appmanifest", m_ApplicationManifest);
|
||||
m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile);
|
||||
m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
|
||||
m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
|
||||
m_Language = Helper.AttributeValue(node, "language", m_Language);
|
||||
m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type);
|
||||
m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
|
||||
if(m_useFramework)
|
||||
m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework);
|
||||
|
||||
m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
|
||||
m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
|
||||
|
||||
int hash = m_Name.GetHashCode();
|
||||
Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString());
|
||||
m_Guid = new Guid(guid);
|
||||
|
||||
m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
|
||||
m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty);
|
||||
|
||||
if(string.IsNullOrEmpty(m_AssemblyName))
|
||||
{
|
||||
m_AssemblyName = m_Name;
|
||||
}
|
||||
|
||||
if(string.IsNullOrEmpty(m_RootNamespace))
|
||||
{
|
||||
m_RootNamespace = m_Name;
|
||||
}
|
||||
|
||||
m_FullPath = m_Path;
|
||||
try
|
||||
{
|
||||
m_FullPath = Helper.ResolvePath(m_FullPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new WarningException("Could not resolve Solution path: {0}", m_Path);
|
||||
}
|
||||
|
||||
Kernel.Instance.CurrentWorkingDirectory.Push();
|
||||
try
|
||||
{
|
||||
Helper.SetCurrentDir(m_FullPath);
|
||||
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if(dataNode is ConfigurationNode)
|
||||
{
|
||||
HandleConfiguration((ConfigurationNode)dataNode);
|
||||
}
|
||||
else if(dataNode is ReferencePathNode)
|
||||
{
|
||||
m_ReferencePaths.Add((ReferencePathNode)dataNode);
|
||||
}
|
||||
else if(dataNode is ReferenceNode)
|
||||
{
|
||||
m_References.Add((ReferenceNode)dataNode);
|
||||
}
|
||||
else if(dataNode is AuthorNode)
|
||||
{
|
||||
m_Authors.Add((AuthorNode)dataNode);
|
||||
}
|
||||
else if(dataNode is FilesNode)
|
||||
{
|
||||
m_Files = (FilesNode)dataNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Kernel.Instance.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable Members
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
ProjectNode that = (ProjectNode)obj;
|
||||
return m_Name.CompareTo(that.m_Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,144 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Reference")]
|
||||
public class ReferenceNode : DataNode, IComparable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
private string m_Path;
|
||||
private string m_LocalCopy;
|
||||
private string m_Version;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [local copy specified].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value>
|
||||
public bool LocalCopySpecified
|
||||
{
|
||||
get
|
||||
{
|
||||
return ( m_LocalCopy != null && m_LocalCopy.Length == 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [local copy].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value>
|
||||
public bool LocalCopy
|
||||
{
|
||||
get
|
||||
{
|
||||
if( m_LocalCopy == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return bool.Parse(m_LocalCopy);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_Path = Helper.AttributeValue(node, "path", m_Path);
|
||||
m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable Members
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
ReferenceNode that = (ReferenceNode)obj;
|
||||
return this.m_Name.CompareTo(that.m_Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("ReferencePath")]
|
||||
public class ReferencePathNode : DataNode, IComparable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Path;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Path == null)
|
||||
{
|
||||
m_Path = "";
|
||||
}
|
||||
|
||||
m_Path = m_Path.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable Members
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
ReferencePathNode that = (ReferencePathNode)obj;
|
||||
return this.m_Path.CompareTo(that.m_Path);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,382 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Solution")]
|
||||
[DataNode("EmbeddedSolution")]
|
||||
[DebuggerDisplay("{Name}")]
|
||||
public class SolutionNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Guid m_Guid = Guid.NewGuid();
|
||||
private string m_Name = "unknown";
|
||||
private string m_Path = "";
|
||||
private string m_FullPath = "";
|
||||
private string m_ActiveConfig;
|
||||
private string m_Version = "1.0.0";
|
||||
|
||||
private OptionsNode m_Options;
|
||||
private FilesNode m_Files;
|
||||
private readonly ConfigurationNodeCollection m_Configurations = new ConfigurationNodeCollection();
|
||||
private readonly Dictionary<string, ProjectNode> m_Projects = new Dictionary<string, ProjectNode>();
|
||||
private readonly Dictionary<string, DatabaseProjectNode> m_DatabaseProjects = new Dictionary<string, DatabaseProjectNode>();
|
||||
private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>();
|
||||
private readonly Dictionary<string, SolutionNode> m_Solutions = new Dictionary<string, SolutionNode>();
|
||||
private CleanupNode m_Cleanup;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public override IDataNode Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Parent;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value is SolutionNode)
|
||||
{
|
||||
SolutionNode solution = (SolutionNode)value;
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
m_Configurations[conf.Name] = (ConfigurationNode) conf.Clone();
|
||||
}
|
||||
}
|
||||
|
||||
base.Parent = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CleanupNode Cleanup
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Cleanup;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Cleanup = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Guid Guid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Guid;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Guid = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the active config.
|
||||
/// </summary>
|
||||
/// <value>The active config.</value>
|
||||
public string ActiveConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ActiveConfig;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ActiveConfig = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the full path.
|
||||
/// </summary>
|
||||
/// <value>The full path.</value>
|
||||
public string FullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FullPath;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the options.
|
||||
/// </summary>
|
||||
/// <value>The options.</value>
|
||||
public OptionsNode Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Options;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the files.
|
||||
/// </summary>
|
||||
/// <value>The files.</value>
|
||||
public FilesNode Files
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Files;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configurations.
|
||||
/// </summary>
|
||||
/// <value>The configurations.</value>
|
||||
public ConfigurationNodeCollection Configurations
|
||||
{
|
||||
get
|
||||
{
|
||||
ConfigurationNodeCollection tmp = new ConfigurationNodeCollection();
|
||||
tmp.AddRange(ConfigurationsTable);
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configurations table.
|
||||
/// </summary>
|
||||
/// <value>The configurations table.</value>
|
||||
public ConfigurationNodeCollection ConfigurationsTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Configurations;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the database projects.
|
||||
/// </summary>
|
||||
public ICollection<DatabaseProjectNode> DatabaseProjects
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DatabaseProjects.Values;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the nested solutions.
|
||||
/// </summary>
|
||||
public ICollection<SolutionNode> Solutions
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Solutions.Values;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the nested solutions hash table.
|
||||
/// </summary>
|
||||
public Dictionary<string, SolutionNode> SolutionsTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Solutions;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the projects.
|
||||
/// </summary>
|
||||
/// <value>The projects.</value>
|
||||
public ICollection<ProjectNode> Projects
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ProjectNode> tmp = new List<ProjectNode>(m_Projects.Values);
|
||||
tmp.Sort();
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the projects table.
|
||||
/// </summary>
|
||||
/// <value>The projects table.</value>
|
||||
public Dictionary<string, ProjectNode> ProjectsTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Projects;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the projects table.
|
||||
/// </summary>
|
||||
/// <value>The projects table.</value>
|
||||
public List<ProjectNode> ProjectsTableOrder
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ProjectsOrder;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
|
||||
m_Path = Helper.AttributeValue(node, "path", m_Path);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
|
||||
m_FullPath = m_Path;
|
||||
try
|
||||
{
|
||||
m_FullPath = Helper.ResolvePath(m_FullPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new WarningException("Could not resolve solution path: {0}", m_Path);
|
||||
}
|
||||
|
||||
Kernel.Instance.CurrentWorkingDirectory.Push();
|
||||
try
|
||||
{
|
||||
Helper.SetCurrentDir(m_FullPath);
|
||||
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
|
||||
if(dataNode is OptionsNode)
|
||||
{
|
||||
m_Options = (OptionsNode)dataNode;
|
||||
}
|
||||
else if(dataNode is FilesNode)
|
||||
{
|
||||
m_Files = (FilesNode)dataNode;
|
||||
}
|
||||
else if(dataNode is ConfigurationNode)
|
||||
{
|
||||
ConfigurationNode configurationNode = (ConfigurationNode) dataNode;
|
||||
m_Configurations[configurationNode.NameAndPlatform] = configurationNode;
|
||||
|
||||
// If the active configuration is null, then we populate it.
|
||||
if (ActiveConfig == null)
|
||||
{
|
||||
ActiveConfig = configurationNode.Name;
|
||||
}
|
||||
}
|
||||
else if(dataNode is ProjectNode)
|
||||
{
|
||||
m_Projects[((ProjectNode)dataNode).Name] = (ProjectNode) dataNode;
|
||||
m_ProjectsOrder.Add((ProjectNode)dataNode);
|
||||
}
|
||||
else if(dataNode is SolutionNode)
|
||||
{
|
||||
m_Solutions[((SolutionNode)dataNode).Name] = (SolutionNode) dataNode;
|
||||
}
|
||||
else if (dataNode is ProcessNode)
|
||||
{
|
||||
ProcessNode p = (ProcessNode)dataNode;
|
||||
Kernel.Instance.ProcessFile(p, this);
|
||||
}
|
||||
else if (dataNode is DatabaseProjectNode)
|
||||
{
|
||||
m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = (DatabaseProjectNode) dataNode;
|
||||
}
|
||||
else if(dataNode is CleanupNode)
|
||||
{
|
||||
if(m_Cleanup != null)
|
||||
throw new WarningException("There can only be one Cleanup node.");
|
||||
m_Cleanup = (CleanupNode)dataNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Kernel.Instance.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Prebuild.Core.Parse
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum IfState
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
If,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
ElseIf,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Else
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for IfContext.
|
||||
/// </summary>
|
||||
// Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/)
|
||||
public class IfContext
|
||||
{
|
||||
#region Properties
|
||||
|
||||
bool m_Active;
|
||||
bool m_Keep;
|
||||
bool m_EverKept;
|
||||
IfState m_State = IfState.None;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IfContext"/> class.
|
||||
/// </summary>
|
||||
/// <param name="active">if set to <c>true</c> [active].</param>
|
||||
/// <param name="keep">if set to <c>true</c> [keep].</param>
|
||||
/// <param name="state">The state.</param>
|
||||
public IfContext(bool active, bool keep, IfState state)
|
||||
{
|
||||
m_Active = active;
|
||||
m_Keep = keep;
|
||||
m_EverKept = keep;
|
||||
m_State = state;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="IfContext"/> is active.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if active; otherwise, <c>false</c>.</value>
|
||||
public bool Active
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Active;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Active = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if keep; otherwise, <c>false</c>.</value>
|
||||
public bool Keep
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Keep;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Keep = value;
|
||||
if(m_Keep)
|
||||
{
|
||||
m_EverKept = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [ever kept].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value>
|
||||
public bool EverKept
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_EverKept;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the state.
|
||||
/// </summary>
|
||||
/// <value>The state.</value>
|
||||
public IfState State
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_State;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_State = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,652 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
|
||||
namespace Prebuild.Core.Parse
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum OperatorSymbol
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Equal,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
NotEqual,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
LessThan,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
GreaterThan,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
LessThanEqual,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
GreaterThanEqual
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Preprocessor
|
||||
{
|
||||
#region Constants
|
||||
|
||||
/// <summary>
|
||||
/// Includes the regex to look for file tags in the <?include
|
||||
/// ?> processing instruction.
|
||||
/// </summary>
|
||||
private static readonly Regex includeFileRegex = new Regex("file=\"(.+?)\"");
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
readonly XmlDocument m_OutDoc = new XmlDocument();
|
||||
readonly Stack<IfContext> m_IfStack = new Stack<IfContext>();
|
||||
readonly Dictionary<string, object> m_Variables = new Dictionary<string, object>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Preprocessor"/> class.
|
||||
/// </summary>
|
||||
public Preprocessor()
|
||||
{
|
||||
RegisterVariable("OS", GetOS());
|
||||
RegisterVariable("RuntimeVersion", Environment.Version.Major);
|
||||
RegisterVariable("RuntimeMajor", Environment.Version.Major);
|
||||
RegisterVariable("RuntimeMinor", Environment.Version.Minor);
|
||||
RegisterVariable("RuntimeRevision", Environment.Version.Revision);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the processed doc.
|
||||
/// </summary>
|
||||
/// <value>The processed doc.</value>
|
||||
public XmlDocument ProcessedDoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OutDoc;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parts of this code were taken from NAnt and is subject to the GPL
|
||||
/// as per NAnt's license. Thanks to the NAnt guys for this little gem.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetOS()
|
||||
{
|
||||
PlatformID platId = Environment.OSVersion.Platform;
|
||||
if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows)
|
||||
{
|
||||
return "Win32";
|
||||
}
|
||||
|
||||
if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa"))
|
||||
{
|
||||
return "MACOSX";
|
||||
}
|
||||
|
||||
/*
|
||||
* .NET 1.x, under Mono, the UNIX code is 128. Under
|
||||
* .NET 2.x, Mono or MS, the UNIX code is 4
|
||||
*/
|
||||
if(Environment.Version.Major == 1)
|
||||
{
|
||||
if((int)platId == 128)
|
||||
{
|
||||
return "UNIX";
|
||||
}
|
||||
}
|
||||
else if((int)platId == 4)
|
||||
{
|
||||
return "UNIX";
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private static bool CompareNum(OperatorSymbol oper, int val1, int val2)
|
||||
{
|
||||
switch(oper)
|
||||
{
|
||||
case OperatorSymbol.Equal:
|
||||
return (val1 == val2);
|
||||
case OperatorSymbol.NotEqual:
|
||||
return (val1 != val2);
|
||||
case OperatorSymbol.LessThan:
|
||||
return (val1 < val2);
|
||||
case OperatorSymbol.LessThanEqual:
|
||||
return (val1 <= val2);
|
||||
case OperatorSymbol.GreaterThan:
|
||||
return (val1 > val2);
|
||||
case OperatorSymbol.GreaterThanEqual:
|
||||
return (val1 >= val2);
|
||||
}
|
||||
|
||||
throw new WarningException("Unknown operator type");
|
||||
}
|
||||
|
||||
private static bool CompareStr(OperatorSymbol oper, string val1, string val2)
|
||||
{
|
||||
switch(oper)
|
||||
{
|
||||
case OperatorSymbol.Equal:
|
||||
return (val1 == val2);
|
||||
case OperatorSymbol.NotEqual:
|
||||
return (val1 != val2);
|
||||
case OperatorSymbol.LessThan:
|
||||
return (val1.CompareTo(val2) < 0);
|
||||
case OperatorSymbol.LessThanEqual:
|
||||
return (val1.CompareTo(val2) <= 0);
|
||||
case OperatorSymbol.GreaterThan:
|
||||
return (val1.CompareTo(val2) > 0);
|
||||
case OperatorSymbol.GreaterThanEqual:
|
||||
return (val1.CompareTo(val2) >= 0);
|
||||
}
|
||||
|
||||
throw new WarningException("Unknown operator type");
|
||||
}
|
||||
|
||||
private static char NextChar(int idx, string str)
|
||||
{
|
||||
if((idx + 1) >= str.Length)
|
||||
{
|
||||
return Char.MaxValue;
|
||||
}
|
||||
|
||||
return str[idx + 1];
|
||||
}
|
||||
// Very very simple expression parser. Can only match expressions of the form
|
||||
// <var> <op> <value>:
|
||||
// OS = Windows
|
||||
// OS != Linux
|
||||
// RuntimeMinor > 0
|
||||
private bool ParseExpression(string exp)
|
||||
{
|
||||
if(exp == null)
|
||||
{
|
||||
throw new ArgumentException("Invalid expression, cannot be null");
|
||||
}
|
||||
|
||||
exp = exp.Trim();
|
||||
if(exp.Length < 1)
|
||||
{
|
||||
throw new ArgumentException("Invalid expression, cannot be 0 length");
|
||||
}
|
||||
|
||||
string id = "";
|
||||
string str = "";
|
||||
OperatorSymbol oper = OperatorSymbol.None;
|
||||
bool inStr = false;
|
||||
|
||||
for(int i = 0; i < exp.Length; i++)
|
||||
{
|
||||
char c = exp[i];
|
||||
if(Char.IsWhiteSpace(c))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(Char.IsLetterOrDigit(c) || c == '_')
|
||||
{
|
||||
if(inStr)
|
||||
{
|
||||
str += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
id += c;
|
||||
}
|
||||
}
|
||||
else if(c == '\"')
|
||||
{
|
||||
inStr = !inStr;
|
||||
if(inStr)
|
||||
{
|
||||
str = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(inStr)
|
||||
{
|
||||
str += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(c)
|
||||
{
|
||||
case '=':
|
||||
oper = OperatorSymbol.Equal;
|
||||
break;
|
||||
|
||||
case '!':
|
||||
if(NextChar(i, exp) == '=')
|
||||
{
|
||||
oper = OperatorSymbol.NotEqual;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case '<':
|
||||
if(NextChar(i, exp) == '=')
|
||||
{
|
||||
oper = OperatorSymbol.LessThanEqual;
|
||||
}
|
||||
else
|
||||
{
|
||||
oper = OperatorSymbol.LessThan;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case '>':
|
||||
if(NextChar(i, exp) == '=')
|
||||
{
|
||||
oper = OperatorSymbol.GreaterThanEqual;
|
||||
}
|
||||
else
|
||||
{
|
||||
oper = OperatorSymbol.GreaterThan;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(inStr)
|
||||
{
|
||||
throw new WarningException("Expected end of string in expression");
|
||||
}
|
||||
|
||||
if(oper == OperatorSymbol.None)
|
||||
{
|
||||
throw new WarningException("Expected operator in expression");
|
||||
}
|
||||
if(id.Length < 1)
|
||||
{
|
||||
throw new WarningException("Expected identifier in expression");
|
||||
}
|
||||
if(str.Length < 1)
|
||||
{
|
||||
throw new WarningException("Expected value in expression");
|
||||
}
|
||||
|
||||
bool ret;
|
||||
try
|
||||
{
|
||||
object val = m_Variables[id.ToLower()];
|
||||
if(val == null)
|
||||
{
|
||||
throw new WarningException("Unknown identifier '{0}'", id);
|
||||
}
|
||||
|
||||
Type t = val.GetType();
|
||||
if(t.IsAssignableFrom(typeof(int)))
|
||||
{
|
||||
int numVal = (int)val;
|
||||
int numVal2 = Int32.Parse(str);
|
||||
ret = CompareNum(oper, numVal, numVal2);
|
||||
}
|
||||
else
|
||||
{
|
||||
string strVal = val.ToString();
|
||||
string strVal2 = str;
|
||||
ret = CompareStr(oper, strVal, strVal2);
|
||||
}
|
||||
}
|
||||
catch(ArgumentException ex)
|
||||
{
|
||||
ex.ToString();
|
||||
throw new WarningException("Invalid value type for system variable '{0}', expected int", id);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Taken from current Prebuild included in OpenSim 0.7.x
|
||||
/// </summary>
|
||||
/// <param name="readerStack">
|
||||
/// A <see cref="Stack<XmlReader>"/>
|
||||
/// </param>
|
||||
/// <param name="include">
|
||||
/// A <see cref="System.String"/>
|
||||
/// </param>
|
||||
private static void WildCardInclude (Stack<XmlReader> readerStack, string include)
|
||||
{
|
||||
if (!include.Contains ("*")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Console.WriteLine("Processing {0}", include);
|
||||
|
||||
// Break up the include into pre and post wildcard sections
|
||||
string preWildcard = include.Substring (0, include.IndexOf ("*"));
|
||||
string postWildcard = include.Substring (include.IndexOf ("*") + 2);
|
||||
|
||||
// If preWildcard is a directory, recurse
|
||||
if (Directory.Exists (preWildcard)) {
|
||||
string[] directories = Directory.GetDirectories (preWildcard);
|
||||
Array.Sort (directories);
|
||||
Array.Reverse (directories);
|
||||
foreach (string dirPath in directories) {
|
||||
//Console.WriteLine ("Scanning : {0}", dirPath);
|
||||
|
||||
string includeFile = Path.Combine (dirPath, postWildcard);
|
||||
if (includeFile.Contains ("*")) {
|
||||
// postWildcard included another wildcard, recurse.
|
||||
WildCardInclude (readerStack, includeFile);
|
||||
} else {
|
||||
FileInfo file = new FileInfo (includeFile);
|
||||
if (file.Exists) {
|
||||
//Console.WriteLine ("Including File: {0}", includeFile);
|
||||
XmlReader newReader = new XmlTextReader (file.Open (FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
readerStack.Push (newReader);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// preWildcard is not a path to a directory, so the wildcard is in the filename
|
||||
string searchFilename = Path.GetFileName (preWildcard.Substring (preWildcard.IndexOf ("/") + 1) + "*" + postWildcard);
|
||||
Console.WriteLine ("searchFilename: {0}", searchFilename);
|
||||
|
||||
string searchDirectory = Path.GetDirectoryName (preWildcard);
|
||||
Console.WriteLine ("searchDirectory: {0}", searchDirectory);
|
||||
|
||||
string[] files = Directory.GetFiles (searchDirectory, searchFilename);
|
||||
Array.Sort (files);
|
||||
Array.Reverse (files);
|
||||
foreach (string includeFile in files) {
|
||||
FileInfo file = new FileInfo (includeFile);
|
||||
if (file.Exists) {
|
||||
// Console.WriteLine ("Including File: {0}", includeFile);
|
||||
XmlReader newReader = new XmlTextReader (file.Open (FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
readerStack.Push (newReader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="variableValue"></param>
|
||||
public void RegisterVariable(string name, object variableValue)
|
||||
{
|
||||
if(name == null || variableValue == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_Variables[name.ToLower()] = variableValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs validation on the xml source as well as evaluates conditional and flow expresions
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception>
|
||||
/// <param name="initialReader"></param>
|
||||
/// <returns>the output xml </returns>
|
||||
public string Process(XmlReader initialReader)
|
||||
{
|
||||
if(initialReader == null)
|
||||
{
|
||||
throw new ArgumentException("Invalid XML reader to pre-process");
|
||||
}
|
||||
|
||||
IfContext context = new IfContext(true, true, IfState.None);
|
||||
StringWriter xmlText = new StringWriter();
|
||||
XmlTextWriter writer = new XmlTextWriter(xmlText);
|
||||
writer.Formatting = Formatting.Indented;
|
||||
|
||||
// Create a queue of XML readers and add the initial
|
||||
// reader to it. Then we process until we run out of
|
||||
// readers which lets the <?include?> operation add more
|
||||
// readers to generate a multi-file parser and not require
|
||||
// XML fragments that a recursive version would use.
|
||||
Stack<XmlReader> readerStack = new Stack<XmlReader>();
|
||||
readerStack.Push(initialReader);
|
||||
|
||||
while(readerStack.Count > 0)
|
||||
{
|
||||
// Pop off the next reader.
|
||||
XmlReader reader = readerStack.Pop();
|
||||
|
||||
// Process through this XML reader until it is
|
||||
// completed (or it is replaced by the include
|
||||
// operation).
|
||||
while(reader.Read())
|
||||
{
|
||||
// The prebuild file has a series of processing
|
||||
// instructions which allow for specific
|
||||
// inclusions based on operating system or to
|
||||
// include additional files.
|
||||
if(reader.NodeType == XmlNodeType.ProcessingInstruction)
|
||||
{
|
||||
bool ignore = false;
|
||||
|
||||
switch(reader.LocalName)
|
||||
{
|
||||
case "include":
|
||||
// use regular expressions to parse out the attributes.
|
||||
MatchCollection matches = includeFileRegex.Matches(reader.Value);
|
||||
|
||||
// make sure there is only one file attribute.
|
||||
if(matches.Count > 1)
|
||||
{
|
||||
throw new WarningException("An <?include ?> node was found, but it specified more than one file.");
|
||||
}
|
||||
|
||||
if(matches.Count == 0)
|
||||
{
|
||||
throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute.");
|
||||
}
|
||||
|
||||
// ***** Adding for wildcard handling
|
||||
// Push current reader back onto the stack.
|
||||
readerStack.Push (reader);
|
||||
|
||||
// Pull the file out from the regex and make sure it is a valid file before using it.
|
||||
string filename = matches[0].Groups[1].Value;
|
||||
|
||||
filename = String.Join (Path.DirectorySeparatorChar.ToString (), filename.Split (new char[] { '/', '\\' }));
|
||||
|
||||
if (!filename.Contains ("*")) {
|
||||
|
||||
FileInfo includeFile = new FileInfo (filename);
|
||||
if (!includeFile.Exists) {
|
||||
throw new WarningException ("Cannot include file: " + includeFile.FullName);
|
||||
}
|
||||
|
||||
// Create a new reader object for this file. Then put the old reader back on the stack and start
|
||||
// processing using this new XML reader.
|
||||
|
||||
XmlReader newReader = new XmlTextReader (includeFile.Open (FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
reader = newReader;
|
||||
readerStack.Push (reader);
|
||||
|
||||
} else {
|
||||
WildCardInclude (readerStack, filename);
|
||||
}
|
||||
|
||||
reader = (XmlReader)readerStack.Pop ();
|
||||
ignore = true;
|
||||
break;
|
||||
|
||||
case "if":
|
||||
m_IfStack.Push(context);
|
||||
context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If);
|
||||
ignore = true;
|
||||
break;
|
||||
|
||||
case "elseif":
|
||||
if(m_IfStack.Count == 0)
|
||||
{
|
||||
throw new WarningException("Unexpected 'elseif' outside of 'if'");
|
||||
}
|
||||
if(context.State != IfState.If && context.State != IfState.ElseIf)
|
||||
{
|
||||
throw new WarningException("Unexpected 'elseif' outside of 'if'");
|
||||
}
|
||||
|
||||
context.State = IfState.ElseIf;
|
||||
if(!context.EverKept)
|
||||
{
|
||||
context.Keep = ParseExpression(reader.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Keep = false;
|
||||
}
|
||||
|
||||
ignore = true;
|
||||
break;
|
||||
|
||||
case "else":
|
||||
if(m_IfStack.Count == 0)
|
||||
{
|
||||
throw new WarningException("Unexpected 'else' outside of 'if'");
|
||||
}
|
||||
if(context.State != IfState.If && context.State != IfState.ElseIf)
|
||||
{
|
||||
throw new WarningException("Unexpected 'else' outside of 'if'");
|
||||
}
|
||||
|
||||
context.State = IfState.Else;
|
||||
context.Keep = !context.EverKept;
|
||||
ignore = true;
|
||||
break;
|
||||
|
||||
case "endif":
|
||||
if(m_IfStack.Count == 0)
|
||||
{
|
||||
throw new WarningException("Unexpected 'endif' outside of 'if'");
|
||||
}
|
||||
|
||||
context = m_IfStack.Pop();
|
||||
ignore = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(ignore)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}//end pre-proc instruction
|
||||
|
||||
if(!context.Active || !context.Keep)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(reader.NodeType)
|
||||
{
|
||||
case XmlNodeType.Element:
|
||||
bool empty = reader.IsEmptyElement;
|
||||
writer.WriteStartElement(reader.Name);
|
||||
|
||||
while (reader.MoveToNextAttribute())
|
||||
{
|
||||
writer.WriteAttributeString(reader.Name, reader.Value);
|
||||
}
|
||||
|
||||
if(empty)
|
||||
{
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case XmlNodeType.EndElement:
|
||||
writer.WriteEndElement();
|
||||
break;
|
||||
|
||||
case XmlNodeType.Text:
|
||||
writer.WriteString(reader.Value);
|
||||
break;
|
||||
|
||||
case XmlNodeType.CDATA:
|
||||
writer.WriteCData(reader.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(m_IfStack.Count != 0)
|
||||
{
|
||||
throw new WarningException("Mismatched 'if', 'endif' pair");
|
||||
}
|
||||
}
|
||||
|
||||
return xmlText.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,102 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-20 03:42:51 -0400 (Wed, 20 Sep 2006) $
|
||||
* $Revision: 164 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
|
||||
#if (DEBUG && _DEBUG_TARGET)
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
[Target("debug")]
|
||||
public class DebugTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
public void Write()
|
||||
{
|
||||
foreach(SolutionNode s in m_Kernel.Solutions)
|
||||
{
|
||||
Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path);
|
||||
foreach(string file in s.Files)
|
||||
{
|
||||
Console.WriteLine("\tFile [ {0} ]", file);
|
||||
}
|
||||
|
||||
foreach(ProjectNode proj in s.Projects)
|
||||
{
|
||||
Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language);
|
||||
foreach(string file in proj.Files)
|
||||
Console.WriteLine("\t\tFile [ {0} ]", file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Clean()
|
||||
{
|
||||
Console.WriteLine("Not implemented");
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "debug";
|
||||
}
|
||||
}
|
||||
|
||||
public Kernel Kernel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Kernel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Kernel = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,469 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Crestez Leonard (cleonard@go.ro)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
[Target("makefile")]
|
||||
public class MakefileTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
// This converts a path relative to the path of a project to
|
||||
// a path relative to the solution path.
|
||||
private string NicePath(ProjectNode proj, string path)
|
||||
{
|
||||
string res;
|
||||
SolutionNode solution = (SolutionNode)proj.Parent;
|
||||
res = Path.Combine(Helper.NormalizePath(proj.FullPath, '/'), Helper.NormalizePath(path, '/'));
|
||||
res = Helper.NormalizePath(res, '/');
|
||||
res = res.Replace("/./", "/");
|
||||
while (res.IndexOf("/../") >= 0)
|
||||
{
|
||||
int a = res.IndexOf("/../");
|
||||
int b = res.LastIndexOf("/", a - 1);
|
||||
res = res.Remove(b, a - b + 3);
|
||||
}
|
||||
res = Helper.MakePathRelativeTo(solution.FullPath, res);
|
||||
if (res.StartsWith("./"))
|
||||
res = res.Substring(2, res.Length - 2);
|
||||
res = Helper.NormalizePath(res, '/');
|
||||
return res;
|
||||
}
|
||||
|
||||
private void WriteProjectFiles(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
// Write list of source code files
|
||||
f.WriteLine("SOURCES_{0} = \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.Compile)
|
||||
f.WriteLine("\t{0} \\", NicePath(project, file));
|
||||
f.WriteLine();
|
||||
|
||||
// Write list of resource files
|
||||
f.WriteLine("RESOURCES_{0} = \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource)
|
||||
{
|
||||
string path = NicePath(project, file);
|
||||
f.WriteLine("\t-resource:{0},{1} \\", path, Path.GetFileName(path));
|
||||
}
|
||||
f.WriteLine();
|
||||
|
||||
// There's also Content and None in BuildAction.
|
||||
// What am I supposed to do with that?
|
||||
}
|
||||
|
||||
private string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach (ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = NicePath(project, Helper.MakeFilePath(refPath.Path, refName, "dll"));
|
||||
if (File.Exists(fullPath))
|
||||
return fullPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void WriteProjectReferences(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("REFERENCES_{0} = \\", project.Name);
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
string path;
|
||||
// Project references change with configurations.
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
continue;
|
||||
path = FindFileReference(refr.Name, project);
|
||||
if (path != null)
|
||||
f.WriteLine("\t-r:{0} \\", path);
|
||||
else
|
||||
f.WriteLine("\t-r:{0} \\", refr.Name);
|
||||
}
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private void WriteProjectDependencies(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("DEPENDENCIES_{0} = \\", project.Name);
|
||||
f.WriteLine("\t$(SOURCES_{0}) \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource)
|
||||
f.WriteLine("\t{0} \\", NicePath(project, file));
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private string ProjectTypeToExtension(ProjectType t)
|
||||
{
|
||||
if (t == ProjectType.Exe || t == ProjectType.WinExe)
|
||||
{
|
||||
return "exe";
|
||||
}
|
||||
else if (t == ProjectType.Library)
|
||||
{
|
||||
return "dll";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FatalException("Bad ProjectType: {0}", t);
|
||||
}
|
||||
}
|
||||
|
||||
private string ProjectTypeToTarget(ProjectType t)
|
||||
{
|
||||
if (t == ProjectType.Exe)
|
||||
{
|
||||
return "exe";
|
||||
}
|
||||
else if (t == ProjectType.WinExe)
|
||||
{
|
||||
return "winexe";
|
||||
}
|
||||
else if (t == ProjectType.Library)
|
||||
{
|
||||
return "library";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FatalException("Bad ProjectType: {0}", t);
|
||||
}
|
||||
}
|
||||
|
||||
private string ProjectOutput(ProjectNode project, ConfigurationNode config)
|
||||
{
|
||||
string filepath;
|
||||
filepath = Helper.MakeFilePath((string)config.Options["OutputPath"],
|
||||
project.AssemblyName, ProjectTypeToExtension(project.Type));
|
||||
return NicePath(project, filepath);
|
||||
}
|
||||
|
||||
// Returns true if two configs in one project have the same output.
|
||||
private bool ProjectClashes(ProjectNode project)
|
||||
{
|
||||
foreach (ConfigurationNode conf1 in project.Configurations)
|
||||
foreach (ConfigurationNode conf2 in project.Configurations)
|
||||
if (ProjectOutput(project, conf1) == ProjectOutput(project, conf2) && conf1 != conf2)
|
||||
{
|
||||
m_Kernel.Log.Write("Warning: Configurations {0} and {1} for project {2} output the same file",
|
||||
conf1.Name, conf2.Name, project.Name);
|
||||
m_Kernel.Log.Write("Warning: I'm going to use some timestamps(extra empty files).");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void WriteProject(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("# This is for project {0}", project.Name);
|
||||
f.WriteLine();
|
||||
|
||||
WriteProjectFiles(f, solution, project);
|
||||
WriteProjectReferences(f, solution, project);
|
||||
WriteProjectDependencies(f, solution, project);
|
||||
|
||||
bool clash = ProjectClashes(project);
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
string outpath = ProjectOutput(project, conf);
|
||||
string filesToClean = outpath;
|
||||
|
||||
if (clash)
|
||||
{
|
||||
f.WriteLine("{0}-{1}: .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.Write(".{0}-{1}-timestamp: $(DEPENDENCIES_{0})", project.Name, conf.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
f.WriteLine("{0}-{1}: {2}", project.Name, conf.Name, outpath);
|
||||
f.WriteLine();
|
||||
f.Write("{2}: $(DEPENDENCIES_{0})", project.Name, conf.Name, outpath);
|
||||
}
|
||||
// Dependencies on other projects.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
if (ProjectClashes(refProj))
|
||||
f.Write(" .{0}-{1}-timestamp", refProj.Name, conf.Name);
|
||||
else
|
||||
f.Write(" {0}", ProjectOutput(refProj, conf));
|
||||
}
|
||||
f.WriteLine();
|
||||
|
||||
// make directory for output.
|
||||
if (Path.GetDirectoryName(outpath) != "")
|
||||
{
|
||||
f.WriteLine("\tmkdir -p {0}", Path.GetDirectoryName(outpath));
|
||||
}
|
||||
// mcs command line.
|
||||
f.Write("\tgmcs", project.Name);
|
||||
f.Write(" -warn:{0}", conf.Options["WarningLevel"]);
|
||||
if ((bool)conf.Options["DebugInformation"])
|
||||
f.Write(" -debug");
|
||||
if ((bool)conf.Options["AllowUnsafe"])
|
||||
f.Write(" -unsafe");
|
||||
if ((bool)conf.Options["CheckUnderflowOverflow"])
|
||||
f.Write(" -checked");
|
||||
if (project.StartupObject != "")
|
||||
f.Write(" -main:{0}", project.StartupObject);
|
||||
if ((string)conf.Options["CompilerDefines"] != "")
|
||||
{
|
||||
f.Write(" -define:\"{0}\"", conf.Options["CompilerDefines"]);
|
||||
}
|
||||
|
||||
f.Write(" -target:{0} -out:{1}", ProjectTypeToTarget(project.Type), outpath);
|
||||
|
||||
// Build references to other projects. Now that sux.
|
||||
// We have to reference the other project in the same conf.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode refProj;
|
||||
refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
f.Write(" -r:{0}", ProjectOutput(refProj, conf));
|
||||
}
|
||||
|
||||
f.Write(" $(REFERENCES_{0})", project.Name);
|
||||
f.Write(" $(RESOURCES_{0})", project.Name);
|
||||
f.Write(" $(SOURCES_{0})", project.Name);
|
||||
f.WriteLine();
|
||||
|
||||
// Copy references with localcopy.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (refr.LocalCopy)
|
||||
{
|
||||
string outPath, srcPath, destPath;
|
||||
outPath = Helper.NormalizePath((string)conf.Options["OutputPath"]);
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode refProj;
|
||||
refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
srcPath = ProjectOutput(refProj, conf);
|
||||
destPath = Path.Combine(outPath, Path.GetFileName(srcPath));
|
||||
destPath = NicePath(project, destPath);
|
||||
if (srcPath != destPath)
|
||||
{
|
||||
f.WriteLine("\tcp -f {0} {1}", srcPath, destPath);
|
||||
filesToClean += " " + destPath;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
srcPath = FindFileReference(refr.Name, project);
|
||||
if (srcPath != null)
|
||||
{
|
||||
destPath = Path.Combine(outPath, Path.GetFileName(srcPath));
|
||||
destPath = NicePath(project, destPath);
|
||||
f.WriteLine("\tcp -f {0} {1}", srcPath, destPath);
|
||||
filesToClean += " " + destPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (clash)
|
||||
{
|
||||
filesToClean += String.Format(" .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.WriteLine("\ttouch .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.Write("\trm -rf");
|
||||
foreach (ConfigurationNode otherConf in project.Configurations)
|
||||
if (otherConf != conf)
|
||||
f.WriteLine(" .{0}-{1}-timestamp", project.Name, otherConf.Name);
|
||||
f.WriteLine();
|
||||
}
|
||||
f.WriteLine();
|
||||
f.WriteLine("{0}-{1}-clean:", project.Name, conf.Name);
|
||||
f.WriteLine("\trm -rf {0}", filesToClean);
|
||||
f.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteIntro(StreamWriter f, SolutionNode solution)
|
||||
{
|
||||
f.WriteLine("# Makefile for {0} generated by Prebuild ( http://dnpb.sf.net )", solution.Name);
|
||||
f.WriteLine("# Do not edit.");
|
||||
f.WriteLine("#");
|
||||
|
||||
f.Write("# Configurations:");
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}", conf.Name);
|
||||
f.WriteLine();
|
||||
|
||||
f.WriteLine("# Projects:");
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.WriteLine("#\t{0}", proj.Name);
|
||||
|
||||
f.WriteLine("#");
|
||||
f.WriteLine("# Building:");
|
||||
f.WriteLine("#\t\"make\" to build everything under the default(first) configuration");
|
||||
f.WriteLine("#\t\"make CONF\" to build every project under configuration CONF");
|
||||
f.WriteLine("#\t\"make PROJ\" to build project PROJ under the default(first) configuration");
|
||||
f.WriteLine("#\t\"make PROJ-CONF\" to build project PROJ under configuration CONF");
|
||||
f.WriteLine("#");
|
||||
f.WriteLine("# Cleaning (removing results of build):");
|
||||
f.WriteLine("#\t\"make clean\" to clean everything, that's what you probably want");
|
||||
f.WriteLine("#\t\"make CONF\" to clean everything for a configuration");
|
||||
f.WriteLine("#\t\"make PROJ\" to clean everything for a project");
|
||||
f.WriteLine("#\t\"make PROJ-CONF\" to clea project PROJ under configuration CONF");
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private void WritePhony(StreamWriter f, SolutionNode solution)
|
||||
{
|
||||
string defconf = "";
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
defconf = conf.Name;
|
||||
break;
|
||||
}
|
||||
|
||||
f.Write(".PHONY: all");
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0} {0}-clean", proj.Name);
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0} {0}-clean", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}-{1} {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
f.WriteLine("all: {0}", defconf);
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("clean:");
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}-clean", conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
f.Write("{0}: ", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0}-{1}", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("{0}-clean: ", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
{
|
||||
f.WriteLine("{0}: {0}-{1}", proj.Name, defconf);
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("{0}-clean:", proj.Name);
|
||||
foreach (ConfigurationNode conf in proj.Configurations)
|
||||
f.Write(" {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating makefile for {0}", solution.Name);
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
|
||||
string file = "Makefile";// Helper.MakeFilePath(solution.FullPath, solution.Name, "make");
|
||||
StreamWriter f = new StreamWriter(file);
|
||||
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(file));
|
||||
|
||||
using (f)
|
||||
{
|
||||
WriteIntro(f, solution);
|
||||
WritePhony(f, solution);
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating Project: {0}", project.Name);
|
||||
WriteProject(f, solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning makefile for {0}", solution.Name);
|
||||
|
||||
string file = Helper.MakeFilePath(solution.FullPath, solution.Name, "make");
|
||||
Helper.DeleteIfExists(file);
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode solution in kern.Solutions)
|
||||
WriteSolution(solution);
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode sol in kern.Solutions)
|
||||
CleanSolution(sol);
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "makefile";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,515 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("monodev")]
|
||||
public class MonoDevelopTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static string PrependPath(string path)
|
||||
{
|
||||
string tmpPath = Helper.NormalizePath(path, '/');
|
||||
Regex regex = new Regex(@"(\w):/(\w+)");
|
||||
Match match = regex.Match(tmpPath);
|
||||
if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
|
||||
{
|
||||
tmpPath = Helper.NormalizePath(tmpPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpPath = Helper.NormalizePath("./" + tmpPath);
|
||||
}
|
||||
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
private static string BuildReference(SolutionNode solution, ReferenceNode refr)
|
||||
{
|
||||
string ret = "<ProjectReference type=\"";
|
||||
if(solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ret += "Project\"";
|
||||
ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectNode project = (ProjectNode)refr.Parent;
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
|
||||
if(refr.Path != null || fileRef != null)
|
||||
{
|
||||
ret += "Assembly\" refto=\"";
|
||||
|
||||
string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
|
||||
|
||||
ret += finalPath;
|
||||
ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret += "Gac\"";
|
||||
ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\"";
|
||||
ret += " refto=\"";
|
||||
try
|
||||
{
|
||||
/*
|
||||
Day changed to 28 Mar 2007
|
||||
...
|
||||
08:09 < cj> is there anything that replaces Assembly.LoadFromPartialName() ?
|
||||
08:09 < jonp> no
|
||||
08:10 < jonp> in their infinite wisdom [sic], microsoft decided that the
|
||||
ability to load any assembly version by-name was an inherently
|
||||
bad idea
|
||||
08:11 < cj> I'm thinking of a bunch of four-letter words right now...
|
||||
08:11 < cj> security through making it difficult for the developer!!!
|
||||
08:12 < jonp> just use the Obsolete API
|
||||
08:12 < jonp> it should still work
|
||||
08:12 < cj> alrighty.
|
||||
08:12 < jonp> you just get warnings when using it
|
||||
*/
|
||||
Assembly assem = Assembly.LoadWithPartialName(refr.Name);
|
||||
ret += assem.FullName;
|
||||
//ret += refr.Name;
|
||||
}
|
||||
catch (System.NullReferenceException e)
|
||||
{
|
||||
e.ToString();
|
||||
ret += refr.Name;
|
||||
}
|
||||
ret += "\" />";
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach(ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
|
||||
|
||||
if(File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
|
||||
{
|
||||
if( conf == null )
|
||||
{
|
||||
throw new ArgumentNullException("conf");
|
||||
}
|
||||
if( project == null )
|
||||
{
|
||||
throw new ArgumentNullException("project");
|
||||
}
|
||||
string docFile = (string)conf.Options["XmlDocFile"];
|
||||
if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
|
||||
{
|
||||
return "False";
|
||||
}
|
||||
return "True";
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
string csComp = "Mcs";
|
||||
string netRuntime = "Mono";
|
||||
if(project.Runtime == ClrRuntime.Microsoft)
|
||||
{
|
||||
csComp = "Csc";
|
||||
netRuntime = "MsNet";
|
||||
}
|
||||
|
||||
string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
|
||||
StreamWriter ss = new StreamWriter(projFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
|
||||
|
||||
using(ss)
|
||||
{
|
||||
ss.WriteLine(
|
||||
"<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">",
|
||||
project.Name,
|
||||
project.RootNamespace
|
||||
);
|
||||
|
||||
int count = 0;
|
||||
|
||||
ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
|
||||
|
||||
foreach(ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name);
|
||||
ss.Write(" <Output");
|
||||
ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString())));
|
||||
ss.Write(" assembly=\"{0}\"", project.AssemblyName);
|
||||
ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
|
||||
//ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
|
||||
//ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
|
||||
if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
|
||||
}
|
||||
if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
|
||||
}
|
||||
ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
|
||||
ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
|
||||
ss.WriteLine(" />");
|
||||
|
||||
ss.Write(" <Build");
|
||||
ss.Write(" debugmode=\"True\"");
|
||||
if (project.Type == ProjectType.WinExe)
|
||||
{
|
||||
ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(" target=\"{0}\"", project.Type);
|
||||
}
|
||||
ss.WriteLine(" />");
|
||||
|
||||
ss.Write(" <Execution");
|
||||
ss.Write(" runwithwarnings=\"{0}\"", !conf.Options.WarningsAsErrors);
|
||||
ss.Write(" consolepause=\"True\"");
|
||||
ss.Write(" runtime=\"{0}\"", netRuntime);
|
||||
ss.Write(" clr-version=\"Net_2_0\"");
|
||||
ss.WriteLine(" />");
|
||||
|
||||
ss.Write(" <CodeGeneration");
|
||||
ss.Write(" compiler=\"{0}\"", csComp);
|
||||
ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
|
||||
ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
|
||||
ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
|
||||
ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
|
||||
ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
|
||||
ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
|
||||
ss.Write(" mainclass=\"{0}\"", project.StartupObject);
|
||||
ss.Write(" target=\"{0}\"", project.Type);
|
||||
ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
|
||||
ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
|
||||
ss.Write(" win32Icon=\"{0}\"", project.AppIcon);
|
||||
ss.Write(" ctype=\"CSharpCompilerParameters\"");
|
||||
ss.WriteLine(" />");
|
||||
ss.WriteLine(" </Configuration>");
|
||||
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </Configurations>");
|
||||
|
||||
ss.Write(" <DeploymentInformation");
|
||||
ss.Write(" target=\"\"");
|
||||
ss.Write(" script=\"\"");
|
||||
ss.Write(" strategy=\"File\"");
|
||||
ss.WriteLine(">");
|
||||
ss.WriteLine(" <excludeFiles />");
|
||||
ss.WriteLine(" </DeploymentInformation>");
|
||||
|
||||
ss.WriteLine(" <Contents>");
|
||||
foreach(string file in project.Files)
|
||||
{
|
||||
string buildAction;
|
||||
string dependson = "";
|
||||
string resource_id = "";
|
||||
string copyToOutput = "";
|
||||
|
||||
switch(project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.None:
|
||||
buildAction = "Nothing";
|
||||
break;
|
||||
|
||||
case BuildAction.Content:
|
||||
buildAction = "Exclude";
|
||||
break;
|
||||
|
||||
case BuildAction.EmbeddedResource:
|
||||
buildAction = "EmbedAsResource";
|
||||
break;
|
||||
|
||||
default:
|
||||
buildAction = "Compile";
|
||||
break;
|
||||
}
|
||||
|
||||
if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never)
|
||||
buildAction = "FileCopy";
|
||||
|
||||
// Sort of a hack, we try and resolve the path and make it relative, if we can.
|
||||
string extension = Path.GetExtension(file);
|
||||
string designer_format = string.Format(".Designer{0}", extension);
|
||||
|
||||
if (file.EndsWith(designer_format))
|
||||
{
|
||||
string basename = file.Substring(0, file.LastIndexOf(designer_format));
|
||||
string[] extensions = new string[] { ".cs", ".resx", ".settings" };
|
||||
|
||||
foreach(string ext in extensions)
|
||||
{
|
||||
if (project.Files.Contains(basename + ext))
|
||||
{
|
||||
dependson = string.Format(" dependson=\"{0}{1}\"", basename, ext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (extension == ".resx")
|
||||
{
|
||||
buildAction = "EmbedAsResource";
|
||||
string basename = file.Substring(0, file.LastIndexOf(".resx"));
|
||||
|
||||
// Visual Studio type resx + form dependency
|
||||
if (project.Files.Contains(basename + ".cs"))
|
||||
{
|
||||
dependson = string.Format(" dependson=\"{0}{1}\"", basename, ".cs");
|
||||
}
|
||||
|
||||
// We need to specify a resources file name to avoid MissingManifestResourceExceptions
|
||||
// in libraries that are built.
|
||||
resource_id = string.Format(" resource_id=\"{0}.{1}.resources\"",
|
||||
project.AssemblyName, basename.Replace("/", "."));
|
||||
}
|
||||
|
||||
switch(project.Files.GetCopyToOutput(file))
|
||||
{
|
||||
case CopyToOutput.Always:
|
||||
copyToOutput = string.Format(" copyToOutputDirectory=\"Always\"");
|
||||
break;
|
||||
case CopyToOutput.PreserveNewest:
|
||||
copyToOutput = string.Format(" copyToOutputDirectory=\"PreserveNewest\"");
|
||||
break;
|
||||
}
|
||||
|
||||
// Sort of a hack, we try and resolve the path and make it relative, if we can.
|
||||
string filePath = PrependPath(file);
|
||||
ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\"{2}{3}{4} />",
|
||||
filePath, buildAction, dependson, resource_id, copyToOutput);
|
||||
}
|
||||
ss.WriteLine(" </Contents>");
|
||||
|
||||
ss.WriteLine(" <References>");
|
||||
foreach(ReferenceNode refr in project.References)
|
||||
{
|
||||
ss.WriteLine(" {0}", BuildReference(solution, refr));
|
||||
}
|
||||
ss.WriteLine(" </References>");
|
||||
|
||||
|
||||
ss.WriteLine("</Project>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void WriteCombine(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating MonoDevelop combine and project files");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(m_Kernel.AllowProject(project.FilterGroups))
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
|
||||
StreamWriter ss = new StreamWriter(combFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
|
||||
|
||||
int count = 0;
|
||||
|
||||
using(ss)
|
||||
{
|
||||
ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name);
|
||||
|
||||
count = 0;
|
||||
foreach(ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
if(count == 0)
|
||||
{
|
||||
ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
|
||||
}
|
||||
|
||||
ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name);
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name);
|
||||
}
|
||||
ss.WriteLine(" </Configuration>");
|
||||
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </Configurations>");
|
||||
|
||||
count = 0;
|
||||
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(count == 0)
|
||||
ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
|
||||
|
||||
ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name);
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </StartMode>");
|
||||
|
||||
ss.WriteLine(" <Entries>");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.WriteLine(" <Entry filename=\"{0}\" />",
|
||||
Helper.MakeFilePath(path, project.Name, "mdp"));
|
||||
}
|
||||
ss.WriteLine(" </Entries>");
|
||||
|
||||
ss.WriteLine("</Combine>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode solution in kern.Solutions)
|
||||
{
|
||||
WriteCombine(solution);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode sol in kern.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "sharpdev";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,777 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 - 2008
|
||||
Matthew Holmes (matthew@wildfiregames.com),
|
||||
Dan Moorehead (dan05a@gmail.com),
|
||||
C.J. Adams-Collier (cjac@colliertech.org),
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("nant")]
|
||||
public class NAntTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static string PrependPath(string path)
|
||||
{
|
||||
string tmpPath = Helper.NormalizePath(path, '/');
|
||||
Regex regex = new Regex(@"(\w):/(\w+)");
|
||||
Match match = regex.Match(tmpPath);
|
||||
//if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
|
||||
//{
|
||||
tmpPath = Helper.NormalizePath(tmpPath);
|
||||
//}
|
||||
// else
|
||||
// {
|
||||
// tmpPath = Helper.NormalizePath("./" + tmpPath);
|
||||
// }
|
||||
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr)
|
||||
{
|
||||
|
||||
if (!String.IsNullOrEmpty(refr.Path))
|
||||
{
|
||||
return refr.Path;
|
||||
}
|
||||
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode projectRef = (ProjectNode) solution.ProjectsTable[refr.Name];
|
||||
string finalPath =
|
||||
Helper.NormalizePath(refr.Name + GetProjectExtension(projectRef), '/');
|
||||
return finalPath;
|
||||
}
|
||||
|
||||
ProjectNode project = (ProjectNode) refr.Parent;
|
||||
|
||||
// Do we have an explicit file reference?
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
if (fileRef != null)
|
||||
{
|
||||
return fileRef;
|
||||
}
|
||||
|
||||
// Is there an explicit path in the project ref?
|
||||
if (refr.Path != null)
|
||||
{
|
||||
return Helper.NormalizePath(refr.Path + "/" + refr.Name + GetProjectExtension(project), '/');
|
||||
}
|
||||
|
||||
// No, it's an extensionless GAC ref, but nant needs the .dll extension anyway
|
||||
return refr.Name + ".dll";
|
||||
}
|
||||
|
||||
public static string GetRefFileName(string refName)
|
||||
{
|
||||
if (ExtensionSpecified(refName))
|
||||
{
|
||||
return refName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return refName + ".dll";
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ExtensionSpecified(string refName)
|
||||
{
|
||||
return refName.EndsWith(".dll") || refName.EndsWith(".exe");
|
||||
}
|
||||
|
||||
private static string GetProjectExtension(ProjectNode project)
|
||||
{
|
||||
string extension = ".dll";
|
||||
if (project.Type == ProjectType.Exe || project.Type == ProjectType.WinExe)
|
||||
{
|
||||
extension = ".exe";
|
||||
}
|
||||
return extension;
|
||||
}
|
||||
|
||||
private static string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach (ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = Helper.MakeFilePath(refPath.Path, refName);
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
fullPath = Helper.MakeFilePath(refPath.Path, refName, "exe");
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
|
||||
{
|
||||
if (conf == null)
|
||||
{
|
||||
throw new ArgumentNullException("conf");
|
||||
}
|
||||
if (project == null)
|
||||
{
|
||||
throw new ArgumentNullException("project");
|
||||
}
|
||||
string docFile = (string)conf.Options["XmlDocFile"];
|
||||
// if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
|
||||
// {
|
||||
// return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
|
||||
// }
|
||||
return docFile;
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
string projFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build");
|
||||
StreamWriter ss = new StreamWriter(projFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
|
||||
bool hasDoc = false;
|
||||
|
||||
using (ss)
|
||||
{
|
||||
ss.WriteLine("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
|
||||
ss.WriteLine(" <target name=\"{0}\">", "build");
|
||||
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\" flatten=\"true\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
if (refr.LocalCopy)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)) + "\" />", '/'));
|
||||
}
|
||||
}
|
||||
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </copy>");
|
||||
if (project.ConfigFile != null && project.ConfigFile.Length!=0)
|
||||
{
|
||||
ss.Write(" <copy file=\"" + project.ConfigFile + "\" tofile=\"${project::get-base-directory()}/${build.dir}/${project::get-name()}");
|
||||
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.Write(".dll.config\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(".exe.config\"");
|
||||
}
|
||||
ss.WriteLine(" />");
|
||||
}
|
||||
|
||||
// Add the content files to just be copied
|
||||
ss.WriteLine(" {0}", "<copy todir=\"${project::get-base-directory()}/${build.dir}\">");
|
||||
ss.WriteLine(" {0}", "<fileset basedir=\".\">");
|
||||
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
// Ignore if we aren't content
|
||||
if (project.Files.GetBuildAction(file) != BuildAction.Content)
|
||||
continue;
|
||||
|
||||
// Create a include tag
|
||||
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
}
|
||||
|
||||
ss.WriteLine(" {0}", "</fileset>");
|
||||
ss.WriteLine(" {0}", "</copy>");
|
||||
|
||||
ss.Write(" <csc ");
|
||||
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
|
||||
ss.Write(" debug=\"{0}\"", "${build.debug}");
|
||||
ss.Write(" platform=\"${build.platform}\"");
|
||||
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (conf.Options.KeyFile != "")
|
||||
{
|
||||
ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" warnaserror=\"{0}\"", conf.Options.WarningsAsErrors);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
|
||||
break;
|
||||
}
|
||||
|
||||
ss.Write(" main=\"{0}\"", project.StartupObject);
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (GetXmlDocFile(project, conf) != "")
|
||||
{
|
||||
ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
|
||||
hasDoc = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.Write(".dll\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(".exe\"");
|
||||
}
|
||||
if (project.AppIcon != null && project.AppIcon.Length != 0)
|
||||
{
|
||||
ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/'));
|
||||
}
|
||||
// This disables a very different behavior between VS and NAnt. With Nant,
|
||||
// If you have using System.Xml; it will ensure System.Xml.dll is referenced,
|
||||
// but not in VS. This will force the behaviors to match, so when it works
|
||||
// in nant, it will work in VS.
|
||||
ss.Write(" noconfig=\"true\"");
|
||||
ss.WriteLine(">");
|
||||
ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.EmbeddedResource:
|
||||
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (project.Files.GetSubType(file).ToString() != "Code")
|
||||
//{
|
||||
// ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
|
||||
ss.WriteLine(" </resources>");
|
||||
ss.WriteLine(" <sources failonempty=\"true\">");
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.Compile:
|
||||
ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </sources>");
|
||||
ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <lib>");
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
|
||||
foreach(ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}/" + refPath.Path.TrimEnd('/', '\\') + "\" />");
|
||||
}
|
||||
ss.WriteLine(" </lib>");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/');
|
||||
if (refr.Path != null) {
|
||||
if (ExtensionSpecified(refr.Name))
|
||||
{
|
||||
ss.WriteLine (" <include name=\"" + path + refr.Name + "\"/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.WriteLine (" <include name=\"" + path + refr.Name + ".dll\"/>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.WriteLine (" <include name=\"" + path + "\" />");
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </references>");
|
||||
|
||||
ss.WriteLine(" </csc>");
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(conf.Options.OutputPath))
|
||||
{
|
||||
string targetDir = Helper.NormalizePath(conf.Options.OutputPath, '/');
|
||||
|
||||
ss.WriteLine(" <echo message=\"Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/" + targetDir + "\" />");
|
||||
|
||||
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/" + targetDir + "\"/>");
|
||||
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/" + targetDir + "\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}/${build.dir}/\" >");
|
||||
ss.WriteLine(" <include name=\"*.dll\"/>");
|
||||
ss.WriteLine(" <include name=\"*.exe\"/>");
|
||||
ss.WriteLine(" <include name=\"*.mdb\" if='${build.debug}'/>");
|
||||
ss.WriteLine(" <include name=\"*.pdb\" if='${build.debug}'/>");
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </copy>");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\">");
|
||||
ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
|
||||
if (hasDoc)
|
||||
{
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
|
||||
ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
|
||||
ss.WriteLine(" </if>");
|
||||
ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
|
||||
ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
|
||||
ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.WriteLine(".dll\" />");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.WriteLine(".exe\" />");
|
||||
}
|
||||
|
||||
ss.WriteLine(" </assemblies>");
|
||||
ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
|
||||
ss.WriteLine(" </summaries>");
|
||||
ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}\" />");
|
||||
// foreach(ReferenceNode refr in project.References)
|
||||
// {
|
||||
// string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
|
||||
// if (path != "")
|
||||
// {
|
||||
// ss.WriteLine(" <include name=\"{0}\" />", path);
|
||||
// }
|
||||
// }
|
||||
ss.WriteLine(" </referencepaths>");
|
||||
ss.WriteLine(" <documenters>");
|
||||
ss.WriteLine(" <documenter name=\"MSDN\">");
|
||||
ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
|
||||
ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
|
||||
ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
|
||||
ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
|
||||
ss.WriteLine(" </documenter>");
|
||||
ss.WriteLine(" </documenters>");
|
||||
ss.WriteLine(" </ndoc>");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void WriteCombine(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating NAnt build files");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
if (m_Kernel.AllowProject(project.FilterGroups))
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
|
||||
StreamWriter ss = new StreamWriter(combFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
|
||||
|
||||
using (ss)
|
||||
{
|
||||
ss.WriteLine("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
|
||||
ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
|
||||
ss.WriteLine();
|
||||
|
||||
//ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
|
||||
//ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
|
||||
ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
|
||||
ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
|
||||
ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
|
||||
ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
|
||||
|
||||
// Use the active configuration, which is the first configuration name in the prebuild file.
|
||||
Dictionary<string,string> emittedConfigurations = new Dictionary<string, string>();
|
||||
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig);
|
||||
ss.WriteLine();
|
||||
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
// If the name isn't in the emitted configurations, we give a high level target to the
|
||||
// platform specific on. This lets "Debug" point to "Debug-AnyCPU".
|
||||
if (!emittedConfigurations.ContainsKey(conf.Name))
|
||||
{
|
||||
// Add it to the dictionary so we only emit one.
|
||||
emittedConfigurations.Add(conf.Name, conf.Platform);
|
||||
|
||||
// Write out the target block.
|
||||
ss.WriteLine(" <target name=\"{0}\" description=\"{0}|{1}\" depends=\"{0}-{1}\">", conf.Name, conf.Platform);
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
}
|
||||
|
||||
// Write out the target for the configuration.
|
||||
ss.WriteLine(" <target name=\"{0}-{1}\" description=\"{0}|{1}\">", conf.Name, conf.Platform);
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
|
||||
ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
|
||||
ss.WriteLine("\t\t <property name=\"build.platform\" value=\"{0}\" />", conf.Platform);
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
}
|
||||
|
||||
ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"net-3.5\" description=\"Sets framework to .NET 3.5\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-3.5\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-3.5\" description=\"Sets framework to mono 3.5\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-3.5\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"init\" description=\"\">");
|
||||
ss.WriteLine(" <call target=\"${project.config}\" />");
|
||||
ss.WriteLine(" <property name=\"sys.os.platform\"");
|
||||
ss.WriteLine(" value=\"${platform::get-name()}\"");
|
||||
ss.WriteLine(" />");
|
||||
ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
|
||||
ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
|
||||
// sdague - ok, this is an ugly hack, but what it lets
|
||||
// us do is native include of files into the nant
|
||||
// created files from all .nant/*include files. This
|
||||
// lets us keep using prebuild, but allows for
|
||||
// extended nant targets to do build and the like.
|
||||
|
||||
try
|
||||
{
|
||||
Regex re = new Regex(".include$");
|
||||
DirectoryInfo nantdir = new DirectoryInfo(".nant");
|
||||
foreach (FileSystemInfo item in nantdir.GetFileSystemInfos())
|
||||
{
|
||||
if (item is DirectoryInfo) { }
|
||||
else if (item is FileInfo)
|
||||
{
|
||||
if (re.Match(item.FullName) !=
|
||||
System.Text.RegularExpressions.Match.Empty)
|
||||
{
|
||||
Console.WriteLine("Including file: " + item.FullName);
|
||||
|
||||
using (FileStream fs = new FileStream(item.FullName,
|
||||
FileMode.Open,
|
||||
FileAccess.Read,
|
||||
FileShare.None))
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(fs))
|
||||
{
|
||||
ss.WriteLine("<!-- included from {0} -->", (item).FullName);
|
||||
while (sr.Peek() != -1)
|
||||
{
|
||||
ss.WriteLine(sr.ReadLine());
|
||||
}
|
||||
ss.WriteLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
// ss.WriteLine(" <include buildfile=\".nant/local.include\" />");
|
||||
// ss.WriteLine(" <target name=\"zip\" description=\"\">");
|
||||
// ss.WriteLine(" <zip zipfile=\"{0}-{1}.zip\">", solution.Name, solution.Version);
|
||||
// ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
|
||||
// ss.WriteLine(" <include name=\"${project::get-base-directory()}/**/*.cs\" />");
|
||||
// // ss.WriteLine(" <include name=\"${project.main.dir}/**/*\" />");
|
||||
// ss.WriteLine(" </fileset>");
|
||||
// ss.WriteLine(" </zip>");
|
||||
// ss.WriteLine(" <echo message=\"Building zip target\" />");
|
||||
// ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\" description=\"\">");
|
||||
ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />");
|
||||
//ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />");
|
||||
if (solution.Cleanup != null && solution.Cleanup.CleanFiles.Count > 0)
|
||||
{
|
||||
foreach (CleanFilesNode cleanFile in solution.Cleanup.CleanFiles)
|
||||
{
|
||||
ss.WriteLine(" <delete failonerror=\"false\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"{0}/*\"/>", cleanFile.Pattern);
|
||||
ss.WriteLine(" <include name=\"{0}\"/>", cleanFile.Pattern);
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </delete>");
|
||||
}
|
||||
}
|
||||
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/'));
|
||||
ss.WriteLine(" target=\"clean\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">");
|
||||
|
||||
foreach (ProjectNode project in solution.ProjectsTableOrder)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/'));
|
||||
ss.WriteLine(" target=\"build\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />");
|
||||
ss.WriteLine();
|
||||
//ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">");
|
||||
ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + GetProjectExtension(project), "build"), '/'));
|
||||
ss.WriteLine(" target=\"doc\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build");
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning NAnt build files for", solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode solution in kern.Solutions)
|
||||
{
|
||||
WriteCombine(solution);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode sol in kern.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "nant";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("sharpdev2")]
|
||||
public class SharpDevelop2Target : VS2005Target
|
||||
{
|
||||
#region Properties
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "SharpDevelop2";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public override void Write(Kernel kern)
|
||||
{
|
||||
base.Write(kern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public override void Clean(Kernel kern)
|
||||
{
|
||||
base.Clean(kern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "sharpdev2";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,425 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("sharpdev")]
|
||||
public class SharpDevelopTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static string PrependPath(string path)
|
||||
{
|
||||
string tmpPath = Helper.NormalizePath(path, '/');
|
||||
Regex regex = new Regex(@"(\w):/(\w+)");
|
||||
Match match = regex.Match(tmpPath);
|
||||
if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
|
||||
{
|
||||
tmpPath = Helper.NormalizePath(tmpPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpPath = Helper.NormalizePath("./" + tmpPath);
|
||||
}
|
||||
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
private static string BuildReference(SolutionNode solution, ReferenceNode refr)
|
||||
{
|
||||
string ret = "<Reference type=\"";
|
||||
if(solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ret += "Project\" refto=\"" + refr.Name;
|
||||
ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectNode project = (ProjectNode)refr.Parent;
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
|
||||
if(refr.Path != null || fileRef != null)
|
||||
{
|
||||
ret += "Assembly\" refto=\"";
|
||||
|
||||
string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
|
||||
|
||||
ret += finalPath;
|
||||
ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret += "Gac\" refto=\"";
|
||||
try
|
||||
{
|
||||
//Assembly assem = Assembly.Load(refr.Name);
|
||||
ret += refr.Name;// assem.FullName;
|
||||
}
|
||||
catch (System.NullReferenceException e)
|
||||
{
|
||||
e.ToString();
|
||||
ret += refr.Name;
|
||||
}
|
||||
ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach(ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
|
||||
|
||||
if(File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
|
||||
{
|
||||
if( conf == null )
|
||||
{
|
||||
throw new ArgumentNullException("conf");
|
||||
}
|
||||
if( project == null )
|
||||
{
|
||||
throw new ArgumentNullException("project");
|
||||
}
|
||||
string docFile = (string)conf.Options["XmlDocFile"];
|
||||
if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
|
||||
{
|
||||
return "False";
|
||||
}
|
||||
return "True";
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
string csComp = "Csc";
|
||||
string netRuntime = "MsNet";
|
||||
if(project.Runtime == ClrRuntime.Mono)
|
||||
{
|
||||
csComp = "Mcs";
|
||||
netRuntime = "Mono";
|
||||
}
|
||||
|
||||
string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
|
||||
StreamWriter ss = new StreamWriter(projFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
|
||||
|
||||
using(ss)
|
||||
{
|
||||
ss.WriteLine(
|
||||
"<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">",
|
||||
project.Name,
|
||||
project.RootNamespace
|
||||
);
|
||||
|
||||
ss.WriteLine(" <Contents>");
|
||||
foreach(string file in project.Files)
|
||||
{
|
||||
string buildAction = "Compile";
|
||||
switch(project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.None:
|
||||
buildAction = "Nothing";
|
||||
break;
|
||||
|
||||
case BuildAction.Content:
|
||||
buildAction = "Exclude";
|
||||
break;
|
||||
|
||||
case BuildAction.EmbeddedResource:
|
||||
buildAction = "EmbedAsResource";
|
||||
break;
|
||||
|
||||
default:
|
||||
buildAction = "Compile";
|
||||
break;
|
||||
}
|
||||
|
||||
// Sort of a hack, we try and resolve the path and make it relative, if we can.
|
||||
string filePath = PrependPath(file);
|
||||
ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
|
||||
}
|
||||
ss.WriteLine(" </Contents>");
|
||||
|
||||
ss.WriteLine(" <References>");
|
||||
foreach(ReferenceNode refr in project.References)
|
||||
{
|
||||
ss.WriteLine(" {0}", BuildReference(solution, refr));
|
||||
}
|
||||
ss.WriteLine(" </References>");
|
||||
|
||||
ss.Write(" <DeploymentInformation");
|
||||
ss.Write(" target=\"\"");
|
||||
ss.Write(" script=\"\"");
|
||||
ss.Write(" strategy=\"File\"");
|
||||
ss.WriteLine(" />");
|
||||
|
||||
int count = 0;
|
||||
|
||||
ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
|
||||
|
||||
foreach(ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" <Configuration");
|
||||
ss.Write(" runwithwarnings=\"True\"");
|
||||
ss.Write(" name=\"{0}\"", conf.Name);
|
||||
ss.WriteLine(">");
|
||||
ss.Write(" <CodeGeneration");
|
||||
ss.Write(" runtime=\"{0}\"", netRuntime);
|
||||
ss.Write(" compiler=\"{0}\"", csComp);
|
||||
ss.Write(" compilerversion=\"\"");
|
||||
ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
|
||||
ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
|
||||
ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
|
||||
ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
|
||||
ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
|
||||
ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
|
||||
ss.Write(" mainclass=\"{0}\"", project.StartupObject);
|
||||
ss.Write(" target=\"{0}\"", project.Type);
|
||||
ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
|
||||
ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
|
||||
ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon));
|
||||
ss.Write(" noconfig=\"{0}\"", "False");
|
||||
ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
|
||||
ss.WriteLine(" />");
|
||||
|
||||
ss.Write(" <Execution");
|
||||
ss.Write(" commandlineparameters=\"\"");
|
||||
ss.Write(" consolepause=\"True\"");
|
||||
ss.WriteLine(" />");
|
||||
|
||||
ss.Write(" <Output");
|
||||
ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString()));
|
||||
ss.Write(" assembly=\"{0}\"", project.AssemblyName);
|
||||
ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
|
||||
if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
|
||||
}
|
||||
if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
|
||||
}
|
||||
ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
|
||||
ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
|
||||
ss.WriteLine(" />");
|
||||
ss.WriteLine(" </Configuration>");
|
||||
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </Configurations>");
|
||||
ss.WriteLine("</Project>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void WriteCombine(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating SharpDevelop combine and project files");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(m_Kernel.AllowProject(project.FilterGroups))
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
|
||||
StreamWriter ss = new StreamWriter(combFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
|
||||
|
||||
using(ss)
|
||||
{
|
||||
ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name);
|
||||
|
||||
int count = 0;
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(count == 0)
|
||||
ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
|
||||
|
||||
ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name);
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </StartMode>");
|
||||
|
||||
ss.WriteLine(" <Entries>");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.WriteLine(" <Entry filename=\"{0}\" />",
|
||||
Helper.MakeFilePath(path, project.Name, "prjx"));
|
||||
}
|
||||
ss.WriteLine(" </Entries>");
|
||||
|
||||
count = 0;
|
||||
foreach(ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
if(count == 0)
|
||||
{
|
||||
ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
|
||||
}
|
||||
|
||||
ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name);
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name);
|
||||
}
|
||||
ss.WriteLine(" </Configuration>");
|
||||
|
||||
count++;
|
||||
}
|
||||
ss.WriteLine(" </Configurations>");
|
||||
ss.WriteLine("</Combine>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode solution in kern.Solutions)
|
||||
{
|
||||
WriteCombine(solution);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode sol in kern.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "sharpdev";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,197 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public struct ToolInfo
|
||||
{
|
||||
string name;
|
||||
string guid;
|
||||
string fileExtension;
|
||||
string xmlTag;
|
||||
string importProject;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GUID.
|
||||
/// </summary>
|
||||
/// <value>The GUID.</value>
|
||||
public string Guid
|
||||
{
|
||||
get
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
set
|
||||
{
|
||||
guid = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the file extension.
|
||||
/// </summary>
|
||||
/// <value>The file extension.</value>
|
||||
public string FileExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
return fileExtension;
|
||||
}
|
||||
set
|
||||
{
|
||||
fileExtension = value;
|
||||
}
|
||||
}
|
||||
public string LanguageExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (this.Name)
|
||||
{
|
||||
case "C#":
|
||||
return ".cs";
|
||||
case "VisualBasic":
|
||||
return ".vb";
|
||||
case "Boo":
|
||||
return ".boo";
|
||||
default:
|
||||
return ".cs";
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the XML tag.
|
||||
/// </summary>
|
||||
/// <value>The XML tag.</value>
|
||||
public string XmlTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return xmlTag;
|
||||
}
|
||||
set
|
||||
{
|
||||
xmlTag = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the import project property.
|
||||
/// </summary>
|
||||
/// <value>The ImportProject tag.</value>
|
||||
public string ImportProject
|
||||
{
|
||||
get
|
||||
{
|
||||
return importProject;
|
||||
}
|
||||
set
|
||||
{
|
||||
importProject = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ToolInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="guid">The GUID.</param>
|
||||
/// <param name="fileExtension">The file extension.</param>
|
||||
/// <param name="xml">The XML.</param>
|
||||
/// <param name="importProject">The import project.</param>
|
||||
public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject)
|
||||
{
|
||||
this.name = name;
|
||||
this.guid = guid;
|
||||
this.fileExtension = fileExtension;
|
||||
this.xmlTag = xml;
|
||||
this.importProject = importProject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ToolInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="guid">The GUID.</param>
|
||||
/// <param name="fileExtension">The file extension.</param>
|
||||
/// <param name="xml">The XML.</param>
|
||||
public ToolInfo(string name, string guid, string fileExtension, string xml)
|
||||
{
|
||||
this.name = name;
|
||||
this.guid = guid;
|
||||
this.fileExtension = fileExtension;
|
||||
this.xmlTag = xml;
|
||||
this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals operator
|
||||
/// </summary>
|
||||
/// <param name="obj">ToolInfo to compare</param>
|
||||
/// <returns>true if toolInfos are equal</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new ArgumentNullException("obj");
|
||||
}
|
||||
if (obj.GetType() != typeof(ToolInfo))
|
||||
return false;
|
||||
|
||||
ToolInfo c = (ToolInfo)obj;
|
||||
return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals operator
|
||||
/// </summary>
|
||||
/// <param name="c1">ToolInfo to compare</param>
|
||||
/// <param name="c2">ToolInfo to compare</param>
|
||||
/// <returns>True if toolInfos are equal</returns>
|
||||
public static bool operator ==(ToolInfo c1, ToolInfo c2)
|
||||
{
|
||||
return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not equals operator
|
||||
/// </summary>
|
||||
/// <param name="c1">ToolInfo to compare</param>
|
||||
/// <param name="c2">ToolInfo to compare</param>
|
||||
/// <returns>True if toolInfos are not equal</returns>
|
||||
public static bool operator !=(ToolInfo c1, ToolInfo c2)
|
||||
{
|
||||
return !(c1 == c2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hash Code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2002")]
|
||||
public class VS2002Target : VS2003Target
|
||||
{
|
||||
#region Private Methods
|
||||
|
||||
private void SetVS2002()
|
||||
{
|
||||
this.SolutionVersion = "7.00";
|
||||
this.ProductVersion = "7.0.9254";
|
||||
this.SchemaVersion = "1.0";
|
||||
this.VersionName = "2002";
|
||||
this.Version = VSVersion.VS70;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public override void Write(Kernel kern)
|
||||
{
|
||||
SetVS2002();
|
||||
base.Write(kern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public override void Clean(Kernel kern)
|
||||
{
|
||||
SetVS2002();
|
||||
base.Clean(kern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "vs2002";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,593 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
[Target("vs2003")]
|
||||
public class VS2003Target : ITarget
|
||||
{
|
||||
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "8.00";
|
||||
string productVersion = "7.10.3077";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "2003";
|
||||
VSVersion version = VSVersion.VS71;
|
||||
|
||||
readonly Dictionary<string, ToolInfo> m_Tools = new Dictionary<string, ToolInfo>();
|
||||
Kernel m_Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
protected string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
solutionVersion = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
protected string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
productVersion = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
protected string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
schemaVersion = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
protected string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
set
|
||||
{
|
||||
versionName = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
protected VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
set
|
||||
{
|
||||
version = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2003Target"/> class.
|
||||
/// </summary>
|
||||
public VS2003Target()
|
||||
{
|
||||
m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP");
|
||||
m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string MakeRefPath(ProjectNode project)
|
||||
{
|
||||
string ret = "";
|
||||
foreach(ReferencePathNode node in project.ReferencePaths)
|
||||
{
|
||||
try
|
||||
{
|
||||
string fullPath = Helper.ResolvePath(node.Path);
|
||||
if(ret.Length < 1)
|
||||
{
|
||||
ret = fullPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += ";" + fullPath;
|
||||
}
|
||||
}
|
||||
catch(ArgumentException)
|
||||
{
|
||||
m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
if(!m_Tools.ContainsKey(project.Language))
|
||||
{
|
||||
throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
|
||||
}
|
||||
|
||||
ToolInfo toolInfo = m_Tools[project.Language];
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
|
||||
StreamWriter ps = new StreamWriter(projectFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
|
||||
|
||||
using(ps)
|
||||
{
|
||||
ps.WriteLine("<VisualStudioProject>");
|
||||
ps.WriteLine(" <{0}", toolInfo.XmlTag);
|
||||
ps.WriteLine("\t\t\t\tProjectType = \"Local\"");
|
||||
ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", ProductVersion);
|
||||
ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", SchemaVersion);
|
||||
ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper());
|
||||
ps.WriteLine("\t\t>");
|
||||
|
||||
ps.WriteLine("\t\t\t\t<Build>");
|
||||
ps.WriteLine(" <Settings");
|
||||
ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon);
|
||||
ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\"");
|
||||
ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName);
|
||||
ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\"");
|
||||
ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\"");
|
||||
ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\"");
|
||||
ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\"");
|
||||
ps.WriteLine("\t\t\t\t DelaySign = \"false\"");
|
||||
|
||||
if(Version == VSVersion.VS70)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\"");
|
||||
}
|
||||
|
||||
ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type);
|
||||
|
||||
foreach(ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]);
|
||||
}
|
||||
if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]);
|
||||
}
|
||||
if (conf.Options["RunPostBuildEvent"] == null)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess");
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace);
|
||||
ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject);
|
||||
ps.WriteLine("\t\t >");
|
||||
|
||||
foreach(ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t <Config");
|
||||
ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name);
|
||||
ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower());
|
||||
ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]);
|
||||
ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower());
|
||||
ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\"");
|
||||
ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]);
|
||||
ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name
|
||||
ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower());
|
||||
ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]);
|
||||
ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower());
|
||||
|
||||
if(Version == VSVersion.VS71)
|
||||
{
|
||||
ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower());
|
||||
ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower());
|
||||
}
|
||||
|
||||
ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower());
|
||||
ps.WriteLine(" OutputPath = \"{0}\"",
|
||||
Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
|
||||
ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower());
|
||||
ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower());
|
||||
ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower());
|
||||
ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]);
|
||||
ps.WriteLine(" />");
|
||||
}
|
||||
|
||||
ps.WriteLine(" </Settings>");
|
||||
|
||||
ps.WriteLine(" <References>");
|
||||
foreach(ReferenceNode refr in project.References)
|
||||
{
|
||||
ps.WriteLine(" <Reference");
|
||||
ps.WriteLine(" Name = \"{0}\"", refr.Name);
|
||||
ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name);
|
||||
|
||||
if(solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode refProject = solution.ProjectsTable[refr.Name];
|
||||
ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper());
|
||||
ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToUpper());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(refr.Path != null)
|
||||
{
|
||||
ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(refr.LocalCopySpecified)
|
||||
{
|
||||
ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy);
|
||||
}
|
||||
|
||||
ps.WriteLine(" />");
|
||||
}
|
||||
ps.WriteLine(" </References>");
|
||||
|
||||
ps.WriteLine(" </Build>");
|
||||
ps.WriteLine(" <Files>");
|
||||
|
||||
ps.WriteLine(" <Include>");
|
||||
|
||||
foreach(string file in project.Files)
|
||||
{
|
||||
string fileName = file.Replace(".\\", "");
|
||||
ps.WriteLine(" <File");
|
||||
ps.WriteLine(" RelPath = \"{0}\"", fileName);
|
||||
ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file));
|
||||
ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file));
|
||||
ps.WriteLine(" />");
|
||||
|
||||
if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
|
||||
{
|
||||
ps.WriteLine(" <File");
|
||||
ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx");
|
||||
int slash = fileName.LastIndexOf('\\');
|
||||
if (slash == -1)
|
||||
{
|
||||
ps.WriteLine(" DependentUpon = \"{0}\"", fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1));
|
||||
}
|
||||
ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource");
|
||||
ps.WriteLine(" />");
|
||||
|
||||
}
|
||||
}
|
||||
ps.WriteLine(" </Include>");
|
||||
|
||||
ps.WriteLine(" </Files>");
|
||||
ps.WriteLine(" </{0}>", toolInfo.XmlTag);
|
||||
ps.WriteLine("</VisualStudioProject>");
|
||||
}
|
||||
|
||||
ps = new StreamWriter(projectFile + ".user");
|
||||
using(ps)
|
||||
{
|
||||
ps.WriteLine("<VisualStudioProject>");
|
||||
ps.WriteLine(" <{0}>", toolInfo.XmlTag);
|
||||
ps.WriteLine(" <Build>");
|
||||
|
||||
ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
|
||||
foreach(ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ps.WriteLine(" <Config");
|
||||
ps.WriteLine(" Name = \"{0}\"", conf.Name);
|
||||
ps.WriteLine(" />");
|
||||
}
|
||||
ps.WriteLine(" </Settings>");
|
||||
|
||||
ps.WriteLine(" </Build>");
|
||||
ps.WriteLine(" </{0}>", toolInfo.XmlTag);
|
||||
ps.WriteLine("</VisualStudioProject>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
|
||||
{
|
||||
if( conf == null )
|
||||
{
|
||||
throw new ArgumentNullException("conf");
|
||||
}
|
||||
if( project == null )
|
||||
{
|
||||
throw new ArgumentNullException("project");
|
||||
}
|
||||
// if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false
|
||||
// {
|
||||
// return string.Empty;
|
||||
// }
|
||||
|
||||
//default to "AssemblyName.xml"
|
||||
//string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
|
||||
//return (string)conf.Options["XmlDocFile", defaultValue];
|
||||
|
||||
//default to no XmlDocFile file
|
||||
return (string)conf.Options["XmlDocFile", ""];
|
||||
}
|
||||
|
||||
private void WriteSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", VersionName);
|
||||
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(m_Kernel.AllowProject(project.FilterGroups))
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
|
||||
StreamWriter ss = new StreamWriter(solutionFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
|
||||
|
||||
using(ss)
|
||||
{
|
||||
ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion);
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
if(!m_Tools.ContainsKey(project.Language))
|
||||
{
|
||||
throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
|
||||
}
|
||||
|
||||
ToolInfo toolInfo = m_Tools[project.Language];
|
||||
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
|
||||
toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
|
||||
toolInfo.FileExtension), project.Guid.ToString().ToUpper());
|
||||
|
||||
ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject");
|
||||
ss.WriteLine("\tEndProjectSection");
|
||||
|
||||
ss.WriteLine("EndProject");
|
||||
}
|
||||
|
||||
ss.WriteLine("Global");
|
||||
|
||||
ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution");
|
||||
foreach(ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
ss.WriteLine("\t\t{0} = {0}", conf.Name);
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
for(int i = 0; i < project.References.Count; i++)
|
||||
{
|
||||
ReferenceNode refr = project.References[i];
|
||||
if(solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode refProject = solution.ProjectsTable[refr.Name];
|
||||
ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})",
|
||||
project.Guid.ToString().ToUpper()
|
||||
, i,
|
||||
refProject.Guid.ToString().ToUpper()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution");
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
foreach(ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET",
|
||||
project.Guid.ToString().ToUpper(),
|
||||
conf.Name);
|
||||
|
||||
ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET",
|
||||
project.Guid.ToString().ToUpper(),
|
||||
conf.Name);
|
||||
}
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
if(solution.Files != null)
|
||||
{
|
||||
ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution");
|
||||
foreach(string file in solution.Files)
|
||||
{
|
||||
ss.WriteLine("\t\t{0} = {0}", file);
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
}
|
||||
|
||||
ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution");
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution");
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
ss.WriteLine("EndGlobal");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
|
||||
ToolInfo toolInfo = m_Tools[project.Language];
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
|
||||
string userFile = projectFile + ".user";
|
||||
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
Helper.DeleteIfExists(userFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", VersionName, solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
|
||||
string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
|
||||
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
Helper.DeleteIfExists(suoFile);
|
||||
|
||||
foreach(ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Write(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode sol in m_Kernel.Solutions)
|
||||
{
|
||||
WriteSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if( kern == null )
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach(SolutionNode sol in m_Kernel.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "vs2003";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2005")]
|
||||
public class VS2005Target : VSGenericTarget
|
||||
{
|
||||
#region Inner Classes
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "9.00";
|
||||
string productVersion = "8.0.50727";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual C# 2005";
|
||||
string name = "vs2005";
|
||||
|
||||
VSVersion version = VSVersion.VS80;
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 2005"; }
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||
/// </summary>
|
||||
public VS2005Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2008")]
|
||||
public class VS2008Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
string solutionVersion = "10.00";
|
||||
string productVersion = "9.0.21022";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 2008";
|
||||
string name = "vs2008";
|
||||
VSVersion version = VSVersion.VS90;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"3.5\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 2008"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||
/// </summary>
|
||||
public VS2008Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2010")]
|
||||
public class VS2010Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "11.00";
|
||||
string productVersion = "9.0.30729";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 2010";
|
||||
string name = "vs2010";
|
||||
VSVersion version = VSVersion.VS10;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v4_5_1:
|
||||
case FrameworkVersion.v4_5:
|
||||
case FrameworkVersion.v4_0:
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"4.0\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 2010"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||
/// </summary>
|
||||
public VS2010Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
using System;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Nodes;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2012")]
|
||||
public class VS2012Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "12.00";
|
||||
string productVersion = "11.0.61030.0";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 2012";
|
||||
string name = "vs2012";
|
||||
VSVersion version = VSVersion.VS11;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v4_7_1:
|
||||
case FrameworkVersion.v4_7:
|
||||
case FrameworkVersion.v4_6_2:
|
||||
case FrameworkVersion.v4_6_1:
|
||||
case FrameworkVersion.v4_6:
|
||||
return "ToolsVersion=\"14.0\"";
|
||||
case FrameworkVersion.v4_5_1:
|
||||
case FrameworkVersion.v4_5:
|
||||
case FrameworkVersion.v4_0:
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"4.0\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 2012"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||
/// </summary>
|
||||
public VS2012Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,139 +0,0 @@
|
|||
using System;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Nodes;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2013")]
|
||||
public class VS2013Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "12.00";
|
||||
string productVersion = "12.0.31101";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 2013";
|
||||
string name = "vs2013";
|
||||
VSVersion version = VSVersion.VS12;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v4_6_1:
|
||||
case FrameworkVersion.v4_6:
|
||||
return "ToolsVersion=\"14.0\"";
|
||||
case FrameworkVersion.v4_5_1:
|
||||
case FrameworkVersion.v4_5:
|
||||
return "ToolsVersion=\"12.0\"";
|
||||
case FrameworkVersion.v4_0:
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"4.0\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 2013"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||
/// </summary>
|
||||
public VS2013Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2015")]
|
||||
public class VS2015Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "12.00";
|
||||
string productVersion = "14.0.23107.0";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 14";
|
||||
string name = "vs2015";
|
||||
VSVersion version = VSVersion.VS15;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v4_8:
|
||||
case FrameworkVersion.v4_7_2:
|
||||
case FrameworkVersion.v4_7_1:
|
||||
case FrameworkVersion.v4_7:
|
||||
case FrameworkVersion.v4_6_2:
|
||||
case FrameworkVersion.v4_6_1:
|
||||
case FrameworkVersion.v4_6:
|
||||
return "ToolsVersion=\"14.0\"";
|
||||
case FrameworkVersion.v4_5_2:
|
||||
return "ToolsVersion=\"12.0\"";
|
||||
case FrameworkVersion.v4_5_1:
|
||||
case FrameworkVersion.v4_5:
|
||||
case FrameworkVersion.v4_0:
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"4.0\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 14"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2012Target"/> class.
|
||||
/// </summary>
|
||||
public VS2015Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("vs2019")]
|
||||
public class VS2019Target : VSGenericTarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
string solutionVersion = "12.00";
|
||||
string productVersion = "16.7.3";
|
||||
string schemaVersion = "2.0";
|
||||
string versionName = "Visual Studio 19";
|
||||
string name = "vs2019";
|
||||
VSVersion version = VSVersion.VS19;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public override string SolutionVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return solutionVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public override string ProductVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return productVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public override string SchemaVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemaVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public override string VersionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return versionName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public override VSVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||
{
|
||||
switch (frameworkVersion)
|
||||
{
|
||||
case FrameworkVersion.v4_8:
|
||||
case FrameworkVersion.v4_7_2:
|
||||
return "ToolsVersion=\"16.0\"";
|
||||
case FrameworkVersion.v4_7_1:
|
||||
case FrameworkVersion.v4_7:
|
||||
return "ToolsVersion=\"15.0\"";
|
||||
case FrameworkVersion.v4_6_2:
|
||||
case FrameworkVersion.v4_6_1:
|
||||
case FrameworkVersion.v4_6:
|
||||
return "ToolsVersion=\"14.0\"";
|
||||
case FrameworkVersion.v4_5_2:
|
||||
return "ToolsVersion=\"12.0\"";
|
||||
case FrameworkVersion.v4_5_1:
|
||||
case FrameworkVersion.v4_5:
|
||||
case FrameworkVersion.v4_0:
|
||||
case FrameworkVersion.v3_5:
|
||||
return "ToolsVersion=\"4.0\"";
|
||||
case FrameworkVersion.v3_0:
|
||||
return "ToolsVersion=\"3.0\"";
|
||||
default:
|
||||
return "ToolsVersion=\"2.0\"";
|
||||
}
|
||||
}
|
||||
|
||||
public override string SolutionTag
|
||||
{
|
||||
get { return "# Visual Studio 19"; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VS2012Target"/> class.
|
||||
/// </summary>
|
||||
public VS2019Target()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,979 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2008 Matthew Holmes (matthew@wildfiregames.com), John Anderson (sontek@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public abstract class VSGenericTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
readonly Dictionary<string, ToolInfo> tools = new Dictionary<string, ToolInfo>();
|
||||
// NameValueCollection CopyFiles = new NameValueCollection();
|
||||
Kernel kernel;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Gets or sets the solution version.
|
||||
/// </summary>
|
||||
/// <value>The solution version.</value>
|
||||
public abstract string SolutionVersion { get; }
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
/// <value>The product version.</value>
|
||||
public abstract string ProductVersion { get; }
|
||||
/// <summary>
|
||||
/// Gets or sets the schema version.
|
||||
/// </summary>
|
||||
/// <value>The schema version.</value>
|
||||
public abstract string SchemaVersion { get; }
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
/// <value>The name of the version.</value>
|
||||
public abstract string VersionName { get; }
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public abstract VSVersion Version { get; }
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public abstract string Name { get; }
|
||||
|
||||
protected abstract string GetToolsVersionXml(FrameworkVersion version);
|
||||
public abstract string SolutionTag { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VSGenericTarget"/> class.
|
||||
/// </summary>
|
||||
protected VSGenericTarget()
|
||||
{
|
||||
tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSharp.targets");
|
||||
tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN");
|
||||
tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets");
|
||||
tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets");
|
||||
tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string MakeRefPath(ProjectNode project)
|
||||
{
|
||||
string ret = "";
|
||||
foreach (ReferencePathNode node in project.ReferencePaths)
|
||||
{
|
||||
try
|
||||
{
|
||||
string fullPath = Helper.ResolvePath(node.Path);
|
||||
if (ret.Length < 1)
|
||||
{
|
||||
ret = fullPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += ";" + fullPath;
|
||||
}
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static ProjectNode FindProjectInSolution(string name, SolutionNode solution)
|
||||
{
|
||||
SolutionNode node = solution;
|
||||
|
||||
while (node.Parent is SolutionNode)
|
||||
node = node.Parent as SolutionNode;
|
||||
|
||||
return FindProjectInSolutionRecursively(name, node);
|
||||
}
|
||||
|
||||
private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution)
|
||||
{
|
||||
if (solution.ProjectsTable.ContainsKey(name))
|
||||
return solution.ProjectsTable[name];
|
||||
|
||||
foreach (SolutionNode child in solution.Solutions)
|
||||
{
|
||||
ProjectNode node = FindProjectInSolutionRecursively(name, child);
|
||||
if (node != null)
|
||||
return node;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
if (!tools.ContainsKey(project.Language))
|
||||
{
|
||||
throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
|
||||
}
|
||||
|
||||
ToolInfo toolInfo = tools[project.Language];
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
|
||||
StreamWriter ps = new StreamWriter(projectFile);
|
||||
|
||||
kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
|
||||
|
||||
#region Project File
|
||||
using (ps)
|
||||
{
|
||||
string targets = "";
|
||||
|
||||
if(project.Files.CopyFiles > 0)
|
||||
targets = "Build;CopyFiles";
|
||||
else
|
||||
targets = "Build";
|
||||
|
||||
ps.WriteLine("<Project DefaultTargets=\"{0}\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" {1}>", targets, GetToolsVersionXml(project.FrameworkVersion));
|
||||
ps.WriteLine(" <PropertyGroup>");
|
||||
ps.WriteLine(" <ProjectType>Local</ProjectType>");
|
||||
ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", ProductVersion);
|
||||
ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", SchemaVersion);
|
||||
ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper());
|
||||
|
||||
// Visual Studio has a hard coded guid for the project type
|
||||
if (project.Type == ProjectType.Web)
|
||||
ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>");
|
||||
ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
|
||||
ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon);
|
||||
ps.WriteLine(" <AssemblyKeyContainerName>");
|
||||
ps.WriteLine(" </AssemblyKeyContainerName>");
|
||||
ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName);
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (conf.Options.KeyFile != "")
|
||||
{
|
||||
ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile);
|
||||
ps.WriteLine(" <SignAssembly>true</SignAssembly>");
|
||||
break;
|
||||
}
|
||||
}
|
||||
ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>");
|
||||
ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>");
|
||||
ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>");
|
||||
ps.WriteLine(" <DelaySign>false</DelaySign>");
|
||||
ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", "."));
|
||||
|
||||
ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString());
|
||||
ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder);
|
||||
ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace);
|
||||
ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject);
|
||||
if (string.IsNullOrEmpty(project.DebugStartParameters))
|
||||
{
|
||||
ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters);
|
||||
}
|
||||
ps.WriteLine(" <FileUpgradeFlags>");
|
||||
ps.WriteLine(" </FileUpgradeFlags>");
|
||||
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
if (!string.IsNullOrEmpty(project.ApplicationManifest))
|
||||
{
|
||||
ps.WriteLine(" <PropertyGroup>");
|
||||
ps.WriteLine(" <ApplicationManifest>" + project.ApplicationManifest + "</ApplicationManifest>");
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ps.Write(" <PropertyGroup ");
|
||||
ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|{1}' \">", conf.Name, conf.Platform);
|
||||
ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]);
|
||||
ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]);
|
||||
ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]);
|
||||
ps.WriteLine(" <ConfigurationOverrideFile>");
|
||||
ps.WriteLine(" </ConfigurationOverrideFile>");
|
||||
ps.WriteLine(" <DefineConstants>{0}</DefineConstants>",
|
||||
conf.Options["CompilerDefines"].ToString() == "" ? this.kernel.ForcedConditionals : conf.Options["CompilerDefines"] + ";" + kernel.ForcedConditionals);
|
||||
ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString()));
|
||||
ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
|
||||
ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
|
||||
ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]);
|
||||
if (project.Type != ProjectType.Web)
|
||||
ps.WriteLine(" <OutputPath>{0}</OutputPath>",
|
||||
Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
|
||||
else
|
||||
ps.WriteLine(" <OutputPath>{0}</OutputPath>",
|
||||
Helper.EndPath(Helper.NormalizePath("bin\\")));
|
||||
|
||||
ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]);
|
||||
ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]);
|
||||
ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]);
|
||||
ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]);
|
||||
ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]);
|
||||
ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]);
|
||||
ps.WriteLine(" <PlatformTarget>{0}</PlatformTarget>", conf.Platform);
|
||||
ps.WriteLine(" <Prefer32Bit>{0}</Prefer32Bit>",conf.Options["Prefer32Bit"]);
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
}
|
||||
|
||||
//ps.WriteLine(" </Settings>");
|
||||
|
||||
Dictionary<ReferenceNode, ProjectNode> projectReferences = new Dictionary<ReferenceNode, ProjectNode>();
|
||||
List<ReferenceNode> otherReferences = new List<ReferenceNode>();
|
||||
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
ProjectNode projectNode = FindProjectInSolution(refr.Name, solution);
|
||||
|
||||
if (projectNode == null)
|
||||
otherReferences.Add(refr);
|
||||
else
|
||||
projectReferences.Add(refr, projectNode);
|
||||
}
|
||||
// Assembly References
|
||||
ps.WriteLine(" <ItemGroup>");
|
||||
|
||||
foreach (ReferenceNode refr in otherReferences)
|
||||
{
|
||||
ps.Write(" <Reference");
|
||||
ps.Write(" Include=\"");
|
||||
ps.Write(refr.Name);
|
||||
ps.WriteLine("\" >");
|
||||
ps.Write(" <Name>");
|
||||
ps.Write(refr.Name);
|
||||
ps.WriteLine("</Name>");
|
||||
|
||||
if(!String.IsNullOrEmpty(refr.Path))
|
||||
{
|
||||
// Use absolute path to assembly (for determining assembly type)
|
||||
string absolutePath = Path.Combine(project.FullPath, refr.Path);
|
||||
if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) {
|
||||
// Assembly is an executable (exe)
|
||||
ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "exe"));
|
||||
} else if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) {
|
||||
// Assembly is an library (dll)
|
||||
ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
|
||||
} else {
|
||||
string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll");
|
||||
kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath);
|
||||
ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
|
||||
}
|
||||
}
|
||||
|
||||
ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy);
|
||||
ps.WriteLine(" </Reference>");
|
||||
}
|
||||
ps.WriteLine(" </ItemGroup>");
|
||||
|
||||
//Project References
|
||||
ps.WriteLine(" <ItemGroup>");
|
||||
foreach (KeyValuePair<ReferenceNode, ProjectNode> pair in projectReferences)
|
||||
{
|
||||
ToolInfo tool = tools[pair.Value.Language];
|
||||
if (tools == null)
|
||||
throw new UnknownLanguageException();
|
||||
|
||||
string path =
|
||||
Helper.MakePathRelativeTo(project.FullPath,
|
||||
Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension));
|
||||
ps.WriteLine(" <ProjectReference Include=\"{0}\">", path);
|
||||
|
||||
// TODO: Allow reference to visual basic projects
|
||||
ps.WriteLine(" <Name>{0}</Name>", pair.Value.Name);
|
||||
ps.WriteLine(" <Project>{0}</Project>", pair.Value.Guid.ToString("B").ToUpper());
|
||||
ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper());
|
||||
|
||||
//This is the Copy Local flag in VS
|
||||
ps.WriteLine(" <Private>{0}</Private>", pair.Key.LocalCopy);
|
||||
|
||||
ps.WriteLine(" </ProjectReference>");
|
||||
}
|
||||
ps.WriteLine(" </ItemGroup>");
|
||||
|
||||
// ps.WriteLine(" </Build>");
|
||||
ps.WriteLine(" <ItemGroup>");
|
||||
|
||||
// ps.WriteLine(" <Include>");
|
||||
List<string> list = new List<string>();
|
||||
|
||||
foreach (string path in project.Files)
|
||||
{
|
||||
string lower = path.ToLower();
|
||||
if (lower.EndsWith(".resx"))
|
||||
{
|
||||
string codebehind = String.Format("{0}.Designer{1}", path.Substring(0, path.LastIndexOf('.')), toolInfo.LanguageExtension);
|
||||
if (!list.Contains(codebehind))
|
||||
list.Add(codebehind);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach (string filePath in project.Files)
|
||||
{
|
||||
// Add the filePath with the destination as the key
|
||||
// will use it later to form the copy parameters with Include lists
|
||||
// for each destination
|
||||
if (project.Files.GetBuildAction(filePath) == BuildAction.Copy)
|
||||
continue;
|
||||
// if (file == "Properties\\Bind.Designer.cs")
|
||||
// {
|
||||
// Console.WriteLine("Wait a minute!");
|
||||
// Console.WriteLine(project.Files.GetSubType(file).ToString());
|
||||
// }
|
||||
SubType subType = project.Files.GetSubType(filePath);
|
||||
|
||||
// Visual Studio chokes on file names if forward slash is used as a path separator
|
||||
// instead of backslash. So we must make sure that all file paths written to the
|
||||
// project file use \ as a path separator.
|
||||
string file = filePath.Replace(@"/", @"\");
|
||||
|
||||
if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer
|
||||
&& subType != SubType.CodeBehind)
|
||||
{
|
||||
ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file));
|
||||
ps.WriteLine(" <SubType>Designer</SubType>");
|
||||
ps.WriteLine(" </EmbeddedResource>");
|
||||
//
|
||||
}
|
||||
|
||||
if (subType == SubType.Designer)
|
||||
{
|
||||
ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file);
|
||||
|
||||
string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs";
|
||||
string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs";
|
||||
|
||||
// Check for a parent .cs file with the same name as this designer file
|
||||
if (File.Exists(Helper.NormalizePath(dependent_name)))
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>");
|
||||
ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name));
|
||||
ps.WriteLine(" <SubType>" + subType + "</SubType>");
|
||||
}
|
||||
|
||||
ps.WriteLine(" </EmbeddedResource>");
|
||||
if (File.Exists(Helper.NormalizePath(autogen_name)))
|
||||
{
|
||||
ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name);
|
||||
//ps.WriteLine(" <DesignTime>True</DesignTime>");
|
||||
|
||||
// If a parent .cs file exists, link this autogen file to it. Otherwise link
|
||||
// to the designer file
|
||||
if (File.Exists(dependent_name))
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine(" <AutoGen>True</AutoGen>");
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(filePath));
|
||||
}
|
||||
|
||||
ps.WriteLine(" </Compile>");
|
||||
}
|
||||
list.Add(autogen_name);
|
||||
}
|
||||
if (subType == SubType.Settings)
|
||||
{
|
||||
ps.Write(" <{0} ", project.Files.GetBuildAction(filePath));
|
||||
ps.WriteLine("Include=\"{0}\">", file);
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (project.Files.GetBuildAction(filePath) == BuildAction.None)
|
||||
{
|
||||
ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>");
|
||||
ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
|
||||
}
|
||||
else
|
||||
{
|
||||
ps.WriteLine(" <SubType>Code</SubType>");
|
||||
ps.WriteLine(" <AutoGen>True</AutoGen>");
|
||||
ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
|
||||
string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
|
||||
string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings"));
|
||||
}
|
||||
ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath));
|
||||
}
|
||||
else if (subType != SubType.Designer)
|
||||
{
|
||||
string path = Helper.NormalizePath(file);
|
||||
string path_lower = path.ToLower();
|
||||
|
||||
if (!list.Contains(filePath))
|
||||
{
|
||||
ps.Write(" <{0} ", project.Files.GetBuildAction(filePath));
|
||||
|
||||
int startPos = 0;
|
||||
if (project.Files.GetPreservePath(filePath))
|
||||
{
|
||||
while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1)
|
||||
startPos++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
startPos = file.LastIndexOf(Path.GetFileName(path));
|
||||
}
|
||||
|
||||
// be sure to write out the path with backslashes so VS recognizes
|
||||
// the file properly.
|
||||
ps.WriteLine("Include=\"{0}\">", file);
|
||||
|
||||
int last_period_index = file.LastIndexOf('.');
|
||||
string short_file_name = (last_period_index >= 0)
|
||||
? file.Substring(0, last_period_index)
|
||||
: file;
|
||||
string extension = Path.GetExtension(path);
|
||||
// make this upper case, so that when File.Exists tests for the
|
||||
// existence of a designer file on a case-sensitive platform,
|
||||
// it is correctly identified.
|
||||
string designer_format = string.Format(".Designer{0}", extension);
|
||||
|
||||
if (path_lower.EndsWith(designer_format.ToLowerInvariant()))
|
||||
{
|
||||
int designer_index = path.IndexOf(designer_format);
|
||||
string file_name = path.Substring(0, designer_index);
|
||||
|
||||
// There are two corrections to the next lines:
|
||||
// 1. Fix the connection between a designer file and a form
|
||||
// or usercontrol that don't have an associated resx file.
|
||||
// 2. Connect settings files to associated designer files.
|
||||
if (File.Exists(file_name + extension))
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + extension));
|
||||
else if (File.Exists(file_name + ".resx"))
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx"));
|
||||
else if (File.Exists(file_name + ".settings"))
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".settings"));
|
||||
ps.WriteLine(" <AutoGen>True</AutoGen>");
|
||||
ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
|
||||
}
|
||||
}
|
||||
else if (subType == SubType.CodeBehind)
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name));
|
||||
}
|
||||
if (project.Files.GetIsLink(filePath))
|
||||
{
|
||||
string alias = project.Files.GetLinkPath(filePath);
|
||||
alias += file.Substring(startPos);
|
||||
alias = Helper.NormalizePath(alias);
|
||||
ps.WriteLine(" <Link>{0}</Link>", alias);
|
||||
}
|
||||
else if (project.Files.GetBuildAction(filePath) != BuildAction.None)
|
||||
{
|
||||
if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource)
|
||||
{
|
||||
ps.WriteLine(" <SubType>{0}</SubType>", subType);
|
||||
}
|
||||
}
|
||||
|
||||
if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never)
|
||||
{
|
||||
ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(filePath));
|
||||
}
|
||||
|
||||
ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath));
|
||||
}
|
||||
}
|
||||
}
|
||||
ps.WriteLine(" </ItemGroup>");
|
||||
|
||||
/*
|
||||
* Copy Task
|
||||
*
|
||||
*/
|
||||
if ( project.Files.CopyFiles > 0 ) {
|
||||
|
||||
Dictionary<string, string> IncludeTags = new Dictionary<string, string>();
|
||||
int TagCount = 0;
|
||||
|
||||
// Handle Copy tasks
|
||||
ps.WriteLine(" <ItemGroup>");
|
||||
foreach (string destPath in project.Files.Destinations)
|
||||
{
|
||||
string tag = "FilesToCopy_" + TagCount.ToString("0000");
|
||||
|
||||
ps.WriteLine(" <{0} Include=\"{1}\" />", tag, String.Join(";", project.Files.SourceFiles(destPath)));
|
||||
IncludeTags.Add(destPath, tag);
|
||||
TagCount++;
|
||||
}
|
||||
|
||||
ps.WriteLine(" </ItemGroup>");
|
||||
|
||||
ps.WriteLine(" <Target Name=\"CopyFiles\">");
|
||||
|
||||
foreach (string destPath in project.Files.Destinations)
|
||||
{
|
||||
ps.WriteLine(" <Copy SourceFiles=\"@({0})\" DestinationFolder=\"{1}\" />",
|
||||
IncludeTags[destPath], destPath);
|
||||
}
|
||||
|
||||
ps.WriteLine(" </Target>");
|
||||
}
|
||||
|
||||
ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />");
|
||||
ps.WriteLine(" <PropertyGroup>");
|
||||
ps.WriteLine(" <PreBuildEvent>");
|
||||
ps.WriteLine(" </PreBuildEvent>");
|
||||
ps.WriteLine(" <PostBuildEvent>");
|
||||
ps.WriteLine(" </PostBuildEvent>");
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
ps.WriteLine("</Project>");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region User File
|
||||
|
||||
ps = new StreamWriter(projectFile + ".user");
|
||||
using (ps)
|
||||
{
|
||||
// Get the first configuration from the project.
|
||||
ConfigurationNode firstConfiguration = null;
|
||||
|
||||
if (project.Configurations.Count > 0)
|
||||
{
|
||||
firstConfiguration = project.Configurations[0];
|
||||
}
|
||||
|
||||
ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
|
||||
//ps.WriteLine( "<VisualStudioProject>" );
|
||||
//ps.WriteLine(" <{0}>", toolInfo.XMLTag);
|
||||
//ps.WriteLine(" <Build>");
|
||||
ps.WriteLine(" <PropertyGroup>");
|
||||
//ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
|
||||
|
||||
if (firstConfiguration != null)
|
||||
{
|
||||
ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">{0}</Configuration>", firstConfiguration.Name);
|
||||
ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">{0}</Platform>", firstConfiguration.Platform);
|
||||
}
|
||||
|
||||
ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
|
||||
ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", ProductVersion);
|
||||
ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
|
||||
ps.WriteLine(" <ProjectTrust>0</ProjectTrust>");
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ps.Write(" <PropertyGroup");
|
||||
ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|{1}' \"", conf.Name, conf.Platform);
|
||||
ps.WriteLine(" />");
|
||||
}
|
||||
ps.WriteLine("</Project>");
|
||||
}
|
||||
#endregion
|
||||
|
||||
kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk)
|
||||
{
|
||||
kernel.Log.Write("Creating {0} solution and project files", VersionName);
|
||||
|
||||
foreach (SolutionNode child in solution.Solutions)
|
||||
{
|
||||
kernel.Log.Write("...Creating folder: {0}", child.Name);
|
||||
WriteSolution(child, false);
|
||||
}
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
|
||||
foreach (DatabaseProjectNode project in solution.DatabaseProjects)
|
||||
{
|
||||
kernel.Log.Write("...Creating database project: {0}", project.Name);
|
||||
WriteDatabaseProject(solution, project);
|
||||
}
|
||||
|
||||
if (writeSolutionToDisk) // only write main solution
|
||||
{
|
||||
kernel.Log.Write("");
|
||||
string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
|
||||
|
||||
using (StreamWriter ss = new StreamWriter(solutionFile))
|
||||
{
|
||||
kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
|
||||
|
||||
ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion);
|
||||
ss.WriteLine(SolutionTag);
|
||||
|
||||
WriteProjectDeclarations(ss, solution, solution);
|
||||
|
||||
ss.WriteLine("Global");
|
||||
|
||||
ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution");
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
ss.WriteLine("\t\t{0} = {0}", conf.NameAndPlatform);
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
ss.WriteLine("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution");
|
||||
WriteConfigurationLines(solution.Configurations, solution, ss);
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
|
||||
if (solution.Solutions.Count > 0)
|
||||
{
|
||||
ss.WriteLine("\tGlobalSection(NestedProjects) = preSolution");
|
||||
foreach (SolutionNode embeddedSolution in solution.Solutions)
|
||||
{
|
||||
WriteNestedProjectMap(ss, embeddedSolution);
|
||||
}
|
||||
ss.WriteLine("\tEndGlobalSection");
|
||||
}
|
||||
|
||||
ss.WriteLine("EndGlobal");
|
||||
}
|
||||
|
||||
kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteProjectDeclarations(TextWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution)
|
||||
{
|
||||
foreach (SolutionNode childSolution in embeddedSolution.Solutions)
|
||||
{
|
||||
WriteEmbeddedSolution(writer, childSolution);
|
||||
WriteProjectDeclarations(writer, actualSolution, childSolution);
|
||||
}
|
||||
|
||||
foreach (ProjectNode project in embeddedSolution.Projects)
|
||||
{
|
||||
WriteProject(actualSolution, writer, project);
|
||||
}
|
||||
|
||||
foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects)
|
||||
{
|
||||
WriteProject(actualSolution, writer, dbProject);
|
||||
}
|
||||
|
||||
if (actualSolution.Guid == embeddedSolution.Guid)
|
||||
{
|
||||
WriteSolutionFiles(actualSolution, writer);
|
||||
}
|
||||
}
|
||||
|
||||
private static void WriteNestedProjectMap(TextWriter writer, SolutionNode embeddedSolution)
|
||||
{
|
||||
foreach (ProjectNode project in embeddedSolution.Projects)
|
||||
{
|
||||
WriteNestedProject(writer, embeddedSolution, project.Guid);
|
||||
}
|
||||
|
||||
foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects)
|
||||
{
|
||||
WriteNestedProject(writer, embeddedSolution, dbProject.Guid);
|
||||
}
|
||||
|
||||
foreach (SolutionNode child in embeddedSolution.Solutions)
|
||||
{
|
||||
WriteNestedProject(writer, embeddedSolution, child.Guid);
|
||||
WriteNestedProjectMap(writer, child);
|
||||
}
|
||||
}
|
||||
|
||||
private static void WriteNestedProject(TextWriter writer, SolutionNode solution, Guid projectGuid)
|
||||
{
|
||||
WriteNestedFolder(writer, solution.Guid, projectGuid);
|
||||
}
|
||||
|
||||
private static void WriteNestedFolder(TextWriter writer, Guid parentGuid, Guid childGuid)
|
||||
{
|
||||
writer.WriteLine("\t\t{0} = {1}",
|
||||
childGuid.ToString("B").ToUpper(),
|
||||
parentGuid.ToString("B").ToUpper());
|
||||
}
|
||||
|
||||
private static void WriteConfigurationLines(IEnumerable<ConfigurationNode> configurations, SolutionNode solution, TextWriter ss)
|
||||
{
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
foreach (ConfigurationNode conf in configurations)
|
||||
{
|
||||
ss.WriteLine("\t\t{0}.{1}.ActiveCfg = {1}",
|
||||
project.Guid.ToString("B").ToUpper(),
|
||||
conf.NameAndPlatform);
|
||||
|
||||
ss.WriteLine("\t\t{0}.{1}.Build.0 = {1}",
|
||||
project.Guid.ToString("B").ToUpper(),
|
||||
conf.NameAndPlatform);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (SolutionNode child in solution.Solutions)
|
||||
{
|
||||
WriteConfigurationLines(configurations, child, ss);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteSolutionFiles(SolutionNode solution, TextWriter ss)
|
||||
{
|
||||
if(solution.Files != null && solution.Files.Count > 0)
|
||||
WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files);
|
||||
}
|
||||
|
||||
private void WriteEmbeddedSolution(TextWriter writer, SolutionNode embeddedSolution)
|
||||
{
|
||||
WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files);
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, TextWriter ss, ProjectNode project)
|
||||
{
|
||||
WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath);
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, TextWriter ss, DatabaseProjectNode dbProject)
|
||||
{
|
||||
if (solution.Files != null && solution.Files.Count > 0)
|
||||
WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath);
|
||||
}
|
||||
|
||||
const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\"";
|
||||
const string ProjectDeclarationEndFormat = "EndProject";
|
||||
|
||||
private void WriteProject(TextWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath)
|
||||
{
|
||||
if (!tools.ContainsKey(language))
|
||||
throw new UnknownLanguageException("Unknown .NET language: " + language);
|
||||
|
||||
ToolInfo toolInfo = tools[language];
|
||||
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath);
|
||||
|
||||
path = Helper.MakeFilePath(path, name, toolInfo.FileExtension);
|
||||
|
||||
WriteProject(ss, language, guid, name, path);
|
||||
}
|
||||
|
||||
private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location)
|
||||
{
|
||||
WriteProject(writer, language, projectGuid, name, location, null);
|
||||
}
|
||||
|
||||
private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files)
|
||||
{
|
||||
if (!tools.ContainsKey(language))
|
||||
throw new UnknownLanguageException("Unknown .NET language: " + language);
|
||||
|
||||
ToolInfo toolInfo = tools[language];
|
||||
|
||||
writer.WriteLine(ProjectDeclarationBeginFormat,
|
||||
toolInfo.Guid,
|
||||
name,
|
||||
location,
|
||||
projectGuid.ToString("B").ToUpper());
|
||||
|
||||
if (files != null)
|
||||
{
|
||||
writer.WriteLine("\tProjectSection(SolutionItems) = preProject");
|
||||
|
||||
foreach (string file in files)
|
||||
writer.WriteLine("\t\t{0} = {0}", file);
|
||||
|
||||
writer.WriteLine("\tEndProjectSection");
|
||||
}
|
||||
|
||||
writer.WriteLine(ProjectDeclarationEndFormat);
|
||||
}
|
||||
|
||||
private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project)
|
||||
{
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp");
|
||||
IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " ");
|
||||
|
||||
kernel.CurrentWorkingDirectory.Push();
|
||||
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
|
||||
|
||||
using (ps)
|
||||
{
|
||||
ps.WriteLine("# Microsoft Developer Studio Project File - Database Project");
|
||||
ps.WriteLine("Begin DataProject = \"{0}\"", project.Name);
|
||||
ps.Indent++;
|
||||
ps.WriteLine("MSDTVersion = \"80\"");
|
||||
// TODO: Use the project.Files property
|
||||
if (ContainsSqlFiles(Path.GetDirectoryName(projectFile)))
|
||||
WriteDatabaseFoldersAndFiles(ps, Path.GetDirectoryName(projectFile));
|
||||
|
||||
ps.WriteLine("Begin DBRefFolder = \"Database References\"");
|
||||
ps.Indent++;
|
||||
foreach (DatabaseReferenceNode reference in project.References)
|
||||
{
|
||||
ps.WriteLine("Begin DBRefNode = \"{0}\"", reference.Name);
|
||||
ps.Indent++;
|
||||
ps.WriteLine("ConnectStr = \"{0}\"", reference.ConnectionString);
|
||||
ps.WriteLine("Provider = \"{0}\"", reference.ProviderId.ToString("B").ToUpper());
|
||||
//ps.WriteLine("Colorizer = 5");
|
||||
ps.Indent--;
|
||||
ps.WriteLine("End");
|
||||
}
|
||||
ps.Indent--;
|
||||
ps.WriteLine("End");
|
||||
ps.Indent--;
|
||||
ps.WriteLine("End");
|
||||
|
||||
ps.Flush();
|
||||
}
|
||||
|
||||
kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private static bool ContainsSqlFiles(string folder)
|
||||
{
|
||||
if(Directory.GetFiles(folder, "*.sql").Length > 0)
|
||||
return true; // if the folder contains 1 .sql file, that's good enough
|
||||
|
||||
foreach (string child in Directory.GetDirectories(folder))
|
||||
{
|
||||
if (ContainsSqlFiles(child))
|
||||
return true; // if 1 child folder contains a .sql file, still good enough
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder)
|
||||
{
|
||||
foreach (string child in Directory.GetDirectories(folder))
|
||||
{
|
||||
if (ContainsSqlFiles(child))
|
||||
{
|
||||
writer.WriteLine("Begin Folder = \"{0}\"", Path.GetFileName(child));
|
||||
writer.Indent++;
|
||||
WriteDatabaseFoldersAndFiles(writer, child);
|
||||
writer.Indent--;
|
||||
writer.WriteLine("End");
|
||||
}
|
||||
}
|
||||
foreach (string file in Directory.GetFiles(folder, "*.sql"))
|
||||
{
|
||||
writer.WriteLine("Script = \"{0}\"", Path.GetFileName(file));
|
||||
}
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
|
||||
ToolInfo toolInfo = tools[project.Language];
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
|
||||
string userFile = projectFile + ".user";
|
||||
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
Helper.DeleteIfExists(userFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
kernel.Log.Write("Cleaning {0} solution and project files", VersionName, solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
|
||||
string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
|
||||
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
Helper.DeleteIfExists(suoFile);
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Write(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
kernel = kern;
|
||||
foreach (SolutionNode sol in kernel.Solutions)
|
||||
{
|
||||
WriteSolution(sol, true);
|
||||
}
|
||||
kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
kernel = kern;
|
||||
foreach (SolutionNode sol in kernel.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
kernel = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2008-2009 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com), John Anderson (sontek@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum VSVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Visual Studio 2002
|
||||
/// </summary>
|
||||
VS70,
|
||||
/// <summary>
|
||||
/// Visual Studio 2003
|
||||
/// </summary>
|
||||
VS71,
|
||||
/// <summary>
|
||||
/// Visual Studio 2005
|
||||
/// </summary>
|
||||
VS80,
|
||||
/// <summary>
|
||||
/// Visual Studio 2008
|
||||
/// </summary>
|
||||
VS90,
|
||||
/// <summary>
|
||||
/// Visual Studio 2010
|
||||
/// </summary>
|
||||
VS10,
|
||||
/// <summary>
|
||||
/// Visual Studio 2012
|
||||
/// </summary>
|
||||
VS11,
|
||||
/// <summary>
|
||||
/// Visual Studio 2013
|
||||
/// </summary>
|
||||
VS12,
|
||||
/// <summary>
|
||||
/// Visual Studio 2015
|
||||
/// </summary>
|
||||
VS15,
|
||||
/// <summary>
|
||||
/// Visual Studio 2017
|
||||
/// </summary>
|
||||
VS17,
|
||||
/// <summary>
|
||||
/// Visual Studio 2019
|
||||
/// </summary>
|
||||
VS19
|
||||
}
|
||||
}
|
|
@ -1,594 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Nodes;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Targets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Target("xcode")]
|
||||
public class XcodeTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static string PrependPath(string path)
|
||||
{
|
||||
string tmpPath = Helper.NormalizePath(path, '/');
|
||||
Regex regex = new Regex(@"(\w):/(\w+)");
|
||||
Match match = regex.Match(tmpPath);
|
||||
//if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
|
||||
//{
|
||||
tmpPath = Helper.NormalizePath(tmpPath);
|
||||
//}
|
||||
// else
|
||||
// {
|
||||
// tmpPath = Helper.NormalizePath("./" + tmpPath);
|
||||
// }
|
||||
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
private static string BuildReference(SolutionNode solution, ReferenceNode refr)
|
||||
{
|
||||
string ret = "";
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/${build.dir}/", refr.Name, "dll"), '/');
|
||||
ret += finalPath;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectNode project = (ProjectNode)refr.Parent;
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
|
||||
if (refr.Path != null || fileRef != null)
|
||||
{
|
||||
string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef;
|
||||
ret += finalPath;
|
||||
return ret;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
//Assembly assem = Assembly.Load(refr.Name);
|
||||
//if (assem != null)
|
||||
//{
|
||||
//ret += (refr.Name + ".dll");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
ret += (refr.Name + ".dll");
|
||||
//}
|
||||
}
|
||||
catch (System.NullReferenceException e)
|
||||
{
|
||||
e.ToString();
|
||||
ret += refr.Name + ".dll";
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr)
|
||||
{
|
||||
string ret = "";
|
||||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/');
|
||||
ret += finalPath;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectNode project = (ProjectNode)refr.Parent;
|
||||
string fileRef = FindFileReference(refr.Name, project);
|
||||
|
||||
if (refr.Path != null || fileRef != null)
|
||||
{
|
||||
string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef;
|
||||
ret += finalPath;
|
||||
return ret;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Assembly assem = Assembly.Load(refr.Name);
|
||||
if (assem != null)
|
||||
{
|
||||
ret += "";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "";
|
||||
}
|
||||
}
|
||||
catch (System.NullReferenceException e)
|
||||
{
|
||||
e.ToString();
|
||||
ret += "";
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach (ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
return fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
|
||||
{
|
||||
if (conf == null)
|
||||
{
|
||||
throw new ArgumentNullException("conf");
|
||||
}
|
||||
if (project == null)
|
||||
{
|
||||
throw new ArgumentNullException("project");
|
||||
}
|
||||
string docFile = (string)conf.Options["XmlDocFile"];
|
||||
// if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
|
||||
// {
|
||||
// return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
|
||||
// }
|
||||
return docFile;
|
||||
}
|
||||
|
||||
private void WriteProject(SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
|
||||
StreamWriter ss = new StreamWriter(projFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
|
||||
bool hasDoc = false;
|
||||
|
||||
using (ss)
|
||||
{
|
||||
ss.WriteLine("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
|
||||
ss.WriteLine(" <target name=\"{0}\">", "build");
|
||||
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
if (refr.LocalCopy)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/'));
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </copy>");
|
||||
ss.Write(" <csc");
|
||||
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
|
||||
ss.Write(" debug=\"{0}\"", "${build.debug}");
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (conf.Options.KeyFile != "")
|
||||
{
|
||||
ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (GetXmlDocFile(project, conf) != "")
|
||||
{
|
||||
ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
|
||||
hasDoc = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.Write(".dll\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(".exe\"");
|
||||
}
|
||||
if (project.AppIcon != null && project.AppIcon.Length != 0)
|
||||
{
|
||||
ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/'));
|
||||
}
|
||||
ss.WriteLine(">");
|
||||
ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.EmbeddedResource:
|
||||
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (project.Files.GetSubType(file).ToString() != "Code")
|
||||
//{
|
||||
// ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
|
||||
ss.WriteLine(" </resources>");
|
||||
ss.WriteLine(" <sources failonempty=\"true\">");
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.Compile:
|
||||
ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </sources>");
|
||||
ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <lib>");
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" </lib>");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/'));
|
||||
}
|
||||
ss.WriteLine(" </references>");
|
||||
|
||||
ss.WriteLine(" </csc>");
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\">");
|
||||
ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
|
||||
if (hasDoc)
|
||||
{
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
|
||||
ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
|
||||
ss.WriteLine(" </if>");
|
||||
ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
|
||||
ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
|
||||
ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.WriteLine(".dll\" />");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.WriteLine(".exe\" />");
|
||||
}
|
||||
|
||||
ss.WriteLine(" </assemblies>");
|
||||
ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
|
||||
ss.WriteLine(" </summaries>");
|
||||
ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}\" />");
|
||||
// foreach(ReferenceNode refr in project.References)
|
||||
// {
|
||||
// string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
|
||||
// if (path != "")
|
||||
// {
|
||||
// ss.WriteLine(" <include name=\"{0}\" />", path);
|
||||
// }
|
||||
// }
|
||||
ss.WriteLine(" </referencepaths>");
|
||||
ss.WriteLine(" <documenters>");
|
||||
ss.WriteLine(" <documenter name=\"MSDN\">");
|
||||
ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
|
||||
ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
|
||||
ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
|
||||
ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
|
||||
ss.WriteLine(" </documenter>");
|
||||
ss.WriteLine(" </documenters>");
|
||||
ss.WriteLine(" </ndoc>");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void WriteCombine(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating Xcode build files");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
if (m_Kernel.AllowProject(project.FilterGroups))
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating project: {0}", project.Name);
|
||||
WriteProject(solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj"));
|
||||
if (!directoryInfo.Exists)
|
||||
{
|
||||
directoryInfo.Create();
|
||||
}
|
||||
string combFile = Helper.MakeFilePath(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj"), "project", "pbxproj");
|
||||
StreamWriter ss = new StreamWriter(combFile);
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
|
||||
|
||||
using (ss)
|
||||
{
|
||||
ss.WriteLine("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
|
||||
ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
|
||||
ss.WriteLine();
|
||||
|
||||
//ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
|
||||
//ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
|
||||
ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
|
||||
ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
|
||||
ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
|
||||
ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
|
||||
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
// Set the project.config to a non-debug configuration
|
||||
if (conf.Options["DebugInformation"].ToString().ToLower() != "true")
|
||||
{
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
|
||||
}
|
||||
ss.WriteLine();
|
||||
ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name);
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
|
||||
ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
}
|
||||
|
||||
ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"init\" description=\"\">");
|
||||
ss.WriteLine(" <call target=\"${project.config}\" />");
|
||||
ss.WriteLine(" <sysinfo />");
|
||||
ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
|
||||
ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\" description=\"\">");
|
||||
ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />");
|
||||
//ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
//foreach(ProjectNode project in solution.Projects)
|
||||
//{
|
||||
// string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
// ss.Write(" <nant buildfile=\"{0}\"",
|
||||
// Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
|
||||
// ss.WriteLine(" target=\"clean\" />");
|
||||
//}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">");
|
||||
|
||||
foreach (ProjectNode project in solution.ProjectsTableOrder)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
|
||||
ss.WriteLine(" target=\"build\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />");
|
||||
ss.WriteLine();
|
||||
//ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">");
|
||||
ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
|
||||
ss.WriteLine(" target=\"doc\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanProject(ProjectNode project)
|
||||
{
|
||||
m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
|
||||
string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
|
||||
Helper.DeleteIfExists(projectFile);
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning Xcode build files for", solution.Name);
|
||||
|
||||
string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
|
||||
Helper.DeleteIfExists(slnFile);
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
CleanProject(project);
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode solution in kern.Solutions)
|
||||
{
|
||||
WriteCombine(solution);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
if (kern == null)
|
||||
{
|
||||
throw new ArgumentNullException("kern");
|
||||
}
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode sol in kern.Solutions)
|
||||
{
|
||||
CleanSolution(sol);
|
||||
}
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "xcode";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* $RCSfile$
|
||||
* Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Prebuild.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class UnknownLanguageException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic exception.
|
||||
/// </summary>
|
||||
public UnknownLanguageException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exception with specified string
|
||||
/// </summary>
|
||||
/// <param name="message">Exception message</param>
|
||||
public UnknownLanguageException(string message): base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public UnknownLanguageException(string message, Exception exception) : base(message, exception)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Prebuild.Core.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// The CommandLine class parses and interprets the command-line arguments passed to
|
||||
/// prebuild.
|
||||
/// </summary>
|
||||
public class CommandLineCollection : IEnumerable<KeyValuePair<string, string>>
|
||||
{
|
||||
#region Fields
|
||||
|
||||
// The raw OS arguments
|
||||
private readonly string[] m_RawArgs;
|
||||
|
||||
// Command-line argument storage
|
||||
private readonly Dictionary<string, string> m_Arguments = new Dictionary<string, string>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Create a new CommandLine instance and set some internal variables.
|
||||
/// </summary>
|
||||
public CommandLineCollection(string[] args)
|
||||
{
|
||||
m_RawArgs = args;
|
||||
|
||||
Parse();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Parse()
|
||||
{
|
||||
if(m_RawArgs.Length < 1)
|
||||
return;
|
||||
|
||||
int idx = 0;
|
||||
string lastArg = null;
|
||||
|
||||
while(idx <m_RawArgs.Length)
|
||||
{
|
||||
string arg = m_RawArgs[idx];
|
||||
|
||||
if(arg.Length > 2 && arg[0] == '/')
|
||||
{
|
||||
arg = arg.Substring(1);
|
||||
lastArg = arg;
|
||||
m_Arguments[arg] = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(lastArg != null)
|
||||
{
|
||||
m_Arguments[lastArg] = arg;
|
||||
lastArg = null;
|
||||
}
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Wases the passed.
|
||||
/// </summary>
|
||||
/// <param name="arg">The arg.</param>
|
||||
/// <returns></returns>
|
||||
public bool WasPassed(string arg)
|
||||
{
|
||||
return (m_Arguments.ContainsKey(arg));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parameter associated with the command line option
|
||||
/// </summary>
|
||||
/// <remarks>Returns null if option was not specified,
|
||||
/// null string if no parameter was specified, and the value if a parameter was specified</remarks>
|
||||
public string this[string index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if(m_Arguments.ContainsKey(index))
|
||||
{
|
||||
return (m_Arguments[index]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEnumerable Members
|
||||
|
||||
/// <summary>
|
||||
/// Returns an enumerator that can iterate through a collection.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// An <see cref="T:System.Collections.IDictionaryEnumerator"/>
|
||||
/// that can be used to iterate through the collection.
|
||||
/// </returns>
|
||||
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
|
||||
{
|
||||
return m_Arguments.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Prebuild.Core.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CurrentDirectory
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly Stack<string> m_Stack = new Stack<string>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Pushes this instance.
|
||||
/// </summary>
|
||||
public void Push()
|
||||
{
|
||||
m_Stack.Push(Environment.CurrentDirectory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pops this instance.
|
||||
/// </summary>
|
||||
public void Pop()
|
||||
{
|
||||
if(m_Stack.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string cwd = m_Stack.Pop();
|
||||
Helper.SetCurrentDir(cwd);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,575 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections.Specialized;
|
||||
using System.Xml;
|
||||
using Prebuild.Core.Nodes;
|
||||
|
||||
namespace Prebuild.Core.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Helper
|
||||
{
|
||||
#region Fields
|
||||
|
||||
static bool checkForOSVariables;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool CheckForOSVariables
|
||||
{
|
||||
get
|
||||
{
|
||||
return checkForOSVariables;
|
||||
}
|
||||
set
|
||||
{
|
||||
checkForOSVariables = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
#region String Parsing
|
||||
|
||||
public delegate string StringLookup(string key);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of StringLocationPair objects that represent the matches
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="beforeGroup">The before group.</param>
|
||||
/// <param name="afterGroup">The after group.</param>
|
||||
/// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param>
|
||||
/// <returns></returns>
|
||||
public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings)
|
||||
{
|
||||
if( beforeGroup == null )
|
||||
{
|
||||
throw new ArgumentNullException("beforeGroup");
|
||||
}
|
||||
if( afterGroup == null )
|
||||
{
|
||||
throw new ArgumentNullException("afterGroup");
|
||||
}
|
||||
StringCollection results = new StringCollection();
|
||||
if(target == null || target.Length == 0)
|
||||
{
|
||||
return results;
|
||||
}
|
||||
|
||||
int beforeMod = 0;
|
||||
int afterMod = 0;
|
||||
if(includeDelimitersInSubstrings)
|
||||
{
|
||||
//be sure to not exlude the delims
|
||||
beforeMod = beforeGroup.Length;
|
||||
afterMod = afterGroup.Length;
|
||||
}
|
||||
int startIndex = 0;
|
||||
while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) {
|
||||
int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it
|
||||
if(endIndex == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string
|
||||
string substring = target.Substring(startIndex + beforeGroup.Length - beforeMod,
|
||||
length - afterMod);
|
||||
|
||||
results.Add(substring);
|
||||
//results.Add(new StringLocationPair(substring,startIndex));
|
||||
startIndex = endIndex + 1;
|
||||
//the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization
|
||||
//so start after endIndex
|
||||
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the groups.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="beforeGroup">The before group.</param>
|
||||
/// <param name="afterGroup">The after group.</param>
|
||||
/// <param name="lookup">The lookup.</param>
|
||||
/// <returns></returns>
|
||||
public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) {
|
||||
if( target == null )
|
||||
{
|
||||
throw new ArgumentNullException("target");
|
||||
}
|
||||
//int targetLength = target.Length;
|
||||
StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false);
|
||||
if( lookup == null )
|
||||
{
|
||||
throw new ArgumentNullException("lookup");
|
||||
}
|
||||
foreach(string substring in strings)
|
||||
{
|
||||
target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) );
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="lookup">The lookup.</param>
|
||||
/// <returns></returns>
|
||||
public static string InterpolateForVariables(string target, StringLookup lookup)
|
||||
{
|
||||
return ReplaceGroups(target, "${" , "}" , lookup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces ${var} statements in a string with the corresonding environment variable with name var
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
/// <returns></returns>
|
||||
public static string InterpolateForEnvironmentVariables(string target)
|
||||
{
|
||||
return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Translates the value.
|
||||
/// </summary>
|
||||
/// <param name="translateType">Type of the translate.</param>
|
||||
/// <param name="translationItem">The translation item.</param>
|
||||
/// <returns></returns>
|
||||
public static object TranslateValue(Type translateType, string translationItem)
|
||||
{
|
||||
if(translationItem == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string lowerVal = translationItem.ToLower();
|
||||
if(translateType == typeof(bool))
|
||||
{
|
||||
return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on");
|
||||
}
|
||||
else if(translateType == typeof(int))
|
||||
{
|
||||
return (Int32.Parse(translationItem));
|
||||
}
|
||||
else
|
||||
{
|
||||
return translationItem;
|
||||
}
|
||||
}
|
||||
catch(FormatException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes if exists.
|
||||
/// </summary>
|
||||
/// <param name="file">The file.</param>
|
||||
/// <returns></returns>
|
||||
public static bool DeleteIfExists(string file)
|
||||
{
|
||||
string resFile = null;
|
||||
try
|
||||
{
|
||||
resFile = ResolvePath(file);
|
||||
}
|
||||
catch(ArgumentException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!File.Exists(resFile))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
File.Delete(resFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
static readonly char seperator = Path.DirectorySeparatorChar;
|
||||
|
||||
// This little gem was taken from the NeL source, thanks guys!
|
||||
/// <summary>
|
||||
/// Makes a relative path
|
||||
/// </summary>
|
||||
/// <param name="startPath">Path to start from</param>
|
||||
/// <param name="endPath">Path to end at</param>
|
||||
/// <returns>Path that will get from startPath to endPath</returns>
|
||||
public static string MakePathRelativeTo(string startPath, string endPath)
|
||||
{
|
||||
string tmp = NormalizePath(startPath, seperator);
|
||||
string src = NormalizePath(endPath, seperator);
|
||||
string prefix = "";
|
||||
|
||||
while(true)
|
||||
{
|
||||
if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0))
|
||||
{
|
||||
string ret;
|
||||
int size = tmp.Length;
|
||||
if(size == src.Length)
|
||||
{
|
||||
return "./";
|
||||
}
|
||||
if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = prefix + endPath.Substring(size, endPath.Length - size);
|
||||
ret = ret.Trim();
|
||||
if(ret[0] == seperator)
|
||||
{
|
||||
ret = "." + ret;
|
||||
}
|
||||
|
||||
return NormalizePath(ret);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(tmp.Length < 2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2);
|
||||
int prevPos = tmp.IndexOf(seperator);
|
||||
|
||||
if((lastPos == prevPos) || (lastPos == -1))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
tmp = tmp.Substring(0, lastPos + 1);
|
||||
prefix += ".." + seperator.ToString();
|
||||
}
|
||||
|
||||
return endPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns></returns>
|
||||
public static string ResolvePath(string path)
|
||||
{
|
||||
string tmpPath = NormalizePath(path);
|
||||
if(tmpPath.Length < 1)
|
||||
{
|
||||
tmpPath = ".";
|
||||
}
|
||||
|
||||
tmpPath = Path.GetFullPath(tmpPath);
|
||||
if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath))
|
||||
{
|
||||
throw new ArgumentException("Path could not be resolved: " + tmpPath);
|
||||
}
|
||||
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalizes the path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="separatorCharacter">The separator character.</param>
|
||||
/// <returns></returns>
|
||||
public static string NormalizePath(string path, char separatorCharacter)
|
||||
{
|
||||
if(path == null || path == "" || path.Length < 1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
string tmpPath = path.Replace('\\', '/');
|
||||
tmpPath = tmpPath.Replace('/', separatorCharacter);
|
||||
return tmpPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalizes the path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns></returns>
|
||||
public static string NormalizePath(string path)
|
||||
{
|
||||
return NormalizePath(path, Path.DirectorySeparatorChar);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ends the path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="separatorCharacter">The separator character.</param>
|
||||
/// <returns></returns>
|
||||
public static string EndPath(string path, char separatorCharacter)
|
||||
{
|
||||
if(path == null || path == "" || path.Length < 1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
if(!path.EndsWith(separatorCharacter.ToString()))
|
||||
{
|
||||
return (path + separatorCharacter);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ends the path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns></returns>
|
||||
public static string EndPath(string path)
|
||||
{
|
||||
return EndPath(path, Path.DirectorySeparatorChar);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes the file path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="ext">The ext.</param>
|
||||
/// <returns></returns>
|
||||
public static string MakeFilePath(string path, string name, string ext)
|
||||
{
|
||||
string ret = EndPath(NormalizePath(path));
|
||||
|
||||
if( name == null )
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
ret += name;
|
||||
if(!name.EndsWith("." + ext))
|
||||
{
|
||||
ret += "." + ext;
|
||||
}
|
||||
|
||||
//foreach(char c in Path.GetInvalidPathChars())
|
||||
//{
|
||||
// ret = ret.Replace(c, '_');
|
||||
//}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes the file path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns></returns>
|
||||
public static string MakeFilePath(string path, string name)
|
||||
{
|
||||
string ret = EndPath(NormalizePath(path));
|
||||
|
||||
if( name == null )
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
ret += name;
|
||||
|
||||
//foreach (char c in Path.GetInvalidPathChars())
|
||||
//{
|
||||
// ret = ret.Replace(c, '_');
|
||||
//}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string MakeReferencePath(string path)
|
||||
{
|
||||
string ret = EndPath(NormalizePath(path));
|
||||
|
||||
//foreach (char c in Path.GetInvalidPathChars())
|
||||
//{
|
||||
// ret = ret.Replace(c, '_');
|
||||
//}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the current dir.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
public static void SetCurrentDir(string path)
|
||||
{
|
||||
if( path == null )
|
||||
{
|
||||
throw new ArgumentNullException("path");
|
||||
}
|
||||
if(path.Length < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Environment.CurrentDirectory = path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks the type.
|
||||
/// </summary>
|
||||
/// <param name="typeToCheck">The type to check.</param>
|
||||
/// <param name="attr">The attr.</param>
|
||||
/// <param name="inter">The inter.</param>
|
||||
/// <returns></returns>
|
||||
public static object CheckType(Type typeToCheck, Type attr, Type inter)
|
||||
{
|
||||
if(typeToCheck == null || attr == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
object[] attrs = typeToCheck.GetCustomAttributes(attr, false);
|
||||
if(attrs == null || attrs.Length < 1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if( inter == null )
|
||||
{
|
||||
throw new ArgumentNullException("inter");
|
||||
}
|
||||
|
||||
if(typeToCheck.GetInterface(inter.FullName) == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return attrs[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attributes the value.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="attr">The attr.</param>
|
||||
/// <param name="def">The def.</param>
|
||||
/// <returns></returns>
|
||||
public static string AttributeValue(XmlNode node, string attr, string def)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
if(node.Attributes[attr] == null)
|
||||
{
|
||||
return def;
|
||||
}
|
||||
string val = node.Attributes[attr].Value;
|
||||
if(!CheckForOSVariables)
|
||||
{
|
||||
return val;
|
||||
}
|
||||
|
||||
return InterpolateForEnvironmentVariables(val);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses the boolean.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="attr">The attr.</param>
|
||||
/// <param name="defaultValue">if set to <c>true</c> [default value].</param>
|
||||
/// <returns></returns>
|
||||
public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
if(node.Attributes[attr] == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
return bool.Parse(node.Attributes[attr].Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enums the attribute value.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="attr">The attr.</param>
|
||||
/// <param name="enumType">Type of the enum.</param>
|
||||
/// <param name="def">The def.</param>
|
||||
/// <returns></returns>
|
||||
public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def)
|
||||
{
|
||||
if( def == null )
|
||||
{
|
||||
throw new ArgumentNullException("def");
|
||||
}
|
||||
string val = AttributeValue(node, attr, def.ToString());
|
||||
return Enum.Parse(enumType, val, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="assemblyName"></param>
|
||||
/// <param name="projectType"></param>
|
||||
/// <returns></returns>
|
||||
public static string AssemblyFullName(string assemblyName, ProjectType projectType)
|
||||
{
|
||||
return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,276 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Prebuild.Core.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum LogType
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Info,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Warning,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Error
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum LogTargets
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Null = 1,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
File = 2,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Console = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for Log.
|
||||
/// </summary>
|
||||
public class Log : IDisposable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private TextWriter m_Writer;
|
||||
private LogTargets m_Target = LogTargets.Null;
|
||||
bool disposed;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Log"/> class.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="fileName">Name of the file.</param>
|
||||
public Log(LogTargets target, string fileName)
|
||||
{
|
||||
m_Target = target;
|
||||
|
||||
if ((m_Target & LogTargets.File) != 0)
|
||||
{
|
||||
m_Writer = new StreamWriter(fileName, false);
|
||||
}
|
||||
else if ((m_Target & LogTargets.Console) != 0)
|
||||
{
|
||||
// Prevents null reference exceptions when outputing to the log file.
|
||||
// This seems to only happen when running on a network drive.
|
||||
m_Writer = Console.Out;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Writes this instance.
|
||||
/// </summary>
|
||||
public void Write()
|
||||
{
|
||||
Write(string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified MSG.
|
||||
/// </summary>
|
||||
/// <param name="msg">The MSG.</param>
|
||||
public void Write(string msg)
|
||||
{
|
||||
if((m_Target & LogTargets.Null) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if((m_Target & LogTargets.Console) != 0)
|
||||
{
|
||||
Console.WriteLine(msg);
|
||||
}
|
||||
if((m_Target & LogTargets.File) != 0 && m_Writer != null)
|
||||
{
|
||||
m_Writer.WriteLine(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified format.
|
||||
/// </summary>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
public void Write(string format, params object[] args)
|
||||
{
|
||||
Write(string.Format(format,args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified type.
|
||||
/// </summary>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
public void Write(LogType type, string format, params object[] args)
|
||||
{
|
||||
if((m_Target & LogTargets.Null) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string str = "";
|
||||
switch(type)
|
||||
{
|
||||
case LogType.Info:
|
||||
str = "[I] ";
|
||||
break;
|
||||
case LogType.Warning:
|
||||
str = "[!] ";
|
||||
break;
|
||||
case LogType.Error:
|
||||
str = "[X] ";
|
||||
break;
|
||||
}
|
||||
|
||||
Write(str + format,args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the exception.
|
||||
/// </summary>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="ex">The ex.</param>
|
||||
public void WriteException(LogType type, Exception ex)
|
||||
{
|
||||
if(ex != null)
|
||||
{
|
||||
Write(type, ex.Message);
|
||||
//#if DEBUG
|
||||
m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name);
|
||||
m_Writer.WriteLine(ex.StackTrace);
|
||||
m_Writer.WriteLine("]]");
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushes this instance.
|
||||
/// </summary>
|
||||
public void Flush()
|
||||
{
|
||||
if(m_Writer != null)
|
||||
{
|
||||
m_Writer.Flush();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>
|
||||
/// Performs application-defined tasks associated with freeing, releasing, or
|
||||
/// resetting unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose objects
|
||||
/// </summary>
|
||||
/// <param name="disposing">
|
||||
/// If true, it will dispose close the handle
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// Will dispose managed and unmanaged resources.
|
||||
/// </remarks>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!this.disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (m_Writer != null)
|
||||
{
|
||||
m_Writer.Close();
|
||||
m_Writer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.disposed = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
~Log()
|
||||
{
|
||||
this.Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes and destroys this object
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Same as Dispose(true)
|
||||
/// </remarks>
|
||||
public void Close()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Prebuild.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class WarningException : Exception
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public WarningException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="format"></param>
|
||||
/// <param name="args"></param>
|
||||
public WarningException(string format, params object[] args)
|
||||
: base(String.Format(format, args))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exception with specified string
|
||||
/// </summary>
|
||||
/// <param name="message">Exception message</param>
|
||||
public WarningException(string message): base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public WarningException(string message, Exception exception) : base(message, exception)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context )
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: kunnis $
|
||||
* $Date: 2009-04-14 21:33:14 -0400 (Tue, 14 Apr 2009) $
|
||||
* $Revision: 308 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.EnterpriseServices.Internal;
|
||||
|
||||
using Prebuild.Core;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class Prebuild
|
||||
{
|
||||
#region Main
|
||||
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Kernel kernel = null;
|
||||
try
|
||||
{
|
||||
kernel = Kernel.Instance;
|
||||
kernel.Initialize(LogTargets.File | LogTargets.Console, args);
|
||||
bool exit = false;
|
||||
|
||||
if(kernel.CommandLine.WasPassed("usage"))
|
||||
{
|
||||
exit = true;
|
||||
OutputUsage();
|
||||
}
|
||||
if(kernel.CommandLine.WasPassed("showtargets"))
|
||||
{
|
||||
exit = true;
|
||||
OutputTargets(kernel);
|
||||
}
|
||||
if(kernel.CommandLine.WasPassed("install"))
|
||||
{
|
||||
exit = true;
|
||||
InstallAssembly(kernel);
|
||||
}
|
||||
if(kernel.CommandLine.WasPassed("remove"))
|
||||
{
|
||||
exit = true;
|
||||
RemoveAssembly(kernel);
|
||||
}
|
||||
|
||||
if(!exit)
|
||||
{
|
||||
kernel.Process();
|
||||
}
|
||||
}
|
||||
#if !DEBUG
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Unhandled error: {0}", ex.Message);
|
||||
Console.WriteLine("{0}", ex.StackTrace);
|
||||
}
|
||||
#endif
|
||||
finally
|
||||
{
|
||||
if(kernel != null && kernel.PauseAfterFinish)
|
||||
{
|
||||
Console.WriteLine("\nPress enter to continue...");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static void InstallAssembly(Kernel kernel)
|
||||
{
|
||||
Publish publish = new Publish();
|
||||
string file = kernel.CommandLine["install"];
|
||||
//Console.WriteLine(".."+file+"..");
|
||||
publish.GacInstall(file);
|
||||
}
|
||||
|
||||
private static void RemoveAssembly(Kernel kernel)
|
||||
{
|
||||
Publish publish = new Publish();
|
||||
string file = kernel.CommandLine["remove"];
|
||||
publish.GacRemove(file);
|
||||
}
|
||||
|
||||
private static void OutputUsage()
|
||||
{
|
||||
Console.WriteLine("Usage: prebuild /target <target> [options]");
|
||||
Console.WriteLine("Available command-line switches:");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("/target Target for Prebuild");
|
||||
Console.WriteLine("/clean Clean the build files for the given target");
|
||||
Console.WriteLine("/file XML file to process");
|
||||
Console.WriteLine("/log Log file to write to");
|
||||
Console.WriteLine("/ppo Pre-process the file, but perform no other processing");
|
||||
Console.WriteLine("/pause Pauses the application after execution to view the output");
|
||||
Console.WriteLine("/yes Default to yes to any questions asked");
|
||||
Console.WriteLine("/install Install assembly into the GAC");
|
||||
Console.WriteLine("/remove Remove assembly from the GAC");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("See 'prebuild /showtargets for a list of available targets");
|
||||
Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information");
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private static void OutputTargets(Kernel kern)
|
||||
{
|
||||
Console.WriteLine("Targets available in Prebuild:");
|
||||
Console.WriteLine("");
|
||||
if(kern.Targets.Keys.Count > 0)
|
||||
{
|
||||
string[] targs = new string[kern.Targets.Keys.Count];
|
||||
kern.Targets.Keys.CopyTo(targs, 0);
|
||||
Array.Sort(targs);
|
||||
foreach(string target in targs)
|
||||
{
|
||||
Console.WriteLine(target);
|
||||
}
|
||||
}
|
||||
Console.WriteLine("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue