Changeset 6e9e55b4c06d6ff5ffa577ade54d8fa719940394


Ignore:
Timestamp:
30/06/10 12:02:52 (3 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
9dc4b8be7a77464db2a68e2b39d784a3e87d8dda
Parents:
a3d57aae7735bdde7300b1e663df36ade9dc8e8c
git-committer:
Matias De la Puente <mfpuente.ar@…> (30/06/10 12:02:52)
Message:

Builder: Add support for 'post build command'

This command is executed after the build command

Location:
libi4uc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libi4uc/i4ucbuilderdevicetype.vala

    re20be4a r6e9e55b  
    3232        public Gee.List<string> devices { get { return _devices; } } 
    3333        public Gee.Map<string, BuilderSourceType> source_types { get { return _source_types; } } 
     34        public bool has_post_build_command { set; get; } 
     35        public string post_build_command { set; get; } 
    3436         
    3537        public BuilderDeviceType.from_key_file (KeyFile key_file, string group) throws GLib.Error, GLib.KeyFileError 
     
    3739                _device_type = key_file.get_string (group, "device_type"); 
    3840                _build_command = key_file.get_string (group, "build_command"); 
     41                _has_post_build_command = key_file.has_key (group, "post_build_command"); 
     42                if (_has_post_build_command) 
     43                        _post_build_command = key_file.get_string (group, "post_build_command"); 
    3944                foreach (var clean_type in key_file.get_string_list (group, "clean_types")) 
    4045                        _clean_types.add (clean_type); 
     
    5055                key_file.set_string (group, "device_type", _device_type); 
    5156                key_file.set_string (group, "build_command", _build_command); 
     57                if (_has_post_build_command) 
     58                        key_file.set_string (group, "post_build_command", _post_build_command); 
    5259                key_file.set_string_list (group, "clean_types", _clean_types.to_array ()); 
    5360                key_file.set_string_list (group, "devices", _devices.to_array ()); 
  • libi4uc/i4ucprofilebuilder.vala

    r9e8cdad r6e9e55b  
    7777                                command = command.replace ("%source", "\"" + source + "\""); 
    7878                                command = command.replace ("%object", object.replace (" ", "_")); 
     79                                command = command.replace ("%project", _project.name.replace (" ", "_")); 
     80                                command = command.replace ("%profile", _profile.name.replace (" ", "_")); 
    7981                                 
    8082                                _commands.add (command); 
     
    99101                command = command.replace ("%objects", objects_string); 
    100102                command = command.replace ("%hexfile", hexfile.replace (" ", "_")); 
     103                command = command.replace ("%project", _project.name.replace (" ", "_")); 
     104                command = command.replace ("%profile", _profile.name.replace (" ", "_")); 
    101105                 
    102106                _commands.add (command); 
     107                 
     108                if (device_type.has_post_build_command) 
     109                { 
     110                        command = device_type.post_build_command; 
     111                        command = command.replace ("%device", _profile.device); 
     112                        command = command.replace ("%objects", objects_string); 
     113                        command = command.replace ("%hexfile", hexfile.replace (" ", "_")); 
     114                        command = command.replace ("%project", _project.name.replace (" ", "_")); 
     115                        command = command.replace ("%profile", _profile.name.replace (" ", "_")); 
     116                         
     117                        _commands.add (command); 
     118                } 
     119                 
    103120                on_command_stopped (true); 
    104121        } 
Note: See TracChangeset for help on using the changeset viewer.