Subversion Repositories DevTools

Rev

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

Rev 2314 Rev 2326
Line 21... Line 21...
21
 
21
 
22
 
22
 
23
#
23
#
24
#   Directive specific globals
24
#   Directive specific globals
25
#
25
#
26
my $MakeNsisPackage_count = '';         # Suffix for multiple generated files
26
my $MakeNsisPackage_count = 1;          # Suffix for multiple generated files
27
my %MakeNsisPackage_names;              # Hash of used output names
27
my %MakeNsisPackage_names;              # Hash of used output names
28
 
28
 
29
#-------------------------------------------------------------------------------
29
#-------------------------------------------------------------------------------
30
# Function        : MakeNsisPackage
30
# Function        : MakeNsisPackage
31
#
31
#
Line 44... Line 44...
44
#                       --Define=Name=Value     - Send to compiler
44
#                       --Define=Name=Value     - Send to compiler
45
#                       --Package=Name          - Use this package name instead
45
#                       --Package=Name          - Use this package name instead
46
#                                                 of the build's name.
46
#                                                 of the build's name.
47
#                                                 Not suggested
47
#                                                 Not suggested
48
#                       --Plain                 - No frills
48
#                       --Plain                 - No frills
-
 
49
#                       --NoPackage             - Do not package the installer
49
#
50
#
50
#
51
#
51
# Returns         : Will not return on error
52
# Returns         : Will not return on error
52
#
53
#
53
 
54
 
Line 58... Line 59...
58
    my $vlevel = 2;
59
    my $vlevel = 2;
59
    my $ofile;
60
    my $ofile;
60
    my @defines;
61
    my @defines;
61
    my @genargs;
62
    my @genargs;
62
    my $package = $ScmBuildPackage;
63
    my $package = $ScmBuildPackage;
-
 
64
    my $noPackage;
63
 
65
 
64
    return if ( ! ActivePlatform($platforms) );
66
    return if ( ! ActivePlatform($platforms) );
65
 
67
 
66
    #
68
    #
67
    #   Parse the command line arguments
69
    #   Parse the command line arguments
Line 84... Line 86...
84
            push @genargs, '-Plain';
86
            push @genargs, '-Plain';
85
 
87
 
86
        } elsif  ( m~^--Package=(.+)~i ) {
88
        } elsif  ( m~^--Package=(.+)~i ) {
87
            push @genargs, '-Package=' . $1;
89
            push @genargs, '-Package=' . $1;
88
            $package = $1;
90
            $package = $1;
-
 
91
 
-
 
92
        } elsif  ( m~^--NoPackage~i ) {
-
 
93
            $noPackage = 1;
89
            
94
            
90
        } else {
95
        } else {
91
            Warning ("nsisDirective: Unknown option ignored: $_");
96
            Warning ("nsisDirective: Unknown option ignored: $_");
92
        }
97
        }
93
    }
98
    }
Line 114... Line 119...
114
    Error ("MakeNsisPackage. Multiple packages with the same name: $ofile")
119
    Error ("MakeNsisPackage. Multiple packages with the same name: $ofile")
115
        if ( exists $MakeNsisPackage_names{$ofile} );
120
        if ( exists $MakeNsisPackage_names{$ofile} );
116
 
121
 
117
    #
122
    #
118
    #   Create unique file name for the jats-generated file
123
    #   Create unique file name for the jats-generated file
-
 
124
    #   Include the name of the first script
119
    #
125
    #
-
 
126
    my $dfile = $scripts[0];
-
 
127
    $dfile =~ s~^.*/~~;
-
 
128
    $dfile =~ s~\..*?$~~;
120
    my $dfile = 'JatsNsisDefs'. $MakeNsisPackage_count++ .'.nsh';
129
    $dfile = 'JatsNsisDefs'. $MakeNsisPackage_count++ . '_' . $dfile . '.nsh';
121
    $MakeNsisPackage_names{$ofile} = $dfile;
130
    $MakeNsisPackage_names{$ofile} = $dfile;
122
 
131
 
123
    #
132
    #
124
    #   Create build time values in a file suitable for NSIS to include
133
    #   Create build time values in a file suitable for NSIS to include
125
    #
134
    #
Line 148... Line 157...
148
                        map { '--Prerequisite('.$_. ')' } @scripts,
157
                        map { '--Prerequisite('.$_. ')' } @scripts,
149
                        );
158
                        );
150
 
159
 
151
    # Package up the EXE
160
    # Package up the EXE
152
    #
161
    #
153
    PackageFile ('*', $ofile );
162
    PackageFile ('*', $ofile )
-
 
163
        unless $noPackage;
154
                    
164
                    
155
}
165
}
156
 
166
 
157
1;
167
1;