Exemplo n.º 1
0
void run_entry::load(std::istream & is, const version & version) {

    if(version < INNO_VERSION(1, 3, 21)) {
        ::load<uint32_t>(is); // uncompressed size of the directory entry structure
    }

    is >> encoded_string(name, version.codepage());
    is >> encoded_string(parameters, version.codepage());
    is >> encoded_string(working_dir, version.codepage());
    if(version >= INNO_VERSION(1, 3, 21)) {
        is >> encoded_string(run_once_id, version.codepage());
    } else {
Exemplo n.º 2
0
static std::string StringEncode( const std::wstring &src, UINT codepage )
{
	int required_size = WideCharToMultiByte( codepage, 0, src.c_str(), -1, NULL, 0, NULL, NULL );
	if(required_size <= 0)
	{
		return std::string();
	}
	std::vector<CHAR> encoded_string( required_size );
	WideCharToMultiByte( codepage, 0, src.c_str(), -1, &encoded_string[0], encoded_string.size(), NULL, NULL );
	return &encoded_string[0];
}
Exemplo n.º 3
0
void ini_entry::load(std::istream & is, const version & version) {
	
	if(version < INNO_VERSION(1, 3, 21)) {
		::load<uint32_t>(is); // uncompressed size of the ini entry structure
	}
	
	is >> encoded_string(inifile, version.codepage());
	if(inifile.empty()) {
		inifile = "{windows}/WIN.INI";
	}
	is >> encoded_string(section, version.codepage());
	is >> encoded_string(key, version.codepage());
	is >> encoded_string(value, version.codepage());
	
	load_condition_data(is, version);
	
	load_version_data(is, version);
	
	if(version.bits != 16) {
		options = stored_flags<stored_ini_flags>(is).get();
	} else {
		options = stored_flags<stored_ini_flags, 16>(is).get();
	}
}