Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Commit

Permalink
Changed name from « SalixLive Installer » to « Salix Live Installer ».
Browse files Browse the repository at this point in the history
Updated icons. There is no « clock » or « time » basic icons in hicolor or gnome theme, so I used gtkclocksetup icon that should be installed in any live or normal Salix system.
Packages tab is done.
Added a --clone option to the test script/python to help test a live clone environment.
  • Loading branch information
Cyrille Pontvieux committed Feb 12, 2013
1 parent 5fc78df commit df28431
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 30 deletions.
12 changes: 6 additions & 6 deletions src/salix-live-installer.glade
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
<object class="GtkWindow" id="main_window">
<property name="width_request">800</property>
<property name="visible">True</property>
<property name="title" translatable="yes">SalixLive Installer</property>
<property name="title" translatable="yes">Salix Live Installer</property>
<property name="window_position">center-always</property>
<property name="icon">salix-live-installer.png</property>
<signal name="destroy" handler="gtk_main_quit"/>
Expand Down Expand Up @@ -455,7 +455,7 @@
<child>
<object class="GtkImage" id="image13">
<property name="visible">True</property>
<property name="icon_name">user-away</property>
<property name="icon_name">gtkclocksetup</property>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -468,7 +468,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Time</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">keyboard_tab</property>
<property name="mnemonic_widget">time_tab</property>
</object>
<packing>
<property name="pack_type">end</property>
Expand Down Expand Up @@ -634,7 +634,7 @@
<child>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="icon_name">preferences-desktop-accessibility</property>
<property name="icon_name">system-config-users</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -917,7 +917,7 @@
<property name="width_request">580</property>
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">SalixLive Installer will perform a standard installation of Salix Operating System on your computer.
<property name="label" translatable="yes">Salix Live Installer will perform a standard installation of Salix Operating System on your computer.

Simply click on one of the categories in the left section to configure the corresponding settings. A check will be displayed beside each setting once it has been configured. All the settings must be configured before the 'Launch Salix installation' button becomes accessible.

Expand Down Expand Up @@ -3703,7 +3703,7 @@ If you already have all the needed partitions, please click on the button 'Do no
<property name="type_hint">normal</property>
<property name="skip_taskbar_hint">True</property>
<property name="transient_for">main_window</property>
<property name="program_name">SalixLive Installer</property>
<property name="program_name">Salix Live Installer</property>
<property name="version">Version</property>
<property name="copyright">Copyright &#xA9; 2010-2011 Pierrick Le Brun</property>
<property name="comments" translatable="yes">SalixOS installation from SalixLive's graphic environment</property>
Expand Down
75 changes: 52 additions & 23 deletions src/salix-live-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
MIN_SALT = '0.2.1'

class SalixLiveInstaller:
def __init__(self, is_test = False):
def __init__(self, is_test = False, is_test_clone = False):
self.is_test = is_test
self.is_test_clone = is_test_clone
builder = gtk.Builder()
for d in ('.', '/usr/share/salix-live-installer', '../share/salix-live-installer'):
if os.path.exists(d + '/salix-live-installer.glade'):
Expand Down Expand Up @@ -362,17 +363,17 @@ def on_basic_radiobutton_enter_notify_event(self, widget, data=None):
for advanced users that would like to install a lightweight system and \
add their own choice of applications. "))
def on_full_radiobutton_enter_notify_event(self, widget, data=None):
if liveclone_install == False :
self.ContextLabel.set_markup(_('<b>Full installation:</b>\n\
Everything that is included in the iso is installed. That includes a complete \
desktop environment and a complete selection of matching applications, \
always following the "one application per task" rationale. '))
elif liveclone_install == True :
if self.is_liveclone:
self.ContextLabel.set_markup(_("<b>Full installation:</b>\n\
Salix Live Installer has detected a LiveClone customized environment. \
Core and Basic installation modes are therefore not available. \n\
You can only perform a full installation: all software \
included in your customized LiveClone will be installed."))
else:
self.ContextLabel.set_markup(_('<b>Full installation:</b>\n\
Everything that is included in the iso is installed. That includes a complete \
desktop environment and a complete selection of matching applications, \
always following the "one application per task" rationale. '))
def on_packages_apply_enter_notify_event(self, widget, data=None):
self.ContextLabel.set_text(_("Confirm your packages selection."))
def on_packages_undo_enter_notify_event(self, widget, data=None):
Expand All @@ -396,10 +397,10 @@ def on_button_quit_clicked(self, widget, data=None):
gtk.main_quit()

def get_current_config(self):
print 'Gathering current configuration…'
print 'Gathering current configuration…',
if self.is_test:
self.is_live = True
self.is_liveclone = False
self.is_liveclone = self.is_test_clone
self.salt_version = MIN_SALT
self.is_salt_ok = True
else:
Expand Down Expand Up @@ -429,10 +430,11 @@ def get_current_config(self):
self.cur_use_numlock = sltl.isNumLockEnabledByDefault()
self.cur_use_ibus = sltl.isIbusEnabledByDefault()
self.cur_locale = sltl.getCurrentLocale()
print ' Done'
self.install_mode = None
print ' Done'

def build_data_stores(self):
print 'Building choice lists…'
print 'Building choice lists…',
self.ContinentZoneListStore.clear()
self.ContinentZoneListStore.append([_("Select...")])
self.ContinentZoneCombobox.set_active(0)
Expand All @@ -455,7 +457,7 @@ def build_data_stores(self):
self.LocaleListStore.clear()
for l in sltl.listAvailableLocales():
self.LocaleListStore.append(l)
print ' Done'
print ' Done'

def add_custom_signals(self):
self.KeyboardList.get_selection().connect('changed', self.on_keyboard_list_changed_event)
Expand Down Expand Up @@ -695,23 +697,47 @@ def users_settings(self):
pass
def on_clone_login_apply_clicked(self, widget, data=None):
pass
def on_clone_login_undo_clicked(self, widget, data=None):
pass
def on_users_apply_clicked(self, widget, data=None):
pass
def on_users_undo_clicked(self, widget, data=None):
pass
def on_rootpass_apply_clicked(self, widget, data=None):
pass
def on_rootpass_undo_clicked(self, widget, data=None):
pass

def packages_settings(self):
pass
def on_packages_undo_clicked(self, widget, data=None):
pass
if not self.install_mode:
self.CoreRadioButton.set_sensitive(not self.is_liveclone)
self.CoreHBox.set_sensitive(not self.is_liveclone)
self.BasicRadioButton.set_sensitive(not self.is_liveclone)
self.BasicHBox.set_sensitive(not self.is_liveclone)
def on_packages_apply_clicked(self, widget, data=None):
pass
def on_clone_login_undo_clicked(self, widget, data=None):
pass
def on_users_undo_clicked(self, widget, data=None):
pass
def on_rootpass_undo_clicked(self, widget, data=None):
pass
self.CoreRadioButton.set_sensitive(False)
self.BasicRadioButton.set_sensitive(False)
self.FullRadioButton.set_sensitive(False)
self.PackagesApplyButton.set_sensitive(False)
if self.CoreRadioButton.get_active():
self.install_mode = 'core'
elif self.BasicRadioButton.get_active():
self.install_mode = 'basic'
elif self.FullRadioButton.get_active():
self.install_mode = 'full'
self.configurations['packages'] = True
self.update_install_button()
self.PackagesCheck.show()
self.PackagesCheckMarker.hide()
def on_packages_undo_clicked(self, widget, data=None):
self.install_mode = None
self.packages_settings()
self.FullRadioButton.set_sensitive(True)
self.PackagesApplyButton.set_sensitive(True)
self.configurations['packages'] = False
self.update_install_button()
self.PackagesCheck.hide()
self.PackagesCheckMarker.show()



Expand Down Expand Up @@ -860,16 +886,19 @@ def error_dialog(message, parent = None):
# If no root privilege, displays error message and exit
is_test = (len(sys.argv) > 1 and sys.argv[1] == '--test')
if is_test:
is_clone = (len(sys.argv) > 2 and sys.argv[2] == '--clone')
gettext.install(APP, './locale', True)
gtk.glade.bindtextdomain(APP, './locale')
else:
is_clone = False
gettext.install(APP, '/usr/share/locale', True)
gtk.glade.bindtextdomain(APP, '/usr/share/locale')
gtk.glade.textdomain(APP)

if not is_test and os.getuid() != 0:
error_dialog(_("<b>Sorry!</b> \n\nRoot privileges are required to run this program. "))
sys.exit(1)
print 'Salix Live Installer v' + VERSION
# show the gui and wait for signals
SalixLiveInstaller(is_test)
SalixLiveInstaller(is_test, is_clone)
gtk.main()
2 changes: 1 addition & 1 deletion src/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ for p in ../po/*.po; do
msgfmt $p -o locale/$d/LC_MESSAGES/salix-live-installer.mo
fi
done
./salix-live-installer.py --test
./salix-live-installer.py --test "$@"

0 comments on commit df28431

Please sign in to comment.