mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 05:17:03 +08:00
*** empty log message ***
This commit is contained in:
@@ -99,8 +99,40 @@ sub build_gui {
|
||||
# my $sessions_page = $notebook->add("sessions", -label => "Sessions", -underline => 0);
|
||||
|
||||
$self->{session_frame} = $session_frame;
|
||||
|
||||
check_paparazzi_home($mw);
|
||||
|
||||
}
|
||||
|
||||
sub check_paparazzi_home {
|
||||
my ($mw) = @_;
|
||||
if (Paparazzi::Environment::paparazzi_home() eq "/usr/share/paparazzi") {
|
||||
my $button = $mw->messageBox(
|
||||
-title => 'Welcome to Paparazzi',
|
||||
-type => 'YesNo',
|
||||
-message => "Paparazzi needs access to a writable directory to store your data and settings. Do you want Paparazzi to use a temporary system directory ?");
|
||||
|
||||
my $pph = "";
|
||||
|
||||
if ($button eq "Yes") {
|
||||
$pph = `mktemp -d /tmp/paparazzi.XXXXXXXX`;
|
||||
print "using dir $pph as paparazzi_home\n"
|
||||
}
|
||||
else {
|
||||
$pph = $mw->chooseDirectory(-title => 'choose a directory',
|
||||
-initialdir => '~/paparazzi'
|
||||
);
|
||||
# print "choosed $file_name\n";
|
||||
if ($pph eq "") {
|
||||
die("need a writable dir. Exiting");
|
||||
}
|
||||
}
|
||||
my $pps = "/usr/share/paparazzi";
|
||||
`cd $pps && make -f conf/Makefile.install DESTDIR=$pph install_skel\n`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub build_logo_page {
|
||||
my ($self, $notebook) = @_;
|
||||
|
||||
@@ -4,10 +4,13 @@ package Paparazzi;
|
||||
my $paparazzi_lib;
|
||||
BEGIN {
|
||||
$paparazzi_lib = (defined $ENV{PAPARAZZI_SRC}) ?
|
||||
$ENV{PAPARAZZI_SRC}."/sw/lib/perl" : "/usr/lib/paparazzi/";
|
||||
$ENV{PAPARAZZI_SRC}."/sw/lib/perl:".$ENV{PAPARAZZI_SRC}."/sw/supervision" :
|
||||
"/usr/lib/paparazzi/";
|
||||
}
|
||||
use lib ($paparazzi_lib);
|
||||
#if (exists $ENV{PAPARAZZI_SRC} and defined $ENV{PAPARAZZI_SRC}) {
|
||||
#use lib ($ENV{PAPARAZZI_SRC}."/sw/supervision");
|
||||
#}
|
||||
|
||||
use Paparazzi::CpGui;
|
||||
@ISA = qw(Paparazzi::CpGui);
|
||||
|
||||
Reference in New Issue
Block a user