Skip to content

Commit

Permalink
Use standard VS project for 7Zap.NET
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Jan 30, 2024
1 parent 05f8a0f commit 9c45f5f
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 41 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ jobs:
cmake ..\ -A x64 "-DCMAKE_SYSTEM_VERSION=10.0.19041.0"
cmake --build . --config Release
- name: Build 7Zap.NET
run: |
msbuild 7Zap\dirs.proj -restore -p:FullVersion=23.01.${{ github.run_number }}
- name: Nuget pack
run: |
nuget pack 7Zap\Nuget\7Zap.NET.nuspec -Version 23.01.${{ github.run_number }} -BasePath "${{ github.workspace }}" -NonInteractive -Properties "src_root=.;build_x64=build-x64;build_x86=build-x86;build_arm64=build-Arm64;config=Release"
nuget pack 7Zap\Nuget\7Zap.nuspec -Version 23.01.${{ github.run_number }} -BasePath "${{ github.workspace }}" -NonInteractive -Properties "src_root=.;build_x64=build-x64;build_x86=build-x86;build_arm64=build-Arm64;config=Release"
- uses: actions/[email protected]
Expand Down
36 changes: 36 additions & 0 deletions 7Zap/7Zap.NET/7Zap.NET.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>SevenZap</RootNamespace>
<TargetName>7Zap.NET</TargetName>
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Label="Nuspec">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
<PackageId>7Zap.NET</PackageId>
<PackageVersion>$(FullVersion)</PackageVersion>
<Title>7Zap.NET: dotnet 7z creator</Title>
<Authors>Nir Bar</Authors>
<Company>N.B- Panel::Software Ltd.</Company>
<PackageOutputPath>..\..\</PackageOutputPath>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>dotnet assembly that creates or updated 7z archives</Description>
<Copyright>Copyright ©2011-$([System.DateTime]::Now.ToString("yyyy")) Panel::Software</Copyright>
<PackageProjectUrl>https://github.com/nirbar/7zap</PackageProjectUrl>
<RepositoryUrl>https://github.com/nirbar/7zap</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\README.md" Visible="false" Pack="true" PackagePath="README.md" />
<None Include="..\..\build-x64\7Zap\7Zap\$(Configuration)\7Zap.dll" Visible="false" Pack="true" PackagePath="lib\netstandard2\win-x64\7Zap.dll" />
<None Include="..\..\build-x86\7Zap\7Zap\$(Configuration)\7Zap.dll" Visible="false" Pack="true" PackagePath="lib\netstandard2\win-x86\7Zap.dll" />
<None Include="..\..\build-arm64\7Zap\7Zap\$(Configuration)\7Zap.dll" Visible="false" Pack="true" PackagePath="lib\netstandard2\win-arm64\7Zap.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="TidyBuild" />
</ItemGroup>

</Project>
16 changes: 0 additions & 16 deletions 7Zap/7Zap.NET/CMakeLists.txt

This file was deleted.

36 changes: 36 additions & 0 deletions 7Zap/7Zap.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34316.72
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "7Zap.NET", "7Zap.NET\7Zap.NET.csproj", "{050E3992-624A-3CA1-A654-796F47D6961D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{80BB407D-1D60-4D9F-AAF3-248F559D0D82}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\build.yml = ..\.github\workflows\build.yml
CMakeLists.txt = CMakeLists.txt
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
dirs.proj = dirs.proj
global.json = global.json
TidyBuild.custom.props = TidyBuild.custom.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{050E3992-624A-3CA1-A654-796F47D6961D}.Debug|x64.ActiveCfg = Debug|Any CPU
{050E3992-624A-3CA1-A654-796F47D6961D}.Debug|x64.Build.0 = Debug|Any CPU
{050E3992-624A-3CA1-A654-796F47D6961D}.Release|x64.ActiveCfg = Release|Any CPU
{050E3992-624A-3CA1-A654-796F47D6961D}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4A4B384F-319A-33C7-A3F0-4AA77687364E}
EndGlobalSection
EndGlobal
1 change: 0 additions & 1 deletion 7Zap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
cmake_policy(SET CMP0091 NEW)

add_subdirectory ("7zap")
add_subdirectory ("7zap.NET")
21 changes: 21 additions & 0 deletions 7Zap/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup Label="Build folders">
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<BaseBuildFolder Condition="'$(BaseBuildFolder)'==''">$(MSBuildThisFileDirectory)..\build\</BaseBuildFolder>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(BaseBuildFolder)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath )'==''">$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>

<BuildFolder Condition="'$(BuildFolder)'==''">$(BaseBuildFolder)$(Platform)\</BuildFolder>
<OutputPath Condition="'$(OutputPath)'==''">$(BuildFolder)bin\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
<OutDirLib Condition="'$(OutDirLib)'==''">$(BuildFolder)lib\$(Configuration)\</OutDirLib>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'==''">$(BuildFolder)obj\$(Configuration)\$(MSBuildProjectName)\</IntermediateOutputPath>

<OutDir Condition="'$(OutDir)'==''">$(OutputPath)</OutDir>
<IntDir Condition="'$(IntDir)'==''">$(IntermediateOutputPath)</IntDir>
<OutputDirectory Condition="'$(OutputDirectory)'==''">$(OutputPath)</OutputDirectory>
<IntermediateDirectory Condition="'$(IntermediateDirectory)'==''">$(IntermediateOutputPath)</IntermediateDirectory>

<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
</Project>
9 changes: 9 additions & 0 deletions 7Zap/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="TidyBuild" version="1.5.2"/>
</ItemGroup>
</Project>
23 changes: 0 additions & 23 deletions 7Zap/Nuget/7Zap.NET.nuspec

This file was deleted.

12 changes: 12 additions & 0 deletions 7Zap/TidyBuild.custom.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)TidyBuild.user.props" Condition="Exists('$(MSBuildThisFileDirectory)TidyBuild.user.props')"/>
<PropertyGroup>
<FullVersion>23.01</FullVersion>
<FullVersion Condition=" '$(GITHUB_RUN_NUMBER)'!='' ">$(FullVersion).$(GITHUB_RUN_NUMBER)</FullVersion>

<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
</PropertyGroup>
</Project>
13 changes: 13 additions & 0 deletions 7Zap/dirs.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
<TraversalGlobalProperties>SolutionDir=$(MSBuildThisFileDirectory);BuildProjectReferences=false</TraversalGlobalProperties>
<CustomBeforeTraversalProps>$(MSBuildThisFileDirectory)Directory.Build.props</CustomBeforeTraversalProps>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="7Zap.NET\7Zap.NET.csproj" Properties="Configuration=$(Configuration);Platform=AnyCPU" Targets="Restore;Build" BuildInParallel="false" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="TidyBuild" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions 7Zap/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"msbuild-sdks": {
"Microsoft.Build.Traversal": "4.0.0"
},
"sdk": {
"version": "6.0.300",
"rollForward": "latestMinor"
}
}

0 comments on commit 9c45f5f

Please sign in to comment.