| 337 | } |
| 338 | |
| 339 | HRESULT STDMETHODCALLTYPE UnpackFile(BSTR fileSrc, BSTR fileDst, VARIANT_BOOL* pbChanged, INT* pSubcode, VARIANT_BOOL* pbSuccess) override |
| 340 | { |
| 341 | if (!m_info.m_unpackFile) |
| 342 | { |
| 343 | *pSubcode = 0; |
| 344 | *pbChanged = VARIANT_FALSE; |
| 345 | *pbSuccess = VARIANT_FALSE; |
| 346 | return S_OK; |
| 347 | } |
| 348 | TempFile scriptFile; |
| 349 | String command = replaceMacros(m_info.m_unpackFile->m_command, fileSrc, fileDst); |
| 350 | if (m_info.m_unpackFile->m_script) |
| 351 | { |
| 352 | createScript(*m_info.m_unpackFile->m_script, scriptFile); |
| 353 | strutils::replace(command, _T("${SCRIPT_FILE}"), scriptFile.GetPath()); |
| 354 | } |
| 355 | DWORD dwExitCode; |
| 356 | HRESULT hr = launchProgram(command, SW_HIDE, dwExitCode); |
| 357 | |
| 358 | *pSubcode = 0; |
| 359 | *pbChanged = SUCCEEDED(hr); |
| 360 | *pbSuccess = SUCCEEDED(hr); |
| 361 | return hr; |
| 362 | } |
| 363 | |
| 364 | HRESULT STDMETHODCALLTYPE PackFile(BSTR fileSrc, BSTR fileDst, VARIANT_BOOL* pbChanged, INT subcode, VARIANT_BOOL* pbSuccess) override |
| 365 | { |
no test coverage detected