Skip to content

Commit

Permalink
Work on setting up the build and nF project
Browse files Browse the repository at this point in the history
- Fix AppVeyor
- Tweak VS extension installer
- Add nuget project folder to make restore work
- Fix paths to packages
- Add missing build properties for class library build
- Add Nuget solutions and projects

Signed-off-by: José Simões <jose.simoes@eclo.solutions>
  • Loading branch information
josesimoes committed Sep 18, 2018
1 parent db8fc90 commit 44a0128
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 20 deletions.
42 changes: 30 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: HeABB68Sn/Lhbd69C2cUcfWv0ab/rMDEcOLvcxf8gGw=
secure: /NpmL1KqwHyHFnF0GlUovA586wDIt8Hg/Q8Dro6kUpk=
GitHubToken:
secure: WOqlCsnwTzfDPJFoNV/h8mEESIpG/9uFn1u6oE8hGZtXwIQQlsY+NyyLt9Y5xoFn
secure: i/2hGsqVMwzdM5yIS4rxOIeG3ftx7su7klWYN80s/fHvgk7A5H2fF3oUTNLcyTbw

init:
- git config --global core.autocrlf true
Expand All @@ -42,10 +42,10 @@

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle config --local path vendor/bundle
- gem install bundler --quiet --no-ri --no-rdoc
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
# - bundle install
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1

before_build:
- ps: >-
Expand Down Expand Up @@ -138,7 +138,29 @@
build:
verbosity: minimal

environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- RUBY_VERSION: 24
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: /NpmL1KqwHyHFnF0GlUovA586wDIt8Hg/Q8Dro6kUpk=
GitHubToken:
secure: i/2hGsqVMwzdM5yIS4rxOIeG3ftx7su7klWYN80s/fHvgk7A5H2fF3oUTNLcyTbw

init:
- git config --global core.autocrlf true
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubToken):x-oauth-basic@github.com`n"
- git config --global user.email "%GitHubUserEmail%"
- git config --global user.name "%GitHubUserName%"

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle config --local path vendor/bundle
- gem install bundler --quiet --no-ri --no-rdoc
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1

Expand Down Expand Up @@ -222,18 +244,19 @@

build:
verbosity: minimal

test: off

environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- RUBY_VERSION: 24
GitHubUserName:
secure: 7OBtVAMTodMWK20wg6pGnQ==
GitHubUserEmail:
secure: HeABB68Sn/Lhbd69C2cUcfWv0ab/rMDEcOLvcxf8gGw=
secure: /NpmL1KqwHyHFnF0GlUovA586wDIt8Hg/Q8Dro6kUpk=
GitHubToken:
secure: WOqlCsnwTzfDPJFoNV/h8mEESIpG/9uFn1u6oE8hGZtXwIQQlsY+NyyLt9Y5xoFn
secure: i/2hGsqVMwzdM5yIS4rxOIeG3ftx7su7klWYN80s/fHvgk7A5H2fF3oUTNLcyTbw

init:
- git config --global core.autocrlf true
Expand All @@ -243,11 +266,6 @@
- git config --global user.name "%GitHubUserName%"

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle config --local path vendor/bundle
- gem install bundler --quiet --no-ri --no-rdoc
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
# - bundle install
- choco install gitversion.portable -pre -y
- ps: .\install-vsix-appveyor.ps1

Expand Down
7 changes: 6 additions & 1 deletion install-vsix-appveyor.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
$vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
(New-Object Net.WebClient).DownloadFile('https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vs-publisher-1470366/vsextensions/nanoFrameworkVS2017Extension/0/vspackage', $vsixPath)
"`"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII
& .\install-vsix.cmd

'Installing nanoFramework VS extension ...' | Write-Host -ForegroundColor White -NoNewline

& .\install-vsix.cmd --quiet --no-verbose > $null

'OK' | Write-Host -ForegroundColor Green
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<Content Include="..\bin\$(Configuration)\Stubs\*.*">
<Link>content\Stubs\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="..\bin\$(Configuration)\*.txt">
<Link>content\txt\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="..\bin\$(Configuration)\*.dump">
<Link>content\dump\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="..\bin\$(Configuration)\*.strings">
<Link>content\dump\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="..\bin\$(Configuration)\*.resources">
<Link>content\resources\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<Content Include="..\bin\$(Configuration)\*.il">
<Link>content\disasm\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="lib\" />
</ItemGroup>
<ItemGroup>
<Dependency Include="nanoFramework.CoreLibrary">
<Version>[1.0.0-preview073]</Version>
</Dependency>
<Dependency Include="nanoFramework.Windows.Storage.Streams">
<Version>[1.0.0-preview201]</Version>
</Dependency>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>8D8B5AF4-165A-4070-968D-6A2C58A35273</ProjectGuid>
</PropertyGroup>
<PropertyGroup>
<NuProjPath>..\packages\NuProj.0.20.4-beta\tools\</NuProjPath>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
<PropertyGroup Label="Configuration">
<Id>nanoFramework.Windows.Storage.DELIVERABLES</Id>
<Version>$(GitVersion_NuGetVersionV2)</Version>
<Title>nanoFramework.Windows.Storage.DELIVERABLES</Title>
<Authors>nanoFramework project contributors</Authors>
<Owners>nanoFramework project contributors</Owners>
<Summary>Windows.Storage.DELIVERABLES is not meant for development.</Summary>
<Description>** DON'T REFERENCE THIS PACKAGE ** Not meant for development. This package includes the deliverable artifacts of the Windows.Storage assembly for nanoFramework. These are for testing purposes and for updating the native code base of the core library.</Description>
<ReleaseNotes>
</ReleaseNotes>
<ProjectUrl>https://github.com/nanoframework/lib-Windows.Storage</ProjectUrl>
<LicenseUrl>
</LicenseUrl>
<Copyright>Copyright (c) 2018 The nanoFramework project contributors</Copyright>
<Tags>nanoFramework C# csharp netmf netnf Windows.Storage</Tags>
<IconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</IconUrl>
<GenerateSymbolPackage>false</GenerateSymbolPackage>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.targets" />
</Project>
67 changes: 67 additions & 0 deletions source/Nuget.Windows.Storage/Nuget.Windows.Storage.nuproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<Content Include="..\bin\$(Configuration)\Windows.Storage.dll">
<Link>lib\Windows.Storage.dll</Link>
</Content>
<Content Include="..\bin\$(Configuration)\Windows.Storage.pdb">
<Link>lib\Windows.Storage.pdb</Link>
</Content>
<Content Include="..\bin\$(Configuration)\Windows.Storage.pdbx">
<Link>lib\Windows.Storage.pdbx</Link>
</Content>
<Content Include="..\bin\$(Configuration)\Windows.Storage.pe">
<Link>lib\Windows.Storage.pe</Link>
</Content>
<Content Include="..\bin\$(Configuration)\Windows.Storage.xml">
<Link>lib\Windows.Storage.xml</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="lib\" />
</ItemGroup>
<ItemGroup>
<Dependency Include="nanoFramework.CoreLibrary">
<Version>[1.0.0-preview073]</Version>
</Dependency>
<Dependency Include="nanoFramework.Windows.Storage.Streams">
<Version>[1.0.0-preview201]</Version>
</Dependency>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>8b4c7973-9a32-4d6d-82b1-a166fa4b89e2</ProjectGuid>
</PropertyGroup>
<PropertyGroup>
<NuProjPath>..\packages\NuProj.0.20.4-beta\tools\</NuProjPath>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
<PropertyGroup Label="Configuration">
<Id>nanoFramework.Windows.Storage</Id>
<Version>$(GitVersion_NuGetVersionV2)</Version>
<Title>nanoFramework.Windows.Storage</Title>
<Authors>nanoFramework project contributors</Authors>
<Owners>nanoFramework project contributors</Owners>
<Summary>Windows.Storage assembly for nanoFramework C# projects</Summary>
<Description>This package includes the Windows.Storage assembly for nanoFramework C# projects</Description>
<ReleaseNotes>
</ReleaseNotes>
<ProjectUrl>https://github.com/nanoframework/lib-Windows.Storage</ProjectUrl>
<LicenseUrl>
</LicenseUrl>
<Copyright>Copyright (c) 2018 The nanoFramework project contributors</Copyright>
<Tags>nanoFramework C# csharp netmf netnf Windows.Storage</Tags>
<IconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</IconUrl>
<GenerateSymbolPackage>false</GenerateSymbolPackage>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.targets" />
</Project>
44 changes: 38 additions & 6 deletions source/Windows.Storage.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,37 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<RootNamespace>lib_Windows.Storage</RootNamespace>
<AssemblyName>lib_Windows.Storage</AssemblyName>
<RootNamespace></RootNamespace>
<AssemblyName>Windows.Storage</AssemblyName>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<NF_IsCoreLibrary>True</NF_IsCoreLibrary>
<DocumentationFile>bin\$(Configuration)\Windows.Storage.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<!-- override default options for MetaDataProcessor -->
<!-- generate PE: TRUE -->
<NFMDP_PE_SKIP>false</NFMDP_PE_SKIP>
<NFMDP_PE_Verbose>true</NFMDP_PE_Verbose>
<NFMDP_PE_VerboseMinimize>true</NFMDP_PE_VerboseMinimize>
<!-- generate STUBS: TRUE -->
<NFMDP_STUB_SKIP>false</NFMDP_STUB_SKIP>
<NFMDP_STUB_Verbose>true</NFMDP_STUB_Verbose>
<!-- this is one is absolutely mandatory for base class libraries -->
<NFMDP_STUB_SkeletonWithoutInterop>true</NFMDP_STUB_SkeletonWithoutInterop>
<NFMDP_STUB_VerboseMinimize>true</NFMDP_STUB_VerboseMinimize>
<NFMDP_STUB_GenerateSkeletonFile>Stubs\win_storage_native</NFMDP_STUB_GenerateSkeletonFile>
<NFMDP_STUB_GenerateSkeletonProject>win_storage_native</NFMDP_STUB_GenerateSkeletonProject>
<NFMDP_CMD_LINE_OUTPUT>false</NFMDP_CMD_LINE_OUTPUT>
<Name>Windows.Storage</Name>
</PropertyGroup>
<ItemGroup>
<NFMDP_PE_LoadHints Include="packages\nanoFramework.CoreLibrary.1.0.0-preview073\lib\mscorlib.dll">
<InProject>false</InProject>
</NFMDP_PE_LoadHints>
<NFMDP_PE_LoadHints Include="packages\nanoFramework.Windows.Storage.Streams.1.0.0-preview201\lib\Windows.Storage.Streams.dll">
<InProject>false</InProject>
</NFMDP_PE_LoadHints>
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="AppDataPaths.cs" />
Expand Down Expand Up @@ -77,15 +104,20 @@
<Compile Include="SystemVideoProperties.cs" />
<Compile Include="UserDataPaths.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\..\lib-Windows.Storage\packages\nanoFramework.CoreLibrary.1.0.0-preview062\lib\mscorlib.dll</HintPath>
<HintPath>packages\nanoFramework.CoreLibrary.1.0.0-preview073\lib\mscorlib.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="Windows.Storage.Streams, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>packages\nanoFramework.Windows.Storage.Streams.1.0.0-preview201\lib\Windows.Storage.Streams.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<ProjectExtensions>
Expand Down
31 changes: 31 additions & 0 deletions source/nanoFramework.Windows.Storage.Nuget.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "Nuget.Windows.Storage.DELIVERABLES", "Nuget.Windows.Storage.DELIVERABLES\Nuget.Windows.Storage.DELIVERABLES.nuproj", "{8D8B5AF4-165A-4070-968D-6A2C58A35273}"
EndProject
Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "Nuget.Windows.Storage", "Nuget.Windows.Storage\Nuget.Windows.Storage.nuproj", "{8B4C7973-9A32-4D6D-82B1-A166FA4B89E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8D8B5AF4-165A-4070-968D-6A2C58A35273}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D8B5AF4-165A-4070-968D-6A2C58A35273}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D8B5AF4-165A-4070-968D-6A2C58A35273}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D8B5AF4-165A-4070-968D-6A2C58A35273}.Release|Any CPU.Build.0 = Release|Any CPU
{8B4C7973-9A32-4D6D-82B1-A166FA4B89E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B4C7973-9A32-4D6D-82B1-A166FA4B89E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B4C7973-9A32-4D6D-82B1-A166FA4B89E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B4C7973-9A32-4D6D-82B1-A166FA4B89E2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ACA0B0A7-A547-46C8-A3D8-4DA94A464DF5}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions source/nanoFramework.Windows.Storage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ VisualStudioVersion = 15.0.28010.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "Windows.Storage", "Windows.Storage.nfproj", "{4AA106B9-7837-4A19-9EBC-DF2A1E164F74}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5A2EB86F-8655-43BD-8C8C-A5DA19C0EB2B}"
ProjectSection(SolutionItems) = preProject
packages.config = packages.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
5 changes: 4 additions & 1 deletion source/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nanoFramework.CoreLibrary" version="1.0.0-preview062" targetFramework="netnanoframework10" />
<package id="nanoFramework.CoreLibrary" version="1.0.0-preview073" targetFramework="netnanoframework10" />
<package id="nanoFramework.Windows.Storage.Streams" version="1.0.0-preview201" targetFramework="netnanoframework10" />
<package id="NuProj" version="0.20.4-beta" developmentDependency="true" />
<package id="NuProj.Common" version="0.20.4-beta" developmentDependency="true" />
</packages>

0 comments on commit 44a0128

Please sign in to comment.