Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sn4k3 committed Dec 29, 2020
1 parent b2617d1 commit 7211afe
Show file tree
Hide file tree
Showing 55 changed files with 2,680 additions and 2,340 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Changelog

## 25/11/2020 - v2.0.0
## 29/12/2020 - v2.1.0

* (Add) Tool - Redraw model/supports: Redraw the model or supports with a set brightness.
This requires an extra sliced file from same object but without any supports and raft, straight to the build plate.
* (Add) Tool - Raft Relief:
* Allow ignore a number of layer(s) to start only after that number, detault is 0
* Allow set a pixel brightness for the operation, detault is 0
* New "dimming" type, works like relief but instead of drill raft it set to a brightness level
* (Add) Arch-x64 package (#104)
* (Fix) A OS dependent startup crash when there's no primary screen set (#115)
* (Fix) Tool - Re height: Able to cancel the job
* (Fix) Unable to save "Calibration - Tolerance" profiles
* (Change) Core: Move all operations code from LayerManager and Layer to it own Operation* class within a Execute method (Abstraction)
* (Change) sh UVtools.sh to run independent UVtools instance first, if not found it will fallback to dotnet UVtools.dll
* (Change) Compile and zip project with WSL to keep the +x (execute) attribute for linux and unix systems
* (Change) MacOS builds are now packed as an application bundle (Auto-updater disabled for now)
* (Remove) Universal package from builds/releases

## 25/12/2020 - v2.0.0

This release bump the major version due the introduction of .NET 5.0, the discontinuation old UVtools GUI project and the new calibration wizards.
* (Upgrade) From .NET Core 3.1 to .NET 5.0
Expand All @@ -11,7 +29,6 @@ This release bump the major version due the introduction of .NET 5.0, the discon
* **Take into account the screen scale factor to limit the dialogs windows maximum size**: Due wrong information UVtools can clamp the windows maximum size when you have plenty more avaliable or when use in a secondary monitor. If is the case disable this option
* **Horizontal limiting margin:** Limits windows and dialogs maximum width to the screen resolution less this margin
* **Vertical limiting margin:** Limits windows and dialogs maximum height to the screen resolution less this margin
* (Add) Setting - General: Take into account the screen scale factor to limit the dialogs windows maximum size. Due wrong information UVtools can cap the windows maximum size when you have plenty more avaliable or when use in a secondary monitor. If is the case disable this option
* (Add) Ctrl + Shift + Z to undo and edit the last operation (If contain a valid operation)
* (Add) Allow to deselect the current selected profile
* (Add) Allow to set a default profile to load in when open a tool
Expand Down
5 changes: 3 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

### Jason S. McMullan (ezrec)

* For ideas and permission to use his project (uv3dp)
* For ideas, file formats and permission to use his project (uv3dp)
* https://github.com/ezrec/uv3dp

# Supporters / Contributors
Expand All @@ -40,4 +40,5 @@
* Nahin Mulla
* Jorge diego Robles Ayerbe
* Timothy Gray
* David Gordon
* David Gordon
* Claus Pfeilschifter
65 changes: 56 additions & 9 deletions CreateRelease.WPF.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FixedEncoder : System.Text.UTF8Encoding {
####################################
### Configuration ###
####################################
$enableMSI = $false
$enableMSI = $true
# Profilling
$stopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
$deployStopWatch = New-Object -TypeName System.Diagnostics.Stopwatch
Expand All @@ -44,7 +44,11 @@ $project = "UVtools.WPF"
$buildWith = "Release"
$netFolder = "net5.0"
$releaseFolder = "$PSScriptRoot\$project\bin\$buildWith\$netFolder"
$publishFolder = "$PSScriptRoot\publish"
$objFolder = "$PSScriptRoot\$project\obj\$buildWith\$netFolder"
$publishFolder = "publish"
$platformsFolder = "UVtools.Platforms"

$macIcns = "UVtools.CAD/UVtools.icns"

#$version = (Get-Command "$releaseFolder\UVtools.dll").FileVersionInfo.ProductVersion
$projectXml = [Xml] (Get-Content "$PSScriptRoot\$project\$project.csproj")
Expand Down Expand Up @@ -80,14 +84,22 @@ $runtimes =
"win-x64" = @{
"extraCmd" = "-p:PublishReadyToRun=true"
"exclude" = @("libcvextern.so", "libcvextern.dylib", "UVtools.sh")
"include" = @()
}
"linux-x64" = @{
"extraCmd" = "-p:PublishReadyToRun=true"
"exclude" = @("x86", "x64", "libcvextern.dylib")
"include" = @("libcvextern.so")
}
"arch-x64" = @{
"extraCmd" = "-p:PublishReadyToRun=true"
"exclude" = @("x86", "x64", "libcvextern.dylib", "libcvextern.so")
"include" = @("libcvextern.so")
}
"rhel-x64" = @{
"extraCmd" = "-p:PublishReadyToRun=true"
"exclude" = @("x86", "x64", "libcvextern.dylib")
"include" = @("libcvextern.so")
}
#"unix-x64" = @{
# "extraCmd" = "-p:PublishReadyToRun=true"
Expand All @@ -96,6 +108,7 @@ $runtimes =
"osx-x64" = @{
"extraCmd" = "-p:PublishReadyToRun=true"
"exclude" = @("x86", "x64", "libcvextern.so")
"include" = @("libcvextern.dylib")
}
}

Expand All @@ -104,31 +117,65 @@ foreach ($obj in $runtimes.GetEnumerator()) {
$deployStopWatch.Restart()
$runtime = $obj.Name; # runtime name
$extraCmd = $obj.extraCmd; # extra cmd to run with dotnet
$targetZip = "$publishFolder\${software}_${runtime}_v$version.zip" # Target zip filename
$targetZip = "$publishFolder/${software}_${runtime}_v$version.zip" # Target zip filename

# Deploy
Write-Output "################################
Building: $runtime"
dotnet publish $project -o "$publishFolder\$runtime" -c $buildWith -r $runtime $extraCmd
wsl dotnet publish $project -o "$publishFolder/$runtime" -c $buildWith -r $runtime $extraCmd

# Cleanup
Remove-Item "$releaseFolder\$runtime" -Recurse -ErrorAction Ignore
Remove-Item "$releaseFolder\$runtime" -Recurse -ErrorAction Ignore
Remove-Item "$objFolder\$runtime" -Recurse -ErrorAction Ignore
Write-Output "$releaseFolder\$runtime"

foreach ($excludeObj in $obj.Value.exclude) {
Write-Output "Excluding: $excludeObj"
Remove-Item "$publishFolder\$runtime\$excludeObj" -Recurse -ErrorAction Ignore
}

# Zip
foreach ($includeObj in $obj.Value.include) {
Write-Output "Including: $includeObj"
Copy-Item "$platformsFolder\$runtime\$includeObj" -Destination "$publishFolder\$runtime" -Recurse -ErrorAction Ignore
}

Write-Output "Compressing $runtime to: $targetZip"
[System.IO.Compression.ZipFile]::CreateFromDirectory("$publishFolder\$runtime", $targetZip, [System.IO.Compression.CompressionLevel]::Optimal, $false, [FixedEncoder]::new())
$deployStopWatch.Stop()
Write-Output $targetZip "$publishFolder/$runtime"

if($runtime.Equals('osx-x64')){
$macAppFolder = "${software}.app"
$macPublishFolder = "$publishFolder/${macAppFolder}"

wsl mkdir "$macPublishFolder"
wsl mkdir "$macPublishFolder/Contents"
wsl mkdir "$macPublishFolder/Contents/MacOS"
wsl mkdir "$macPublishFolder/Contents/Resources"

$outputInfoplist = "$macPublishFolder/Contents/Info.plist"
wsl cp "$platformsFolder/$runtime/Info.plist" "$outputInfoplist"
((Get-Content -Path "$outputInfoplist") -replace '#VERSION',"$version") | Set-Content -Path "$outputInfoplist"
wsl cp "$macIcns" "$macPublishFolder/Contents/Resources/$software.icns"
wsl cp -a "$publishFolder/$runtime/." "$macPublishFolder/Contents/MacOS"

wsl cd "$publishFolder/" `&`& pwd `&`& zip -r "../$targetZip" "$macAppFolder/*"
}
else {
wsl cd "$publishFolder/$runtime" `&`& pwd `&`& zip -r "../../$targetZip" "."
}

# Zip
#Write-Output "Compressing $runtime to: $targetZip"
#Write-Output $targetZip "$publishFolder/$runtime"
#[System.IO.Compression.ZipFile]::CreateFromDirectory("$publishFolder\$runtime", $targetZip, [System.IO.Compression.CompressionLevel]::Optimal, $false, [FixedEncoder]::new())
#wsl cd "$publishFolder/$runtime" `&`& pwd `&`& chmod +x -f "./$software" `|`| : `&`& zip -r "../../$targetZip" "."
$deployStopWatch.Stop()
Write-Output "Took: $($deployStopWatch.Elapsed)
################################
"
}

# Universal package
<#
$deployStopWatch.Restart()
$runtime = "universal-x86-x64"
$targetZip = "$publishFolder\${software}_${runtime}_v$version.zip"
Expand All @@ -143,7 +190,7 @@ Write-Output "Took: $($deployStopWatch.Elapsed)
################################
"
$stopWatch.Stop()

#>

# MSI Installer for Windows
if($enableMSI)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y apt-transport-https
dotnet-runtime-3.1
dotnet-runtime-5.0
!-->

```bash
Expand Down Expand Up @@ -211,7 +211,7 @@ To run UVtools open it folder on a terminal and call one of:
1. 4GB RAM or higher

<!---
* Donwload and install: https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.402-macos-x64-installer
* Donwload and install: https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.101-macos-x64-installer
brew install libjpeg libpng libgeotiff libdc1394 ffmpeg openexr tbb
-->

Expand Down
Binary file added UVtools.CAD/UVtools.icns
Binary file not shown.
7 changes: 7 additions & 0 deletions UVtools.Core/Extensions/EmguExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,12 @@ public static Mat InitMat(Size size, int channels = 1, DepthType depthType = Dep
return mat;
}

public static Mat InitMat(Size size, MCvScalar scalar, int channels = 1, DepthType depthType = DepthType.Cv8U)
{
var mat = new Mat(size, depthType, channels);
mat.SetTo(scalar);
return mat;
}

}
}
2 changes: 1 addition & 1 deletion UVtools.Core/FileFormats/FileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
if (SuppressRebuildProperties) return;
if (e.PropertyName == nameof(LayerCount))
{
if (this[LayerCount - 1] is null) return; // Not initialized
if (LayerCount == 0 || this[LayerCount - 1] is null) return; // Not initialized
LayerManager.RebuildLayersProperties();
RebuildGCode();
PrintTime = PrintTimeComputed;
Expand Down
12 changes: 6 additions & 6 deletions UVtools.Core/FileFormats/PhotonWorkshopFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,12 @@ public void Validate()

public override FileExtension[] FileExtensions { get; } = {

new FileExtension("pwmx", "Photon Mono X (PWMX)"),
new FileExtension("pwms", "Photon Mono SE (PWMS)"),
new FileExtension("pwmo", "Photon Mono (PWMO)"),
new FileExtension("pwx", "Photon X (PWX)"),
new FileExtension("pws", "Photon / Photon S (PWS)"),
new FileExtension("pw0", "Photon Zero (PW0)"),
new("pwmx", "Photon Mono X (PWMX)"),
new("pwms", "Photon Mono SE (PWMS)"),
new("pwmo", "Photon Mono (PWMO)"),
new("pwx", "Photon X (PWX)"),
new("pws", "Photon / Photon S (PWS)"),
new("pw0", "Photon Zero (PW0)"),

};

Expand Down
Loading

0 comments on commit 7211afe

Please sign in to comment.