From 5ffb9b367d7767b09ba1b3b4d85f1961f5435836 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 16 Jun 2012 22:33:34 +0300 Subject: [PATCH] Minor changes --- SkinInstaller/DialogPackage.cpp | 20 ++++++++++---------- SkinInstaller/SkinInstaller.rc | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SkinInstaller/DialogPackage.cpp b/SkinInstaller/DialogPackage.cpp index 89069101..55c0b385 100644 --- a/SkinInstaller/DialogPackage.cpp +++ b/SkinInstaller/DialogPackage.cpp @@ -249,7 +249,7 @@ bool CDialogPackage::CreatePackage() WritePrivateProfileString(L"rmskin", L"MinimumWindows", m_MinimumWindows.c_str(), tempFile); // Create archive and add options file and header bitmap - m_ZipFile = zipOpen(ConvertToAscii(m_TargetFile.c_str()).c_str(), 0); + m_ZipFile = zipOpen(ConvertToAscii(m_TargetFile.c_str()).c_str(), APPEND_STATUS_CREATE); auto cleanup = [&]()->bool { @@ -259,11 +259,11 @@ bool CDialogPackage::CreatePackage() if (!m_ZipFile || !AddFileToPackage(ConvertToAscii(tempFile).c_str(), "RMSKIN.ini") || - !(!c_Dialog->m_HeaderFile.empty() && AddFileToPackage(ConvertToAscii(c_Dialog->m_HeaderFile.c_str()).c_str(), "RMSKIN.bmp"))) + (!c_Dialog->m_HeaderFile.empty() && !AddFileToPackage(ConvertToAscii(c_Dialog->m_HeaderFile.c_str()).c_str(), "RMSKIN.bmp"))) { std::wstring error = L"Unable to create package."; error += L"\n\nClick OK to close Packager."; - MessageBox(m_Window, error.c_str(), L"Rainmeter Packager", MB_OK | MB_TOPMOST); + MessageBox(NULL, error.c_str(), L"Rainmeter Packager", MB_ERROR); DeleteFile(tempFile); return cleanup(); } @@ -292,7 +292,7 @@ bool CDialogPackage::CreatePackage() error += (*iter).first; error += L"'."; error += L"\n\nClick OK to close Packager."; - MessageBox(m_Window, error.c_str(), L"Rainmeter Packager", MB_OK | MB_TOPMOST); + MessageBox(NULL, error.c_str(), L"Rainmeter Packager", MB_ERROR); return cleanup(); } } @@ -312,7 +312,7 @@ bool CDialogPackage::CreatePackage() error += (*iter).first; error += L"'."; error += L"\n\nClick OK to close Packager."; - MessageBox(m_Window, error.c_str(), L"Rainmeter Packager", MB_OK | MB_TOPMOST); + MessageBox(NULL, error.c_str(), L"Rainmeter Packager", MB_ERROR); return cleanup(); } } @@ -332,7 +332,7 @@ bool CDialogPackage::CreatePackage() { std::wstring error = L"Unable to create package."; error += L"\n\nClick OK to close Packager."; - MessageBox(m_Window, error.c_str(), L"Rainmeter Packager", MB_OK | MB_TOPMOST); + MessageBox(NULL, error.c_str(), L"Rainmeter Packager", MB_ERROR); return false; } @@ -350,7 +350,7 @@ unsigned __stdcall CDialogPackage::PackagerThreadProc(void* pParam) // SendMessage(item, PBM_SETMARQUEE, (WPARAM)FALSE, 0); FlashWindow(dialog->m_Window, TRUE); - MessageBox(dialog->m_Window, L"The .rmskin file has been successfully created.", L"Rainmeter Packager", MB_OK | MB_ICONINFORMATION); + MessageBox(NULL, L"The .rmskin file has been successfully created.", L"Rainmeter Packager", MB_OK | MB_ICONINFORMATION); } else { @@ -463,12 +463,12 @@ bool CDialogPackage::AddFolderToPackage(const std::wstring& path, std::wstring b ret = AddFileToPackage(asciiFile.c_str(), zipFile.c_str()); if (!ret) { - std::wstring error = L"Error adding file:\n\n"; + std::wstring error = L"Error adding file:\n"; error += path; error += base; - error += L"\\"; error += fd.cFileName; - MessageBox(m_Window, error.c_str(), L"Rainmeter Packager", MB_OK | MB_TOPMOST); + error += L"\n\nClick OK to close Packager."; + MessageBox(NULL, error.c_str(), L"Rainmeter Packager", MB_ERROR); break; } } diff --git a/SkinInstaller/SkinInstaller.rc b/SkinInstaller/SkinInstaller.rc index 42f9ed64..dee8f8e4 100644 --- a/SkinInstaller/SkinInstaller.rc +++ b/SkinInstaller/SkinInstaller.rc @@ -27,7 +27,7 @@ VS_VERSION_INFO VERSIONINFO { BLOCK "040904E4" { - VALUE "FileDescription", "Rainmeter Skin Installer" + VALUE "FileDescription", "Rainmeter Skin Package Installer" VALUE "FileVersion", STRFILEVER VALUE "LegalCopyright", "© 2012 - Birunthan Mohanathas" VALUE "OriginalFilename", "SkinInstaller.exe"