App-Music-ChordPro
view release on metacpan or search on metacpan
script/wxchordpro.pl view on Meta::CPAN
#!/usr/bin/perl
# WxChordPro -- Successor of Chord/Chordii
# Author : Johan Vromans
# Created On : Fri Jul 9 14:32:34 2010
# Last Modified On: Wed Sep 17 12:15:41 2025
# Update Count : 339
# Status : Unknown, Use with caution!
################ Common stuff ################
use strict;
use warnings;
use utf8;
binmode(STDERR, ':utf8');
binmode(STDOUT, ':utf8');
use FindBin;
# @INC construction...
# Standard paths are lib and lib/ChordPro/lib relative to the parent
# of the script directory. This may fail if the ChordPro files are installed
# in another directory than next to the script.
# Directories in CHORDPRO_XLIBS follow, to augment the path.
# For example, to add custom delegates.
# Directories in CHORDPRO_XXLIBS are put in front, these can be used
# to overrule standard modules. For example, to provide a patches
# module to an installed kit. Caveat emptor.
my @inc;
BEGIN {
for my $lib ( "$FindBin::Bin/../lib", "$FindBin::Bin/../lib/ChordPro/lib", @INC ) {
next unless -d $lib;
# Is our main module here?
if ( -s "$lib/ChordPro.pm" ) {
# Prepend override libs.
for ( $ENV{CHORDPRO_XXLIBS} ) {
push( @inc, split( $^O =~ /msw/ ? ";" : ":", $_ ) ) if $_;
}
# Add ChordPro libs.
push( @inc, $lib, "$lib/ChordPro/lib" );
# Append augment libs.
for ( $ENV{CHORDPRO_XLIBS} ) {
push( @inc, split( $^O =~ /msw/ ? ";" : ":", $_ ) ) if $_;
}
}
else {
# Copy.
push( @inc, $lib );
}
}
}
use lib @inc;
use ChordPro;
use ChordPro::Paths;
CP->pathprepend( "$FindBin::Bin", "$FindBin::Bin/.." );
# Package name.
my $my_package = 'ChordPro';
# Program name and version.
my $my_name = 'WxChordPro';
my $my_version = $ChordPro::VERSION;
my $options = app_options();
# Verify that we have an appropriate Wx version.
our $Wx_tng = 3.004;
our $Wx_min = $options->{wxtng} ? $Wx_tng : 0.9932;
unless ( eval { Wx->VERSION($Wx_min) } ) {
my $md = ChordPro::Wx::WxUpdateRequired->new;
$md->ShowModal;
$md->Destroy;
exit 1;
}
( run in 0.821 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )