Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some maintenance on the building stuff. Works pretty good now

  • Loading branch information...
commit 5ddc2fe9dc718bd83fa35ecffb33a724135bd770 1 parent 52d8e49
@Blaizer authored
View
2  .gitignore
@@ -6,7 +6,9 @@ _build*
*.bak
MANIFEST
META.yml
+META.json
MYMETA.yml
+MYMETA.json
img*
blb*
blbconv*
View
3  Build.PL
@@ -25,6 +25,9 @@ my $build = My::Module::Build->new(
},
add_to_cleanup => [
'MANIFEST',
+ 'META.yml',
+ 'META.json',
+ 'lib/Games/Neverhood/typemap',
],
);
View
2  MANIFEST.skip
@@ -7,6 +7,7 @@
\.bak$
^MANIFEST\.skip$
^MYMETA\.yml$
+^MYMETA\.json$
^img/
^blb/
^blbconv/
@@ -16,3 +17,4 @@
^unshare/
\.[co]$
^lib/Games/Neverhood/typemap$
+^nhc.pl$
View
14 inc/My/Module/Build.pm
@@ -4,15 +4,16 @@ use warnings;
use base 'Module::Build';
use autodie ':all';
+$ENV{SDL_VIDEODRIVER} = 'dummy';
+$ENV{SDL_AUDIODRIVER} = 'dummy';
+
sub ACTION_uninstall {
require File::ShareDir;
require File::Spec;
eval { require Games::Neverhood };
$! and leave("Games::Neverhood wouldn't load: $@. Maybe install before uninstalling?");
- my $packlist = File::Spec->catfile(
- File::ShareDir::module_dir('Games::Neverhood'),
- '.packlist'
- );
+ my $dir = File::ShareDir::module_dir('Games::Neverhood');
+ my $packlist = File::Spec->catfile($dir, '.packlist');
open LIST, ">>$packlist"; #Just makin' sure we can write in it later
open LIST, $packlist;
my $leftover;
@@ -33,20 +34,21 @@ sub ACTION_uninstall {
}
$total++;
}
- print "$deleted of $total files successfully deleted\n";
if(defined $leftover and $deleted) {
+ print "$deleted of $total files successfully deleted\n";
print "Updating .packlist with remaining files\n";
open LIST, ">$packlist";
print LIST $leftover;
print ".packlist updated with remaining files\n";
}
else {
+ print "all files successfully deleted\n";
if(do { no autodie; unlink $packlist }) {
print ".packlist deleted\n";
}
else {
- print "Emptying .packlist\n";
open LIST, ">$packlist";
+ print ".packlist emptied\n";
}
}
close LIST;
Please sign in to comment.
Something went wrong with that request. Please try again.