-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgalleryserverpro.targets
146 lines (127 loc) · 10.3 KB
/
galleryserverpro.targets
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
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This MSBuild script runs automatically during a build and performs the following tasks:
1. Creates a ZIP install file containing the compiled web application copies it
to the bin directory of the web application.
2. Creates a ZIP install file containing the source code and copies it
to the bin directory of the web application.
NOTES
1. Changes to this file do not take effect until the project is unloaded and reloaded.
-->
<PropertyGroup>
<MSBuildCommunityTasksPath>$(SolutionDir)\.build</MSBuildCommunityTasksPath>
<ProductName>GalleryServerPro</ProductName>
<ProductVersion>V3_1_0</ProductVersion>
<UpdateSkins>1</UpdateSkins>
<ZipCompiledFiles>0</ZipCompiledFiles>
<!-- Specify 1 to create a ZIP archive of the compiled files -->
<ZipSourceFiles>0</ZipSourceFiles>
<!-- Specify 1 to create a ZIP archive of the source code files -->
<DeployDir>$(MSBuildProjectDirectory)\bin</DeployDir>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
<Target Name="AfterBuild">
<CallTarget Targets="DeployFiles" />
</Target>
<Target Name="DeployFiles">
<MakeDir Directories="$(DeployDir)" />
<CallTarget Targets="CreateLightSkin" Condition="$(UpdateSkins) == 1" />
<CallTarget Targets="CreateInstallZip" Condition="$(ZipCompiledFiles) == 1" />
<CallTarget Targets="CreateSourceZip" Condition="$(ZipSourceFiles) == 1" />
</Target>
<Target Name="CreateLightSkin">
<!-- Copy the dark skin CSS file and replace colors with their opposites -->
<Copy SourceFiles="$(MSBuildProjectDirectory)\gs\skins\dark\styles\gallery.css" DestinationFolder="$(MSBuildProjectDirectory)\gs\skins\light\styles\" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#000" ReplacementText="#_tmp_fff" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#151515" ReplacementText="#_tmp_f2f2f2" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#353535" ReplacementText="#_tmp_f2f2f2" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#3f3f3f" ReplacementText="#_tmp_b3b3b3" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#4a4a4a" ReplacementText="#_tmp_a7a7a7" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#545454" ReplacementText="#_tmp_a7a7a7" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#747474" ReplacementText="#_tmp_818181" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#818181" ReplacementText="#747474" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#a7a7a7" ReplacementText="#4a4a4a" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#b3b3b3" ReplacementText="#3f3f3f" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#c0c0c0" ReplacementText="#353535" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#ccc" ReplacementText="#353535" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#e6e6e6" ReplacementText="#151515" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#f2f2f2" ReplacementText="#151515" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#fff" ReplacementText="#000" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_fff" ReplacementText="#fff" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_f2f2f2" ReplacementText="#f2f2f2" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_b3b3b3" ReplacementText="#b3b3b3" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_a7a7a7" ReplacementText="#a7a7a7" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_818181" ReplacementText="#818181" />
<!--Swap colors -->
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="(#b2d6a2|#86be6d)" ReplacementText="#_tmp_060" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#ff7171" ReplacementText="#_tmp_c03" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#060" ReplacementText="#86be6d" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="(#600|#c03)" ReplacementText="#ff7171" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_060" ReplacementText="#060" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="#_tmp_c03" ReplacementText="#c03" />
<!-- Swap sun-s.png <=> sun-s-o.png, arrow-right-open-s.png <=> arrow-right-open-s-o.png -->
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="sun-s.png" ReplacementText="sun-s-o_tmp.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="sun-s-o.png" ReplacementText="sun-s.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="sun-s-o_tmp.png" ReplacementText="sun-s-o.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="arrow-right-open-s.png" ReplacementText="arrow-right-open-s-o_tmp.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="arrow-right-open-s-o.png" ReplacementText="arrow-right-open-s.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="arrow-right-open-s-o_tmp.png" ReplacementText="arrow-right-open-s-o.png" />
<!-- Swap jQuery UI CSS images -->
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="(ui-icons_cccccc_256x240.png|ui-icons_ffffff_256x240.png)" ReplacementText="ui-icons_222222_256x240_tmp.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="ui-icons_222222_256x240.png" ReplacementText="ui-icons_ffffff_256x240.png" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="ui-icons_222222_256x240_tmp.png" ReplacementText="ui-icons_222222_256x240.png" />
<!-- Define custom color conversions -->
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="\.ui-tabs-active \{ background-color: rgb\(63,63,63\)" ReplacementText=".ui-tabs-active { background-color: #ccc" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="\.ui-tabs-panel \{ background-color: rgb\(63,63,63\);" ReplacementText=".ui-tabs-panel { background-color: #ccc;" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="div\.album \{ background-color: rgb\(21,21,21\); \}" ReplacementText="div.album { background-color: rgb(167,167,167); }" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="2px 2px 0 0 rgb\(167,167,167\), 4px 4px 0 0 #a7a7a7, 6px 6px 0 0 rgb\(167,167,167\); background-color: #CCC;" ReplacementText="2px 2px 0 0 #e6e6e6, 4px 4px 0 0 #a7a7a7, 6px 6px 0 0 #e6e6e6; background-color: #e6e6e6;" /> <!-- box shadow color on thumb images -->
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="\.gsp_ns div\.thmb \{ background-color: rgb\(84,84,84\);" ReplacementText=".gsp_ns div.thmb { background-color: rgb(242,242,242);" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="\.gsp_ns textarea \{ background-color: rgb\(74,74,74\);" ReplacementText=".gsp_ns textarea { background-color: rgb(255,255,255);" />
<FileUpdate Files="$(MSBuildProjectDirectory)\gs\skins\light\styles\gallery.css" Regex="\.gsp_abm_sum_sbi_hdr \{ background-color: rgb\(53,53,53\);" ReplacementText=".gsp_abm_sum_sbi_hdr { background-color: rgb(204,204,204);" />
</Target>
<Target Name="CreateInstallZip">
<!-- Obtain reference to installation files -->
<CreateItem Include="
$(MSBuildProjectDirectory)\bin\**\*.dll;
$(MSBuildProjectDirectory)\bin\**\*.txt;
$(MSBuildProjectDirectory)\bin\**\*.manifest;
$(MSBuildProjectDirectory)\App_Data\*.txt;
$(MSBuildProjectDirectory)\App_GlobalResources\*.resx;
$(MSBuildProjectDirectory)\gs\**;
$(MSBuildProjectDirectory)\*.aspx;
$(MSBuildProjectDirectory)\*.config;"
Exclude="$(MSBuildProjectDirectory)\**\*.cs;
$(MSBuildProjectDirectory)\**\*.sdf;
$(MSBuildProjectDirectory)\bin\nl\**;
$(MSBuildProjectDirectory)\gs\mediaobjects\**;
$(MSBuildProjectDirectory)\packages.config;
">
<Output TaskParameter="Include" ItemName="InstallZipFiles" />
</CreateItem>
<Zip Files="@(InstallZipFiles)" WorkingDirectory="$(MSBuildProjectDirectory)\" ZipFileName="$(DeployDir)\$(ProductName)_$(ProductVersion).zip" />
</Target>
<Target Name="CreateSourceZip">
<CreateItem
Include="$(SolutionDir)\**;"
Exclude="
$(SolutionDir)\Website\gs\mediaobjects\**;
$(SolutionDir)\**\*.vsp;
$(SolutionDir)\**\*.vspx;
$(SolutionDir)\**\*.suo;
$(SolutionDir)\**\*.vs10x;
$(SolutionDir)\**\*.user;
$(SolutionDir)\**\*.vspscc;
$(SolutionDir)\**\*.vssscc;
$(SolutionDir)\**\bin\**;
$(SolutionDir)\**\obj\**;
$(SolutionDir)\_ReSharper.TIS.GSP\**;
$(SolutionDir)\TIS.GSP.sln.docstates;
$(SolutionDir)\TIS.GSP.sln.GhostDoc.xml;
$(SolutionDir)\Website\App_Data\GalleryData.sdf;
$(SolutionDir)\Website\WebSite.Publish.xml;
">
<Output TaskParameter="Include" ItemName="SourceZipFiles"/>
</CreateItem>
<Zip Files="@(SourceZipFiles)" WorkingDirectory="$(SolutionDir)" ZipFileName="$(DeployDir)\$(ProductName)_$(ProductVersion)_Source.zip" />
</Target>
</Project>