Skip to content

Commit

Permalink
Bugfixes and minor changes:
Browse files Browse the repository at this point in the history
[Viewport] Discard left mouse button click if context menu is open and just close the menu.
[SketchEditor] Re-enable move tool after segment creation.
[Model,SaveAs] Initialize file dialog with current directory and filename.
[Model,SaveAs] Add correct file extension if user has added a wrong extension.
[Exchange,SaveAs] Find correct exchanger if user has given an extension not supported by the selected exchanger.
[Document] Renamed method names containing "child".
[Reference] Fixed missing reference operand when cloning multiple Reference shapes referencing the same body and reusing it.
[UserGuide] Drop CHM support, use online docs instead.
[Viewport] Create viewport OpenGL window with correct size and position instead of waiting of first reposition.
[Script] Fixed crash if erroneous script is startet via command line.
[Managed] Fixed intellisense getting confused by '#using as_friend' in PCH.
[Docs] Removed duplicate license file for TaskDialog and TreeView.
[OCCT] Updated version metadata.
  • Loading branch information
dipts committed Dec 21, 2021
1 parent f2a4316 commit 456a11c
Show file tree
Hide file tree
Showing 153 changed files with 945 additions and 697 deletions.
22 changes: 5 additions & 17 deletions Build/Build.csx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using System.Linq;

if (Args.Count() < 1)
{
Printer.Line("Usage: build <all, debug, release, publish, doc, webdoc> [/clean] [/log]");
Printer.Line("Usage: build <all, debug, release, publish, webdoc> [/clean] [/log]");
return -1;
}

Expand Down Expand Up @@ -39,10 +39,6 @@ if (buildRelease)
if (!_BuildConfiguration("Release"))
return -1;

if (config == "all" || config == "doc")
if (!_BuildDocumentation("Doc"))
return -1;

if (config == "all" || config == "publish")
if (!_BuildPublish())
return -1;
Expand Down Expand Up @@ -130,25 +126,17 @@ bool _BuildDocumentation(string configuration)
return false;

// Ensure SHFB
var shfbPath = Packages.FindPackageFile($"EWSoftware.SHFB.20*", "Tools\\BuildAssembler.exe");
var shfbPath = Packages.FindPackageFile($"EWSoftware.SHFB.20*", "tools\\SandcastleHelpFileBuilder.targets");
if(string.IsNullOrEmpty(shfbPath))
return false;
Environment.SetEnvironmentVariable("SHFBROOT", Path.GetDirectoryName(shfbPath));
shfbPath = Path.GetDirectoryName(shfbPath);

// Ensure .Net Reflection Package
var shfbNetReflectionPath = Packages.FindPackageFile($"EWSoftware.SHFB.NET.*", "build\\EWSoftware.SHFB.NET.props");
if(string.IsNullOrEmpty(shfbNetReflectionPath))
return false;
Environment.SetEnvironmentVariable("SHFBNETFRAMEWORK", Path.GetDirectoryName(shfbNetReflectionPath));
shfbNetReflectionPath = Path.GetDirectoryName(shfbNetReflectionPath);

// Ensure HtmlHelp
var setupCompilerPath = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\HTML Help Workshop", "InstallDir", "") as string;
if(string.IsNullOrEmpty(setupCompilerPath) || !File.Exists(Path.Combine(setupCompilerPath, "hhc.exe")))
{
Printer.Error("Cannot find HTML Help Workshop. Please install it.");
return false;
}

if(!Version.ReadCurrentVersion(out var major, out var minor, out var revision, out var flags))
{
Printer.Error("Cannot read version information.");
Expand All @@ -158,7 +146,7 @@ bool _BuildDocumentation(string configuration)

var pathToProject = Path.Combine(Common.GetRootFolder(), @"Source\Macad.UserGuide\Macad.UserGuide.shfbproj");

var commandLine = $"\"{pathToProject}\" /p:Configuration={configuration} /p:HelpFileVersion=\"{major}.{minor}{flagsStr}\" /m /nologo /ds /verbosity:minimal /clp:Summary;EnableMPLogging";
var commandLine = $"\"{pathToProject}\" /p:Configuration={configuration} /p:SHFBROOT=\"{shfbPath}\" /p:SHFBNETFRAMEWORK=\"{shfbNetReflectionPath}\" /p:HelpFileVersion=\"{major}.{minor}{flagsStr}\" /m /nologo /ds /verbosity:minimal /clp:Summary;EnableMPLogging";
if (_OptionClean)
{
if (Common.Run(_VS.PathToMSBuild, commandLine + " /t:clean") != 0)
Expand Down
1 change: 0 additions & 1 deletion Build/Deploy.csx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static Dictionary<string, List<string>> FileSets = new Dictionary<string, List<s
@"Bin\Publish\*.exe",
@"Bin\Publish\*.dll",
@"Bin\Publish\*.runtimeconfig.json",
@"Bin\Doc\Macad.UserGuide.chm",
}},
{ "shellext", new List<string> {
@"Bin\Release\Macad.ShellExtension.dll",
Expand Down
18 changes: 0 additions & 18 deletions Build/MSBuild/Macad.Doc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@
<Delete Files="@(MdFiles -> '%(RootDir)%(Directory)%(Filename).aml' )" />
</Target>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<!-- Copy of help files to build directories -->

<Target Name="CopyHelpFiles"
AfterTargets="AfterBuildHelp"
Condition=" '$(Configuration)' == 'Doc' ">
<Copy SourceFiles="$(OutputPath)$(HtmlHelpName).chm" DestinationFolder="$(OutputPath)..\Release" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)$(HtmlHelpName).chm" DestinationFolder="$(OutputPath)..\Debug" SkipUnchangedFiles="true" />
</Target>

<Target Name="CleanHelpfiles"
AfterTargets="AfterCleanHelp"
Condition=" '$(Configuration)' == 'Doc' ">
<Delete Files="$(OutputPath)..\Release\$(HtmlHelpName).chm" />
<Delete Files="$(OutputPath)..\Debug\$(HtmlHelpName).chm" />
</Target>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<!-- Patch file for web doc -->
Expand Down
2 changes: 1 addition & 1 deletion Build/Packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<packages>
<package id="NUnit.ConsoleRunner.NetCore" version="3.12.0-beta2" targetFramework="net5.0-windows" />
<package id="Tools.InnoSetup" version="6.2.0" />
<package id="EWSoftware.SHFB" version="2021.4.9" />
<package id="EWSoftware.SHFB" version="2021.11.7" />
<package id="EWSoftware.SHFB.NET" version="5.0.0" />
</packages>
3 changes: 3 additions & 0 deletions Data/UITests/SourceData/CompilerError.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

// The following method does not exists and should throw an compiler error
Console.Writea("Hello World");
2 changes: 1 addition & 1 deletion Data/UITests/SourceData/CreateBoxBody.csx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ var box = new Box()

var body = Body.Create(box);

Document.AddChild(body);
Document.Add(body);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Data/UnitTests/SourceData/Scripts/CreateBoxBody.csx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ var box = new Box()

var body = Body.Create(box);

Document.AddChild(body);
Document.Add(body);
2 changes: 1 addition & 1 deletion Data/UnitTests/SourceData/Scripts/PreProcessorComments.csx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* pre-processor
*/
#region Hellp
#region Hello
/* This is a stress test
/* for */
#if version >= 2.0
Expand Down
Loading

0 comments on commit 456a11c

Please sign in to comment.