-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlivemap.csproj
89 lines (80 loc) · 4.49 KB
/
livemap.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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>livemap</PackageId>
<Title>LiveMap</Title>
<Ver>0.0.13</Ver>
<Version Condition="'$(BUILD_NUMBER)' != ''">$(Ver)-b$(BUILD_NUMBER)</Version>
<Version Condition="'$(BUILD_NUMBER)' == ''">$(Ver)-SNAPSHOT</Version>
<Authors>BillyGalbreath</Authors>
<Company>Pl3x</Company>
<Description>LiveMap is a browser-based world map viewer for Vintage Story</Description>
<Copyright>Copyright (c) 2024 William Blake Galbreath</Copyright>
<PackageIcon>modicon.png</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://mods.vintagestory.at/livemap</PackageProjectUrl>
<RepositoryUrl>https://github.com/billygalbreath/vs-livemap</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryBranch>master</RepositoryBranch>
<PackageType>Dependency</PackageType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<OutputPath>bin\mods\mod</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="$(VINTAGE_STORY)/**/*.dll" Private="false" />
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.7.0" IncludeAssets="compile" PrivateAssets="all" />
<PackageReference Include="MimeTypeMapOfficial" Version="1.0.17" IncludeAssets="compile;runtime" PrivateAssets="all" />
<None Include="LICENSE;README.md;resources/**" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="" Link="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<Target Name="_ResolveCopyLocalNuGetPkgXmls" AfterTargets="ResolveReferences">
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)'!='' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
</Target>
<Target Name="InstallAndRunNpm" AfterTargets="PostBuildEvent">
<Exec Command="npm install" WorkingDirectory="web" />
<Exec Command="npm run build" WorkingDirectory="web" />
</Target>
<Target Name="CopyWebDir" AfterTargets="InstallAndRunNpm">
<ItemGroup>
<_CopyWebStuffs Include="web/public/**/*.*" Exclude="web/public/tiles/**/*;web/public/data/**" />
</ItemGroup>
<Copy SourceFiles="@(_CopyWebStuffs)" DestinationFolder="$(TargetDir)/assets/livemap/config/%(RecursiveDir)" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" Retries="3" RetryDelayMilliseconds="300" />
</Target>
<Target Name="FilterModInfo" AfterTargets="CopyWebDir">
<PropertyGroup>
<ModInfoJson>$(TargetDir)/modinfo.json</ModInfoJson>
</PropertyGroup>
<WriteLinesToFile Lines="$([System.IO.File]::ReadAllText($(ModInfoJson))
.Replace('{version}','$(Version)')
.Replace('{description}','$(Description)')
)" File="$(ModInfoJson)" Overwrite="true" Encoding="UTF-8"
/>
</Target>
<Target Name="FilterIndexHtml" AfterTargets="FilterModInfo">
<PropertyGroup>
<IndexHTML>$(TargetDir)/assets/livemap/config/index.html</IndexHTML>
</PropertyGroup>
<WriteLinesToFile Lines="$([System.IO.File]::ReadAllText($(IndexHTML))
.Replace('{description}','$(Description)')
)" File="$(IndexHTML)" Overwrite="true" Encoding="UTF-8"
/>
</Target>
<Target Name="PackZip" AfterTargets="FilterIndexHtml">
<MakeDir Directories="bin\mods\mod" />
<ItemGroup>
<FilesToDelete Include="bin\**\*.nupkg" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<ZipDirectory DestinationFile="bin/livemap-$(Version).zip" SourceDirectory="$(TargetDir)" Overwrite="true" />
</Target>
</Project>