mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Merge branch 'feature-2.0.0/builds-with-cpz' into feature-2.0.0/creslib-version-update
This commit is contained in:
52
.github/workflows/docker.yml
vendored
52
.github/workflows/docker.yml
vendored
@@ -66,8 +66,55 @@ jobs:
|
||||
# Build the solutions in the docker image
|
||||
- name: Build Solution
|
||||
run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m
|
||||
- name: Debug CPZ Files
|
||||
shell: powershell
|
||||
run: |
|
||||
Write-Host "Checking for CPZ files..."
|
||||
|
||||
# First, let's find out the actual directory structure
|
||||
Write-Host "Current directory: $(Get-Location)"
|
||||
Write-Host "Directory structure:"
|
||||
Get-ChildItem -Path . -Directory -Recurse -Depth 2 | ForEach-Object { Write-Host $_.FullName }
|
||||
|
||||
# Look for all CPZ files in the repository
|
||||
Write-Host "Searching for all CPZ files in the repository:"
|
||||
$cpzFiles = Get-ChildItem -Path . -Recurse -Filter "*.cpz"
|
||||
if ($cpzFiles.Count -eq 0) {
|
||||
Write-Host "No CPZ files found in the repository."
|
||||
} else {
|
||||
Write-Host "Found $($cpzFiles.Count) CPZ files:"
|
||||
foreach ($file in $cpzFiles) {
|
||||
Write-Host " $($file.FullName)"
|
||||
}
|
||||
|
||||
# Create output directory if it doesn't exist
|
||||
$outputDir = ".\output\build"
|
||||
if (-not (Test-Path $outputDir)) {
|
||||
New-Item -ItemType Directory -Path $outputDir -Force
|
||||
Write-Host "Created output directory: $outputDir"
|
||||
}
|
||||
|
||||
# Copy all CPZ files to the output directory
|
||||
foreach ($file in $cpzFiles) {
|
||||
$destPath = Join-Path $outputDir $file.Name
|
||||
Write-Host "Copying $($file.FullName) to $destPath"
|
||||
Copy-Item -Path $file.FullName -Destination $destPath -Force
|
||||
}
|
||||
}
|
||||
- name: Pack Solution
|
||||
run: dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}"
|
||||
run: |
|
||||
dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}"
|
||||
|
||||
# Ensure CPZ files are included in the package
|
||||
$cpzFiles = Get-ChildItem -Path . -Recurse | Where-Object { $_.Extension -eq ".cpz" }
|
||||
if ($cpzFiles.Count -eq 0) {
|
||||
Write-Host "WARNING: No CPZ files found!"
|
||||
} else {
|
||||
Write-Host "Found $($cpzFiles.Count) CPZ files"
|
||||
foreach ($file in $cpzFiles) {
|
||||
Write-Host "CPZ file: $($file.FullName)"
|
||||
}
|
||||
}
|
||||
- name: Create tag for non-rc builds
|
||||
if: contains(steps.setVersion.outputs.version, 'alpha')
|
||||
run: |
|
||||
@@ -76,9 +123,6 @@ jobs:
|
||||
# Create the release on the source repo
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
# if: contains(steps.setVersion.outputs.version,'-rc-') ||
|
||||
# contains(steps.setVersion.outputs.version,'-hotfix-') ||
|
||||
# contains(steps.setVersion.outputs.version, '-beta-')
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: 'output\**\*.*(cpz|cplz)'
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
Provided under MIT license
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs.
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<None Include="$(PackageOutputPath)\$(AssemblyName)\*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<!-- Include CPZ files from multiple possible locations -->
|
||||
<None Include="$(TargetDir)*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
<None Include="$(OutputPath)*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
<None Include="$(MSBuildProjectDirectory)\bin\$(Configuration)\**\*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
<None Include="$(PackageOutputPath)\build\*.cpz" Condition="$(ProjectType) == 'Program'">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>build;</PackagePath>
|
||||
</None>
|
||||
@@ -10,17 +23,94 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="Create CPLZ" AfterTargets="Build; AfterRebuild" Condition="$(ProjectType) == 'ProgramLibrary' And $(TargetDir) != ''">
|
||||
<Message Text="Creating CPLZ $(TargetDir)"></Message>
|
||||
<Message Text="Creating CPLZ $(TargetDir)" Importance="high" />
|
||||
<Message Text="PackageOutputPath: $(PackageOutputPath)" Importance="high" />
|
||||
<Message Text="AssemblyName: $(AssemblyName)" Importance="high" />
|
||||
<Message Text="TargetName: $(TargetName)" Importance="high" />
|
||||
<Message Text="Version: $(Version)" Importance="high" />
|
||||
<Message Text="TargetFramework: $(TargetFramework)" Importance="high" />
|
||||
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))" />
|
||||
<MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)" Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
|
||||
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/>
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net6.0' ) Or ( '$(TargetFramework)' == 'net8.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
<Target Name="Debug Variables" BeforeTargets="Build">
|
||||
<Message Text="================ Debug Variables ================" Importance="high" />
|
||||
<Message Text="ProjectType: '$(ProjectType)'" Importance="high" />
|
||||
<Message Text="TargetFramework: '$(TargetFramework)'" Importance="high" />
|
||||
<Message Text="TargetDir: '$(TargetDir)'" Importance="high" />
|
||||
<Message Text="===============================================" Importance="high" />
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET47" AfterTargets="SimplSharpPostProcess47" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' != 'net6.0' ) And ( '$(TargetFramework)' != 'net8.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
<Target Name="Copy CPZ NET472"
|
||||
AfterTargets="Build"
|
||||
DependsOnTargets="BuildDependencies"
|
||||
Condition="'$(ProjectType)' == 'Program' And '$(TargetFramework)' == 'net472'">
|
||||
<Message Text="========================================" Importance="high" />
|
||||
<Message Text="Starting CPZ Build Process for NET472" Importance="high" />
|
||||
<Message Text="ProjectType: '$(ProjectType)'" Importance="high" />
|
||||
<Message Text="TargetFramework: '$(TargetFramework)'" Importance="high" />
|
||||
<Message Text="========================================" Importance="high" />
|
||||
|
||||
<!-- Create output directory -->
|
||||
<MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)"
|
||||
Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
|
||||
|
||||
<!-- Copy the CPZ file -->
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).cpz"
|
||||
DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz"
|
||||
Condition="Exists('$(TargetDir)$(TargetName).cpz')" />
|
||||
|
||||
<Message Text="CPZ Build completed for NET472"
|
||||
Condition="Exists('$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz')"
|
||||
Importance="high" />
|
||||
</Target>
|
||||
</Project>
|
||||
<Target Name="Copy CPZ NET6"
|
||||
AfterTargets="Build"
|
||||
DependsOnTargets="BuildDependencies"
|
||||
Condition="'$(ProjectType)' == 'Program' And ('$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net8.0')">
|
||||
<Message Text="========================================" Importance="high" />
|
||||
<Message Text="Starting CPZ Build Process" Importance="high" />
|
||||
<Message Text="ProjectType: '$(ProjectType)'" Importance="high" />
|
||||
<Message Text="TargetFramework: '$(TargetFramework)'" Importance="high" />
|
||||
<Message Text="MSBuildProjectDirectory: '$(MSBuildProjectDirectory)'" Importance="high" />
|
||||
<Message Text="PATH: '$(PATH)'" Importance="high" />
|
||||
<Message Text="========================================" Importance="high" />
|
||||
|
||||
<!-- Check for SimplSharp compiler -->
|
||||
<PropertyGroup>
|
||||
<SimplSharpCompilerPath>$(HOME)/.crestron/SimplSharpPro/SimplSharpCompiler</SimplSharpCompilerPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Warning Text="SimplSharpCompiler not found at: $(SimplSharpCompilerPath)"
|
||||
Condition="!Exists('$(SimplSharpCompilerPath)')" />
|
||||
|
||||
<!-- Run the SimplSharp compiler to create CPZ -->
|
||||
<Exec Command=""$(SimplSharpCompilerPath)" "$(MSBuildProjectDirectory)" "$(TargetDir)""
|
||||
IgnoreExitCode="false"
|
||||
WorkingDirectory="$(MSBuildProjectDirectory)"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition="Exists('$(SimplSharpCompilerPath)')">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
|
||||
<Message Text="SimplSharp Output: $(OutputOfExec)" Importance="high" />
|
||||
|
||||
<!-- Create output directory -->
|
||||
<MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)"
|
||||
Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
|
||||
|
||||
<!-- Copy the CPZ file -->
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).cpz"
|
||||
DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz"
|
||||
Condition="Exists('$(TargetDir)$(TargetName).cpz')" />
|
||||
|
||||
<Message Text="CPZ Build completed"
|
||||
Condition="Exists('$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz')"
|
||||
Importance="high" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildDependencies">
|
||||
<MSBuild Projects="@(ProjectReference)"
|
||||
Targets="Build"
|
||||
BuildInParallel="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -6,7 +6,7 @@
|
||||
<PropertyGroup>
|
||||
<RootNamespace>PepperDash.Essentials</RootNamespace>
|
||||
<AssemblyName>PepperDashEssentials</AssemblyName>
|
||||
<TargetFrameworks>net472;net6</TargetFrameworks>
|
||||
<TargetFrameworks>net472</TargetFrameworks>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<Title>PepperDash Essentials</Title>
|
||||
|
||||
Reference in New Issue
Block a user