Upgrading Guiguts involves installing the new version in a directory and possibly copying a few files over from the prior install. This document walks you through all the steps.
This document assumes you have Guiguts installed in c:\guiguts
. If you have
this installed in a different location, you will need to adjust the paths
below accordingly. Despite the instructions using Windows paths, the overall
steps below work for all operating systems.
- Backup your old installation. It is highly recommended that you backup your prior Guiguts installation before continuing.
- Rename your old Guiguts directory (eg:
c:\guiguts
) to a new one (eg:c:\guiguts-old
). - Follow the instructions in INSTALL.md to install Guiguts
for your operating system, including any helper applications, noting that
if you are upgrading from release 1.0.25 or earlier on Windows, you must
install Strawberry Perl before trying to install and run Guiguts.
Note the requirement to run
install_cpan_modules.pl
to ensure all necessary Perl modules are installed. - Review and possibly copy over changes made to Guiguts files.
-
This release has two features that will assist with this process for the current release and largely eliminate this step for future releases. It is therefore recommended that you complete the following steps if you have never done them before:
- Run the newly installed Guiguts program, open the
Preferences
menu, thenFile Paths
, then selectCopy Settings From A Release
. Use the dialog that pops up to select the top level of your old release (eg:c:\guiguts-old
). This should be a folder that containsguiguts.pl
,headerdefault.txt
, etc. Using this option will copy necessary configuration files from the old release into a new folder named%HOMEPATH%\Documents\GGprefs
where %HOMEPATH% is your home directory, e.g.C:\Users\user1\Documents\GGprefs
. The folder is similarly under your home directory Documents folder on a Mac. Under Linux, the new folder will be$HOME/.GGprefs
. When you have done this once, you will not normally want to do it again when you upgrade to a future release, because all your settings will be safe in theGGprefs
folder. - If you have previously customized the
header.txt
used during HTML generation, it is recommended that you use the newheader_user.txt
feature instead. During HTML generation, if Guiguts finds aheader_user.txt
file, it will insert this into the HTML file just before the end of theheaderdefault.txt
file that was included at the top. This mechanism means that you will gain the benefits of any changes to the default header in future releases, while retaining your own customizations, which usually you will not need to alter between releases. To take advantage of this, create a file namedheader_user.txt
in theGGPrefs
folder created in the step above. Add CSS toheader_user.txt
to augment or override the CSS contained inheaderdefault.txt
. For example, ifheaderdefault.txt
sets the width of the HR at the end of a chapter to 65%, but you prefer a width of 30%, you could add the following CSS toheader_user.txt
:hr.chap {width:30%}
. Normal CSS rules apply regarding priority, so your customization will override the default. - You will not need to apply the following bullet points regarding
setting.rc
,data
andheader.txt
, since the relevant files are now safely in yourGGprefs
folder.
- Run the newly installed Guiguts program, open the
-
The
setting.rc
file stores Guiguts configurations. This file is automatically generated by Guiguts if it doesn't exist. Newer versions of Guiguts will include updated defaults, such as DP URLs and bundled tool locations. It is recommended that you do not copy this file from your old version but let the new Guiguts create the file afresh. You may then have some preferences you want to change within Guiguts which will be saved in this file. -
The files in the
data
directory contain words used in HTML generation like Footnote and Page, so they can be customized for different languages. If you have changed these in the old release, copy the relevant ones to the new release. This will not apply to most users. -
The file
headerdefault.txt
has had important changes made to it in this release. When you first run Guiguts, it copies this file to one namedheader.txt
. If you have customized yourheader.txt
in a previous release, you may want to retain those changes in the new release. If you are upgrading from a 1.3.x release, you can copyheader.txt
from the old release to the new one after you have run and exited Guiguts once. If you are upgrading from an older release, e.g. 1.0.25, 1.1.x or 1.2.x, you should follow the steps below to ensure you get all the updates:- In the old directory compare
header.txt
withheaderdefault.txt
, making note of any differences. - Run the newly installed Guiguts program to create the new
header.txt
then immediately exit. - Edit
header.txt
in the new directory and make the changes you want to carry over from the old release.
- In the old directory compare
-
If you were using
@media handheld
in your customized header file, please note that it is now deprecated. The same effects can be achieved using thex-ebookmaker
class as described here. Alternatively, ask in the DP forum Help with: guiguts thread.
-
You can now run Guiguts from the new installation directory.