RKWard on Windows/Packaging
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
- An installation of KDE, including kdelibs-devel and dependencies, compiled with MinGW4. See http://techbase.kde.org/Projects/KDE_on_Windows/Installation .
- An installation of R (http://www.r-project.org). You should use a 32-bit version for best compatibility.
- An appropriate version of Rtools: http://www.murdoch-sutherland.com/Rtools/
- An SVN client. A command-line client is available from the KDE windows installer. Update: with KDE 4.4.4 the subversion package is no longer available/installable; try, for example, Silk SVN or TortoiseSVN.
- NSIS: http://nsis.sourceforge.net/Download
- 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:
svn co http://rkward.svn.sourceforge.net/svnroot/rkward/branches/release_branch_0.5.4
- CD to the "windows_nsis"-subdirectory of the sources.
- 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.
- If all goes well, an .exe-file 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.
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.
- 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).
- Use the regular KDE for windows installer to install KDE to RKWard\KDE. As usual, select MinGW4 as compiler. Install kdebase-apps and dependencies. We could save a (small) amount of space by installing only kdebase-runtime, but adding "kwrite" might be useful in its own right.
- Use the regular R installer to install R to RKWard\R.
- Use the RKWard for Windows installer to install RKWard
- Edit RKWard\KDE\bin\rkward.bat to use a relative path for R_BINARY and RKWARD.BIN:
- SET RKWARD.BIN=%~dsp0\rkward.bin.exe
- Fire up R (or RKWard) in the installation, and install the R2HTML-package.
- Create a link to rkward.bat, and place it in RKWard. Use RKWard\KDE\bin\rkward.ico as icon. Change the working-directory to "%USERPROFILE%".
- Place a copy of the GPL v2 and the Readme.html (get the current version from the existing bundle) in RKWard.
- Use 7zip to zip it up in a self-extracting archive.
- 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.
- For R and RKWard, simply place the source packages into the respective directories (don't forget including Rtools).
- For KDE, use the fetch_kde_sources.sh script (you need sh and wget). Personally I do this step on Linux.
- Tar it all up.