- Timestamp:
- 03/26/11 21:10:52 (2 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- c391984
- Parents:
- 7443b58
- Location:
- helpers
- Files:
-
- 2 edited
-
installer-dlls/main_dll/main_dll.cpp (modified) (10 diffs)
-
installers/installer/Product.wxs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
helpers/installer-dlls/main_dll/main_dll.cpp
r197b263 r2d69ab6 13 13 14 14 LPCWSTR vcsServiceQuery = 15 L"SELECT `ShortName`, `LongName`, `Description`, `Program`, ` Attributes`, `Component_` FROM `Services`";16 enum eServiceQuery { feqShortName = 1, feqLongName, feqDesc, feqProgram, feq Attributes, feqComponent };15 L"SELECT `ShortName`, `LongName`, `Description`, `Program`, `Dependencies`, `Attributes`, `Component_` FROM `Services`"; 16 enum eServiceQuery { feqShortName = 1, feqLongName, feqDesc, feqProgram, feqDeps, feqAttributes, feqComponent }; 17 17 enum eFirewallExceptionAttributes { feaIgnoreFailures = 1 }; 18 18 19 bool install(msi_helper &h, std::wstring exe, std::wstring service_short_name, std::wstring service_long_name, std::wstring service_description );19 bool install(msi_helper &h, std::wstring exe, std::wstring service_short_name, std::wstring service_long_name, std::wstring service_description, std::wstring service_deps); 20 20 bool uninstall(msi_helper &h, std::wstring service_name); 21 21 UINT SchedServiceMgmt(__in MSIHANDLE hInstall, msi_helper::WCA_TODO todoSched); … … 53 53 std::wstring longname = data.get_next_string(); 54 54 std::wstring desc = data.get_next_string(); 55 std::wstring deps = data.get_next_string(); 55 56 int attr = data.get_next_int(); 56 57 BOOL fIgnoreFailures = feaIgnoreFailures == (attr & feaIgnoreFailures); … … 60 61 case msi_helper::WCA_TODO_REINSTALL: 61 62 h.logMessage(_T("Installing service install: ") + shortname + _T(", ") + file); 62 install(h, file, shortname, longname, desc );63 install(h, file, shortname, longname, desc, deps); 63 64 break; 64 65 … … 109 110 std::wstring longname = h.get_record_formatted_string(hRec, feqLongName); 110 111 std::wstring desc = h.get_record_formatted_string(hRec, feqDesc); 112 std::wstring deps = h.get_record_formatted_string(hRec, feqDeps); 111 113 std::wstring program = h.get_record_formatted_string(hRec, feqProgram); 112 114 int attributes = h.get_record_integer(hRec, feqAttributes); … … 127 129 custom_data.write_string(longname); 128 130 custom_data.write_string(desc); 131 custom_data.write_string(deps); 129 132 custom_data.write_int(attributes); 130 133 //custom_data.write_int(fetApplication); … … 274 277 275 278 276 bool install(msi_helper &h, std::wstring exe, std::wstring service_short_name, std::wstring service_long_name, std::wstring service_desc ription) {279 bool install(msi_helper &h, std::wstring exe, std::wstring service_short_name, std::wstring service_long_name, std::wstring service_desc, std::wstring service_deps) { 277 280 h.updateProgress(_T("Preparing to install service"), service_short_name); 278 281 try { … … 286 289 } 287 290 h.updateProgress(_T("Installing service"), service_short_name); 288 serviceControll::Install(service_short_name, service_long_name, SZDEPENDENCIES, SERVICE_WIN32_OWN_PROCESS, exe);291 serviceControll::Install(service_short_name, service_long_name, service_deps, SERVICE_WIN32_OWN_PROCESS, exe); 289 292 } catch (const serviceControll::SCException& e) { 290 293 h.errorMessage(_T("Failed to install service: ") + e.error_); … … 292 295 } 293 296 try { 294 serviceControll::SetDescription(service_short_name, service_desc ription);297 serviceControll::SetDescription(service_short_name, service_desc); 295 298 } catch (const serviceControll::SCException& e) { 296 299 h.errorMessage(_T("Failed to set description of service: ") + e.error_); … … 453 456 454 457 455 bool start(msi_helper &h, std::wstring service_name = _T("")) { 456 if (service_name.empty()) 457 service_name = SZSERVICENAME; 458 bool start(msi_helper &h, std::wstring service_name) { 458 459 if (!serviceControll::isInstalled(service_name)) { 459 460 h.logMessage(_T("Service was not installed (so we cannot start it): ")+ service_name); … … 474 475 } 475 476 476 bool stop(msi_helper &h, std::wstring service_name = _T("")) { 477 if (service_name.empty()) 478 service_name = SZSERVICENAME; 477 bool stop(msi_helper &h, std::wstring service_name) { 479 478 h.updateProgress(_T("Preparing to stopp service"), service_name); 480 479 try { -
helpers/installers/installer/Product.wxs
r197b263 r2d69ab6 266 266 <Column Id="Program" Category="Formatted" PrimaryKey="no" Type="string" Width="255" Modularize="Property" Nullable="yes" 267 267 Description="Exception for a program (formatted path name)."/> 268 <Column Id="Dependencies" Category="Formatted" PrimaryKey="no" Type="string" Width="255" Modularize="Property" Nullable="yes" 269 Description="Service Dependencies"/> 268 270 <Column Id="Attributes" Category="Integer" PrimaryKey="no" Type="int" Width="4" Nullable="yes" MinValue="0" MaxValue="65536" 269 271 Description="Vital=1"/> … … 277 279 <Data Column="Component_">ServiceRegistration</Data> 278 280 <Data Column="Program">[#NSClientEXE]</Data> 281 <Data Column="Dependencies"></Data> 279 282 </Row> 280 283 </CustomTable>
Note: See TracChangeset
for help on using the changeset viewer.








