Changeset 16198e3 in nscp
- Timestamp:
- 11/14/11 23:56:33 (18 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 96c1461
- Parents:
- d48afa1
- Files:
-
- 4 edited
-
changelog (modified) (1 diff)
-
helpers/installer-dlls/main_dll/main_dll.cpp (modified) (7 diffs)
-
version.hpp (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
rb24c97f r16198e3 5 5 * Fixa dependonservice LanManWorkStation (old win) 6 6 * Fix RtlStringFromGUID problem on NT4 7 8 2011-11-14 MickeM 9 * Fixed issue with installer not saving nsc.ini when upgrading from 0.3.9 7 10 8 11 2011-11-09 MickeM -
helpers/installer-dlls/main_dll/main_dll.cpp
ra78a985 r16198e3 52 52 } 53 53 virtual void debug(std::string file, int line, std::wstring message) { 54 h->logMessage(_T("DEBUG: ") + message); 54 55 debug_log.push_back(_T("DEBUG: ") + message); 55 56 } … … 159 160 return ERROR_SUCCESS; 160 161 } 162 163 boost::filesystem::wpath restore_path = h.getTempPath(); 164 restore_path = restore_path / (_T("old_nsc.ini")); 165 boost::filesystem::wpath old_path = target; 166 old_path = old_path / (_T("nsc.ini")); 167 168 h.logMessage(_T("Looking for old settings file (for archiving): ") + old_path.string()); 169 h.logMessage(_T("Using restore path: ") + restore_path.string()); 170 if (boost::filesystem::exists(old_path)) { 171 h.logMessage(_T("Found old file: ") + strEx::itos(boost::filesystem::file_size(old_path))); 172 h.setProperty(_T("RESTORE_FILE"), restore_path.string()); 173 copy_file(h, old_path.string(), restore_path.string()); 174 } 175 if (boost::filesystem::exists(restore_path)) 176 h.logMessage(_T("Found restore file: ") + strEx::itos(boost::filesystem::file_size(restore_path))); 161 177 162 178 installer_settings_provider provider(&h, target, map_data); … … 228 244 } 229 245 settings_manager::destroy_settings(); 230 231 246 } catch (installer_exception e) { 232 247 h.logMessage(_T("Failed to read old configuration file: ") + e.what()); … … 278 293 data.write_string(h.getTargetPath(_T("INSTALLLOCATION"))); 279 294 data.write_string(h.getPropery(_T("CONFIGURATION_TYPE"))); 295 data.write_string(h.getPropery(_T("RESTORE_FILE"))); 280 296 data.write_int(h.getPropery(_T("ADD_DEFAULTS"))==_T("1")?1:0); 281 297 … … 326 342 std::wstring target = data.get_next_string(); 327 343 std::wstring context = data.get_next_string(); 344 std::wstring restore = data.get_next_string(); 328 345 int add_defaults = data.get_next_int(); 329 346 330 //std::wstring map_data = read_map_data(h); 347 h.logMessage(_T("Target: ") + target); 348 h.logMessage(_T("Context: ") + context); 349 h.logMessage(_T("Restore: ") + restore); 350 351 boost::filesystem::wpath path = target; 352 boost::filesystem::wpath old_path = path / _T("nsc.ini.old"); 353 path = path / _T("nsc.ini"); 354 355 boost::filesystem::wpath restore_path = restore; 356 357 if (boost::filesystem::exists(old_path)) 358 h.logMessage(_T("Found old (.old) file: ") + strEx::itos(boost::filesystem::file_size(old_path))); 359 if (boost::filesystem::exists(path)) 360 h.logMessage(_T("Found old file: ") + strEx::itos(boost::filesystem::file_size(path))); 361 if (boost::filesystem::exists(restore_path)) 362 h.logMessage(_T("Found restore file: ") + strEx::itos(boost::filesystem::file_size(restore_path))); 363 364 if (boost::filesystem::exists(restore_path)) { 365 if (!boost::filesystem::exists(path)) { 366 h.logMessage(_T("Restoring nsc.ini configuration file")); 367 copy_file(h, restore_path.string(), path.string()); 368 } 369 if (!boost::filesystem::exists(old_path)) { 370 h.logMessage(_T("Creating backup nsc.ini.old configuration file")); 371 copy_file(h, restore_path.string(), old_path.string()); 372 } 373 } 374 375 if (boost::filesystem::exists(path)) 376 h.logMessage(_T("Size (001): ") + strEx::itos(boost::filesystem::file_size(path))); 331 377 332 378 installer_settings_provider provider(&h, target); … … 335 381 return ERROR_INSTALL_FAILURE; 336 382 } 383 if (boost::filesystem::exists(path)) 384 h.logMessage(_T("Size (002): ") + strEx::itos(boost::filesystem::file_size(path))); 385 337 386 h.logMessage(_T("Switching to: ") + context); 338 387 settings_manager::change_context(context); 388 if (boost::filesystem::exists(path)) 389 h.logMessage(_T("Size (003): ") + strEx::itos(boost::filesystem::file_size(path))); 339 390 340 391 while (data.has_more()) { … … 354 405 } 355 406 } 407 if (boost::filesystem::exists(path)) 408 h.logMessage(_T("Size (004): ") + strEx::itos(boost::filesystem::file_size(path))); 356 409 settings_manager::get_settings()->save(); 410 if (boost::filesystem::exists(path)) 411 h.logMessage(_T("Size (005): ") + strEx::itos(boost::filesystem::file_size(path))); 357 412 } catch (installer_exception e) { 358 413 h.errorMessage(_T("Failed to write configuration: ") + e.what()); -
version.hpp
rd48afa1 r16198e3 1 1 #ifndef VERSION_HPP 2 2 #define VERSION_HPP 3 #define PRODUCTVER 0,4,0,1 084 #define STRPRODUCTVER "0,4,0,1 08"5 #define STRPRODUCTDATE "2011-11-1 3"3 #define PRODUCTVER 0,4,0,111 4 #define STRPRODUCTVER "0,4,0,111" 5 #define STRPRODUCTDATE "2011-11-14" 6 6 #endif // VERSION_HPP -
version.txt
rd48afa1 r16198e3 1 1 version=0.4.0 2 build=1 083 date=2011-11-1 32 build=111 3 date=2011-11-14
Note: See TracChangeset
for help on using the changeset viewer.








