Menu

Installation on Windows

← Previous ↑Installation TOC ↑Home → Next

Installation on Windows

Before we start

Recommendation

In the following procedure we will download files.
I generally recommend to run a virus/malware scan on each download before using it.

Directory creation

Create the following directories:

  • C:\P
  • C:\P\Tools
  • C:\P\pdf2svg
  • C:\Install
  • C:\Install\Cygwin
  • C:\Temp

Part 1: Base installation

The steps in this part are required.
After the base installation we should be able to use the gxhconvert.pl script from within a Cygwin Terminal.


Cygwin installation

Download

From the Cygwin homepage download setup-x86_64.exe (for 64 bit systems) or setup-x86.exe (for 32 bit Save the file into the "C:\Install\Cygwin" directory.

Start installation

Double-click the executable to start the installation, confirm administrative privileges for the administration process.

Information screen

Click "Continue" on the information screen.

information screen

Download and install

Choose the first option, click "Continue".

click continue

Change installation directory and users

Change the suggested directory "C:\cygwin" or "C:\cygwin64" to "C:\p\cygwin" or "C:\p\cygwin64".
For the "Install For" choice make sure to select "All Users".
Click the "Continue" button.

Continue

Local package directory

Confirm the suggested value by clicking "Continue".

Continue

Select internet connection

Select the connection type appropriate for you computer, click "Continue".

Continue

Choose download site

Choose a cygwin mirror near to you. Not necessarily the one shown in the screenshot.
Click the "Continue" button.

Continue

Select packages

Click the "View" button near the windows right top.
The view is switched from tree view to an alphabetically sorted list ("Full").

Continue

Make sure the following packages are selected:

  • ghostscript
  • ghostscript-fonts-std
  • ghostscript-fonts-other
  • git
  • git-completion
  • gnuplot
  • gzip
  • inkscape
  • netpbm
  • perl
  • poppler
  • texlive
  • texlive-collection-basic
  • texlive-collection-bibtexextra
  • texlive-collection-binextra
  • texlive-collection-fontsextra
  • texlive-collection-fontsrecommended
  • texlive-collection-fontutils
  • texlive-collection-htmlxml
  • texlive-collection-langgerman (or whatever package reflects your language)
  • texlive-collection-latex
  • texlive-collection-latexextra
  • texlive-collection-latexrecommended
  • texlive-collection-mathextra
  • texlive-collection-metapost
  • texlive-collection-omega
  • texlive-collection-pictures
  • texlive-collection-plainextra
  • texlive-collection-science
  • xpdf

I also use the following packages, but these are not required for gxhconvert (don't worry if some package is no longer available):

  • WindowMaker
  • arc
  • arj
  • autoconf
  • automake
  • autotrace
  • a2ps
  • bash
  • bash-completion
  • bashdb
  • binutils
  • bison
  • bmp2png
  • cabextract
  • cadaver
  • cdda2wav
  • cdrecord
  • cdrkit
  • cpio
  • ctags
  • curl
  • cygport
  • cygwin-x-doc
  • ddd
  • ddrescue
  • dejagnu
  • dmalloc
  • doxygen
  • email
  • exif
  • e2fsimage
  • gcc
  • gcc-g77
  • gcc-objc
  • gd
  • genisoimage
  • giflib
  • gzip
  • hdparm
  • hexedit
  • iceauth
  • imake
  • imlib
  • indent
  • jpeg
  • lynx
  • make
  • makedepend
  • mc
  • mcrypt
  • mkisofs
  • nasm
  • ncftp
  • nedit
  • netcat
  • oclock
  • octave
  • octave-*
  • ogmtools
  • openssh
  • optipng
  • patchutils
  • pcre
  • pkgconfig
  • pngcheck
  • pngcrush
  • pngquant
  • potrace
  • pstoedit
  • psutils
  • p7zip
  • rebase
  • rpm
  • rpm-build
  • rpm-doc
  • rsync
  • sharutils
  • smartmontools
  • sng
  • splint
  • texi2html
  • tidy
  • tiff
  • tiffdoc
  • transfig
  • unifdef
  • vorbis-tools
  • webcheck
  • wget
  • wput
  • wodim
  • xclock
  • xfig
  • xfontsel
  • xhost
  • xinit
  • xkbutils
  • xorg-docs
  • xset
  • xsetmode
  • xsetroot
  • xwininfo

Resolving dependencies

Allow to install the required packages for the packages choosen in the step before (make sure the "Select required packages (RECOMMENDED)" option is enabled), click the "Continue" button.

Continue

Progress window

The installation process shows a progress window, installation takes some time.

Progress

Desktop and start menu

You can choose to create icons in the start menu or on the desktop.
Make your choice and click the "Complete" button.

Complete


Desktop icon for cmd.exe with Cygwin in PATH

cmd file to set PATH

In the C:\P\Tools directory create a file startcyg.cmd with the following contents:

PATH c:\p\tools;c:\p\pdf2svg;%PATH%;c:\p\cygwin\usr\local\bin;c:\p\cygwin\bin;c:\p\cygwin\usr\bin;c:\p\cygwin\lib\lapack

Right-click on the desktop background.
From the context menu choose "New → Link".

Path to command

As path for the command enter "C:\windows\system32\cmd.exe".

Name

Enter the name "Cygwin".

Change properties

Right-click the new "Cygwin" desktop icon.
From the context menu choose "Properties".

Complete command line

Change the command line from

C:\windows\system32\cmd.exe

to

C:\windows\system32\cmd.exe /K c:\p\tools\startcyg.cmd

Security settings

In the "Security" or "Permissions" tab grant the INTERACTIVE role read and execute access to the link.

Make icon available for all users

Run a console / command prompt as administrator and enter:

c:
cd \users\admin\desktop
move Cygwin.lnk "..\..\all users\desktop"

You must correct the second line, use the correct user name instead of admin.


DK tools installation

Download

Download dktools-x.y.z-WINDOWS-10-mingw64-nsis.exe from http://sourceforge.net/projects/dktools/files into the c:\install directory.

Run installer

Open a console / command prompt window and enter

c:
cd \install
dktools-4.36.1-WINDOWS-10-mingw64-nsis.exe /S /D=C:\P\Kr

Confirm to run the installation with administrative privileges.


Pdf2svg

Start Cygwin terminal

Start a Cygwin terminal either using the
"Start → All Programs → Cygwin → Cygwin Terminal"
start menu item or by using the Windows-r keyboard combination and
entering the command:

c:\p\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -

Download via git

Enter the commands:

cd /cygdrive/c/install
git clone https://github.com/jalios/pdf2svg-windows

After the git command has finished, wait 5 minutes and type:

rm -fr pdf2svg/.git
rm -fr pdf2svg/.gitignore
exit

Copy files in place

Copy the entire contents of the "C:\install\pdf2svg-windows\dist-64bits" directory into the "C:\p\pdf2svg" directory.


gxhconvert.pl script

Place the gxhconvert.pl script from the gxhints download in the "c:\p\tools" directory.


Documentation

A copy of the project wiki contents is in the doc/html directory.
You can copy it to a suitable directory on your computer.


Test

Create test file

Write a file gptest.gp in the C:\Temp directory:

##      width   =       10cm
##      height  =       10cm
set xrange[0:10]
plot x*x title "\\(y=x^2\\)"

Start Cygwin Terminal

From the start menu choose:
"Start → All Programs → Cygwin → Cygwin Terminal".
On systems without a start menu use the Windows-r key combination and type the command:

c:\p\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -

Run test command

In the terminal type:

cd /cygdrive/c/temp
perl /cygdrive/c/p/tools/gxhconvert.pl -o=png x.gp

Part 2: Optional installation of Windows binaries

The installation of Windows binaries allows to use ghxconvert.pl from a usual console / command prompt window.


Perl

Download

Obtain the *.msi install package for your system from http://strawberryperl.com/.

Installation: Change destination directory

The installation is straightforward: After accpeting the license conditions change the installation destination directory from "C:\Strawberry" to "C:\P\Strawberry".

Continue installation

Accept suggested defaults for all other questions (if any).


MikTeX (LaTeX)

Download

Visit the MikTeX homepage, in the "Downloads" section klick the "Other Downloads" link to see all downloads. Get the MikTeX x.y.z 64-bit or 32-bit Net Installer.

2 passes

Installation requires to run the net installer in 2 passes:

  1. Download the packages.
  2. Install the packages.

Pass 1: Package download

Start
Start the installer, i.e. by double-clicking the download.

Accept license terms
Activate the coption "I accept the MiKTeX copying conditions", click on "Continue".

Choose download
Activate the "Download MiKTeX" option, click "Continue".

Complete MiKTeX
Activate the "Complete MiKTeX" option, click "Continue".

Choose download source
Choose a server near to you!
This is not necessarily the server in the screenshot!
Click "Continue".

Directory for downloaded packages
Accept the suggested default directory to store the downloaded packages, click "Continue".

Start download
On the summary page click "Start" to start the download.

Download in progress
As long as the download is in progress you see progress bars, the "Continue" button is disabled.

Download finished
The download is finished when the progress bars are disabled and the "Continue" button is enabled. Click "Continue".

Summary screen
The summary screen indicates success or error. Click "Close".

Pass 2: Real installation

Start installer again
Start the installer again.

License conditions
Once again accept the MiKTeX copying conditions.

** Decide to install**
Choose the "Install MiKTeX"option, click "Continue".

Install complete MiKTeX
Choose the "Complete MiKTeX" option, click "Continue".

Shared installation
Choose the "Anyone who uses this computer (all users)" option, click "Continue".

Local download directory
We left the download directory unchanged while downloading, so we leave it unchanged now and click "Continue".

Installation directory
Accept the suggested default directory and click "Continue".

Settings / preferences
Choose you preferred paper size and decide whether or not to install missing packages on the fly. Click "Continue".

Start installation
On the summary screen click "Start".

Progress bars
The progress bars are active, the "Continue" button is inactive while the installation is in progress.

Installation finished
The installation is finished when the progress bars are disabled and the "Continue" button is enabled. Click "Continue".

Summary screen
The summary screen indicates success or error. Click "Close".


Gnuplot

Download

Get the installer from http://sourceforge.net/projects/gnuplot/files/. Get a stable version, in the example I used gp466-win64-setup.exe.

Start installer

Start the installer, i.e. by double-clicking the download.

Language

Choose your preferred language.

License

Accept the license agreement.

Release information

Read the release information.

Destination folder

Change the destination folder to "C:\P\gnuplot".

Accept defaults

In all remaining dialogs accept the suggested defaults and continue.

Copy LaTeX files

Copy the entire contents of the "C:\p\gnuplot\share\texmf" directory into the "C:\ProgramData\MiKTeX\2.9" directory.

Update LaTeX filename database

Open a console / command prompt windows as administrator and run:

mktexlsr --update-fndb=C:\ProgramData\MiKTeX\2.9

Inkscape

Download

Get the installer from https://inkscape.org/.

Start installer

Start the installation, i.e. by double-clicking the installer.

License Agreement

Accept the license agreement.

Setup type

I recommend to click the "Complete"button.

Complete procedure

Complete the installation procedure, accept the suggested defaults in remaining dialogs.


Ghostscript

Download

Get the installer from http://www.ghostscript.com/download/gsdnld.html.

Start installer

Start the installation, i.e. by double-clicking the installer.

License Agreement

Accept the license agreement.

Destination directory

Change the destination folder to "C:\p\gs\gs9.18" (for other versions correct the version number).

Complete procedure

Complete the installation procedure, accept the suggested defaults in remaining dialogs.


CMD file and icon

Copy command file

In the C:\P\Tools directory copy the existing file startcyg.cmd to a new file wincyg.cmd.

Modify command file

Modify the C:\P\Tools\wincyg.cmd file to:

PATH C:\p\tools;C:\p\pdf2svg;C:\p\gnuplot\bin;C:\p\gs\gs9.18\bin;C:\p\gs\gs9.18\lib;C:\Program Files\Inkscape;%PATH%;c:\p\cygwin\usr\local\bin;c:\p\cygwin\bin;c:\p\cygwin\usr\bin;c:\p\cygwin\lib\lapack

Copy desktop icon

On the desktop create a copy of the "Cygwin" icon, change the name to "WinCygwin".

Modify desktop icon

Change the properties of the new icon, modify the command line to:

C:\windows\system32\cmd.exe /K c:\p\tools\wincyg.cmd

Access for all users

Optionally you might want to allow the INTERACTIVE role read and execute access to the link and make the icon accessable to all users by moving it into the "c:\users\all users\desktop" directory.


Test

Special console / command prompt window

Double-click the WinCygwin desktop icon to open the command prompt window.

Change into the C:\Temp directory

In the command prompt window type:

C:
cd \Temp

to change into the C:\Temp directory containing the gptest.gp file from the test at the end of part 1.

Run test

Type:

perl c:\p\tools\gxhconvert.pl -o=png gptest.gp

or simply

gxhconvert.pl -o=png x.gp

Part 3: Using the software as unprivileged user


MiKTeX: Prepare to use pdflatex as non-privileged user

Unprivileged (non-administrator) users should run:

initexmf -u
initexmf --mkmaps

once before starting to use pdflatex from MiKTeX or the gxhconvert.pl script.

← Previous ↑Installation TOC ↑Home → Next

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.