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
- 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.
- For producing a 32-bit MinGW4 binary, there's a shortcut to this: http://sourceforge.net/projects/rkwardextras/files/Windows/Development/ .
- Don't forget to install gettext-tools (missing in the above shortcut bundle)
- Set up your KDE environment (i.e. run kdeenv.bat) in your emerge install.
- 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.
- 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. Follow these guidelines:
- i.e. point this at the root of your emerge tree.
C:\R\R-x.y.z\bin\R.exeexists (and you want to compile against that version), set
- You'll probably take MinGW from your emerge tree, i.e.
- 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.
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.
- 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 kate, okular, and dependencies.
- 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.ini to use a relative path for "R executable":
- Fire up R (or RKWard) in the installation, and install the R2HTML-package.
- Create a link to rkward.exe, and place it in RKWard. 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 (i.e. first unpack the 7zip binary archive, somewhere).
- Tar it all up.