From 2f05e2965786af3051946bfc787510bf34e6403d Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 21 Dec 2012 22:40:52 +0000 Subject: [PATCH] =?UTF-8?q?Usposobil=20sem=20upravljanje=20napredka=20in?= =?UTF-8?q?=20izpis=20sporo=C4=8Dil=20med=20namestitvijo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nadgradnja zdaj ne povozi opravila, če že obstaja. Brisanje datotek/opravil zdaj v primeru, da datoteka/opravilo ne obstaja, vseeno vrne stanje OK. Saj je želen efekt opravila že dosežen. Estetski popravki --- MSICALib/MSI/Makefile | 4 +- MSICALib/MSITSCA.cpp | 17 ++++--- MSICALib/MSITSCAOp.cpp | 109 +++++++++++++++++++++++++---------------- MSICALib/MSITSCAOp.h | 79 +++++++++++++++++++++++------ MSICALib/res/en_GB.po | 58 +++++++++++++++++++++- 5 files changed, 198 insertions(+), 69 deletions(-) diff --git a/MSICALib/MSI/Makefile b/MSICALib/MSI/Makefile index 996c473..de76de8 100644 --- a/MSICALib/MSI/Makefile +++ b/MSICALib/MSI/Makefile @@ -1,6 +1,6 @@ !INCLUDE "..\..\include\MSINast.mak" -#MSM_IMA_LOKALIZACIJO=1 +MSM_IMA_LOKALIZACIJO=1 !IF "$(CFG)" == "ReleaseU" CFG_VC=Unicode Release !ELSEIF "$(CFG)" == "DebugU" @@ -66,7 +66,7 @@ Vse :: "$(JEZIK).$(CFG).$(PLAT).ActionText-2.idt" Action Description Template s$(MSI_TIP_ID) L0 L0 1250 ActionText Action -InstallScheduledTasks Registracija razporejenih opravil Opravilo: [1] +InstallScheduledTasks Registracija razporejenih opravil Razporejeno opravilo: [1] <= INSTALLSTATE_LOCAL) { // Installing component. Add the task. PMSIHANDLE hViewTT; - CMSITSCAOpCreateTask *opCreateTask = new CMSITSCAOpCreateTask(sDisplayName); + CMSITSCAOpCreateTask *opCreateTask = new CMSITSCAOpCreateTask(sDisplayName, iAction < INSTALLSTATE_LOCAL, MSITSCA_TASK_TICK_SIZE); assert(opCreateTask); // Populate the operation with task's data. @@ -138,7 +138,7 @@ UINT MSITSCA_API EvaluateScheduledTasks(MSIHANDLE hInstall) olExecute.AddTail(opCreateTask); } else { // Removing component. Remove the task. - olExecute.AddTail(new CMSITSCAOpDeleteTask(sDisplayName)); + olExecute.AddTail(new CMSITSCAOpDeleteTask(sDisplayName, MSITSCA_TASK_TICK_SIZE)); } // The amount of tick space to add for each task to progress indicator. @@ -247,6 +247,8 @@ UINT MSITSCA_API InstallScheduledTasks(MSIHANDLE hInstall) CMSITSCASession session; BOOL bIsCleanup = ::MsiGetMode(hInstall, MSIRUNMODE_COMMIT) || ::MsiGetMode(hInstall, MSIRUNMODE_ROLLBACK); + session.m_hInstall = hInstall; + // In case of commit/rollback, continue sequence on error, to do as much cleanup as possible. session.m_bContinueOnError = bIsCleanup; @@ -283,15 +285,18 @@ UINT MSITSCA_API InstallScheduledTasks(MSIHANDLE hInstall) // Saving commit file failed. uiResult = HRESULT_CODE(hr); } - } else + } else { + // No cleanup support required. uiResult = ERROR_SUCCESS; + } } else { // Execution failed. uiResult = HRESULT_CODE(hr); } - if (uiResult != ERROR_SUCCESS && !bIsCleanup) { - // Perform the cleanup now, since rollback action might not get called at all (if scheduled later than this action). + if (uiResult != ERROR_SUCCESS) { + // Perform the cleanup now. The rollback script might not have been written to file yet. + // And even if it was, the rollback action might not get invoked at all (if scheduled in InstallExecuteSequence later than this action). session.m_bContinueOnError = TRUE; session.m_bRollbackEnabled = FALSE; verify(SUCCEEDED(session.m_olRollback.Execute(&session))); diff --git a/MSICALib/MSITSCAOp.cpp b/MSICALib/MSITSCAOp.cpp index 1c25269..73f457d 100644 --- a/MSICALib/MSITSCAOp.cpp +++ b/MSICALib/MSITSCAOp.cpp @@ -5,7 +5,8 @@ // CMSITSCAOp //////////////////////////////////////////////////////////////////////////// -CMSITSCAOp::CMSITSCAOp() +CMSITSCAOp::CMSITSCAOp(int iTicks) : + m_iTicks(iTicks) { } @@ -14,9 +15,9 @@ CMSITSCAOp::CMSITSCAOp() // CMSITSCAOpSingleStringOperation //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpSingleStringOperation::CMSITSCAOpSingleStringOperation(LPCWSTR pszValue) : +CMSITSCAOpSingleStringOperation::CMSITSCAOpSingleStringOperation(LPCWSTR pszValue, int iTicks) : m_sValue(pszValue), - CMSITSCAOp() + CMSITSCAOp(iTicks) { } @@ -25,10 +26,10 @@ CMSITSCAOpSingleStringOperation::CMSITSCAOpSingleStringOperation(LPCWSTR pszValu // CMSITSCAOpDoubleStringOperation //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpSrcDstStringOperation::CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValue1, LPCWSTR pszValue2) : +CMSITSCAOpSrcDstStringOperation::CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValue1, LPCWSTR pszValue2, int iTicks) : m_sValue1(pszValue1), m_sValue2(pszValue2), - CMSITSCAOp() + CMSITSCAOp(iTicks) { } @@ -37,8 +38,9 @@ CMSITSCAOpSrcDstStringOperation::CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValu // CMSITSCAOpBooleanOperation //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpBooleanOperation::CMSITSCAOpBooleanOperation(BOOL bValue) : - m_bValue(bValue) +CMSITSCAOpBooleanOperation::CMSITSCAOpBooleanOperation(BOOL bValue, int iTicks) : + m_bValue(bValue), + CMSITSCAOp(iTicks) { } @@ -47,8 +49,8 @@ CMSITSCAOpBooleanOperation::CMSITSCAOpBooleanOperation(BOOL bValue) : // CMSITSCAOpEnableRollback //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpEnableRollback::CMSITSCAOpEnableRollback(BOOL bEnable) : - CMSITSCAOpBooleanOperation(bEnable) +CMSITSCAOpEnableRollback::CMSITSCAOpEnableRollback(BOOL bEnable, int iTicks) : + CMSITSCAOpBooleanOperation(bEnable, iTicks) { } @@ -66,8 +68,8 @@ HRESULT CMSITSCAOpEnableRollback::Execute(CMSITSCASession *pSession) // CMSITSCAOpDeleteFile //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpDeleteFile::CMSITSCAOpDeleteFile(LPCWSTR pszFileName) : - CMSITSCAOpSingleStringOperation(pszFileName) +CMSITSCAOpDeleteFile::CMSITSCAOpDeleteFile(LPCWSTR pszFileName, int iTicks) : + CMSITSCAOpSingleStringOperation(pszFileName, iTicks) { } @@ -75,17 +77,18 @@ CMSITSCAOpDeleteFile::CMSITSCAOpDeleteFile(LPCWSTR pszFileName) : HRESULT CMSITSCAOpDeleteFile::Execute(CMSITSCASession *pSession) { assert(pSession); + DWORD dwError; if (pSession->m_bRollbackEnabled) { CStringW sBackupName; UINT uiCount = 0; - DWORD dwError; do { // Rename the file to make a backup. sBackupName.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount); dwError = ::MoveFileW(m_sValue, sBackupName) ? ERROR_SUCCESS : ::GetLastError(); - } while (dwError == ERROR_FILE_EXISTS); + } while (dwError == ERROR_ALREADY_EXISTS); + if (dwError == ERROR_FILE_NOT_FOUND) return S_OK; if (dwError != ERROR_SUCCESS) return AtlHresultFromWin32(dwError); // Order rollback action to restore from backup copy. @@ -97,7 +100,9 @@ HRESULT CMSITSCAOpDeleteFile::Execute(CMSITSCASession *pSession) return S_OK; } else { // Delete the file. - return ::DeleteFileW(m_sValue) ? S_OK : AtlHresultFromLastError(); + if (::DeleteFileW(m_sValue)) return S_OK; + dwError = ::GetLastError(); + return dwError == ERROR_FILE_NOT_FOUND ? S_OK : AtlHresultFromWin32(dwError); } } @@ -106,8 +111,8 @@ HRESULT CMSITSCAOpDeleteFile::Execute(CMSITSCASession *pSession) // CMSITSCAOpMoveFile //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpMoveFile::CMSITSCAOpMoveFile(LPCWSTR pszFileSrc, LPCWSTR pszFileDst) : - CMSITSCAOpSrcDstStringOperation(pszFileSrc, pszFileDst) +CMSITSCAOpMoveFile::CMSITSCAOpMoveFile(LPCWSTR pszFileSrc, LPCWSTR pszFileDst, int iTicks) : + CMSITSCAOpSrcDstStringOperation(pszFileSrc, pszFileDst, iTicks) { } @@ -135,14 +140,14 @@ HRESULT CMSITSCAOpMoveFile::Execute(CMSITSCASession *pSession) // CMSITSCAOpCreateTask //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpCreateTask::CMSITSCAOpCreateTask(LPCWSTR pszTaskName) : - m_bForce(FALSE), +CMSITSCAOpCreateTask::CMSITSCAOpCreateTask(LPCWSTR pszTaskName, BOOL bForce, int iTicks) : + m_bForce(bForce), m_dwFlags(0), m_dwPriority(NORMAL_PRIORITY_CLASS), m_wIdleMinutes(0), m_wDeadlineMinutes(0), m_dwMaxRuntimeMS(INFINITE), - CMSITSCAOpSingleStringOperation(pszTaskName) + CMSITSCAOpSingleStringOperation(pszTaskName, iTicks) { } @@ -161,6 +166,12 @@ HRESULT CMSITSCAOpCreateTask::Execute(CMSITSCASession *pSession) HRESULT hr; CComPtr pTask; POSITION pos; + PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1); + + // Display our custom message in the progress bar. + verify(::MsiRecordSetStringW(hRecordMsg, 1, m_sValue) == ERROR_SUCCESS); + if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL) + return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT); // Load the task to see if it exists. hr = pSession->m_pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask); @@ -406,8 +417,8 @@ UINT CMSITSCAOpCreateTask::SetTriggersFromView(MSIHANDLE hView) // CMSITSCAOpDeleteTask //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpDeleteTask::CMSITSCAOpDeleteTask(LPCWSTR pszTaskName) : - CMSITSCAOpSingleStringOperation(pszTaskName) +CMSITSCAOpDeleteTask::CMSITSCAOpDeleteTask(LPCWSTR pszTaskName, int iTicks) : + CMSITSCAOpSingleStringOperation(pszTaskName, iTicks) { } @@ -415,9 +426,9 @@ CMSITSCAOpDeleteTask::CMSITSCAOpDeleteTask(LPCWSTR pszTaskName) : HRESULT CMSITSCAOpDeleteTask::Execute(CMSITSCASession *pSession) { assert(pSession); + HRESULT hr; if (pSession->m_bRollbackEnabled) { - HRESULT hr; CComPtr pTask; DWORD dwFlags; CString sDisplayNameOrig; @@ -425,7 +436,8 @@ HRESULT CMSITSCAOpDeleteTask::Execute(CMSITSCASession *pSession) // Load the task. hr = pSession->m_pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask); - if (FAILED(hr)) return hr; + if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) return S_OK; + else if (FAILED(hr)) return hr; // Disable the task. hr = pTask->GetFlags(&dwFlags); @@ -469,7 +481,9 @@ HRESULT CMSITSCAOpDeleteTask::Execute(CMSITSCASession *pSession) return S_OK; } else { // Delete the task. - return pSession->m_pTaskScheduler->Delete(m_sValue); + hr = pSession->m_pTaskScheduler->Delete(m_sValue); + if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) return S_OK; + else return hr; } } @@ -478,9 +492,9 @@ HRESULT CMSITSCAOpDeleteTask::Execute(CMSITSCASession *pSession) // CMSITSCAOpEnableTask //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpEnableTask::CMSITSCAOpEnableTask(LPCWSTR pszTaskName, BOOL bEnable) : +CMSITSCAOpEnableTask::CMSITSCAOpEnableTask(LPCWSTR pszTaskName, BOOL bEnable, int iTicks) : m_bEnable(bEnable), - CMSITSCAOpSingleStringOperation(pszTaskName) + CMSITSCAOpSingleStringOperation(pszTaskName, iTicks) { } @@ -535,8 +549,8 @@ HRESULT CMSITSCAOpEnableTask::Execute(CMSITSCASession *pSession) // CMSITSCAOpCopyTask //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpCopyTask::CMSITSCAOpCopyTask(LPCWSTR pszTaskSrc, LPCWSTR pszTaskDst) : - CMSITSCAOpSrcDstStringOperation(pszTaskSrc, pszTaskDst) +CMSITSCAOpCopyTask::CMSITSCAOpCopyTask(LPCWSTR pszTaskSrc, LPCWSTR pszTaskDst, int iTicks) : + CMSITSCAOpSrcDstStringOperation(pszTaskSrc, pszTaskDst, iTicks) { } @@ -572,7 +586,8 @@ HRESULT CMSITSCAOpCopyTask::Execute(CMSITSCASession *pSession) // CMSITSCAOpList //////////////////////////////////////////////////////////////////////////// -CMSITSCAOpList::CMSITSCAOpList() : +CMSITSCAOpList::CMSITSCAOpList(int iTicks) : + CMSITSCAOp(iTicks), CAtlList(sizeof(CMSITSCAOp*)) { } @@ -634,12 +649,33 @@ HRESULT CMSITSCAOpList::Execute(CMSITSCASession *pSession) assert(pSession); POSITION pos; HRESULT hr; + PMSIHANDLE hRecordProg = ::MsiCreateRecord(3); + + // Tell the installer to use explicit progress messages. + verify(::MsiRecordSetInteger(hRecordProg, 1, 1) == ERROR_SUCCESS); + verify(::MsiRecordSetInteger(hRecordProg, 2, 1) == ERROR_SUCCESS); + verify(::MsiRecordSetInteger(hRecordProg, 3, 0) == ERROR_SUCCESS); + ::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg); + + // Prepare hRecordProg for progress messages. + verify(::MsiRecordSetInteger(hRecordProg, 1, 2) == ERROR_SUCCESS); + verify(::MsiRecordSetInteger(hRecordProg, 3, 0) == ERROR_SUCCESS); for (pos = GetHeadPosition(); pos;) { - hr = GetNext(pos)->Execute(pSession); + CMSITSCAOp *pOp = GetNext(pos); + assert(pOp); + + hr = pOp->Execute(pSession); if (!pSession->m_bContinueOnError && FAILED(hr)) return hr; + + verify(::MsiRecordSetInteger(hRecordProg, 2, pOp->m_iTicks) == ERROR_SUCCESS); + if (::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL) + return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT); } + verify(::MsiRecordSetInteger(hRecordProg, 2, m_iTicks) == ERROR_SUCCESS); + ::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg); + return S_OK; } @@ -653,16 +689,3 @@ CMSITSCASession::CMSITSCASession() : m_bRollbackEnabled(FALSE) { } - - -CMSITSCASession::~CMSITSCASession() -{ -} - - -HRESULT CMSITSCASession::Initialize() -{ - return m_pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL); -} - - diff --git a/MSICALib/MSITSCAOp.h b/MSICALib/MSITSCAOp.h index 1c43281..b40f64d 100644 --- a/MSICALib/MSITSCAOp.h +++ b/MSICALib/MSITSCAOp.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -19,9 +20,16 @@ class CMSITSCASession; class CMSITSCAOp { public: - CMSITSCAOp(); + CMSITSCAOp(int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession) = 0; + + friend class CMSITSCAOpList; + friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOp &op); + friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOp &op); + +protected: + int m_iTicks; // Number of ticks on a progress bar required for this action execution }; @@ -32,7 +40,7 @@ public: class CMSITSCAOpSingleStringOperation : public CMSITSCAOp { public: - CMSITSCAOpSingleStringOperation(LPCWSTR pszValue = L""); + CMSITSCAOpSingleStringOperation(LPCWSTR pszValue = L"", int iTicks = 0); friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSingleStringOperation &op); friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSingleStringOperation &op); @@ -49,7 +57,7 @@ protected: class CMSITSCAOpSrcDstStringOperation : public CMSITSCAOp { public: - CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValue1 = L"", LPCWSTR pszValue2 = L""); + CMSITSCAOpSrcDstStringOperation(LPCWSTR pszValue1 = L"", LPCWSTR pszValue2 = L"", int iTicks = 0); friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSrcDstStringOperation &op); friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op); @@ -67,7 +75,7 @@ protected: class CMSITSCAOpBooleanOperation : public CMSITSCAOp { public: - CMSITSCAOpBooleanOperation(BOOL bValue = TRUE); + CMSITSCAOpBooleanOperation(BOOL bValue = TRUE, int iTicks = 0); friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpBooleanOperation &op); friend inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpBooleanOperation &op); @@ -84,7 +92,7 @@ protected: class CMSITSCAOpEnableRollback : public CMSITSCAOpBooleanOperation { public: - CMSITSCAOpEnableRollback(BOOL bEnable = TRUE); + CMSITSCAOpEnableRollback(BOOL bEnable = TRUE, int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); }; @@ -96,7 +104,7 @@ public: class CMSITSCAOpDeleteFile : public CMSITSCAOpSingleStringOperation { public: - CMSITSCAOpDeleteFile(LPCWSTR pszFileName = L""); + CMSITSCAOpDeleteFile(LPCWSTR pszFileName = L"", int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); }; @@ -108,7 +116,7 @@ public: class CMSITSCAOpMoveFile : public CMSITSCAOpSrcDstStringOperation { public: - CMSITSCAOpMoveFile(LPCWSTR pszFileSrc = L"", LPCWSTR pszFileDst = L""); + CMSITSCAOpMoveFile(LPCWSTR pszFileSrc = L"", LPCWSTR pszFileDst = L"", int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); }; @@ -120,9 +128,8 @@ public: class CMSITSCAOpCreateTask : public CMSITSCAOpSingleStringOperation { public: - CMSITSCAOpCreateTask(LPCWSTR pszTaskName = L""); + CMSITSCAOpCreateTask(LPCWSTR pszTaskName = L"", BOOL bForce = FALSE, int iTicks = 0); virtual ~CMSITSCAOpCreateTask(); - virtual HRESULT Execute(CMSITSCASession *pSession); UINT SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord); @@ -156,7 +163,7 @@ protected: class CMSITSCAOpDeleteTask : public CMSITSCAOpSingleStringOperation { public: - CMSITSCAOpDeleteTask(LPCWSTR pszTaskName = L""); + CMSITSCAOpDeleteTask(LPCWSTR pszTaskName = L"", int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); }; @@ -168,7 +175,7 @@ public: class CMSITSCAOpEnableTask : public CMSITSCAOpSingleStringOperation { public: - CMSITSCAOpEnableTask(LPCWSTR pszTaskName = L"", BOOL bEnable = TRUE); + CMSITSCAOpEnableTask(LPCWSTR pszTaskName = L"", BOOL bEnable = TRUE, int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); friend inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpEnableTask &op); @@ -186,7 +193,7 @@ protected: class CMSITSCAOpCopyTask : public CMSITSCAOpSrcDstStringOperation { public: - CMSITSCAOpCopyTask(LPCWSTR pszTaskSrc = L"", LPCWSTR pszTaskDst = L""); + CMSITSCAOpCopyTask(LPCWSTR pszTaskSrc = L"", LPCWSTR pszTaskDst = L"", int iTicks = 0); virtual HRESULT Execute(CMSITSCASession *pSession); }; @@ -198,7 +205,7 @@ public: class CMSITSCAOpList : public CMSITSCAOp, public CAtlList { public: - CMSITSCAOpList(); + CMSITSCAOpList(int iTicks = 0); void Free(); HRESULT LoadFromFile(LPCTSTR pszFileName); @@ -235,10 +242,8 @@ class CMSITSCASession { public: CMSITSCASession(); - virtual ~CMSITSCASession(); - - HRESULT Initialize(); + MSIHANDLE m_hInstall; // Installer handle CComPtr m_pTaskScheduler; // Task scheduler interface BOOL m_bContinueOnError; // Continue execution on operation error? BOOL m_bRollbackEnabled; // Is rollback enabled? @@ -251,14 +256,36 @@ public: // Inline operators //////////////////////////////////////////////////////////////////////////// +inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOp &op) +{ + return f << op.m_iTicks; +} + + +inline HRESULT operator >>(CAtlFile &f, CMSITSCAOp &op) +{ + return f >> op.m_iTicks; +} + + inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSingleStringOperation &op) { + HRESULT hr; + + hr = f << (const CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + return f << op.m_sValue; } inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSingleStringOperation &op) { + HRESULT hr; + + hr = f >> (CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + return f >> op.m_sValue; } @@ -267,6 +294,9 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpSrcDstStringOperation &o { HRESULT hr; + hr = f << (const CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + hr = f << op.m_sValue1; if (FAILED(hr)) return hr; @@ -278,6 +308,9 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op) { HRESULT hr; + hr = f >> (CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + hr = f >> op.m_sValue1; if (FAILED(hr)) return hr; @@ -287,6 +320,11 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpSrcDstStringOperation &op) inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpBooleanOperation &op) { + HRESULT hr; + + hr = f << (const CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + return f << (int)op.m_bValue; } @@ -296,6 +334,9 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpBooleanOperation &op) int iValue; HRESULT hr; + hr = f >> (CMSITSCAOp &)op; + if (FAILED(hr)) return hr; + hr = f >> iValue; if (FAILED(hr)) return hr; op.m_bValue = iValue ? TRUE : FALSE; @@ -392,6 +433,9 @@ inline HRESULT operator <<(CAtlFile &f, const CMSITSCAOpList &list) POSITION pos; HRESULT hr; + hr = f << (const CMSITSCAOp &)list; + if (FAILED(hr)) return hr; + hr = f << (int)list.GetCount(); if (FAILED(hr)) return hr; @@ -431,6 +475,9 @@ inline HRESULT operator >>(CAtlFile &f, CMSITSCAOpList &list) HRESULT hr; DWORD dwCount; + hr = f >> (CMSITSCAOp &)list; + if (FAILED(hr)) return hr; + hr = f >> (int&)dwCount; if (FAILED(hr)) return hr; diff --git a/MSICALib/res/en_GB.po b/MSICALib/res/en_GB.po index 3760755..22fcce9 100644 --- a/MSICALib/res/en_GB.po +++ b/MSICALib/res/en_GB.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: MSITSCA\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-29 10:54+0100\n" +"POT-Creation-Date: 2012-12-21 22:56+0100\n" "PO-Revision-Date: \n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -15,6 +15,7 @@ msgstr "" "X-Poedit-Basepath: .\n" "X-Generator: Poedit 1.5.4\n" "X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPath-1: ..\\MSI\n" # Koda jezika in privzeta kodna stran ANSI za ta jezik (šesnajstiško) # Če ne prevajamo ločeno vsake lokalne različice jezika, uporabimo kodo privzetega podjezika. @@ -31,7 +32,14 @@ msgid "0x424" msgstr "0x409" # Privzeta kodna stran ANSI za ta jezik (desetiško) -#: MSITSCA.rcx:64 +#: MSITSCA.rcx:64 ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:3 +#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:3 +#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:3 +#: ..\MSI/Sl.DebugU.x64.Error-2.idtx:3 +#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:3 +#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:3 +#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:3 +#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:3 msgid "1250" msgstr "1252" @@ -65,3 +73,49 @@ msgstr "SUBLANG_DEFAULT" #: MSITSCA.rcx:52 msgid "Vse pravice pridržane © Amebis, d. o. o., Kamnik, 2012" msgstr "Copyright © Amebis, d. o. o., Kamnik, 2012" + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:7 ..\MSI/Sl.DebugU.x64.Error-2.idtx:7 +#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:7 +#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:7 +msgid "Pri nastavljanju parametra »[2]« je prišlo do napake [3]." +msgstr "Error [3] setting \"[2]\" parameter." + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:4 ..\MSI/Sl.DebugU.x64.Error-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:4 +msgid "Pri odpiranju namestitvenega paketa je prišlo do napake." +msgstr "Error opening installation package." + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:6 ..\MSI/Sl.DebugU.x64.Error-2.idtx:6 +#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:6 +#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:6 +msgid "" +"Pri pisanju v datoteko seznama razporejenih opravil »[2]« je prišlo do " +"napake [3]." +msgstr "Error [3] writing to \"[2]\" scheduled task list file." + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.Error-2.idtx:5 ..\MSI/Sl.DebugU.x64.Error-2.idtx:5 +#: ..\MSI/Sl.ReleaseU.Win32.Error-2.idtx:5 +#: ..\MSI/Sl.ReleaseU.x64.Error-2.idtx:5 +msgid "Pri pripravi seznama razvrščenih opravil je prišlo do napake [2]." +msgstr "Error [2] creating scheduled task list." + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4 +#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:4 +msgid "Razporejeno opravilo: [1]" +msgstr "Scheduled task: [1]" + +# !!! Lektorirati !!! +#: ..\MSI/Sl.DebugU.Win32.ActionText-2.idtx:4 +#: ..\MSI/Sl.DebugU.x64.ActionText-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.Win32.ActionText-2.idtx:4 +#: ..\MSI/Sl.ReleaseU.x64.ActionText-2.idtx:4 +msgid "Registracija razporejenih opravil" +msgstr "Registering scheduled tasks"