RKWard on Windows/Packaging

From RKWard
Jump to: navigation, search


Packaging RKWard for Windows

RKWard for Windows is currently distributed in two different variants: as a single installer, and as an installation bundle including R and KDE. This page details the steps needed to create these two packages.

Creating the RKWard for Windows installer


  • A source-based installation of KDE, using emerge. In general you should not use the latest and greatest KDE, here, but the latest version which already has an official KDE on Windows release to it.


  1. Set up your KDE environment (i.e. run kdeenv.bat) in your emerge install.
  2. Check out a clean copy of the RKWard source from SVN. When creating the installer package, you will probably want to check out a release branch, rather than trunk. Thus, typically you will use something like:
    git clone git://anongit.kde.org/rkward.git
    git checkout releases/0.6.3
    It does not really matter, where you put the sources. It may be a good idea to do so outside the emerge tree, though.
  3. CD to the "windows_nsis"-subdirectory of the sources.
  4. There is a batch file "make_release.bat", here. Edit this (e.g. using kwrite). Adjust the top few lines to reflect the details of you installations. Follow these guidelines:
    • If K:\K\bin\kwrite.exe exists, set
    i.e. point this at the root of your emerge tree.
    • If C:\R\R-x.y.z\bin\R.exe exists (and you want to compile against that version), set
    • If C:\NSIS\makensis.exe exists, set
    • You'll probably take MinGW from your emerge tree, i.e.
  5. Run
  6. If all goes well, an .exe-file (eg: install_rkward_0.6.1.exe) of roughly 1.4MB will be created. Test this installer, by simply running it.

This should be it.

Creating the installation bundle


  • The latest KDE windows installer.
  • The latest stable 32-bit installer of R.
  • The RKWard for Windows installer, as created with the above procedure.
  • 7zip.


Note: Please use clean installations of KDE and R as detailed, below. Do not use your existing installations of KDE or R, to avoid shipping any cruft that has accumulated, there. In particular, do not use your emerge based installation of KDE, as it is *much* larger than a binary only installation.

  1. Create a directory "RKWard", somewhere. It seems best to root the installation in a drive other than C:\ (otherwise there are some problems when moving the RKWard.lnk, later on).
  2. Use the regular KDE for windows installer to install KDE to RKWard\KDE. As usual, select MinGW4 as compiler. Install kate, okular, and dependencies.
  3. Use the regular R installer to install R to RKWard\R.
  4. Use the RKWard for Windows installer to install RKWard
  5. Edit RKWard\KDE\bin\rkward.ini to use a relative path for "R executable":
    R executable=\..\..\R\bin\R.exe
  6. Fire up R (or RKWard) in the installation, and install the R2HTML-package.
  7. Create a link to rkward.exe, and place it in RKWard. Change the working-directory to "%USERPROFILE%".
  8. Place a copy of the GPL v2 and the Readme.html (get the current version from the existing bundle) in RKWard.
  9. Use 7zip to zip it up in a self-extracting archive.
  10. Rename this to RKWard-X.X.X_KDE-X.X.X_R-'X.X.X.exe, substituting the appropriate version numbers.

Next, you also need to create a source bundle, for GPLv2-compliance. You can use the existing source bundle as a template.

  1. For R and RKWard, simply place the source packages into the respective directories (don't forget including Rtools).
  2. For KDE, use the fetch_kde_sources.sh script (you need sh and wget). Personally I do this step on Linux (i.e. first unpack the 7zip binary archive, somewhere).
  3. Tar it all up.
Personal tools