~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/xpinstall/packager/build/cfgs/mozilla.pl

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package WizCfg;
 
2
require Exporter;
 
3
@ISA = qw(Exporter);
 
4
@EXPORT = qw(SetCfgVars, CopyExtraDistFiles, CreateFullInstaller);
 
5
 
 
6
 
 
7
sub SetCfgVars 
 
8
{
 
9
  print"What is going on here?\n";
 
10
  $::ProdDir                = "$::DEPTH\\xpinstall\\packager\\build\\win\\mozilla";
 
11
  $::XPI_JST_Dir            = "$::ProdDir\\XPI_JSTs";
 
12
  $::StubInstJstDir         = "$::ProdDir\\StubInstJst";
 
13
#  $cwdBuilder               = "$::DEPTH\\xpinstall\\wizard\\windows\\builder";
 
14
#  $cwdDistWin              = GetCwd("distwin",  $::DEPTH, $cwdBuilder);
 
15
  $::inStagePath            = "$::DEPTH\\stage";
 
16
  $::inDistPath             = "$::DEPTH\\dist\\installer\\mozilla";
 
17
 
 
18
  $::seiFileNameGeneric       = "nsinstall.exe";
 
19
  $::seiFileNameSpecific      = "mozilla-win32-installer.exe";
 
20
  $::seiStubRootName          = "mozilla-win32-stub-installer";
 
21
  $::seiFileNameSpecificStub  = "$::seiStubRootName.exe";
 
22
  $::sebiFileNameSpecific     = "";                 # filename for the big blob installer
 
23
  $::seuFileNameSpecific      = "MozillaUninstall.exe";
 
24
  $::seuzFileNameSpecific     = "mozillauninstall.zip";
 
25
  $::versionLanguage          = "en";
 
26
  $::seiBetaRelease           = "";
 
27
 
 
28
# set environment vars for use by other .pl scripts called from this script.
 
29
  $ENV{WIZ_nameCompany}          = "mozilla.org";
 
30
  $ENV{WIZ_nameProduct}          = "Mozilla";
 
31
  $ENV{WIZ_nameProductInternal}  = "Mozilla";
 
32
  $ENV{WIZ_nameProductNoVersion} = "Mozilla";
 
33
  $ENV{WIZ_fileMainExe}          = "Mozilla.exe";
 
34
  $ENV{WIZ_fileUninstall}        = $::seuFileNameSpecific;
 
35
  $ENV{WIZ_fileUninstallZip}     = $::seuzFileNameSpecific;
 
36
  $ENV{WIZ_descShortcut}         = "";
 
37
 
 
38
}
 
39
 
 
40
sub GetStarted
 
41
{
 
42
  print "\nNo Getting Started actions required for this product\n";
 
43
}
 
44
 
 
45
sub PrepareDistArea
 
46
{
 
47
  print "\n Don't need prep the dist area for this product  \n";
 
48
}
 
49
 
 
50
sub MakeExeZipFiles
 
51
{
 
52
  print "\n Don't need to create any Self-extracting zip files for this product  \n";
 
53
}
 
54
 
 
55
sub CopyExtraDistFiles
 
56
{
 
57
  # copy license file for the installer
 
58
  if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $::inDistPath\\license.txt"))
 
59
  {
 
60
    die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $::inDistPath\\license.txt\n";
 
61
  }
 
62
  if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $::inDistPath\\setup\\license.txt"))
 
63
  {
 
64
    die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $::inDistPath\\setup\\license.txt\n";
 
65
  }
 
66
}
 
67
 
 
68
sub CreateFullInstaller()
 
69
{
 
70
  # create the big self extracting .exe installer
 
71
  print "\n**************************************************************\n";
 
72
  print "*                                                            *\n";
 
73
  print "*  creating Self Extracting Executable Full Install file...  *\n";
 
74
  print "*                                                            *\n";
 
75
  print "**************************************************************\n";
 
76
  if(-d "$::inDistPath\\sea")
 
77
  {
 
78
    unlink <$::inDistPath\\sea\\*>;
 
79
  }
 
80
  else
 
81
  {
 
82
    mkdir ("$::inDistPath\\sea",0775);
 
83
  }
 
84
  if(system("copy $::inDistPath\\$::seiFileNameGeneric $::inDistPath\\$::seiFileNameSpecific"))
 
85
  {
 
86
    die "\n Error: copy $::inDistPath\\$::seiFileNameGeneric $::inDistPath\\$::seiFileNameSpecific\n";
 
87
  }
 
88
  if(system("$::inDistPath\\nsztool.exe $::inDistPath\\$::seiFileNameSpecific $::inDistPath\\setup\\*.* $::inDistPath\\xpi\\*.*"))
 
89
  {
 
90
    die "\n Error: $::inDistPath\\nsztool.exe $::inDistPath\\$::seiFileNameSpecific $::inDistPath\\setup\\*.* $::inDistPath\\xpi\\*.*\n";
 
91
  }
 
92
  if(system("copy $::inDistPath\\$::seiFileNameSpecific $::inDistPath\\sea"))
 
93
  {
 
94
    die "\n Error: copy $::inDistPath\\$::seiFileNameSpecific $::inDistPath\\sea\n";
 
95
  }
 
96
  unlink <$::inDistPath\\$::seiFileNameSpecificStub>;
 
97
 
 
98
  return(0);
 
99
}
 
100
 
 
101
sub FinishUp
 
102
{
 
103
  if((!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll")) ||
 
104
     (!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll")))
 
105
  {
 
106
    print "***\n";
 
107
    print "**\n";
 
108
    print "**  The following required Microsoft redistributable system files were not found\n";
 
109
    print "**  in $ENV{MOZ_SRC}\\redist\\microsoft\\system:\n";
 
110
    print "**\n";
 
111
    if(!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll"))
 
112
    {
 
113
      print "**    msvcrt.dll\n";
 
114
    }
 
115
    if(!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll"))
 
116
    {
 
117
      print "**    msvcirt.dll\n";
 
118
    }
 
119
    print "**\n";
 
120
    print "**  The above files are required by the installer and the browser.  If you attempt\n";
 
121
    print "**  to run the installer, you may encounter the following bug:\n";
 
122
    print "**\n";
 
123
    print "**    http://bugzilla.mozilla.org/show_bug.cgi?id=27601\n";
 
124
    print "**\n";
 
125
    print "***\n\n";
 
126
  }
 
127
 
 
128
  return(0);
 
129
}