Commit 7bf61b0d authored by Ulrike Uhlig's avatar Ulrike Uhlig Committed by intrigeri

Rename liveusb-creator to Tails Installer

Renaming software, files, classes so that
we would not steal LiveUSBCreator's namespace.
See Tails #8552.
parent 8af13288
include README.txt
include Makefile
include LICENSE.txt
include liveusb-creator
include liveusb-creator-launcher
include tails-installer
include tails-installer-launcher
include setup.py
include liveusb/__init__.py
include liveusb/creator.py
include liveusb/dialog.py
include liveusb/gui.py
include liveusb/launcher.py
include liveusb/releases.py
include liveusb/urlgrabber/__init__.py
include liveusb/urlgrabber/byterange.py
include liveusb/urlgrabber/grabber.py
include liveusb/urlgrabber/keepalive.py
include liveusb/urlgrabber/mirror.py
include liveusb/urlgrabber/progress.py
include data/liveusb-creator.ui
include data/liveusb-creator-launcher.ui
include data/liveusb-creator.desktop
include data/tails-liveusb-header.png
include tails_installer/__init__.py
include tails_installer/creator.py
include tails_installer/dialog.py
include tails_installer/gui.py
include tails_installer/launcher.py
include tails_installer/releases.py
include tails_installer/urlgrabber/__init__.py
include tails_installer/urlgrabber/byterange.py
include tails_installer/urlgrabber/grabber.py
include tails_installer/urlgrabber/keepalive.py
include tails_installer/urlgrabber/mirror.py
include tails_installer/urlgrabber/progress.py
include data/tails-installer.ui
include data/tails-installer-launcher.ui
include data/tails-installer.desktop
include data/tails-tails_installer-header.png
include data/usb-creator-gtk.svg
include liveusb-creator.console
include liveusb-creator.pam
include liveusb-creator.spec
include tails-installer.console
include tails-installer.pam
include tails-installer.spec
include po/*.po
===============
liveusb-creator
tails-installer
===============
A cross-platform tool for easily installing live operating systems on to USB
flash drives.
Using
-----
See the wiki for instructions on how to use the liveusb-creator:
https://fedorahosted.org/liveusb-creator
Developing
----------
See the Developers Guide on the wiki for details,
https://fedorahosted.org/liveusb-creator/wiki/Development
License
-------
The liveusb-creator is licensed under the GPLv2.
The tails-installer is licensed under the GPLv2.
This tool is distributed with the following open source software::
......
s_InstallHere=Select the directory to install LiveUSB Creator in:
s_InstallHere[fr]=Choisir le dossier où installer « LiveUSB Creator » :
s_RunNow=Run LiveUSB Creator now?
s_RunNow[fr]=Lancer « LiveUSB Creator » maintenant ?
s_UnInstall=This will uninstall LiveUSB Creator from your system.
s_UnInstall[fr]=Ceci va désinstaller « LiveUSB Creator » de votre système.
......@@ -7,7 +7,7 @@ Comment=Install, clone, upgrade Tails
Comment[fr]=Installer, cloner, mettre à jour Tails
Comment[sv]=Installera, klona, uppgradera Tails
Icon=usb-creator-gtk.svg
Exec=liveusb-creator-launcher
Exec=tails-installer-launcher
Terminal=false
Categories=System;Tails;
Keywords=Tails;Install;Upgrade;Update;Copy;Clone;Installer;USB;Installation;Anonymity;Tor;Anonymous;SD;Amnesic;Amnesia;
s_InstallHere=Select the directory to install Tails Installer in:
s_InstallHere[fr]=Choisir le dossier où installer « Tails Installer » :
s_RunNow=Run Tails Installer now?
s_RunNow[fr]=Lancer « Tails Installer » maintenant ?
s_UnInstall=This will uninstall Tails Installer from your system.
s_UnInstall[fr]=Ceci va désinstaller « Tails Installer » de votre système.
[Desktop Entry]
Type=Application
Name=LiveUSB Creator
Name=Tails Installer
Comment=Write operating system images to a USB device
Icon=usb-creator-gtk.svg
Exec=liveusb-creator
Exec=tails-installer
Terminal=false
Categories=System;
Name "LiveUSB Creator 3.11.8"
OutFile "liveusb-creator-3.11.8-setup.exe"
Name "Tails Installer 3.11.8"
OutFile "tails-installer-3.11.8-setup.exe"
!include "MUI2.nsh"
XPStyle on
......@@ -9,19 +9,19 @@ XPStyle on
SetCompressor lzma
InstallDir "$PROGRAMFILES\LiveUSB Creator"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator" ""
InstallDir "$PROGRAMFILES\Tails Installer"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer" ""
DirText "Select the directory to install LiveUSB Creator in:"
DirText "Select the directory to install Tails Installer in:"
!define MUI_ICON liveusb-creator.ico
;!define MUI_UNICON liveusb-creator.ico
!define MUI_ICON tails-installer.ico
;!define MUI_UNICON tails-installer.ico
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN $INSTDIR\liveusb-creator.exe
!define MUI_FINISHPAGE_RUN $INSTDIR\tails-installer.exe
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
......@@ -99,7 +99,7 @@ Section ""
vcredist_install_finished:
Delete "$INSTDIR\vcredist_x86.exe"
File liveusb-creator.exe
File tails-installer.exe
File LICENSE.txt
File README.txt
File w9xpopen.exe
......@@ -114,35 +114,35 @@ Section ""
; Create shortcut.
SetOutPath -
CreateDirectory "$SMPROGRAMS\LiveUSB Creator"
CreateShortCut "$SMPROGRAMS\LiveUSB Creator\LiveUSB Creator.lnk" "$INSTDIR\liveusb-creator.exe"
CreateShortCut "$SMPROGRAMS\LiveUSB Creator\Uninstall LiveUSB Creator.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
CreateDirectory "$SMPROGRAMS\Tails Installer"
CreateShortCut "$SMPROGRAMS\Tails Installer\Tails Installer.lnk" "$INSTDIR\tails-installer.exe"
CreateShortCut "$SMPROGRAMS\Tails Installer\Uninstall Tails Installer.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
; Create uninstaller.
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator" "DisplayName" "LiveUSB Creator (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer" "DisplayName" "Tails Installer (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteUninstaller "$INSTDIR\uninst.exe"
SectionEnd
UninstallText "This will uninstall LiveUSB Creator from your system."
UninstallText "This will uninstall Tails Installer from your system."
Section Uninstall
; Delete shortcuts.
Delete "$SMPROGRAMS\LiveUSB Creator\LiveUSB Creator.lnk"
Delete "$SMPROGRAMS\LiveUSB Creator\Uninstall LiveUSB Creator.lnk"
RMDir "$SMPROGRAMS\LiveUSB Creator"
Delete "$DESKTOP\LiveUSB Creator.lnk"
Delete "$SMPROGRAMS\Tails Installer\Tails Installer.lnk"
Delete "$SMPROGRAMS\Tails Installer\Uninstall Tails Installer.lnk"
RMDir "$SMPROGRAMS\Tails Installer"
Delete "$DESKTOP\Tails Installer.lnk"
; Delete registry keys.
Delete "$INSTDIR\uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer"
; Delete files.
Delete "$INSTDIR\liveusb-creator.exe"
Delete "$INSTDIR\tails-installer.exe"
Delete "$INSTDIR\LICENSE.txt"
Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\w9xpopen.exe"
......@@ -153,7 +153,7 @@ Section Uninstall
Delete "$INSTDIR\tools\dd.exe"
Delete "$INSTDIR\tools\syslinux.exe"
Delete "$INSTDIR\liveusb-creator.exe.log"
Delete "$INSTDIR\tails-installer.exe.log"
; Remove the installation directories.
RMDir /R "$INSTDIR\locale"
......
;--------------------------------
;LiveUSB Creator NSIS script
;Tails Installer NSIS script
Name "LiveUSB Creator 3.11.8"
OutFile "liveusb-creator-3.11.8-setup.exe"
Name "Tails Installer 3.11.8"
OutFile "tails-installer-3.11.8-setup.exe"
SetCompressor lzma
......@@ -15,7 +15,7 @@ SetCompressor lzma
; Interface Configuration
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${LC_NSIS_INCLUDE_PATH}\liveusb-creator-nsi.bmp"
!define MUI_HEADERIMAGE_BITMAP "${LC_NSIS_INCLUDE_PATH}\tails-installer-nsi.bmp"
!define MUI_ABORTWARNING
;--------------------------------
......@@ -32,12 +32,12 @@ SetCompressor lzma
@INSERT_TRANSLATIONS@
;--------------------------------
InstallDir "$PROGRAMFILES\LiveUSB Creator"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator" ""
InstallDir "$PROGRAMFILES\Tails Installer"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer" ""
DirText $(s_InstallHere)
Icon liveusb-creator.ico
Icon tails-installer.ico
Section "Dummy Section" SecDummy
......@@ -45,7 +45,7 @@ Section "Dummy Section" SecDummy
SetOverwrite on
SetOutPath "$INSTDIR"
File liveusb-creator.exe
File tails-installer.exe
File LICENSE.txt
File README.txt
File MSVCP90.dll
......@@ -63,19 +63,19 @@ Section "Dummy Section" SecDummy
; Create shortcut.
SetOutPath -
CreateDirectory "$SMPROGRAMS\LiveUSB Creator"
CreateShortCut "$SMPROGRAMS\LiveUSB Creator\LiveUSB Creator.lnk" "$INSTDIR\liveusb-creator.exe"
CreateShortCut "$SMPROGRAMS\LiveUSB Creator\Uninstall LiveUSB Creator.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
CreateDirectory "$SMPROGRAMS\Tails Installer"
CreateShortCut "$SMPROGRAMS\Tails Installer\Tails Installer.lnk" "$INSTDIR\tails-installer.exe"
CreateShortCut "$SMPROGRAMS\Tails Installer\Uninstall Tails Installer.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
; Optionally start program.
MessageBox MB_YESNO|MB_ICONQUESTION $(s_RunNow) IDNO SkipRunProgram
Exec "$INSTDIR\liveusb-creator.exe"
Exec "$INSTDIR\tails-installer.exe"
SkipRunProgram:
; Create uninstaller.
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator" "DisplayName" "LiveUSB Creator (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer" "DisplayName" "Tails Installer (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteUninstaller "$INSTDIR\uninst.exe"
SectionEnd
......@@ -85,18 +85,18 @@ UninstallText $(s_UnInstall)
Section Uninstall
; Delete shortcuts.
Delete "$SMPROGRAMS\LiveUSB Creator\LiveUSB Creator.lnk"
Delete "$SMPROGRAMS\LiveUSB Creator\Uninstall LiveUSB Creator.lnk"
RMDir "$SMPROGRAMS\LiveUSB Creator"
Delete "$DESKTOP\LiveUSB Creator.lnk"
Delete "$SMPROGRAMS\Tails Installer\Tails Installer.lnk"
Delete "$SMPROGRAMS\Tails Installer\Uninstall Tails Installer.lnk"
RMDir "$SMPROGRAMS\Tails Installer"
Delete "$DESKTOP\Tails Installer.lnk"
; Delete registry keys.
Delete "$INSTDIR\uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\LiveUSB Creator"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\LiveUSB Creator"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Tails Installer"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Tails Installer"
; Delete files.
Delete "$INSTDIR\liveusb-creator.exe"
Delete "$INSTDIR\tails-installer.exe"
Delete "$INSTDIR\LICENSE.txt"
Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\MSVCP90.DLL"
......@@ -110,7 +110,7 @@ Section Uninstall
Delete "$INSTDIR\tools\dd.exe"
Delete "$INSTDIR\tools\syslinux.exe"
Delete "$INSTDIR\liveusb-creator.exe.log"
Delete "$INSTDIR\tails-installer.exe.log"
; Remove the installation directories.
RMDir "$INSTDIR\tools"
......
[encoding: UTF-8]
liveusb/__init__.py
liveusb/creator.py
liveusb/gui.py
liveusb/launcher.py
liveusb/source.py
liveusb/urlgrabber/byterange.py
liveusb/urlgrabber/grabber.py
liveusb/urlgrabber/keepalive.py
liveusb/urlgrabber/mirror.py
liveusb/urlgrabber/progress.py
liveusb/utils.py
tails_installer/__init__.py
tails_installer/creator.py
tails_installer/gui.py
tails_installer/launcher.py
tails_installer/source.py
tails_installer/urlgrabber/byterange.py
tails_installer/urlgrabber/grabber.py
tails_installer/urlgrabber/keepalive.py
tails_installer/urlgrabber/mirror.py
tails_installer/urlgrabber/progress.py
tails_installer/utils.py
data/liveusb-creator.ui.h
data/liveusb-creator-launcher.ui.h
data/tails-installer.ui.h
data/tails-installer-launcher.ui.h
liveusb-creator
liveusb-creator-launcher
tails-installer
tails-installer-launcher
:: Generate a new Windows liveusb-creator release
:: Generate a new Windows tails-installer release
:: Usage: `release 3.0.1`
:: Author: Luke Macken <lmacken@redhat.com>
echo Generating an exe of the liveusb-creator %1
echo Generating an exe of the tails-installer %1
rmdir /S /Q dist
rmdir /S /Q build
rmdir /S /Q liveusb-creator-%1
rmdir /S /Q tails-installer-%1
cd po
rmdir /S /Q locale
for %%f in (*.po) do (
mkdir locale\%%~Nf\LC_MESSAGES
python C:\Python27\Tools\i18n\msgfmt.py -o locale\%%~Nf\LC_MESSAGES\liveusb-creator.mo %%f
python C:\Python27\Tools\i18n\msgfmt.py -o locale\%%~Nf\LC_MESSAGES\tails-installer.mo %%f
)
cd ..
python -OO setup.py py2exe
copy README.txt dist
copy data\fedora.ico dist\liveusb-creator.ico
copy data\fedora.ico dist\tails-installer.ico
copy data\vcredist_x86.exe dist\
copy data\liveusb-creator.nsi dist\liveusb-creator.nsi
"C:\Program Files\NSIS\makensis.exe" dist\liveusb-creator.nsi
rename dist liveusb-creator-%1
copy data\tails-installer.nsi dist\tails-installer.nsi
"C:\Program Files\NSIS\makensis.exe" dist\tails-installer.nsi
rename dist tails-installer-%1
......@@ -43,20 +43,20 @@ if sys.platform == 'win32':
LOCALE_DIR = 'locale'
setup(
name = 'liveusb-creator',
name = 'tails-installer',
version = VERSION,
packages = ['liveusb', 'liveusb/urlgrabber'],
scripts = ['liveusb-creator'],
packages = ['tails_installer', 'tails_installer/urlgrabber'],
scripts = ['tails-installer'],
license = 'GNU General Public License (GPL)',
url = 'https://fedorahosted.org/liveusb-creator',
url = 'https://tails.boum.org/tails-installer',
description = 'This tool installs a LiveCD ISO on to a USB stick',
long_description = 'The liveusb-creator is a cross-platform tool for easily installing live operating systems on to USB flash drives',
long_description = 'The tails-installer is a cross-platform tool for easily installing live operating systems on to USB flash drives',
platforms = ['Windows'],
maintainer = 'Luke Macken',
maintainer_email = 'lmacken@redhat.com',
windows = [
{
"script" : "liveusb-creator",
"script" : "tails-installer",
# "icon_resources" : [(0, "data/fedora.ico")],
}
],
......@@ -81,7 +81,7 @@ if sys.platform == 'win32':
"tools/7-Zip-License.txt",
],)
] + [(os.path.join(LOCALE_DIR, locale),
[os.path.join('po', 'locale', locale, 'liveusb-creator.mo')])
[os.path.join('po', 'locale', locale, 'tails-installer.mo')])
for locale in locales]
)
else:
......@@ -96,30 +96,30 @@ else:
def run(self):
subprocess.call (["intltool-extract",
"--type=gettext/glade",
"data/liveusb-creator.ui"])
"data/tails-installer.ui"])
subprocess.call (["intltool-extract",
"--type=gettext/glade",
"data/liveusb-creator-launcher.ui"])
"data/tails-installer-launcher.ui"])
build_extra.build_extra.sub_commands.insert(0, ("build_gtkbuilderi18n", None))
setup(
name = 'liveusb-creator',
name = 'tails-installer',
version = VERSION,
packages = ['liveusb'],
scripts = ['liveusb-creator', 'liveusb-creator-launcher'],
packages = ['tails_installer'],
scripts = ['tails-installer', 'tails-installer-launcher'],
license = 'GNU General Public License (GPL)',
url = 'https://fedorahosted.org/liveusb-creator',
url = 'https://fedorahosted.org/tails-installer',
description = 'This tool installs a LiveCD ISO on to a USB stick',
long_description = 'The liveusb-creator is a cross-platform tool for easily installing live operating systems on to USB flash drives',
long_description = 'The tails-installer is a cross-platform tool for easily installing live operating systems on to USB flash drives',
platforms = ['Linux'],
maintainer = 'Luke Macken',
maintainer_email = 'lmacken@redhat.com',
data_files = [("/usr/share/applications",
[ "data/liveusb-creator-launcher.desktop" ]),
[ "data/tails-installer-launcher.desktop" ]),
("/usr/share/pixmaps",["data/usb-creator-gtk.svg"]),
("/usr/share/liveusb-creator", ["data/liveusb-creator.ui",
"data/liveusb-creator-launcher.ui",
("/usr/share/tails-installer", ["data/tails-installer.ui",
"data/tails-installer-launcher.ui",
"data/tails-liveusb-header.png"])],
cmdclass = {
"build" : build_extra.build_extra,
......
......@@ -23,7 +23,7 @@
import os
import sys
from liveusb import _
from tails_installer import _
__version__ = '3.11.8'
......@@ -78,9 +78,9 @@ def parse_args():
def main():
opts, args = parse_args()
if opts.console:
from liveusb import LiveUSBCreator
from tails_installer import TailsInstallerCreator
try:
live = LiveUSBCreator(opts)
live = TailsInstallerCreator(opts)
live.detect_supported_drives()
live.verify_filesystem()
live.extract_iso()
......@@ -92,9 +92,9 @@ def main():
else:
## Start our graphical interface
from gi.repository import Gtk
from liveusb.gui import LiveUSBWindow
from tails_installer.gui import TailsInstallerWindow
try:
win = LiveUSBWindow(opts=opts, args=sys.argv)
win = TailsInstallerWindow(opts=opts, args=sys.argv)
Gtk.main()
except KeyboardInterrupt:
pass
......
......@@ -17,7 +17,7 @@ import sys
from gi.repository import Gtk
from liveusb.launcher import LiveUSBLauncherWindow
from tails_installer.launcher import TailsInstallerLauncherWindow
def main():
try:
......@@ -25,7 +25,7 @@ def main():
args = sys.argv[1:]
else:
args = []
LiveUSBLauncherWindow(args)
TailsInstallerLauncherWindow(args)
Gtk.main()
except KeyboardInterrupt:
pass
......
% LIVEUSB-CREATOR-LAUNCHER(1) liveusb-creator-launcher user manual
% tails-installer-LAUNCHER(1) tails-installer-launcher user manual
% This manual page was written by u <u@451f.org>
% July 22nd, 2015
NAME
====
liveusb-creator-launcher - launches Tails Installer
tails-installer-launcher - launches Tails Installer
SYNOPSIS
========
liveusb-creator-launcher
tails-installer-launcher
DESCRIPTION
===========
liveusb-creator-launcher is a graphical frontend that hides the
complexity of running liveusb-creator with the right set of options.
tails-installer-launcher is a graphical frontend that hides the
complexity of running tails-installer with the right set of options.
It lets the user choose among a limited number of installation and
upgrade options; only the options that make sense in the current
runtime context are made available.
% LIVEUSB-CREATOR(1) liveusb-creator user manual
% tails-installer(1) tails-installer user manual
% This manual page was written by intrigeri <intrigeri@boum.org>
% February 2, 2012
NAME
====
liveusb-creator - installs a LiveCD ISO onto a USB stick
tails-installer - installs a LiveCD ISO onto a USB stick
SYNOPSIS
========
liveusb-creator [OPTIONS] [FILE]
tails-installer [OPTIONS] [FILE]
OPTIONS
=======
......
USER=root
PROGRAM=/usr/sbin/liveusb-creator
PROGRAM=/usr/sbin/tails-installer
SESSION=true
FALLBACK=true
......@@ -34,9 +34,9 @@ if os.path.exists('/usr/sbin') or os.path.exists('/usr/local/sbin'):
os.environ['PATH'] = '/usr/local/sbin:/usr/sbin'
if os.path.exists('po/locale'):
translation = gettext.translation('liveusb-creator', 'po/locale', fallback=True)
translation = gettext.translation('tails-installer', 'po/locale', fallback=True)
else:
translation = gettext.translation('liveusb-creator', '/usr/share/locale',
translation = gettext.translation('tails-installer', '/usr/share/locale',
fallback=True)
_ = translation.ugettext
......@@ -44,17 +44,17 @@ def utf8_gettext(string):
" Translate string, converting it to a UTF-8 encoded bytestring "
return _(string).encode('utf8')
from liveusb.creator import LiveUSBError
from tails_installer.creator import TailsInstallerError
if sys.platform == "win32":
from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
from tails_installer.creator import WindowsTailsInstallerCreator as TailsInstallerCreator
else:
from liveusb.creator import LinuxLiveUSBCreator as LiveUSBCreator
from tails_installer.creator import LinuxTailsInstallerCreator as TailsInstallerCreator
from liveusb.config import config
from tails_installer.config import config
branding = {
'distribution': config['branding']['distribution'],
'header': config['branding']['header']
}
__all__ = ("LiveUSBCreator", "LiveUSBError", "LiveUSBDialog", "_", "utf8_gettext", "branding")
__all__ = ("TailsInstallerCreator", "TailsInstallerError", "TailsInstallerDialog", "_", "utf8_gettext", "branding")
......@@ -4,7 +4,7 @@ import os
from configobj import ConfigObj
config_files = [ os.path.join('/', 'etc', 'liveusb-creator', f )
config_files = [ os.path.join('/', 'etc', 'tails-installer', f )
for f in [ 'defaults.ini', 'vendor.ini', 'site.ini' ] ]
# XXX: move defaults to a proper defaults.ini file?
......
......@@ -23,7 +23,7 @@
# Tails Developers <tails@boum.org>
"""
A cross-platform graphical interface for the LiveUSBCreator
A cross-platform graphical interface for the Tails Installer
"""
import os
......@@ -38,16 +38,16 @@ from datetime import datetime
from gi.repository import Gdk, GLib, Gtk
from liveusb import LiveUSBCreator, LiveUSBError, _
from liveusb.config import config
from liveusb.source import SourceError, LocalIsoSource
from liveusb.source import RunningLiveSystemSource
from liveusb.releases import releases, get_fedora_releases
from liveusb.utils import _to_unicode, _format_bytes_in_gb, _get_datadir
from liveusb.utils import is_running_from_tails
from tails_installer import TailsInstallerCreator, TailsInstallerError, _
from tails_installer.config import config
from tails_installer.source import SourceError, LocalIsoSource
from tails_installer.source import RunningLiveSystemSource
from tails_installer.releases import releases, get_fedora_releases
from tails_installer.utils import _to_unicode, _format_bytes_in_gb, _get_datadir
from tails_installer.utils import is_running_from_tails
if sys.platform == 'win32':
from liveusb.urlgrabber.grabber import URLGrabber, URLGrabError
from liveusb.urlgrabber.progress import BaseMeter
from tails_installer.urlgrabber.grabber import URLGrabber, URLGrabError
from tails_installer.urlgrabber.progress import BaseMeter
else:
from urlgrabber.grabber import URLGrabber, URLGrabError
from urlgrabber.progress import BaseMeter
......@@ -70,7 +70,7 @@ class ReleaseDownloader(threading.Thread):
self.url = rel['url']
break
else:
raise LiveUSBError(_("Unknown release: %s") % release)
raise TailsInstallerError(_("Unknown release: %s") % release)
def run(self):
GLib.idle_add(self.parent.update_log,
......@@ -158,7 +158,7 @@ class ProgressThread(threading.Thread):
GLib.idle_add(self.parent.progress, 1.0)
threading.Thread.__del__(self)
class LiveUSBThread(threading.Thread):
class TailsInstallerThread(threading.Thread):
def __init__(self, live, progress, parent):
threading.Thread.__init__(self)
......@@ -187,7 +187,7 @@ class LiveUSBThread(threading.Thread):
GLib.idle_add(self.parent.on_installation_complete, None)
def run(self):
self.handler = LiveUSBLogHandler(self.status)
self.handler = TailsInstallerLogHandler(self.status)
self.live.log.addHandler(self.handler)
self.now = datetime.now()
self.live.save_full_drive()
......@@ -261,7 +261,7 @@ class LiveUSBThread(threading.Thread):
except Exception, e:
self.status(e.args[0])
self.status(_("LiveUSB creation failed!"))
self.status(_("Tails installation failed!"))
self.live.log.exception(unicode(e))
self.live.log.debug(traceback.format_exc())
......@@ -278,7 +278,7 @@ class LiveUSBThread(threading.Thread):
self.wait()
class LiveUSBLogHandler(logging.Handler):
class TailsInstallerLogHandler(logging.Handler):
def __init__(self, cb):
logging.Handler.__init__(self)
......@@ -289,7 +289,7 @@ class LiveUSBLogHandler(logging.Handler):
self.cb(record.msg)
class LiveUSBWindow(Gtk.ApplicationWindow):
class TailsInstallerWindow(Gtk.ApplicationWindow):
""" Our main dialog class """
def __init__(self, app=None, opts=None, args=None):
......@@ -325,7 +325,7 @@ class LiveUSBWindow(Gtk.ApplicationWindow):
# self.refreshDevicesButton.setFlat(True)
# self.refreshDevicesButton.setObjectName("refreshDevicesButton")
self.update_start_button()
self.live = LiveUSBCreator(opts=opts)
self.live = TailsInstallerCreator(opts=opts)
if self.opts.clone:
self.live.source = RunningLiveSystemSource(
path=config['running_liveos_mountpoint'])
......@@ -335,15 +335,15 @@ class LiveUSBWindow(Gtk.ApplicationWindow):
self.downloader = None
self.progress_thread = ProgressThread(parent=self)
self.download_progress = DownloadProgress(parent=self)
self.live_thread = LiveUSBThread(live=self.live,
self.live_thread = TailsInstallerThread(live=self.live,
progress=self.progress_thread,
parent=self)
self.live.connect_drive_monitor(self.populate_devices)
self.confirmed = False
self.delete_existing_liveos_confirmed = False
# Intercept all liveusb INFO log messages, and display them in the gui
self.handler = LiveUSBLogHandler(lambda x: self.append_to_log(x))
# Intercept all tails_installer.INFO log messages, and display them in the gui
self.handler = TailsInstallerLogHandler(lambda x: self.append_to_log(x))
self.live.log.addHandler(self.handler)
if not self.opts.verbose:
self.live.log.removeHandler(self.live.handler)
......@@ -372,7 +372,7 @@ class LiveUSBWindow(Gtk.ApplicationWindow):
# Import window content from UI file
builder = Gtk.Builder.new_from_file(
os.path.join(_get_datadir(), 'liveusb-creator.ui'))
os.path.join(_get_datadir(), 'tails-installer.ui'))
self.__box_installer = builder.get_object('box_installer')
self.__image_header = builder.get_object('image_header')
self.__infobar = builder.get_object('infobar')
......@@ -523,7 +523,7 @@ class LiveUSBWindow(Gtk.ApplicationWindow):
try:
self.live.detect_supported_drives(callback=add_devices)