New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOW TO build from source on Mono #53

Open
ulidtko opened this Issue Aug 5, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@ulidtko

ulidtko commented Aug 5, 2018

This is how you build the GerberPanelizer from source on Linux.

Get @runesoeknudsen branch

git remote add github-pr-41 https://github.com/runesoeknudsen/GerberTools
git fetch github-pr-41
git checkout linuxHAck

Obtain dependency: Triangle.dll

This one is clean and easy.

git clone https://github.com/eppz/Triangle.NET
cd Triangle.NET/Triangle.NET
xbuild
cp Triangle/bin/Debug/Triangle.dll /tmp

Obtain dependency: DotNetZip.dll

This repo has it: https://github.com/haf/DotNetZip.Semverd
Can be done from source, but requires Ruby tools for that.
I preferred to pull the DotNetZip.1.11.0.nupkg package from their Appveyor CI. The .nupkg is just a zip file, the dll is inside.

Obtain dependency: OpenTK

https://www.nuget.org/packages/OpenTK/3.0.0-pre
https://www.nuget.org/packages/OpenTK.GLControl/3.0.0-pre

Patch up the source a bit

This diff was somehow necessary to get it to compile as well:

diff --git i/GerberPanelizer/GerberPanelize.cs w/GerberPanelizer/GerberPanelize.cs
index b30d7fc..59ed2b7 100644
--- i/GerberPanelizer/GerberPanelize.cs
+++ w/GerberPanelizer/GerberPanelize.cs
@@ -656,7 +656,7 @@ namespace GerberCombinerBuilder
 
             GL.Disable(EnableCap.DepthTest);
             GL.Enable(EnableCap.Blend);
-            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
+            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
             GL.Hint(HintTarget.LineSmoothHint, HintMode.Nicest);
             GL.Hint(HintTarget.PointSmoothHint, HintMode.Nicest);
 
diff --git i/GerberPanelizer/QuickFont/QFont.cs w/GerberPanelizer/QuickFont/QFont.cs
index 0ab0d53..fa97c9d 100644
--- i/GerberPanelizer/QuickFont/QFont.cs
+++ w/GerberPanelizer/QuickFont/QFont.cs
@@ -588,7 +588,7 @@ namespace QuickFont
 
                 if (Options.UseDefaultBlendFunction)
                 {
-                    GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
+                    GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
                 }
 
             }
@@ -1137,7 +1137,7 @@ namespace QuickFont
                 if (Options.UseDefaultBlendFunction)
                 {
 
-                    GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
+                    GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
 
                 }
             }

Start compilation

cd GerberTools/GerberPanelizer
xbuild

Finally, run it

mono bin/Debug/GerberPanelizer.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment