Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
0b85419f
Commit
0b85419f
authored
Feb 22, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 547336: Make installation work on Windows with Strawberry Perl Professional
r=glob, a=mkanat
parent
2f34ebff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
Constants.pm
Bugzilla/Constants.pm
+3
-0
Requirements.pm
Bugzilla/Install/Requirements.pm
+4
-15
install-module.pl
install-module.pl
+6
-3
No files found.
Bugzilla/Constants.pm
View file @
0b85419f
...
...
@@ -149,6 +149,7 @@ use File::Basename;
DB_MODULE
ROOT_USER
ON_WINDOWS
ON_ACTIVESTATE
MAX_TOKEN_AGE
MAX_LOGINCOOKIE_AGE
...
...
@@ -471,6 +472,8 @@ use constant DB_MODULE => {
# True if we're on Win32.
use
constant
ON_WINDOWS
=>
(
$^O
=~
/MSWin32/i
);
# True if we're using ActiveState Perl (as opposed to Strawberry) on Windows.
use
constant
ON_ACTIVESTATE
=>
eval
{
&
Win32::
BuildNumber
};
# The user who should be considered "root" when we're giving
# instructions to Bugzilla administrators.
...
...
Bugzilla/Install/Requirements.pm
View file @
0b85419f
...
...
@@ -376,17 +376,6 @@ sub _check_missing {
return
\
@missing
;
}
# Returns the build ID of ActivePerl. If several versions of
# ActivePerl are installed, it won't be able to know which one
# you are currently running. But that's our best guess.
sub
_get_activestate_build_id
{
eval
'use Win32::TieRegistry'
;
return
0
if
$@
;
my
$key
=
Win32::
TieRegistry
->
new
(
'LMachine\Software\ActiveState\ActivePerl'
)
or
return
0
;
return
$key
->
GetValue
(
"CurrentVersion"
);
}
sub
print_module_instructions
{
my
(
$check_results
,
$output
)
=
@_
;
...
...
@@ -427,7 +416,7 @@ sub print_module_instructions {
if
((
!
$output
&&
@
{
$check_results
->
{
missing
}})
||
(
$output
&&
$check_results
->
{
any_missing
}))
{
if
(
ON_
WINDOWS
)
{
if
(
ON_
ACTIVESTATE
)
{
my
$perl_ver
=
sprintf
(
'%vd'
,
$
^
V
);
# URL when running Perl 5.8.x.
...
...
@@ -439,7 +428,7 @@ sub print_module_instructions {
print
colored
(
install_string
(
'ppm_repo_add'
,
{
theory_url
=>
$url_to_theory58S
}),
'red'
);
# ActivePerls older than revision 819 require an additional command.
if
(
_get_activestate_build_id
()
<
819
)
{
if
(
ON_ACTIVESTATE
<
819
)
{
print
install_string
(
'ppm_repo_up'
);
}
}
...
...
@@ -477,7 +466,7 @@ sub print_module_instructions {
}
}
if
(
$output
&&
$check_results
->
{
any_missing
}
&&
!
ON_
WINDOWS
if
(
$output
&&
$check_results
->
{
any_missing
}
&&
!
ON_
ACTIVESTATE
&&
!
$check_results
->
{
hide_all
})
{
print
install_string
(
'install_all'
,
{
perl
=>
$^X
});
...
...
@@ -586,7 +575,7 @@ sub install_command {
my
$module
=
shift
;
my
(
$command
,
$package
);
if
(
ON_
WINDOWS
)
{
if
(
ON_
ACTIVESTATE
)
{
$command
=
'ppm install %s'
;
$package
=
$module
->
{
package
};
}
...
...
install-module.pl
View file @
0b85419f
...
...
@@ -47,9 +47,12 @@ GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g',
pod2usage
({
-
verbose
=>
1
})
if
$switch
{
'help'
};
if
(
ON_WINDOWS
)
{
print
"\nYou cannot run this script on Windows. Please follow instructions\n"
;
print
"given by checksetup.pl to install missing Perl modules.\n\n"
;
if
(
ON_ACTIVESTATE
)
{
print
<<END;
You cannot run this script when using ActiveState Perl. Please follow
the instructions given by checksetup.pl to install missing Perl modules.
END
exit
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment