aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiktor w brodlo <wiktor@brodlo.net>2011-08-20 01:40:58 +0000
committerwiktor w brodlo <wiktor@brodlo.net>2011-08-20 01:40:58 +0000
commit94a21b5ced9a299c21f8663e31ea024cc107f865 (patch)
tree33b05fac528d6abc78062b2dfc8f99690c7175b5
parentFixed some syntax errors (diff)
downloadanaconda-94a21b5ced9a299c21f8663e31ea024cc107f865.tar.gz
anaconda-94a21b5ced9a299c21f8663e31ea024cc107f865.tar.bz2
anaconda-94a21b5ced9a299c21f8663e31ea024cc107f865.zip
Documentation
-rw-r--r--docs/creating-screens.txt107
-rw-r--r--docs/files.txt44
-rw-r--r--docs/gentoo-intro.txt38
-rw-r--r--docs/install.txt23
-rw-r--r--docs/installing-gentoo.txt48
5 files changed, 260 insertions, 0 deletions
diff --git a/docs/creating-screens.txt b/docs/creating-screens.txt
new file mode 100644
index 0000000..f0db983
--- /dev/null
+++ b/docs/creating-screens.txt
@@ -0,0 +1,107 @@
+ ******************************
+ * Gentoo Anaconda port *
+ ******************************
+
+ Creating new installer screens
+ by wiktor w brodlo <wiktor@brodlo.net>
+
+
+Creating new screens for Anaconda is fairly easy. Each screens has two parts:
+- a Glade file with the UI elements
+- a Python script with functionality
+
+The Glade files are stored in the ui/ directory, the Python scripts - in ui/.
+The actual names of files are irrelevant, but it's useful to follow the
+convention - call the Glade file screenname.glade, the Python script -
+screenname_gui.py.
+
+Your Glade interface should be inside a containter. You will need the name of
+this containter in order to load it with your Python script.
+
+The Python script is mostly free-form, but there are certain things that you
+need to do.
+
+First of all, import all the modules that you want to use. You will NEED to
+import gtk and gtk.glade, otherwise you won't be able to load your UI.
+
+Create a class, it's good to follow the convention call the class
+ScreennameWindow. It has to accept InstallWindow as the only argument.
+
+You're free to do anything you want inside the class, but the dispatcher
+assumes you have two functions - getNext(self) and getScreen(self, anaconda).
+The second parameter of getScreen is the anaconda object with all the settings
+etc that you might want.
+
+getNext should return None, and getScreen should return None if you want to,
+for any reason, skip the screen (perhaps it is a special screen that handles
+some odd case and is otherwise unneeded), or the container box that will be
+displayed inside the screen.
+
+Before the screen is shown, getScreen is called. This is the place to create
+any default settings and store whatever you'll need in getNexn. The container
+it returns will be displayed on the screen (so it is actually possible to
+create screens without a Glade file).
+
+When the "Next" button is clicked by the user, getNext is called. This is the
+place to store all the settings that you want in the anaconda object. While it
+is technically possible to run whatever code, it is recommended that you store
+the information that you'll need in anaconda, and run the code later, when the
+system is installing (there are some exceptions, just use common sense).
+
+When your screen is finished, you'll need to add it in three places:
+- the dispatcher (dispatch.py)
+- the install class (installclass.py)
+- the GUI (gui.py).
+
+All three parts need to know about your script in order for it to be
+displayed.
+
+In dispatch.py, find installSteps and add your screen. The dispatcher is a
+simple state machine that goes through all the screens and displays them in
+sequence, assuming they are in the install class and in the GUI.
+The syntax is ( name, Function ) where the name is the screenname, and the
+Function can be empty or a function *in the dispatcher* that you want to be
+called instead of Screenname.getScreen.
+
+In gui.py, add your screen to stepToClass. The syntax is
+name: (screen_file, screen_class), where name is the same name that you put in
+the dispatcher, the screen_file is the Python script for your screen without
+extension ("screenname_gui"), and screen_class is the class in your script
+("ScreennameWindow").
+
+In installclass.py, add the name of the screen (the same as you've used for
+the previous two files) to dispatch.setStepList in setSteps.
+
+Now, you need to tell the installer to perform some actions based on the
+settings the user has entered. You can do this in the gentoo/livecd.py file.
+Find the doPreInstall/doInstall/doPostInstall/writeConfiguration functions (as
+appropriate, depending on when you want your actions to run) and simply
+program in what you want. It's a good idea to create a separate function for
+each action to keep the procedures clean - the best place for such functions
+is the gentoo/utils.py file. Add your function to the GentooInstall class in
+the gentoo/utils.py file and it will be available in gentoo/livecd.py through
+self._gentoo_install (it's an instance of the GentooInstall class from
+gentoo/utils.py).
+
+That's it ;-)
+
+Here's a simple Python template:
+
+import gtk
+import gtk.glade
+
+class TemplateWindow(InstallWindow):
+ def getNext(self):
+ # Save your settings to self.anaconda
+ return None
+
+ def getScreen(self, anaconda):
+ self.anaconda = anaconda
+ (self.xml, self.container) = gui.getGladeWidget("sample.glade",
+ "sample_box")
+ # your widgets will now be available through
+ # self.xml.getWidget(widget_name) - keep the xml in self as
+ # you'll most likely need it in getNext.
+ return self.containter
+
+
diff --git a/docs/files.txt b/docs/files.txt
new file mode 100644
index 0000000..57e3c74
--- /dev/null
+++ b/docs/files.txt
@@ -0,0 +1,44 @@
+ ******************************
+ * Gentoo Anaconda port *
+ ******************************
+
+ Description of the tree
+ by wiktor w brodlo <wiktor@brodlo.net>
+
+Below is a description of every directory and the more important files in the
+source tree.
+
+/ The files in the main directory are various helpers, and
+| scripts that implement top-level functionality.
++-anaconda This python file is the core Anaconda. It implements the
+| anaconda class which contains the various options that the
+| user can select.
++-dispatch.py The dispatcher controls the order of the screens.
++-gui.py This file controls the GUI installer. It contains a list of
+| the GUI screens that can be displayed.
++-installclass.py This file describes the Install Class. Gentoo only has a
+| single install class, "gentoo_corecd" This file contains a
+| list of screens in the class.
++-command-stubs/ Various utility scripts.
++-docs/ Documentation.
++-gentoo/ Scripts for the Gentoo install class.
+| +-__init__.py Portage interface class.
+| +-const.py Various constants used by the installer.
+| +-livecd.py Helper functions for the LiveDVD install.
+| +-utils.py The main install class file, performs the actual operations on
+| the new system.
++-gptsync/ GPT helper.
++-installclasses/ This directory contains the install classes available for the
+| | installer.
+| +-corecd.py The "gentoo_corecd" install class.
++-isys/
++-iw/ Implements the screens.
++-liveinst/ Starts the installation from a live system (LiveDVD).
++-m4/ autom4te files.
++-pixmaps/ Pixmaps for the installer (banner, icons and such).
++-po/ Translations.
++-scripts/ Various helper scripts.
++-storage/ Storage (HDD etc.) helper scripts.
++-tests/ Anaconda self-tests.
++-ui/ Glade files for the GUI.
++-utils/ Some more helper utilities.
diff --git a/docs/gentoo-intro.txt b/docs/gentoo-intro.txt
new file mode 100644
index 0000000..3cab52c
--- /dev/null
+++ b/docs/gentoo-intro.txt
@@ -0,0 +1,38 @@
+ ******************************
+ * Gentoo Anaconda port *
+ ******************************
+
+ Introduction to the Gentoo port
+ by wiktor w brodlo <wiktor@brodlo.net>
+
+
+This is a fork of Sabayon's <http://www.sabayon.org> of Anaconda, itself a fork
+of Red Hat's/Fedora's Anaconda. The reason for choosing this particular setup
+was because Sabayon is a Gentoo-based distribution and has already prepared the
+infrastructure requried for the installation of Anaconda on a Gentoo system and
+for the installation of a Gentoo system using Anaconda (ebuilds for Anaconda and
+its dependencies, build/install process etc.).
+
+Several packages have been imported from the Sabayon overlay, available from
+layman, and some of these had to be patched and/or adapted slightly.
+
+The following files in the docs/ directory have been provided by Red Hat and/or
+Sabayon and have not been changed since the initial for from Sabayon:
+
+ - anaconda-release-notes.txt
+ - api.cfg
+ - driverdisc.txt
+ - gettext.txt
+ - install-methods.txt
+ - lvm_sanity_checks.txt
+ - making-screenshots
+ - mediacheck.txt
+ - rescue-mode
+ - threads.txt
+
+Feel free to read those but their accuracy, completeness and relevancy are not
+guaranteed.
+
+The Anaconda documentation from Fedora is a very useful source of information,
+and is generally more up-to-date than the above files.
+It is available at <http://www.fedoraproject.org/wiki/Anaconda>.
diff --git a/docs/install.txt b/docs/install.txt
new file mode 100644
index 0000000..4a4b303
--- /dev/null
+++ b/docs/install.txt
@@ -0,0 +1,23 @@
+ ******************************
+ * Gentoo Anaconda port *
+ ******************************
+
+ Installing Anaconda
+ by wiktor w brodlo <wiktor@brodlo.net>
+
+This file describes how to install Anaconda on a Gentoo system, like the Gentoo
+LiveDVD. It does NOT describe how to install Gentoo using Anaconda.
+
+First of all, you will need roughly 500 MB of space for all the dependencies and
+such. Anaconda depends on various libraries and other packages.
+
+As root:
+1. cd /
+2. git clone git://git.overlays.gentoo.org/proj/anaconda-overlay.git
+3. Add /anaconda-overlay to your PORTDIR_OVERLAY
+ NOTICE: The overlay MUST be in /anaconda-overlay.
+4. emerge anaconda --autounmask-write
+5. Update your configs (e.g. etc-update).
+6. emerge anaconda
+7. Go for a tea or something ;-)
+8. Enjoy.
diff --git a/docs/installing-gentoo.txt b/docs/installing-gentoo.txt
new file mode 100644
index 0000000..6aecfcf
--- /dev/null
+++ b/docs/installing-gentoo.txt
@@ -0,0 +1,48 @@
+ ******************************
+ * Gentoo Anaconda port *
+ ******************************
+
+ Installing Gentoo with Anaconda
+ by wiktor w brodlo <wiktor@brodlo.net>
+
+It is fairly easy to install Gentoo using the Anaconda installer (that's the
+point). For the most part, the installer follows the Gentoo handbook, but there
+are some exceptions.
+
+To start the installer, run liveinst as a regular user. You will be asked for
+your language (this language will be used for the installer as well as your
+new system), your keyboard layout (just like the language, this keyboard layout
+will be used throughout the installation and will be the default layout in the
+installed system).
+
+After these are selected, you will be asked where would you like to install
+Gentoo. You will be given several choices: automatic re-partitioning including
+wipe, using the existing Linux partitions, using the free space on the HDD, or
+your own personal layout. You can also verify the installer's magic by selecting
+"Review layout".
+
+You will then be asked to pick the settings that go into /etc/make.conf. Please
+follow the instructions on-screen to pick the best options for your new system.
+
+Select your mirrors and your sync mirrors, so that new packages can be installed
+and the Portage tree can be updated. Pick your profile and your USE flags.
+
+Use the nice map to tell the installer where you are, so that the correct
+timezone is set by the installer. Choose whether you want to pick your own
+kernel configuration or whether you prefer to just copy the kernel from the DVD.
+
+Pick your cron and system logger.
+
+Choose where you'd like the GRUB bootloader installed, and whether you'd like a
+bootloader password.
+
+Create a user account and choose whether you'd like a desktop environment with
+X.org or just text mode.
+
+The installation will now download a stage3 archive, unpack it on your new
+system, sync the Portage tree, install some tools, write down your configuration
+and install any software you elected to install.
+
+After the installer is done, it will ask you for permission to reboot the
+system. When you're ready, reboot, remove the LiveDVD from the drive and let
+your new Gentoo boot. Enjoy! ;-)