Skip to content
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

Mac version ? #32

Closed
Xav83130 opened this issue Feb 4, 2016 · 33 comments
Closed

Mac version ? #32

Xav83130 opened this issue Feb 4, 2016 · 33 comments
Labels

Comments

@Xav83130
Copy link
Contributor

Xav83130 commented Feb 4, 2016

Good evening,
it would be possible to compile a version for "Mac"?
If it's not too complicated.
Thank you

@Denvi
Copy link
Owner

Denvi commented Feb 5, 2016

I think it's possible.
But I haven't Mac, sorry.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 5, 2016

you think I could try to do? knowing that I have no knowledge on the subject?

@Denvi
Copy link
Owner

Denvi commented Feb 5, 2016

Why not?

  1. Download Qt for OS X from here: http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg.mirrorlist
  2. Install Qt.
  3. Download source code of grblControl.
  4. Start Qt Creator and open "grbl_control.pro" project file from "src" directory of sources.
  5. Build grblControl (look for image bellow).
  6. Post any compiling errors here.

qt_build_1

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 5, 2016

1 test and 1 error messages
1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Try to replace "std::isnan" with "qIsNaN" in whole project.

Update: also "NAN" macro with "qQNaN()"

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

after changes

1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

#include <math.h> to top of interpolation.h

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

result
1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

If replace <math.h> with ?

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Sure using ? not <cmath.h>.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

it's better with cmath
1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Remove

#include "math.h"

from "gcodedrawer.cpp" source file. Or replace with #include if failed to compile.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

same result with two
1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Think need to repeat previous step for these files:
tooldrawer.cpp
gcodeparser.cpp
gcodepreprocessorutils.cpp

In "heightmapgriddrawer.cpp" line 32 looks the same as:

if (m_model == NULL || qIsNaN(m_model->data(m_model->index(i, j), Qt::UserRole).toDouble())) {

?

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

for "heightmapgriddrawer.cpp" line 50 and 64 also ?

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Lines 50 & 64 should also have "qIsNaN". Looks like you have "std::isnan" for now.

Use advanced search:
search1

Select "Current project", string to find "std::isnan", check "Case sensitive" and press "Find and replace" button:
search2

Enter "Replace to": "qIsNaN" and press "Replace" button:
search3

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

1st test

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

It's easy, just repeat previous step to replace "NAN" with "qQNaN()"

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

successful compilation

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

How about pressing big green triangle to try start?

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

the program starts without problems !!!!!
I just connect the milling machine,
it connects.
little problem:
in preferences: colors are all black.
but I can change them manually

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

Need to apply "Default settings" after first start to get normal colors.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

it is good with to apply "Default settings".
Now i go test command machine manually.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

THE MACHINE MOOOOOOVE is too good

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

what should he do now?
to install on the Mac.

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

You should use "macdeployqt" util from "QTDIR/bin/" folder to get .dmg file.

Open terminal, change directory to grbl_control build folder with "cd" command (it should be above sources like this one: "build-grbl_control-Desktop_Qt_5_4_2_MinGW_32bit-Release")

cd path_to_grbl_control.app

Then:

$QTDIR/bin/macdeployqt grbl_control.app -dmg

I beleive it will create .dmg file in build directory.

But i don't know what to do with settings file & translations for now.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

it is complicated for me ....
I look at all this in one hour

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

Ok i understand for create a .dmg
but when i run .dmg i have error

"Dyld Error Message:
Library not loaded: @rpath/QtOpenGL.framework/Versions/5/QtOpenGL
Referenced from: /Applications/grbl_control.app/Contents/MacOS/grbl_control
Reason: image not found"

@Denvi
Copy link
Owner

Denvi commented Feb 6, 2016

May be change "grbl_control.pro" file:

unix: {
    DEFINES += UNIX #GL_GLEXT_PROTOTYPES
    QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/libs\'"
}

to

unix:!macx {
    DEFINES += UNIX #GL_GLEXT_PROTOTYPES
    QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/libs\'"
}

will help.

How about just run "grbl_control.app"? Or rebuild, run "macdeployqt" without "-dmg" flag and start "grbl_control.app".

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 6, 2016

grbl_control.app works.
I still tried to do the .dmg but without success.

Thank you anyway.

@Xav83130
Copy link
Contributor Author

Xav83130 commented Feb 8, 2016

When I disconnect the USB computer "grbl control" crash.

@Denvi
Copy link
Owner

Denvi commented Nov 20, 2016

Fixed in one of the latest commits.

@Denvi Denvi closed this as completed Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants