[2597] | 1 | # +-----------------------------------------------------------------------+ |
---|
| 2 | # | pLoader - a Perl photo uploader for Piwigo | |
---|
| 3 | # +-----------------------------------------------------------------------+ |
---|
| 4 | # | Copyright(C) 2008 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 | |
---|
[3180] | 13 | # | General Public License for more details. | |
---|
[2597] | 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 | |
---|
| 21 | use strict; |
---|
[4632] | 22 | use FindBin; |
---|
| 23 | use lib "$FindBin::Bin"; |
---|
| 24 | use lib "$FindBin::Bin/../res"; |
---|
| 25 | use lib "$FindBin::Bin/../lib"; |
---|
[3180] | 26 | use Wx; |
---|
[2597] | 27 | use Class::Accessor::Fast; |
---|
| 28 | use Uploader::GUI::wxApp; |
---|
| 29 | use JSON; |
---|
[3180] | 30 | use Wx::Locale qw/:default/; |
---|
[4322] | 31 | use Data::Dumper; |
---|
[2597] | 32 | |
---|
[4504] | 33 | $SIG{__DIE__} = \&OnDieHandler; |
---|
[2597] | 34 | |
---|
[4632] | 35 | # search path defined by use lib "$Bin/../res" |
---|
| 36 | require 'global_settings_wdr.pl'; |
---|
| 37 | require 'progress_wdr.pl'; |
---|
| 38 | require 'login_wdr.pl'; |
---|
| 39 | require 'reupload_wdr.pl'; |
---|
| 40 | require 'photo_properties_wdr.pl'; |
---|
[4590] | 41 | |
---|
[4095] | 42 | eval { |
---|
[4632] | 43 | my $app = Uploader::GUI::wxApp->new( |
---|
| 44 | { |
---|
| 45 | bin_dir => $FindBin::Bin, |
---|
| 46 | resource_dir => 'res', |
---|
| 47 | locale_dir => 'locale', |
---|
| 48 | } |
---|
| 49 | ); |
---|
[4095] | 50 | $app->MainLoop(); |
---|
| 51 | }; |
---|
[4279] | 52 | |
---|
| 53 | sub OnDieHandler { |
---|
| 54 | my ( $exception ) = @_; |
---|
| 55 | |
---|
| 56 | # if triggered in eval |
---|
| 57 | # return if $^S; |
---|
| 58 | print $exception; |
---|
| 59 | } |
---|
[2597] | 60 | 1; |
---|
| 61 | |
---|
| 62 | |
---|