Jump to content

How do I build Cura?


nubnubbud

Recommended Posts

Posted · How do I build Cura?

Yes, you just move the executable to the Cura-folder.

 

More importantly, I reply because a contributor has decided to clean up the Windows build instructions, and we've added them to the wiki over here. (A small note is that these instructions work for VS2015 and possibly VS2019, but VS2017 has a regression that requires some extra work to get it done.)

  • Like 1
Link to post
Share on other sites

Posted · How do I build Cura?
On 6/13/2019 at 2:20 AM, rburema said:

Yes, you just move the executable to the Cura-folder.

 

More importantly, I reply because a contributor has decided to clean up the Windows build instructions, and we've added them to the wiki over here. (A small note is that these instructions work for VS2015 and possibly VS2019, but VS2017 has a regression that requires some extra work to get it done.)

Thanks!

There are still a few things unanswered for me though. What is the deal with using 32 bit everything to build cura? I understand if you're building a program most people should be able to use it, but at this point, 64 bit has been the majority for the better part of a decade, and 32 bit support is being dropped more and more, so I'm curious why it's preferred. The only things I can think about are issues with building or that something requires it to be 32 bit.

speaking of that, I do have a couple questions as an outsider reading the guide. I can work them out on my own, but it's mostly curiosity.

  • it says to download the correct shapely library, but what counts as a "64 bit install"? just python as I assume, or is it referring to everything, or the expected final cura version?
  • I don't remember libsavitar and charon from my previous attempts, I think they're proprietary file loading and marketplace stuff?


also as someone from the outside, I want to thank you so much for a few features in particular:

  • noting that uranium does not need to be compiled is huge. I was so confused about it.
  • noting the function and reason of commands instead of blindly following them means building cura might even be good for learning how to build and contribute to open source projects. Even blender doesn't go into such depth. the blurb on how nmake is used through the VS dev prompt is great.
  • all in depth information is both succinct and in actual everyday english. it may be overlooked often, but most of the time, in-depth and accurate terminology only serve to alienate the people who can't causally breathe code. 
  • reminding us to verify if things are installed. I'm dense and forgetful. this is really useful.


I'm getting some issues regarding wonky installs and cl.exe apparently being broken? It's most likely me being super dumb and installing things and vs not uninstalling properly and I've left my computer a mess. In any case, I'm setting up a windows virtual machine. I've decided it's the best way to develop in a stable, repeatable manner. that's why I'm being so long-winded (looking at you, storage allocation bar.), it'll take a day just to set up the machine and install visual studio/get it optimized to the point I can open a file folder in under a minute. I'll get back to you to tell you how it goes. 

  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?

    alright, I spun up a windows VM to make the environment as clean as possible, and it all worked until compiling the engine, which ended up throwing these errors. I tried it a second time, and though the percentages changed, the files supposedly causing the issues did not (I assume because it was skipping completed files)

    I can't find gtest_prod.h, so the program is right and it's absolutely not there, but no other file in any of the dependencies include it or anything of the same name. I remember there being some options in a cmake file about an optional test, that could be switched off. Is this related? (edit, they don't seem to be. gtest looks like it handles gcode export testing which seems super important, so now I'm even more confused as to why it was never made.)
    Untitled.thumb.png.a3546e1f4ec1bab85aea4792f0faec2b.png

    man, I feel a lot closer this time, and I bet this is the only thing missing, too. 

    Edited by nubnubbud
  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?
    9 minutes ago, ahoeben said:

    I am fairly sure that gTest (and gMock) refer to the google testing framework:

    https://github.com/google/googletest

    The header file that is failing specifically only includes the gtest_prod.h file if you BUILD_TESTS, so your initial guess is correct. This is about that optional test.

     

    alright, so just checking, I've never done it outside of CMake gui, so do I just change 
    -Dprotobuf_BUILD_TESTS=OFF to -Dprotobuf_BUILD_TESTS=ON or is it on by default?


    furthermore, there's an #include in the code that makes use of it, so is there a reason the guide says to set it to off? it looks like that would break the compile every time, seeing as I did not build tests, and it still looked for it.

    Edited by nubnubbud
  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?
    49 minutes ago, ahoeben said:

    See https://github.com/Ultimaker/CuraEngine/blob/27cbc13cab69c24e96f7e293985893f08410695d/src/MergeInfillLines.h#L7

    The file is only included if the BUILD_TESTS compiler flag is set. I don't know where you are getting protobuf_BUILD_TESTS from.

    Untitled.thumb.png.77b78c5f35034e813b2e4fde83dc0e73.png

    I'm probably getting it from here, the header file that cmake produced. it's trying to include this because there's no if statement.

    I removed the include line, and that just made it ask for a bunch of "friend tests" so I can't just do that... it has to be generated correctly.

    is the easiest workaround just to enable tests? or could it be that mentioning them at all is tripping the flag?

    (edit- ah, I see what you mean now. I don't know where it's coming from either. This happened while I was using VS 2019, but I thought it was just because that version wasn't the recommended one, so I started from scratch and just followed the directions closely, copying and pasting all the commands just in case. It might be nice to see if someone else gets the same result, but I understand that's a lot of work just to troubleshoot this with me =3=)

    Edited by nubnubbud
  • Link to post
    Share on other sites

    Posted · How do I build Cura?

    You seem to have a snapshot of the curaengine source that does not do the conditional include that I linked to. Pull in the latest version, and DON'T build tests. I think that is the default.

  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?
    14 hours ago, ahoeben said:

    You seem to have a snapshot of the curaengine source that does not do the conditional include that I linked to. Pull in the latest version, and DON'T build tests. I think that is the default.

    I did this, as the build guide said:

    git clone https://github.com/Ultimaker/CuraEngine.git C:/dev/CuraEngine

    so it should have gotten me the latest version, right? if this isn't the most up to date version, what is?

    (edit: I tried it with curaengine-master and it worked! this does mean that the provided curaengine from the guide is defunct as a build source though.)

    now I just have to figure out how to run it, seeing as python app_cura.py throws errors about sip and UM

    Edited by nubnubbud
  • Link to post
    Share on other sites

    Posted · How do I build Cura?
    3 hours ago, nubnubbud said:

    so it should have gotten me the latest version, right?

    Yes, the latest version at the time. However, that gets you a snapshot of the "master" branch which is actively being worked on so like any copy of a working document it will not remain the latest version. You use `git pull` to get the latest changes.

     

    If you don't mind me asking, what do you plan to accomplish by running Cura from source if you don't know what version control is, and don't seem to understand C++ or Python?

  • Link to post
    Share on other sites

    Posted · How do I build Cura?
    19 minutes ago, ahoeben said:

    Yes, the latest version at the time. However, that gets you a snapshot of the "master" branch which is actively being worked on so like any copy of a working document it will not remain the latest version. You use `git pull` to get the latest changes.

     

    If you don't mind me asking, what do you plan to accomplish by running Cura from source if you don't know what version control is, and don't seem to understand C++ or Python?


    I plan to accomplish the act of getting better at C++, Python, and version control, as well as contribute the tasks I have set for myself when I've done it.
    What I'm lacking is the syntax, mainly, but I do sit down with my friends and help them debug their code and work on solutions, because while syntax isn't my forte, I'm relatively strong at use cases and roughly what background processes are needed to produce a certain qualitative result. I have taken some classes but sadly they've all focused on the code itself, and even several courses in no one formally introduced us to collaborative work or anything beyond basic compiling in an IDE, or even working with dependencies, so here I am, pursuing it solo, because I learn far better from doing than any other way.

    There are features that I want, and being in the industry of VFX myself, at some point I'll probably need to know scripting, build workflows, and such to develop tools anyway. I won't (and can't!) force you to help me, and I know by this point it could be considered meddling, because I've actually impacted the work of others, but this is the same as jumping in some water to learn to swim, but I stand to help other people and advance general FDM technique if I'm successful. It's also why I had the angle, earlier, that better build directions could result in more rapid development/interest.

    I got these issues repeatedly by following the build guide exactly on a clean install of windows, so I had reason to doubt this most recent error was my own ineptitude for once. I had an entire day of the same issue. I didn't bother pulling because I was doing it from scratch and cloning everything about once an hour. I stopped trying to go to sleep at 4AM, which ended up being about the same hour the commit you mentioned happened, hence my surprise when it suddenly worked today!

  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?

    Cura and CuraEngine are complex projects. You are not jumping in the deep end, you are jumping into the middle of a lake.

     

    3-essential-steps-to-crowdfunding-your-r

     

    My advice is to first get comfortable with what you can do without building all of Cura. It seems you have managed to compile the CuraEngine now. You can easily just unzip the Cura 4.1 installer, replace the CuraEngine binary with your compiled version, and run Cura from the unzipped version.

     

    In my opinion a simpler approach is to start with some frontend stuff; create a theme, develop a plugin. Even if it is not your endgoal of changing how ironing works.

     

    Feel free to ignore me and jump in the deep end, but if you ask me to help I expect you to know that you need to breath.

    Edited by ahoeben
    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?
    13 hours ago, ahoeben said:

    My advice is to first get comfortable with what you can do without building all of Cura. It seems you have managed to compile the CuraEngine now. You can easily just unzip the Cura 4.1 installer, replace the CuraEngine binary with your compiled version, and run Cura from the unzipped version.

     

    In my opinion a simpler approach is to start with some frontend stuff; create a theme, develop a plugin. Even if it is not your endgoal of changing how ironing works.

     

    Feel free to ignore me and jump in the deep end, but if you ask me to help I expect you to know that you need to breath.


    the entire reason I wanted to do both is because I'm under the impression you need to edit both the frontend "Cura" and engine to add a new setting like ironing (or an option of said setting). feel free to correct me if I'm wrong though. any information is like gold to me. I'll probably learn as I poke around more, though. 

    and I've gotten compiling the engine to a science, without a single issue, now that the little hiccup with the protobuf tests is out of the way. (id does work with both vs 2015 and 2019, and there's no noticeable downside to having a current sip version) and yeah I know I got a little butthurt earlier, but you're right. as for the frontend stuff, it looks like I need opengl2 or better, virtualbox doesn't support it though...so it'll be a day or two while I clean up my own computer till cmake and nmake are functional again. (edit never mind turns out vbox has its own implementation of gl)

    Edited by nubnubbud
  • Link to post
    Share on other sites

    Posted (edited) · How do I build Cura?

    Alright, got my first fork made! it's a simple one- a theme to help out people affected by colorblindness. I noticed everything was red next to green, or blue next to yellow, a bit of a pain for people with more serious color-blindness. I asked one of my friends (I swear color blindness is way more common among tech workers somehow) and he said he generally has a bit of trouble with the greens and yellows being really bright and always next to each other.

    -so I made a theme that works for the two most common kinds of colorblindness (Deuteranopia and Protanopia), and works as well as I could make it for Tritanopia (because each one is missing a primary color, one of them had to use alternating shades and hues of the same color for them all to at least work). I also duplicated it so there's be one to match ultimaker light and one to match ultimaker dark. The colors are a little wonky looking, mostly orange, yellow, purple and turquoise, but it's not meant for me, so the jury's still out on aesthetics.

    In any case I'm hoping this is worth a pull request-worst case scenario, it's rejected/ignored I guess. I'll wait a day to see if you guys tackle me in case I'm being dumb, cause I'm not sure if it's okay to just submit a pull request out of the blue for a feature not often asked for. Then again, where does that put iron every layer?~

    you can check it out here, though unless you're colorblind or have colorblindness simulation software, it's not really visible how useful it can be:
    https://github.com/nubnubbud/Cura

    Or if you just wanna slap them in your themes folder use these. I think it should work. JSON's nice like that.
    https://github.com/nubnubbud/cura-themes

    Edited by nubnubbud
    • Thanks 1
    Link to post
    Share on other sites

    Posted · How do I build Cura?

    Hi @nubnubbud, We get PR's from out of the blue all the time, we decide if we want them and then reject or accept (or ask to rework, or do some ourselves, depending on the situation). So please submit! It will then take us a bit more than a day to get to your PR though, just to prepare you (it can take quite a long time in fact, since we're a bit backlogged...)

     

    That said, accessibility is a noble cause. Just last week I had a discussion about possibilities for colour-blindness adjustments with another dev. 🙂

  • Link to post
    Share on other sites

    Posted · How do I build Cura?
    19 hours ago, rburema said:

    Hi @nubnubbud, We get PR's from out of the blue all the time, we decide if we want them and then reject or accept (or ask to rework, or do some ourselves, depending on the situation). So please submit! It will then take us a bit more than a day to get to your PR though, just to prepare you (it can take quite a long time in fact, since we're a bit backlogged...)

     

    That said, accessibility is a noble cause. Just last week I had a discussion about possibilities for colour-blindness adjustments with another dev. 🙂

    glad to hear! yeah, my first foray into it was my friend vetting some clothing choices to me, and realizing how much I took full color vision for granted. Since he's also using this, I'm glad there's a decent chance this'll get accepted. it's currently up to date with the master, but so long as the main themes don't change it'll stay that way. As a visual effects artist, the whole "how things look for other people/first time viewers/users" is my home field, so if there are any changes it needs, I'll gladly take suggestions.

  • Link to post
    Share on other sites

    Posted · How do I build Cura?

    How people/users experience things is an important component. We're lucky to have an UXer on the team as well.

     

    As for the PR: We've now made a ticket out of it, so we'll get to it eventually. And like we mention there, it's been on our wishlist 🙂

     

    To other readers: the PR can be found here.

  • Link to post
    Share on other sites

    Posted · How do I build Cura?
    On 6/27/2019 at 11:55 PM, rburema said:

    How people/users experience things is an important component. We're lucky to have an UXer on the team as well.

     

    As for the PR: We've now made a ticket out of it, so we'll get to it eventually. And like we mention there, it's been on our wishlist 🙂

     

    To other readers: the PR can be found here.

    thanks again for the help, and expect a thing here and there from me from now on!~

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...