Alien-Electron

 view release on metacpan or  search on metacpan

ElectronModuleBuild.pm  view on Meta::CPAN

package ElectronModuleBuild;

use strict;

use File::Spec::Functions qw(splitpath);
use IO::File;
use IO::Uncompress::Unzip qw($UnzipError);
use File::Path qw(mkpath);

use parent 'Module::Build';


my $electron_version = '2.0.17';
my $electron_archive = 'electron.zip';


sub ACTION_build {
  my $self = shift;

  $self->download_zip_file();

ElectronModuleBuild.pm  view on Meta::CPAN

}



sub ACTION_install {
  my $self = shift;

  if ($^O =~ /darwin/i) {
    ## ExtUtils::Install appears to break Electron.App - maybe doesn't copy some meta-data or something?

    $self->depends_on('build'); ## So that the parent class ACTION_install won't invoke it again

    print "WARNING: Due to Mac OS X lameness, we are removing the electron binaries from the blib directory before install. You will have to to re-build if you want to use this local blib.\n";

    system("rm -rf blib/lib/auto/share/dist/Alien-Electron/");

    $self->SUPER::ACTION_install;

    my $share_install_dir = $self->install_map->{'blib/lib'} . "/auto/share/dist/Alien-Electron/";

    system('mkdir', '-p', $share_install_dir);



( run in 0.484 second using v1.01-cache-2.11-cpan-4d50c553e7e )