-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRESTbot.csproj
140 lines (140 loc) · 8.09 KB
/
RESTbot.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web" DefaultTargets="Build"
targetNamespace="http://schemas.microsoft.com/developer/msbuild/2003"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
xmlns:msb="http://schemas.microsoft.com/developer/msbuild/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
schemaLocation="./Microsoft.Build.xsd"
elementFormDefault="qualified">
<PropertyGroup Label="Globals">
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>RESTbot</AssemblyName>
<OutputPath>restbot-bin\</OutputPath>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Version gets set by AppVeyor -->
<!-- The following sadly doesn't work! -->
<AssemblyVersion>$(Version)</AssemblyVersion>
<AssetsFolder>assets\</AssetsFolder>
<ApplicationIcon>$(AssetsFolder)images\RESTbot.ico</ApplicationIcon>
<PackageId>RESTbot</PackageId>
<Authors>Gwyneth Llewelyn, Pleiades, others</Authors>
<Copyright>Copyright © Pleiades 2007. Copyright © Gwyneth Llewelyn 2010,2021,2023. Some rights reserved</Copyright>
<PackageIcon>RESTbot-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/GwynethLlewelyn/restbot</PackageProjectUrl>
<Owners>Gwyneth Llewelyn</Owners>
<PackageTags>LMV OMV OpenMetaverse OpenSim OpenSimulator Halcyon OpenMetaverseFoundation VirtualWorld Radegast SecondLife</PackageTags>
<PackageDescription>RESTBot is a C# webserver that uses RESTful transactions to interact with a bot in Second Life or OpenSimulator. It relies on LibreMetaverse.</PackageDescription>
<RepositoryUrl>https://github.com/GwynethLlewelyn/restbot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Title>RESTbot</Title>
<Summary>RESTBot is a C# webserver that uses RESTful transactions to interact with a bot in Second Life or OpenSimulator. It relies on LibreMetaverse.</Summary>
<Description>RESTBot is a C# webserver that uses RESTful transactions to interact with a bot in Second Life or OpenSimulator. It relies on LibreMetaverse.</Description>
<ProjectGuid>{F6E2EED5-AE02-45D9-A129-7E759F326D4C}</ProjectGuid>
<IsPackable>true</IsPackable>
<!-- The following conditions will allow us to do conditional compilation based on operating system -->
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<!-- Define nice constants depending on what OS we run; see https://blog.magnusmontin.net/2018/11/05/platform-conditional-compilation-in-net-core/ (gwyneth 20220426) -->
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>Windows</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<!-- STARTUP_DEBUG moved to here; also, VERBOSE_MESSAGES allows file, line nr. etc. to be written with each and every console output message (gwyneth 20220109) -->
<DefineConstants>DEBUG;TRACE;STARTUP_DEBUG;VERBOSE_MESSAGES</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<!--<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>-->
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibreMetaverse" Version="1.9.20.453-gwyn" />
<PackageReference Include="LibreMetaverse.StructuredData" Version="1.9.20.453-gwyn" />
<PackageReference Include="LibreMetaverse.Types" Version="1.9.20.453-gwyn" />
<PackageReference Include="LibreMetaverse.Utilities" Version="1.9.20.453-gwyn" /><!-- this allows us to include the cool Realism class for chatting! (gwyneth 20210121) -->
<PackageReference Include="log4net" Version="2.0.17" />
</ItemGroup>
<ItemGroup>
<None Include="$(AssetsFolder)images\RESTbot-logo.png" Pack="true" PackagePath="" />
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
<!-- <ItemGroup>
<None Remove="assets\*" />
<None Remove="restbot-tools\*" />
</ItemGroup> -->
<Target Name="Build" Inputs="@(Compile)" Outputs="$(OutputPath)$(AssemblyName).exe">
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<Csc Sources="@(Compile)" OutputAssembly="$(OutputPath)$(AssemblyName).exe" />
</Target>
<Target Name="Clean">
<Message Text="Cleaning up binaries and main DLL..." Importance="high" />
<Delete Files="$(OutputPath)$(AssemblyName).exe" />
<Delete Files="$(OutputPath)$(AssemblyName).dll" />
<Delete Files="$(OutputPath)$(AssemblyName)" />
</Target>
<Target Name="CleanOutDir">
<!-- Basically recursively delete the whole output folder -->
<!-- @see https://stackoverflow.com/a/31730069/1035977 -->
<ItemGroup>
<FilesToClean Include="$(OutputPath)..\**\*.*" />
<!-- Bit of .Net to get all folders and subfolders -->
<FoldersToClean Include="$([System.IO.Directory]::GetDirectories('$(OutputPath)..'))" />
</ItemGroup>
<Message Text="Cleaning up everything in $(OutputPath)..: Files=@(FilesToClean) Folders=@(FoldersToClean); ..." Importance="high" />
<Delete Files="@(FilesToClean)" />
<RemoveDir Directories="@(FoldersToClean)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<Target Name="CopyAssetFiles" AfterTargets="AfterBuild">
<PropertyGroup Label="FolderNames">
<AssetsFolder>assets\</AssetsFolder>
<AssetsConfigFolderName>$(AssetsFolder)configuration</AssetsConfigFolderName>
<OpenMetaverseData>openmetaverse_data\</OpenMetaverseData>
<OpenMetaverseDataFolderName>$(AssetsFolder)$(OpenMetaverseData)</OpenMetaverseDataFolderName>
</PropertyGroup>
<ItemGroup>
<AssetsDataFolder Include="$(OpenMetaverseDataFolderName)\*.*" />
</ItemGroup>
<!--<Message Text="[DEBUG] AssetsFolder=$(AssetsFolder); AssetsConfigFolderName=$(AssetsConfigFolderName); OpenMetaverseData=$(OpenMetaverseData); OpenMetaverseDataFolderName=$(OpenMetaverseDataFolderName); AssetsDataFolder=@(AssetsDataFolder)" Importance="High" />
<Message Text="Preparing to copy asset files..." Importance="High" />-->
<Copy SourceFiles="$(AssetsConfigFolderName)\configuration.xml" DestinationFolder="$(OutputPath)" ContinueOnError="true" />
<!--
<Copy SourceFiles="$(AssetsConfigFolderName)\log4net.config" DestinationFiles="$(OutputPath)$(AssemblyName).config" ContinueOnError="true" />
-->
<Copy SourceFiles="$(AssetsConfigFolderName)\log4net.config" DestinationFolder="$(OutputPath)" ContinueOnError="true" />
<MakeDir Directories="$(OutputPath)$(OpenMetaverseData)" Condition="!Exists('$(OutputPath)$(OpenMetaverseData)')" />
<Copy SourceFiles="@(AssetsDataFolder)" DestinationFolder="$(OutputPath)$(OpenMetaverseData)" ContinueOnError="true" />
<Message Text="Asset files copied." Importance="High" />
</Target>
</Project>