Subversion Repositories DevTools

Rev

Rev 1139 | Rev 2326 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1139 Rev 2314
Line 17... Line 17...
17
use warnings;
17
use warnings;
18
use JatsError;
18
use JatsError;
19
 
19
 
20
our $ScmPlatform;                       # Target Platform
20
our $ScmPlatform;                       # Target Platform
21
 
21
 
-
 
22
 
-
 
23
#
-
 
24
#   Directive specific globals
-
 
25
#
-
 
26
my $MakeNsisPackage_count = '';         # Suffix for multiple generated files
-
 
27
my %MakeNsisPackage_names;              # Hash of used output names
-
 
28
 
22
#-------------------------------------------------------------------------------
29
#-------------------------------------------------------------------------------
23
# Function        : MakeNsisPackage
30
# Function        : MakeNsisPackage
24
#
31
#
25
# Description     : This directive supports the building of Windows Installers
32
# Description     : This directive supports the building of Windows Installers
26
#                   using NSIS. This is a script driven application
33
#                   using NSIS. This is a script driven application
Line 98... Line 105...
98
    #
105
    #
99
    #   Note: Fix platform to WIN32 incase the installer is based on other
106
    #   Note: Fix platform to WIN32 incase the installer is based on other
100
    #         platforms (ie: VS2005) as that would be most confusing.
107
    #         platforms (ie: VS2005) as that would be most confusing.
101
    #         Could be based on machine type.
108
    #         Could be based on machine type.
102
    #
109
    #
-
 
110
    $ofile = "$package-$ScmBuildVersion.$ScmBuildProject-WIN32"
103
    unless ( $ofile )
111
        unless ( $ofile );
-
 
112
    $ofile .= '.exe'
-
 
113
        unless ( $ofile =~ m~\.exe$~i );
-
 
114
    Error ("MakeNsisPackage. Multiple packages with the same name: $ofile")
-
 
115
        if ( exists $MakeNsisPackage_names{$ofile} );
-
 
116
 
104
    {
117
    #
105
        $ofile = "$package-$ScmBuildVersion.$ScmBuildProject-WIN32";
118
    #   Create unique file name for the jats-generated file
106
    }
119
    #
-
 
120
    my $dfile = 'JatsNsisDefs'. $MakeNsisPackage_count++ .'.nsh';
107
    $ofile .= '.exe' unless ( $ofile =~ m~\.exe$~i );
121
    $MakeNsisPackage_names{$ofile} = $dfile;
108
 
122
 
109
    #
123
    #
110
    #   Create build time values in a file suitable for NSIS to include
124
    #   Create build time values in a file suitable for NSIS to include
111
    #
125
    #
112
    GenerateFiles ('*', '--Tool=MakeNsisDefs.pl',
126
    GenerateFiles ('*', '--Tool=MakeNsisDefs.pl',
113
                   '-installer=' . $ofile,
127
                   '-installer=' . $ofile,
114
                   @genargs,
128
                   @genargs,
115
                   '-out=--Generated(JatsNsisDefs.nsh)' );
129
                   '-out=--Generated('.$dfile.')' );
116
 
130
 
117
    #
131
    #
118
    #   Invoke 'makensys' to do the hard work
132
    #   Invoke 'makensys' to do the hard work
119
    #
133
    #
120
    GenerateFiles ('*', 'makensis' ,
134
    GenerateFiles ('*', 'makensis' ,
Line 128... Line 142...
128
                        '--Var(ObjDir,--tag=/DGBE_OBJDIR)',
142
                        '--Var(ObjDir,--tag=/DGBE_OBJDIR)',
129
                        '--Var(Target,--tag=/DGBE_TARGET)',
143
                        '--Var(Target,--tag=/DGBE_TARGET)',
130
                        '--Var(Type,--tag=/DGBE_TYPE)',
144
                        '--Var(Type,--tag=/DGBE_TYPE)',
131
                        (map { '/D' . $_ } @defines),
145
                        (map { '/D' . $_ } @defines),
132
                        '/V' . $vlevel,
146
                        '/V' . $vlevel,
133
                        '--Prerequisite(JatsNsisDefs.nsh)',
147
                        '--Prerequisite('.$dfile.')',
134
                        map { '--Prerequisite('.$_. ')' } @scripts,
148
                        map { '--Prerequisite('.$_. ')' } @scripts,
135
                        );
149
                        );
136
 
150
 
137
    # Package up the EXE
151
    # Package up the EXE
138
    #
152
    #
139
    PackageFile ('*', $ofile );
153
    PackageFile ('*', $ofile );
140
                    
154
                    
141
}
155
}
142
 
156
 
-
 
157
1;