Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit ba414fb

Browse files
Initial code commit
1 parent 6b8b934 commit ba414fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+8698
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#########################################
2+
# #
3+
# TheOutfiled's Ignore file #
4+
5+
##### File globs to match ####
6+
syntax: glob
7+
# Resharper
8+
_ReSharper.*
9+
# Visual Studio Stuff
10+
*.obj
11+
*.pdb
12+
*.user
13+
*.aps
14+
*.pch
15+
*.vspscc
16+
*.vssscc
17+
*_i.c
18+
*_p.c
19+
*.ncb
20+
*.suo
21+
*.tlb
22+
*.tlh
23+
*.bak
24+
*.cache
25+
*.ilk
26+
*.log
27+
*.lib
28+
*.sbr
29+
*.scc
30+
*.csproj.user
31+
obj/
32+
bin/
33+
[Dd]ebug*/
34+
[Rr]elease*/
35+
*.[Pp]ublish.xml
36+
# General
37+
*.orig
38+
*/Thumbs.db
39+
*/log.txt
40+
/Assets/
41+
/Build/
42+
*.DS_Store
43+
[Pp]ackages/*/**

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

1.59 MB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://www.nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
34+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
35+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
40+
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
41+
</PropertyGroup>
42+
43+
<PropertyGroup>
44+
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
45+
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
46+
</PropertyGroup>
47+
48+
<PropertyGroup>
49+
<!-- NuGet command -->
50+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
51+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
52+
53+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
54+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
55+
56+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
57+
58+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
59+
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
60+
61+
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
62+
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
63+
64+
<!-- Commands -->
65+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
66+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
67+
68+
<!-- We need to ensure packages are restored prior to assembly resolve -->
69+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
70+
RestorePackages;
71+
$(BuildDependsOn);
72+
</BuildDependsOn>
73+
74+
<!-- Make the build depend on restore packages -->
75+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
76+
$(BuildDependsOn);
77+
BuildPackage;
78+
</BuildDependsOn>
79+
</PropertyGroup>
80+
81+
<Target Name="CheckPrerequisites">
82+
<!-- Raise an error if we're unable to locate nuget.exe -->
83+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
84+
<!--
85+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
86+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
87+
parallel builds will have to wait for it to complete.
88+
-->
89+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
90+
</Target>
91+
92+
<Target Name="_DownloadNuGet">
93+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
94+
</Target>
95+
96+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
97+
<Exec Command="$(RestoreCommand)"
98+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
99+
100+
<Exec Command="$(RestoreCommand)"
101+
LogStandardErrorAsError="true"
102+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
103+
</Target>
104+
105+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
106+
<Exec Command="$(BuildCommand)"
107+
Condition=" '$(OS)' != 'Windows_NT' " />
108+
109+
<Exec Command="$(BuildCommand)"
110+
LogStandardErrorAsError="true"
111+
Condition=" '$(OS)' == 'Windows_NT' " />
112+
</Target>
113+
114+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
115+
<ParameterGroup>
116+
<OutputFilename ParameterType="System.String" Required="true" />
117+
</ParameterGroup>
118+
<Task>
119+
<Reference Include="System.Core" />
120+
<Using Namespace="System" />
121+
<Using Namespace="System.IO" />
122+
<Using Namespace="System.Net" />
123+
<Using Namespace="Microsoft.Build.Framework" />
124+
<Using Namespace="Microsoft.Build.Utilities" />
125+
<Code Type="Fragment" Language="cs">
126+
<![CDATA[
127+
try {
128+
OutputFilename = Path.GetFullPath(OutputFilename);
129+
130+
Log.LogMessage("Downloading latest version of NuGet.exe...");
131+
WebClient webClient = new WebClient();
132+
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
133+
134+
return true;
135+
}
136+
catch (Exception ex) {
137+
Log.LogErrorFromException(ex);
138+
return false;
139+
}
140+
]]>
141+
</Code>
142+
</Task>
143+
</UsingTask>
144+
</Project>

Our.Umbraco.DocTypeGridEditor.sln

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.DocTypeGridEditor", "Src\Our.Umbraco.DocTypeGridEditor\Our.Umbraco.DocTypeGridEditor.csproj", "{4BD1DB40-1B39-4966-8740-D6A39D658598}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CEE9961C-D747-40CD-B0B2-868D6B46833E}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\NuGet.Config = .nuget\NuGet.Config
11+
.nuget\NuGet.exe = .nuget\NuGet.exe
12+
.nuget\NuGet.targets = .nuget\NuGet.targets
13+
EndProjectSection
14+
EndProject
15+
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "UmbracoCms.7.2.2", "http://localhost:57740", "{4243FDA2-F71E-4A8E-92B0-8021D5C62E64}"
16+
ProjectSection(WebsiteProperties) = preProject
17+
UseIISExpress = "true"
18+
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5"
19+
Debug.AspNetCompiler.VirtualPath = "/localhost_57740"
20+
Debug.AspNetCompiler.PhysicalPath = "..\..\..\Sandbox\Umbraco\UmbracoCms.7.2.2\"
21+
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_57740\"
22+
Debug.AspNetCompiler.Updateable = "true"
23+
Debug.AspNetCompiler.ForceOverwrite = "true"
24+
Debug.AspNetCompiler.FixedNames = "false"
25+
Debug.AspNetCompiler.Debug = "True"
26+
Release.AspNetCompiler.VirtualPath = "/localhost_57740"
27+
Release.AspNetCompiler.PhysicalPath = "..\..\..\Sandbox\Umbraco\UmbracoCms.7.2.2\"
28+
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_57740\"
29+
Release.AspNetCompiler.Updateable = "true"
30+
Release.AspNetCompiler.ForceOverwrite = "true"
31+
Release.AspNetCompiler.FixedNames = "false"
32+
Release.AspNetCompiler.Debug = "False"
33+
SlnRelativePath = "..\..\..\Sandbox\Umbraco\UmbracoCms.7.2.2\"
34+
EndProjectSection
35+
EndProject
36+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Package", "Package", "{D588B45D-9E67-4136-8271-2B8724C8165F}"
37+
ProjectSection(SolutionItems) = preProject
38+
Package.build.cmd = Package.build.cmd
39+
Package.build.xml = Package.build.xml
40+
Package.xml = Package.xml
41+
README.markdown = README.markdown
42+
EndProjectSection
43+
EndProject
44+
Global
45+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
46+
Debug|Any CPU = Debug|Any CPU
47+
Release|Any CPU = Release|Any CPU
48+
EndGlobalSection
49+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
50+
{4BD1DB40-1B39-4966-8740-D6A39D658598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{4BD1DB40-1B39-4966-8740-D6A39D658598}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{4BD1DB40-1B39-4966-8740-D6A39D658598}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{4BD1DB40-1B39-4966-8740-D6A39D658598}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{4243FDA2-F71E-4A8E-92B0-8021D5C62E64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{4243FDA2-F71E-4A8E-92B0-8021D5C62E64}.Release|Any CPU.ActiveCfg = Debug|Any CPU
56+
EndGlobalSection
57+
GlobalSection(SolutionProperties) = preSolution
58+
HideSolutionNode = FALSE
59+
EndGlobalSection
60+
EndGlobal

Package.build.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe Package.build.xml
2+
pause

Package.build.xml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
3+
4+
<!--
5+
****************************************
6+
* IMPORTS
7+
****************************************
8+
-->
9+
<PropertyGroup>
10+
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\Tools\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
11+
<MSBuildUmbracoTasksPath>$(MSBuildProjectDirectory)\Tools\MSBuildUmbracoTasks</MSBuildUmbracoTasksPath>
12+
</PropertyGroup>
13+
14+
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
15+
<Import Project="$(MSBuildUmbracoTasksPath)\MSBuild.Umbraco.Tasks.Targets" />
16+
17+
<!--
18+
****************************************
19+
* PROPERTIES
20+
****************************************
21+
-->
22+
<PropertyGroup>
23+
<PackageVersion>0.1</PackageVersion>
24+
<ProjectName>Our.Umbraco.DocTypeGridEditor</ProjectName>
25+
<BuildConfig>Debug</BuildConfig>
26+
</PropertyGroup>
27+
28+
<PropertyGroup>
29+
<RootDir>$(MSBuildProjectDirectory)</RootDir>
30+
<BuildDir>$(RootDir)\Build</BuildDir>
31+
<PackageDir>$(RootDir)\Package</PackageDir>
32+
<ProjectDir>$(RootDir)\Src\$(ProjectName)</ProjectDir>
33+
</PropertyGroup>
34+
35+
<!--
36+
****************************************
37+
* TARGETS
38+
****************************************
39+
-->
40+
41+
<!-- CLEAN -->
42+
<Target Name="Clean">
43+
<RemoveDir Directories="$(BuildDir)" Condition="Exists('$(BuildDir)')" />
44+
<RemoveDir Directories="$(PackageDir)" Condition="Exists('$(PackageDir)')" />
45+
<MakeDir Directories="$(BuildDir)" />
46+
<MakeDir Directories="$(PackageDir)" />
47+
</Target>
48+
49+
<!-- UPDATE ASSEMBLEY VERSION -->
50+
<Target Name="UpdateAssemblyInfo" DependsOnTargets="Clean">
51+
<FileUpdate
52+
Encoding="ASCII"
53+
Files="$(ProjectDir)\Properties\AssemblyInfo.cs"
54+
Regex="AssemblyVersion\(&quot;.*&quot;\)\]"
55+
ReplacementText="AssemblyVersion(&quot;$(PackageVersion).0.0&quot;)]" />
56+
<FileUpdate
57+
Encoding="ASCII"
58+
Files="$(ProjectDir)\Properties\AssemblyInfo.cs"
59+
Regex="AssemblyFileVersion\(&quot;.*&quot;\)\]"
60+
ReplacementText="AssemblyFileVersion(&quot;$(PackageVersion).0.0&quot;)]" />
61+
</Target>
62+
63+
<!-- COMPILE -->
64+
<Target Name="Compile" DependsOnTargets="UpdateAssemblyInfo">
65+
<MSBuild Projects="$(ProjectDir)\$(ProjectName).csproj" Properties="Configuration=$(BuildConfig)" />
66+
</Target>
67+
68+
<!-- PREPAIRE FILES -->
69+
<Target Name="PrepairFiles" DependsOnTargets="Compile">
70+
<ItemGroup>
71+
<BinFiles Include="$(ProjectDir)\bin\$(BuildConfig)\$(ProjectName).dll" />
72+
<PluginFiles Include="$(ProjectDir)\Web\UI\**\*.*" />
73+
<PackageFile Include="$(RootDir)\Package.xml" />
74+
</ItemGroup>
75+
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BuildDir)\bin" />
76+
<Copy SourceFiles="@(PluginFiles)" DestinationFolder="$(BuildDir)\%(RecursiveDir)" />
77+
<Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildDir)" />
78+
</Target>
79+
80+
<!-- MANIFEST -->
81+
<Target Name="Manifest" DependsOnTargets="PrepairFiles">
82+
<ItemGroup>
83+
<ManifestFiles Include="$(BuildDir)\**\*" Exclude="$(BuildDir)\Package.xml" />
84+
</ItemGroup>
85+
<ManifestUpdate ManifestFile="$(BuildDir)\Package.xml"
86+
WorkingDirectory="$(BuildDir)"
87+
PackageVersion="$(PackageVersion)"
88+
Files="@(ManifestFiles)" />
89+
</Target>
90+
91+
<!-- PACKAGE -->
92+
<Target Name="Package" DependsOnTargets="Manifest">
93+
<ItemGroup>
94+
<PackageFiles Include="$(BuildDir)\**\*.*" />
95+
</ItemGroup>
96+
<Package ManifestFile="$(BuildDir)\Package.xml"
97+
WorkingDirectory="$(BuildDir)"
98+
OutputDirectory="$(PackageDir)"
99+
Files="@(PackageFiles)" />
100+
</Target>
101+
102+
</Project>

0 commit comments

Comments
 (0)