mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 13:11:22 +00:00
[ZIPFLDR] Allow the shell extension to extract passworded zip files
This commit is contained in:
parent
a672665911
commit
08deb1d9de
17 changed files with 352 additions and 22 deletions
|
@ -31,6 +31,7 @@ list(APPEND SOURCE
|
|||
CZipEnumerator.hpp
|
||||
CZipExtract.cpp
|
||||
CZipFolder.hpp
|
||||
CZipPassword.cpp
|
||||
Debug.cpp
|
||||
zipfldr.spec
|
||||
precomp.h
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Zip Shell Extension
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Zip extraction
|
||||
* COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
|
||||
* COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -12,6 +12,7 @@ class CZipExtract :
|
|||
{
|
||||
CStringW m_Filename;
|
||||
CStringW m_Directory;
|
||||
CStringA m_Password;
|
||||
bool m_DirectoryChanged;
|
||||
unzFile uf;
|
||||
public:
|
||||
|
@ -70,11 +71,13 @@ public:
|
|||
{
|
||||
private:
|
||||
CZipExtract* m_pExtract;
|
||||
CStringA* m_pPassword;
|
||||
|
||||
public:
|
||||
CExtractSettingsPage(CZipExtract* extract)
|
||||
CExtractSettingsPage(CZipExtract* extract, CStringA* password)
|
||||
:CPropertyPageImpl<CExtractSettingsPage>(MAKEINTRESOURCE(IDS_WIZ_TITLE))
|
||||
,m_pExtract(extract)
|
||||
,m_pPassword(password)
|
||||
{
|
||||
m_psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_TITLE);
|
||||
m_psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_SUBTITLE);
|
||||
|
@ -85,7 +88,6 @@ public:
|
|||
{
|
||||
SetDlgItemTextW(IDC_DIRECTORY, m_pExtract->m_Directory);
|
||||
m_pExtract->m_DirectoryChanged = false;
|
||||
::EnableWindow(GetDlgItem(IDC_PASSWORD), FALSE); /* Not supported for now */
|
||||
GetParent().CenterWindow(::GetDesktopWindow());
|
||||
SetWizardButtons(PSWIZB_NEXT);
|
||||
return 0;
|
||||
|
@ -108,7 +110,7 @@ public:
|
|||
|
||||
::EnableWindow(GetDlgItem(IDC_BROWSE), TRUE);
|
||||
::EnableWindow(GetDlgItem(IDC_DIRECTORY), TRUE);
|
||||
::EnableWindow(GetDlgItem(IDC_PASSWORD), FALSE); /* Not supported for now */
|
||||
::EnableWindow(GetDlgItem(IDC_PASSWORD), TRUE);
|
||||
SetWizardButtons(PSWIZB_NEXT);
|
||||
|
||||
return TRUE;
|
||||
|
@ -171,6 +173,11 @@ public:
|
|||
|
||||
LRESULT OnPassword(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
|
||||
{
|
||||
CStringA Password;
|
||||
if (_CZipAskPassword(m_hWnd, NULL, Password) == eAccept)
|
||||
{
|
||||
*m_pPassword = Password;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -247,7 +254,7 @@ public:
|
|||
psh.dwFlags = PSH_WIZARD97 | PSH_HEADER;
|
||||
psh.hInstance = _AtlBaseModule.GetResourceInstance();
|
||||
|
||||
CExtractSettingsPage extractPage(this);
|
||||
CExtractSettingsPage extractPage(this, &m_Password);
|
||||
CCompleteSettingsPage completePage(this);
|
||||
HPROPSHEETPAGE hpsp[] =
|
||||
{
|
||||
|
@ -288,6 +295,7 @@ public:
|
|||
BYTE Buffer[2048];
|
||||
CStringA BaseDirectory = m_Directory;
|
||||
CStringA Name;
|
||||
CStringA Password = m_Password;
|
||||
unz_file_info64 Info;
|
||||
int CurrentFile = 0;
|
||||
bool bOverwriteAll = false;
|
||||
|
@ -310,9 +318,48 @@ public:
|
|||
if (is_dir)
|
||||
continue;
|
||||
|
||||
const char* password = NULL;
|
||||
/* FIXME: Process password, if required and not specified, prompt the user */
|
||||
err = unzOpenCurrentFilePassword(uf, password);
|
||||
if (Info.flag & MINIZIP_PASSWORD_FLAG)
|
||||
{
|
||||
eZipPasswordResponse Response = eAccept;
|
||||
do
|
||||
{
|
||||
/* If there is a password set, try it */
|
||||
if (!Password.IsEmpty())
|
||||
{
|
||||
err = unzOpenCurrentFilePassword(uf, Password);
|
||||
if (err == UNZ_OK)
|
||||
{
|
||||
/* Try to read some bytes, because unzOpenCurrentFilePassword does not return failure */
|
||||
char Buf[10];
|
||||
err = unzReadCurrentFile(uf, Buf, sizeof(Buf));
|
||||
unzCloseCurrentFile(uf);
|
||||
if (err >= UNZ_OK)
|
||||
{
|
||||
/* 're'-open the file so that we can begin to extract */
|
||||
err = unzOpenCurrentFilePassword(uf, Password);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Response = _CZipAskPassword(hDlg, Name, Password);
|
||||
} while (Response == eAccept);
|
||||
|
||||
if (Response == eSkip)
|
||||
{
|
||||
Progress.SendMessage(PBM_SETPOS, CurrentFile, 0);
|
||||
continue;
|
||||
}
|
||||
else if (Response == eAbort)
|
||||
{
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
err = unzOpenCurrentFile(uf);
|
||||
}
|
||||
|
||||
if (err != UNZ_OK)
|
||||
{
|
||||
DPRINT1("ERROR, unzOpenCurrentFilePassword: 0x%x\n", err);
|
||||
|
|
91
dll/shellext/zipfldr/CZipPassword.cpp
Normal file
91
dll/shellext/zipfldr/CZipPassword.cpp
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Zip Shell Extension
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Ask the user for a password
|
||||
* COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
class CZipPassword : public CDialogImpl<CZipPassword>
|
||||
{
|
||||
private:
|
||||
CStringA m_Filename;
|
||||
CStringA* m_pPassword;
|
||||
public:
|
||||
CZipPassword(const char* filename, CStringA* Password)
|
||||
:m_pPassword(Password)
|
||||
{
|
||||
if (filename != NULL)
|
||||
m_Filename = filename;
|
||||
}
|
||||
|
||||
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
CenterWindow(GetParent());
|
||||
|
||||
/* No filename, so this is the question before starting to extract */
|
||||
if (m_Filename.IsEmpty())
|
||||
{
|
||||
CStringA message(MAKEINTRESOURCE(IDS_PASSWORD_ZIP_TEXT));
|
||||
::SetDlgItemTextA(m_hWnd, IDC_MESSAGE, message);
|
||||
::ShowWindow(GetDlgItem(IDSKIP), SW_HIDE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Our CString does not support FormatMessage yet */
|
||||
CStringA message(MAKEINTRESOURCE(IDS_PASSWORD_FILE_TEXT));
|
||||
CHeapPtr<CHAR, CLocalAllocator> formatted;
|
||||
|
||||
DWORD_PTR args[2] =
|
||||
{
|
||||
(DWORD_PTR)m_Filename.GetString(),
|
||||
NULL
|
||||
};
|
||||
|
||||
::FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
||||
message, 0, 0, (LPSTR)&formatted, 0, (va_list*)args);
|
||||
|
||||
::SetDlgItemTextA(m_hWnd, IDC_MESSAGE, formatted);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT OnButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
|
||||
{
|
||||
if (wID == IDOK)
|
||||
{
|
||||
HWND item = GetDlgItem(IDC_PASSWORD);
|
||||
int len = ::GetWindowTextLengthA(item);
|
||||
len = ::GetDlgItemTextA(m_hWnd, IDC_PASSWORD, m_pPassword->GetBuffer(len+1), len+1);
|
||||
m_pPassword->ReleaseBuffer(len);
|
||||
}
|
||||
EndDialog(wID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public:
|
||||
enum { IDD = IDD_PASSWORD };
|
||||
|
||||
BEGIN_MSG_MAP(CZipPassword)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
COMMAND_ID_HANDLER(IDOK, OnButton)
|
||||
COMMAND_ID_HANDLER(IDSKIP, OnButton)
|
||||
COMMAND_ID_HANDLER(IDCANCEL, OnButton)
|
||||
END_MSG_MAP()
|
||||
};
|
||||
|
||||
eZipPasswordResponse _CZipAskPassword(HWND hDlg, const char* filename, CStringA& Password)
|
||||
{
|
||||
if (filename)
|
||||
filename = PathFindFileNameA(filename);
|
||||
CZipPassword password(filename, &Password);
|
||||
INT_PTR Result = password.DoModal(hDlg);
|
||||
switch (Result)
|
||||
{
|
||||
case IDOK: return eAccept;
|
||||
case IDSKIP: return eSkip;
|
||||
default:
|
||||
case IDCANCEL: return eAbort;
|
||||
}
|
||||
}
|
|
@ -37,13 +37,26 @@ CAPTION "Ersetzen von Dateien bestätigen"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Ja",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Abbrechen",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Alle",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Nein",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Abbrechen",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Name"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Wählen Sie ein Ziel zum Extrahieren der Dateien."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Dieser Ordner enthält bereits eine Datei '%1'.\nMöchten Sie die existierende Datei ersetzen?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "&Alle Extrahieren..."
|
||||
IDS_HELPTEXT "Ordnerinhalt extrahieren"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Zip Shell Extension
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: English (United States) resource translation
|
||||
* COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
|
||||
* COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
@ -37,13 +37,26 @@ CAPTION "Confirm File Replace"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Yes &To All",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&No",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Name"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Select the place where you want to extract the selected items."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\nDo you want to replace it?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Extract &All..."
|
||||
IDS_HELPTEXT "Extracts folder contents"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "Kinnita faili ülekirjutus"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Jah",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Loobu",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Jah &kõigile",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Ei",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Loobu",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Nimi"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Vali koht kuhu soovid ekstraktida valitud üksused."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "See kaust juba sisaldab faili nimega '%1'.\nKas tahad seda asendada?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Ekstrakti &kõik..."
|
||||
IDS_HELPTEXT "Ekstraktib kausta sisu"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "Confirmer le remplacement de fichier"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Oui",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Annuler",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Oui à &tous",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Non",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Annuler",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Nom"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Choisissez l'endroit où vous voulez extraits les éléments sélectionnés."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Ce répertoire contient déjà un fichier nommé '%1'.\nVoulez-vous le remplacer ?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "&Tout extraire..."
|
||||
IDS_HELPTEXT "Extrait le contenu du répertoire"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "Conferma Sostituzione File"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Sì",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Annulla",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Sì &A Tutti",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&No",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Annulla",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Nome"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Seleziona la destinazione in cui desideri estrarre gli elementi selezionati."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Questa cartella già contiene un file chiamato '%1'.\nVuoi sostituirla?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Estrai &Tutto..."
|
||||
IDS_HELPTEXT "Estrae i contenuti della cartella"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "ファイルの置換の確認"
|
|||
FONT 9, "MS UI Gothic", 400, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "はい(&Y)",IDYES,6,36,62,14
|
||||
PUSHBUTTON "キャンセル",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "すべてはい(&T)",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "いいえ(&N)",IDNO,138,36,62,14
|
||||
PUSHBUTTON "キャンセル",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "名前"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "選択された項目を展開したい場所を選んで下さい。"
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "'%1'という名前のファイルがフォルダ内に既に存在します。\n置き換えしますか?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "すべて展開(&A)..."
|
||||
IDS_HELPTEXT "フォルダ内容の展開"
|
||||
|
|
|
@ -36,13 +36,26 @@ CAPTION "Potwierdzenie zamiany pliku"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Tak",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Anuluj",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Tak na &wszystkie",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Nie",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Anuluj",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Nazwa"
|
||||
|
@ -63,6 +76,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Wybierz miejsce, w którym chcesz wyodrębnić wybrane elementy."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Ten folder zawiera już plik o nazwie '%1'.\nCzy chcesz zamienić istniejący plik?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Wy&odrębnij wszystkie..."
|
||||
IDS_HELPTEXT "Wyodrębnia zawartość folderów"
|
||||
|
|
|
@ -44,6 +44,19 @@ BEGIN
|
|||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Nume"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Selectați destinația unde doriți să extrageți elementele selectate."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Acest folder deja conține un fișier numit '%1'.\nDoriți să o înlocuiți?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Extrage &Tot..."
|
||||
IDS_HELPTEXT "Extrage conținutul folderului"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "Подтвердите замену файла"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Да",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Отмена",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Заменить &все",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Нет",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Отмена",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Название"
|
||||
|
@ -63,7 +76,9 @@ BEGIN
|
|||
IDS_WIZ_COMPL_SUBTITLE "Файлы из zip архива были извлечены."
|
||||
IDS_WIZ_BROWSE_TITLE "Выберите расположение для извлечения элементов."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "В данной папке уже есть файл '%1'.\nВы хотите заменить его?"
|
||||
IDS_OVERWRITEFILE_TEXT "В данной папке уже есть файл '%1!ls!'.\nВы хотите заменить его?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "&Извлечь всё..."
|
||||
IDS_HELPTEXT "Извлекает содержимое архива"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "Bekräfta filersättning"
|
|||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Ja",IDYES,6,36,62,14
|
||||
PUSHBUTTON "Avbryt",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "Ja &till alla",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "&Nej",IDNO,138,36,62,14
|
||||
PUSHBUTTON "Avbryt",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "Namn"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "Välj plats där du vill extrahera de valda objekten."
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "Den här mappen innehåller redan en fil med namnet '%1'.\nVill du ersätta den?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "Extrahera &alla..."
|
||||
IDS_HELPTEXT "Extraherar mappinnehållet"
|
||||
|
|
|
@ -37,13 +37,26 @@ CAPTION "确认替换文件"
|
|||
FONT 9, "宋体", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "是(&Y)",IDYES,6,36,62,14
|
||||
PUSHBUTTON "取消",IDCANCEL,204,36,62,14
|
||||
PUSHBUTTON "全部为是(&T)",IDYESALL,72,36,62,14
|
||||
PUSHBUTTON "否(&N)",IDNO,138,36,62,14
|
||||
PUSHBUTTON "取消",IDCANCEL,204,36,62,14
|
||||
ICON "",IDC_EXCLAMATION_ICON,6,6,24,22
|
||||
LTEXT "",IDC_MESSAGE,36,6,228,24
|
||||
END
|
||||
|
||||
IDD_PASSWORD DIALOGEX 0, 0, 243, 62
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Password needed"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,72,42,108,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,186,6,50,14
|
||||
PUSHBUTTON "Skip File",IDSKIP,186,24,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,186,42,50,14
|
||||
LTEXT "Static",IDC_MESSAGE,24,6,156,30
|
||||
LTEXT "Password:",IDC_STATIC,24,44,44,8
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COL_NAME "名称"
|
||||
|
@ -64,6 +77,8 @@ BEGIN
|
|||
IDS_WIZ_BROWSE_TITLE "选择您想要解压指定项目到的地方。"
|
||||
|
||||
IDS_OVERWRITEFILE_TEXT "这个文件夹中已经包含一个叫 %1 的文件。\n您想要替换它吗?"
|
||||
IDS_PASSWORD_FILE_TEXT "The file '%1' is password protected. Please enter the password."
|
||||
IDS_PASSWORD_ZIP_TEXT "Please specify the password to use when extracting this zip file."
|
||||
|
||||
IDS_MENUITEM "解压全部(&A)..."
|
||||
IDS_HELPTEXT "解压文件夹内容"
|
||||
|
|
|
@ -41,6 +41,8 @@ extern LONG g_ModuleRefCnt;
|
|||
WCHAR* guid2string(REFCLSID iid);
|
||||
|
||||
|
||||
#define MINIZIP_PASSWORD_FLAG 1
|
||||
|
||||
#include "minizip/unzip.h"
|
||||
#include "minizip/ioapi.h"
|
||||
|
||||
|
@ -56,6 +58,25 @@ HRESULT _CExplorerCommandProvider_CreateInstance(IContextMenu* zipObject, REFIID
|
|||
HRESULT _CFolderViewCB_CreateInstance(REFIID riid, LPVOID * ppvOut);
|
||||
void _CZipExtract_runWizard(PCWSTR Filename);
|
||||
|
||||
enum eZipPasswordResponse
|
||||
{
|
||||
eAbort,
|
||||
eSkip,
|
||||
eAccept,
|
||||
};
|
||||
|
||||
eZipPasswordResponse _CZipAskPassword(HWND hDlg, const char* filename, CStringA& Password);
|
||||
|
||||
enum eZipConfirmResponse
|
||||
{
|
||||
eYes,
|
||||
eYesToAll,
|
||||
eNo,
|
||||
eCancel
|
||||
};
|
||||
|
||||
eZipConfirmResponse _CZipAskReplace(HWND hDlg, const char* FullPath);
|
||||
|
||||
#include "CZipEnumerator.hpp"
|
||||
#include "CZipFolder.hpp"
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
#define IDC_EXCLAMATION_ICON 1205
|
||||
#define IDC_MESSAGE 1206
|
||||
|
||||
#define IDD_PASSWORD 1300
|
||||
#define IDSKIP 1301
|
||||
|
||||
|
||||
/* Strings */
|
||||
#define IDS_COL_NAME 100
|
||||
|
@ -45,6 +48,8 @@
|
|||
|
||||
/* Questions */
|
||||
#define IDS_OVERWRITEFILE_TEXT 9000
|
||||
#define IDS_PASSWORD_FILE_TEXT 9001
|
||||
#define IDS_PASSWORD_ZIP_TEXT 9002
|
||||
|
||||
|
||||
/* Context menu / ExplorerCommand strings */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS Zip Shell Extension
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: zip pidl handling
|
||||
* COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
|
||||
* COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -25,7 +25,7 @@ LPITEMIDLIST _ILCreate(ZipPidlType Type, LPCSTR lpString, unz_file_info64& info)
|
|||
pidl->CompressedSize = info.compressed_size;
|
||||
pidl->UncompressedSize = info.uncompressed_size;
|
||||
pidl->DosDate = info.dosDate;
|
||||
pidl->Password = info.flag & 1;
|
||||
pidl->Password = info.flag & MINIZIP_PASSWORD_FLAG;
|
||||
}
|
||||
|
||||
strcpy(pidl->Name, lpString);
|
||||
|
|
Loading…
Reference in a new issue