Running Slic3r from git on Windows - clefranc/Slic3r GitHub Wiki

Slic3r in source code form could be run with Perl and its dependencies installed. It has been tested with CitrusPerl and StrawberryPerl.

You need to get the source, install Perl, its dependencies to get Slic3r runs. The steps are outlined below.

Getting the source

The best way for getting the source is to install git so that you can stay up-to-date easily.

Installing Git for Windows

You can install Git by downloading this package:

If asked, choose to run git from Windows prompt (adjust path environment) instead of git Bash. Line ending conversions don't matter, choose the default.

There are also several alternatives:

  • GitHub for Windows Simplified and GUI tools developed by GitHub team.
  • TortoiseGit GUI with shell integration. UI inspired by TortoiseSvn.
  • Msysgit. The port of the original Git library, provides command prompt and API. The GUI ports listed above actually depends and includes a copy of msysgit.

Cloning the source

Open a command prompt and move to the directory where you want to create a Slic3r working copy. Then issue this command: git clone git://github.com/alexrj/Slic3r.git It will create a Slic3r directory in the current position.

Installing a Perl for Windows

You can choose between Citrus Perl or Strawberry Perl. Either will do. They include MinGW which faciliates installing additional Perl modules.

Citrus Perl installs cleanly into a standalone folder and won't touch the Windows system in any ways. MinGW is downloaded separately (though automatically). At the time of writing, 3D preview won't work with Citrus Perl on 64-bit Windows because its MinGW lacks FreeGLUT.

Strawberry Perl comes with the MinGW packaged in an MSI installer, and touch the environment variable such that integrates itself into the Windows shell. Side by side installation of different versions would be difficult if not impossible.

At the time of writing we recommend Strawberry Perl 5.22 as it's the most up-to-date.

Strawberry Perl

  • Download a copy from http://strawberryperl.com/ Select version 5.22.
  • Install it, following the on screen instruction. Basically that means keep clicking Next.
  • Now your command prompt is loaded with Perl. You start the command prompt with...
    • In the Start Menu, All Programs, then Accessories, finally Command Prompt
    • Press Win+R, type cmd, then Enter.
    • For Vista/Windows 7: open the Start menu, type cmd in the search box, then Enter.

Now continue with installing the dependencies section.

Citrus Perl

  • Download CitrusPerl 5.14 (preferred over 5.12) from http://www.citrusperl.com/download.html
  • Extract the zip to a folder. Choose a reasonable place, like C:\dev\CitrusPerl, as you won't be able to move it after the installation.
  • Run citrusutils.exe in C:\dev\CitrusPerl\bin
  • A window called citrusutils will be opened.
    • Click the "Set GCC" button to set the GCC compiler.
    • Select "Download the binary MinGW distribution used to build this Perl" and click Ok. It will now start downloading the compiler.
    • Select the Folder where you would like to install the compiler and click Ok. (You could ask it to extract to C:\dev\CitrusPerl too)
    • You can now close the citrusperl utilities.
  • Run citrusterm.bat in C:\dev\CitrusPerl\bin (it might be called citrusterm32.bat if you downloaded the 32-bit version), and you get a command prompt with Perl environment ready.
  • Then issue the following command:
cpan JSON App::cpanminus

You will need to open the citrusterm prompt every time you want to launch Slic3r, or run Perl for that matters. Now continue with the installing dependencies section.

Installing the dependencies

The Slic3r depends on few modules. We will be downloading, compiling and installing them. The Build.PL script will do the magic for us.

  • First, verify your Perl command environment is working. Start the prompt as stated above, then type perl -v. You should get some meaningful message. Check your perl installation if not.
  • Now cd to the folder where Slic3r source code is cloned, and proceed with the build process to verify the dependence installed:
cd Slic3r
perl Build.PL
perl Build.PL --gui

Starting Slic3r

If you got the dependencies installed, now you could fire up the Slic3r with still in the command prompt by:

perl slic3r.pl

To start slic3r with a single click You should create a shortcut with a target that shows to the full path of the "wperl.exe" file and then the full path to Your "slicer.pl" file. For example, C:\dev\CitrusPerl\bin\wperl.exe C:\Users\YourUsername\Documents\GitHub\Slic3r\slic3r.pl

Happy Slicing!

Staying up-to-date

You just need a couple commands to keep your Slic3r copy up-to-date:

git pull
perl Build.PL

FAQ

  • Got "Can't write to cpanm home '/.cpanm' You should fix it with chown/chmod first." while issuing cpanm commands.

    You have to Shift-Right-click on the C: drive and click "Open Command Window Here" from the drop down list. Then in the command window type "mkdir .cpanm". You can close the command window and continue the install.