source: extensions/pLoader/trunk/src/ploader.pl @ 4974

Last change on this file since 4974 was 4974, checked in by ronosman, 14 years ago

Feature 1462 added : remove runtime dialog box external dependancies.

  • Property svn:eol-style set to LF
File size: 2.7 KB
Line 
1# +-----------------------------------------------------------------------+
2# | pLoader - a Perl photo uploader for Piwigo                            |
3# +-----------------------------------------------------------------------+
4# | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
5# +-----------------------------------------------------------------------+
6# | This program is free software; you can redistribute it and/or modify  |
7# | it under the terms of the GNU General Public License as published by  |
8# | the Free Software Foundation                                          |
9# |                                                                       |
10# | This program is distributed in the hope that it will be useful, but   |
11# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
12# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
13# | General Public License for more details.                              |
14# |                                                                       |
15# | You should have received a copy of the GNU General Public License     |
16# | along with this program; if not, write to the Free Software           |
17# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
18# | USA.                                                                  |
19# +-----------------------------------------------------------------------+
20
21use strict;
22use File::Spec;
23use Wx;
24
25use Class::Accessor::Fast;
26use Uploader::GUI::wxApp;
27use Uploader::GUI::Frame;
28use Uploader::GUI::Layout::GlobalSettings;
29use Uploader::GUI::Layout::Progress;
30use Uploader::GUI::Layout::Login;
31use Uploader::GUI::Layout::Reupload;
32use Uploader::GUI::Layout::PhotoProperties;
33use Uploader::GUI::Layout::PhotoPropertiesCategoriesTags;
34use Uploader::GUI::Layout::PhotoPropertiesExif;
35use JSON;
36use Wx::Locale qw/:default/;
37use Data::Dumper;
38use File::HomeDir;
39
40#$SIG{__DIE__} = \&OnDieHandler;
41
42eval {
43    my $app = Uploader::GUI::wxApp->new(
44            {
45                root_dir      => $ENV{PLOADER_ROOT}||'..',
46                resource_dir => 'res',
47                locale_dir   => 'locale',
48                argv         => [ grep { -f $_ } @ARGV ],
49            }
50    );
51    $app->SetFrame( 
52        Uploader::GUI::Frame->new(
53            {
54                title     => sprintf("pLoader - Piwigo uploader %s - [%s]", $app->version, $app->site_url),
55                pwg       => $app->pwg,
56                imagelist => $app->imagelist,
57                imageviewer_index => $app->imageviewerIndex,
58                frameLayout => $app->frameLayout,
59            }
60        )
61    );
62    $app->MainLoop();
63};
64
65sub OnDieHandler {
66    my ( $exception ) = @_;
67   
68    # if triggered in eval
69    # return if $^S;
70    print $exception;
71}
721;
73
74
Note: See TracBrowser for help on using the repository browser.