From 4cef94f6369b906a89ec27034f87886db60dced1 Mon Sep 17 00:00:00 2001 From: Maarten Bosma Date: Sat, 10 Feb 2007 21:48:44 +0000 Subject: [PATCH] New try: Lester Kortenhoeven (lester(at)kortenhoeven(dot)de): * Implement uninstall feature. Does not work under reactos yet, because it does not seem to store the installer information under the registry path windows stores them. * Show Version in the description. svn path=/trunk/; revision=25767 --- .../applications/downloader/downloader.rbuild | 3 +- .../applications/downloader/downloader.xml | 78 ++++++++- reactos/base/applications/downloader/main.c | 160 ++++++++++++++++-- .../base/applications/downloader/resources.h | 8 +- .../applications/downloader/resources/10.bmp | Bin 0 -> 824 bytes .../applications/downloader/resources/9.bmp | Bin 0 -> 824 bytes .../downloader/resources/uninstall.bmp | Bin 0 -> 13914 bytes reactos/base/applications/downloader/rsrc.rc | 4 +- .../base/applications/downloader/structures.h | 1 + .../downloader/translations/de.rc | 3 + .../downloader/translations/en.rc | 3 + .../downloader/translations/fr.rc | 3 + .../downloader/translations/it.rc | 3 + reactos/base/applications/downloader/xml.c | 29 +++- 14 files changed, 269 insertions(+), 26 deletions(-) create mode 100644 reactos/base/applications/downloader/resources/10.bmp create mode 100644 reactos/base/applications/downloader/resources/9.bmp create mode 100644 reactos/base/applications/downloader/resources/uninstall.bmp diff --git a/reactos/base/applications/downloader/downloader.rbuild b/reactos/base/applications/downloader/downloader.rbuild index 69ad4600b6a..bd276dabc9f 100644 --- a/reactos/base/applications/downloader/downloader.rbuild +++ b/reactos/base/applications/downloader/downloader.rbuild @@ -10,8 +10,9 @@ 0x0501 - + + Mozilla Firefox (1.5) + MPL/GPL/LGPL + 1.5.0.9 + The most popular and one of the best free WebBrowsers out there. + http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.9/win32/en-US/Firefox%20Setup%201.5.0.9.exe + + + Mozilla Firefox (2.0.0.1) + MPL/GPL/LGPL + 2.0.0.1 The most popular and one of the best free WebBrowsers out there. http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/latest/win32/en-US/Firefox%20Setup%202.0.0.1.exe + Mozilla Thunderbird (1.5) + MPL/GPL/LGPL + 1.5.0.9 The most popular and one of the best free MailClients out there. http://ftp-mozilla.netscape.com/pub/mozilla.org/thunderbird/releases/latest/win32/en-US/Thunderbird%20Setup%201.5.0.9.exe + SeaMonkey (1.0.7) + 1.0.7 Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, Composer bundle you will ever need. http://ftp-mozilla.netscape.com/pub/mozilla.org/seamonkey/releases/1.0.7/seamonkey-1.0.7.en-US.win32.installer.exe + + Mozilla ActiveX Control v1.7.12 (ReactOS special) + 1.7.12 + Essential Component to get ReactOS Explorer's and other application's Internet Browsing feature running. + http://ovh.dl.sourceforge.net/sourceforge/reactos/MozillaControl1712-ReactOS.exe + + + The Off By One Web Browser + The Off By One Browser is a very small and fast web browser with full HTML 3.2 support. + http://offbyone.com/offbyone/images/OffByOneSetup.exe + This tool allows you to access your Windows shared folders/printers with ReactOS. http://svn.reactos.org/packages/samba-tng.exe - - Essential Component to get ReactOS Explorer's and other application's Internet Browsing feature running. - http://ovh.dl.sourceforge.net/sourceforge/reactos/MozillaControl1712-ReactOS.exe - + Miranda IM + 0.5.1 Open source multiprotocol instant messaging application - May not work completely. http://ovh.dl.sourceforge.net/sourceforge/miranda/miranda-im-v0.5.1-unicode.exe + PuTTY version 0.59 + MIT + 0.59 A free SSH, Telnet, rlogin, and raw TCP client. - http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.58-installer.exe + http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.59-installer.exe + "AbiWord 2.4.1 (remove only)" + 2.4.1 Word processor. http://www.abiword.org/downloads/abiword/2.4.1/Windows/abiword-setup-2.4.1.exe + OpenOffice.org 2.1 + 2.1.0 THE Open Source Office Suite. http://ftp.tu-chemnitz.de/pub/openoffice-extended//stable/2.1.0/OOo_2.1.0_Win32Intel_install_en-US.exe + IrfanView (remove only) + 3.99 Viewer for all kinds of graphics/audio files/video files. http://gd.tuwien.ac.at/graphics/irfanview/iview399.exe + 3.99 Additional Plugins for supporting more file types. http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_399.exe + Tux Paint 0.9.16 + 0.9.16 An open source bitmap graphics editor geared towards young children. http://ovh.dl.sourceforge.net/sourceforge/tuxpaint/tuxpaint-0.9.16-win32-installer.exe @@ -57,12 +93,16 @@ + ReactOS Build Environment 0.3.4 + 0.3.4 Allows you to build the ReactOS Source. For more instructions see ReactOS wiki. - http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-0.3.3.exe + http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-0.3.4.exe + ScummVM 0.9.1 + 0.9.1 SamNMax, Day of Tentacle, etc on ReactOS http://ovh.dl.sourceforge.net/sourceforge/scummvm/scummvm-0.9.1-win32.exe @@ -70,17 +110,41 @@ Nice Clone of Chip's Challenge originally made for the Atari Lynx. Includes free CCLP2 Graphics Pack, so you dont need the copyrighted Original. http://www.muppetlabs.com/~breadbox/pub/software/tworld/tworld-1.3.0-win32-CCLP2.exe + LBreakout2 2.4.1 + LBreakout2 2.4.1 + 2.4.1 + Breakout Clone using SDL libs. + http://switch.dl.sourceforge.net/sourceforge/lgames/lbreakout2-2.4.1-win32.exe + + + LGeneral 1.1 + 1.1 + Panzer General Clone using SDL libs. + http://kent.dl.sourceforge.net/sourceforge/lgames/lgeneral-1.1-win32.exe + + + LMarbles 1.0.6 + 1.0.6 + Atomix Clone using SDL libs. + http://heanet.dl.sourceforge.net/sourceforge/lgames/lmarbles-1.0.6-win32.exe + + 7-Zip 4.42 + 4.42 Utility to create and open 7zip, zip, tar, rar and other archive files. http://ovh.dl.sourceforge.net/sourceforge/sevenzip/7z442.exe + µTorrent + 1.6 Small and fast Torrent Client. http://download.utorrent.com/1.6/uTorrent-1.6-install.exe + Audiograbber 1.83 SE + 1.83 SE A very good CD Ripper/Audio File Converter. http://www.audiograbber.de/files/342677432/agsetup183se.exe diff --git a/reactos/base/applications/downloader/main.c b/reactos/base/applications/downloader/main.c index 066ae14fa8b..f53eca5a669 100644 --- a/reactos/base/applications/downloader/main.c +++ b/reactos/base/applications/downloader/main.c @@ -2,19 +2,20 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: base/applications/downloader/xml.c * PURPOSE: Main program - * PROGRAMMERS: Maarten Bosma + * PROGRAMMERS: Maarten Bosma, Lester Kortenhoeven */ #include #include #include #include +#include #include "resources.h" #include "structures.h" #define XML_PATH "C:\\ReactOS\\system32\\downloader.xml" -HWND hCategories, hApps, hDownloadButton, hUpdateButton, hHelpButton; +HWND hwnd, hCategories, hApps, hDownloadButton, hUninstallButton, hUpdateButton, hHelpButton; HBITMAP hLogo, hUnderline; WCHAR* DescriptionHeadline = L""; WCHAR* DescriptionText = L""; @@ -27,13 +28,49 @@ BOOL ProcessXML (const char* filename, struct Category* Root); VOID FreeTree (struct Category* Node); WCHAR Strings [STRING_COUNT][MAX_STRING_LENGHT]; +BOOL getUninstaller(WCHAR* RegName, WCHAR* Uninstaller) { + + const DWORD ArraySize = 200; + + HKEY hKey1; + HKEY hKey2; + DWORD Type = 0; + DWORD Size = ArraySize; + WCHAR Value[ArraySize]; + WCHAR KeyName[ArraySize]; + LONG i = 0; + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall",0,KEY_READ,&hKey1) == ERROR_SUCCESS) { + while (RegEnumKeyExW(hKey1,i,KeyName,&Size,NULL,NULL,NULL,NULL) == ERROR_SUCCESS) { + ++i; + RegOpenKeyExW(hKey1,KeyName,0,KEY_READ,&hKey2); + Size = ArraySize; + if (RegQueryValueExW(hKey2,L"DisplayName",0,&Type,(LPBYTE)Value,&Size) == ERROR_SUCCESS) { + Size = ArraySize; + if (StrCmpW(Value,RegName) == 0) { + if (RegQueryValueExW(hKey2,L"UninstallString",0,&Type,(LPBYTE)Uninstaller,&Size) == ERROR_SUCCESS) { + RegCloseKey(hKey2); + RegCloseKey(hKey1); + return TRUE; + } else { + RegCloseKey(hKey2); + RegCloseKey(hKey1); + return FALSE; + } + } + } + RegCloseKey(hKey2); + Size = ArraySize; + } + RegCloseKey(hKey1); + } + return FALSE; +} + void ShowMessage (WCHAR* title, WCHAR* message) { - HWND hwnd; DescriptionHeadline = title; DescriptionText = message; - - hwnd = GetParent(hCategories); InvalidateRect(hwnd,NULL,TRUE); UpdateWindow(hwnd); } @@ -81,15 +118,23 @@ void CategoryChoosen (HWND hwnd, struct Category* Category) Insert.item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_IMAGE; Insert.hInsertAfter = TVI_LAST; Insert.hParent = TVI_ROOT; - Insert.item.iImage = 0; CurrentApplication = Category->Apps; + WCHAR Uninstaller[200]; while(CurrentApplication) { Insert.item.lParam = (UINT)CurrentApplication; Insert.item.pszText = CurrentApplication->Name; - Insert.item.cchTextMax = lstrlenW(CurrentApplication->Name); + Insert.item.cchTextMax = lstrlenW(CurrentApplication->Name); + Insert.item.iImage = 10; + if(StrCmpW(CurrentApplication->RegName,L"")) { + if(getUninstaller(CurrentApplication->RegName, Uninstaller)) + Insert.item.iImage = 9; + } else { + if(getUninstaller(CurrentApplication->Name, Uninstaller)) + Insert.item.iImage = 9; + } SendMessage(hwnd, TVM_INSERTITEM, 0, (LPARAM)&Insert); CurrentApplication = CurrentApplication->Next; } @@ -118,10 +163,13 @@ BOOL SetupControls (HWND hwnd) hHelpButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 550, 10, 40, 40, hwnd, 0, hInstance, NULL); hUpdateButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 500, 10, 40, 40, hwnd, 0, hInstance, NULL); hDownloadButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 330, 505, 140, 33, hwnd, 0, hInstance, NULL); + hUninstallButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 260, 505, 140, 33, hwnd, 0, hInstance, NULL); SendMessageW(hHelpButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_HELP))); SendMessageW(hUpdateButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UPDATE))); SendMessageW(hDownloadButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_DOWNLOAD))); + SendMessageW(hUninstallButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UNINSTALL))); + ShowWindow(hUninstallButton, SW_HIDE); // Set deflaut entry for hApps Insert.item.mask = TVIF_TEXT|TVIF_IMAGE; @@ -143,7 +191,9 @@ BOOL SetupControls (HWND hwnd) ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_5)), NULL); ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_6)), NULL); ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_7)), NULL); - ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_8)), NULL); + ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_8)), NULL); + ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_9)), NULL); + ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_10)), NULL); // Fill the TreeViews AddItems (hCategories, Root.Children, NULL); @@ -200,6 +250,37 @@ static void DrawDescription (HDC hdc, RECT DescriptionRect) } +void showUninstaller() { + int Split_Vertical = 200; + RECT Rect; + + GetClientRect(hwnd,&Rect); + ShowWindow(hUninstallButton,SW_SHOW); + MoveWindow(hDownloadButton,(Split_Vertical+Rect.right-Rect.left)/2,Rect.bottom-Rect.top-45,140,35,TRUE);; +} + +void hideUninstaller() { + int Split_Vertical = 200; + RECT Rect; + + GetClientRect(hwnd,&Rect); + ShowWindow(hUninstallButton,SW_HIDE); + MoveWindow(hDownloadButton,(Split_Vertical+Rect.right-Rect.left)/2-70,Rect.bottom-Rect.top-45,140,35,TRUE); +} + +void startUninstaller(WCHAR* Uninstaller) { + STARTUPINFOW si; + PROCESS_INFORMATION pi; + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + CreateProcessW(NULL,Uninstaller,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); + CloseHandle(pi.hThread); + // WaitForSingleObject(pi.hProcess, INFINITE); // If you want to wait for the Unistaller + CloseHandle(pi.hProcess); + hideUninstaller(); +} + LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { static RECT DescriptionRect; @@ -244,6 +325,20 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) else ShowMessage(Strings[IDS_NO_APP_TITLE], Strings[IDS_NO_APP]); } + else if (lParam == (LPARAM)hUninstallButton) + { + if(SelectedApplication) + { + WCHAR Uninstaller[200]; + if(StrCmpW(SelectedApplication->RegName, L"")) { + if(getUninstaller(SelectedApplication->RegName, Uninstaller)) + startUninstaller(Uninstaller); + } else { + if(getUninstaller(SelectedApplication->Name, Uninstaller)) + startUninstaller(Uninstaller); + } + } + } else if (lParam == (LPARAM)hUpdateButton) { ShowMessage(Strings[IDS_UPDATE_TITLE], Strings[IDS_UPDATE]); @@ -261,6 +356,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) LPNMHDR data = (LPNMHDR)lParam; if(data->code == TVN_SELCHANGED) { + BOOL bShowUninstaller = FALSE; if(data->hwndFrom == hCategories) { struct Category* Category = (struct Category*) ((LPNMTREEVIEW)lParam)->itemNew.lParam; @@ -270,8 +366,43 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { SelectedApplication = (struct Application*) ((LPNMTREEVIEW)lParam)->itemNew.lParam; if(SelectedApplication) - ShowMessage(SelectedApplication->Name, SelectedApplication->Description); + { + DescriptionText = calloc(700,sizeof(WCHAR)); + if(StrCmpW(SelectedApplication->Version, L"")) { + StrCatW(DescriptionText, Strings[IDS_VERSION]); + StrCatW(DescriptionText, SelectedApplication->Version); + StrCatW(DescriptionText, L"\n"); + } + if(StrCmpW(SelectedApplication->Licence, L"")) { + StrCatW(DescriptionText, Strings[IDS_LICENCE]); + StrCatW(DescriptionText, SelectedApplication->Licence); + StrCatW(DescriptionText, L"\n"); + } + if(StrCmpW(SelectedApplication->Maintainer, L"")) { + StrCatW(DescriptionText, Strings[IDS_MAINTAINER]); + StrCatW(DescriptionText, SelectedApplication->Maintainer); + StrCatW(DescriptionText, L"\n"); + } + if(StrCmpW(SelectedApplication->Licence, L"") || StrCmpW(SelectedApplication->Version, L"") || StrCmpW(SelectedApplication->Maintainer, L"")) + StrCatW(DescriptionText, L"\n"); + StrCatW(DescriptionText, SelectedApplication->Description); + ShowMessage(SelectedApplication->Name, DescriptionText); + WCHAR Uninstaller[200]; + if(StrCmpW(SelectedApplication->RegName, L"")) { + if(getUninstaller(SelectedApplication->RegName, Uninstaller)) { + bShowUninstaller = TRUE; + } + } else { + if(getUninstaller(SelectedApplication->Name, Uninstaller)) { + bShowUninstaller = TRUE; + } + } + } } + if (bShowUninstaller) + showUninstaller(); + else + hideUninstaller(); } } break; @@ -279,8 +410,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) case WM_SIZING: { LPRECT pRect = (LPRECT)lParam; - if (pRect->right-pRect->left < 400) - pRect->right = pRect->left + 400; + if (pRect->right-pRect->left < 520) + pRect->right = pRect->left + 520; if (pRect->bottom-pRect->top < 300) pRect->bottom = pRect->top + 300; @@ -299,7 +430,11 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) MoveWindow(hHelpButton, LOWORD(lParam)-50, 10, 40, 40, TRUE); MoveWindow(hUpdateButton, LOWORD(lParam)-100, 10, 40, 40, TRUE); - MoveWindow(hDownloadButton, (Split_Vertical+LOWORD(lParam))/2-70, HIWORD(lParam)-45, 140, 35, TRUE); + if(IsWindowVisible(hUninstallButton)) + MoveWindow(hDownloadButton, (Split_Vertical+LOWORD(lParam))/2, HIWORD(lParam)-45, 140, 35, TRUE); + else + MoveWindow(hDownloadButton, (Split_Vertical+LOWORD(lParam))/2-70, HIWORD(lParam)-45, 140, 35, TRUE); + MoveWindow(hUninstallButton, (Split_Vertical+LOWORD(lParam))/2-140, HIWORD(lParam)-45, 140, 35, TRUE); } break; @@ -320,7 +455,6 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) INT WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, INT nCmdShow) { - HWND hwnd; int i; WNDCLASSEXW WndClass = {0}; MSG msg; diff --git a/reactos/base/applications/downloader/resources.h b/reactos/base/applications/downloader/resources.h index e06ded18a17..e3918f667bf 100644 --- a/reactos/base/applications/downloader/resources.h +++ b/reactos/base/applications/downloader/resources.h @@ -5,6 +5,7 @@ #define IDB_HELP 0x102 #define IDB_UPDATE 0x103 #define IDB_DOWNLOAD 0x104 +#define IDB_UNINSTALL 0x105 #define IDB_TREEVIEW_ICON_0 0x900 #define IDB_TREEVIEW_ICON_1 0x901 #define IDB_TREEVIEW_ICON_2 0x902 @@ -14,6 +15,8 @@ #define IDB_TREEVIEW_ICON_6 0x906 #define IDB_TREEVIEW_ICON_7 0x907 #define IDB_TREEVIEW_ICON_8 0x908 +#define IDB_TREEVIEW_ICON_9 0x909 +#define IDB_TREEVIEW_ICON_10 0x910 #define IDD_DOWNLOAD 0x100 #define IDC_PROGRESS 0x1000 #define IDC_STATUS 0x1001 @@ -36,6 +39,9 @@ #define IDS_XMLERROR_1 14 #define IDS_XMLERROR_2 15 #define IDS_DOWNLOAD_ERROR 16 +#define IDS_VERSION 17 +#define IDS_LICENCE 18 +#define IDS_MAINTAINER 19 -#define STRING_COUNT 17 +#define STRING_COUNT 20 #define MAX_STRING_LENGHT 0x100 diff --git a/reactos/base/applications/downloader/resources/10.bmp b/reactos/base/applications/downloader/resources/10.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d0825e8fb7960913de3052c6650fc4bca54283e0 GIT binary patch literal 824 zcmbu6v1)@*7=>*+7drM4@&u)G_dZ9TK|&IO=&X_@QN$%78In=V5|XHmrC^kxi$)}a znF4tLp*`GNMA|f=^oM)7T)%Vv|6HG*A8!~^57=v1cVFv@xhMD6_#WNTMJ}*?{JVC$ z-3zJX@p#b;4A>+|w%aWZXCy^YW>$*QB6b{1>Sg+U9b=@@0)oS%h%5fZ;1@A!Pqay)BL)o@%Sr*2ll9ET?X0zFDw=v9YHtYBMC7;n{8fMX literal 0 HcmV?d00001 diff --git a/reactos/base/applications/downloader/resources/9.bmp b/reactos/base/applications/downloader/resources/9.bmp new file mode 100644 index 0000000000000000000000000000000000000000..1e28d936e2bd036696932e328b6b9954aa2f5a4e GIT binary patch literal 824 zcmbtQ&nts*82_@819Ef~N*XCm?+z}zVMGp+QC!u^a-cZSSZiZjb9iHG^KKzO=AuTE z8Z$1;i3hq2mUx#6f7(7Mv=PU zD)bH_xWNo6Bs5sDAfsapy>@sa{J0}bi7?@Etw4$yXbE~jUV0fBuMMkL3 z%gE)u3%q!6-v(Io2W!FTEZPQ9Zh~ZkZ3Y7l#18pBXPLr2^br<(3aPxAZLqsgC2>V& ze5aKN{P6e<7M-B@6*Tpsf0Dqj%=qFC>w~qFM2h>R;k3N&WUZ1=IXcI7@^`RS<%dD- J%s=&veF7ImWL^LO literal 0 HcmV?d00001 diff --git a/reactos/base/applications/downloader/resources/uninstall.bmp b/reactos/base/applications/downloader/resources/uninstall.bmp new file mode 100644 index 0000000000000000000000000000000000000000..077cac9d4ae063a9fbe9f191fb2c76705cc746f6 GIT binary patch literal 13914 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 literal 0 HcmV?d00001 diff --git a/reactos/base/applications/downloader/rsrc.rc b/reactos/base/applications/downloader/rsrc.rc index 79a36ef60fb..ee4a532873d 100644 --- a/reactos/base/applications/downloader/rsrc.rc +++ b/reactos/base/applications/downloader/rsrc.rc @@ -1,11 +1,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_MAIN ICON DISCARDABLE "resources/main.ico" -//IDB_UNDERLINE BITMAP DISCARDABLE "resources/underline.bmp" IDB_LOGO BITMAP DISCARDABLE "resources/logo.bmp" IDB_HELP BITMAP DISCARDABLE "resources/help.bmp" IDB_UPDATE BITMAP DISCARDABLE "resources/update.bmp" IDB_DOWNLOAD BITMAP DISCARDABLE "resources/download.bmp" +IDB_UNINSTALL BITMAP DISCARDABLE "resources/uninstall.bmp" IDB_UNDERLINE BITMAP DISCARDABLE "resources/underline.bmp" IDB_TREEVIEW_ICON_0 BITMAP DISCARDABLE "resources/0.bmp" IDB_TREEVIEW_ICON_1 BITMAP DISCARDABLE "resources/1.bmp" @@ -16,6 +16,8 @@ IDB_TREEVIEW_ICON_5 BITMAP DISCARDABLE "resources/5.bmp" IDB_TREEVIEW_ICON_6 BITMAP DISCARDABLE "resources/6.bmp" IDB_TREEVIEW_ICON_7 BITMAP DISCARDABLE "resources/7.bmp" IDB_TREEVIEW_ICON_8 BITMAP DISCARDABLE "resources/8.bmp" +IDB_TREEVIEW_ICON_9 BITMAP DISCARDABLE "resources/9.bmp" +IDB_TREEVIEW_ICON_10 BITMAP DISCARDABLE "resources/10.bmp" #include "translations/de.rc" diff --git a/reactos/base/applications/downloader/structures.h b/reactos/base/applications/downloader/structures.h index d0c9096c55e..3044ce58506 100644 --- a/reactos/base/applications/downloader/structures.h +++ b/reactos/base/applications/downloader/structures.h @@ -2,6 +2,7 @@ struct Application { WCHAR Name[0x100]; + WCHAR RegName[0x100]; WCHAR Version[0x100]; WCHAR Maintainer[0x100]; WCHAR Licence[0x100]; diff --git a/reactos/base/applications/downloader/translations/de.rc b/reactos/base/applications/downloader/translations/de.rc index f95ee9f664d..01e01a89a4c 100644 --- a/reactos/base/applications/downloader/translations/de.rc +++ b/reactos/base/applications/downloader/translations/de.rc @@ -29,4 +29,7 @@ BEGIN IDS_XMLERROR_1 "XML Datei nicht gefunden!" IDS_XMLERROR_2 "XML Datei kann nicht verarbeitet werden!" IDS_DOWNLOAD_ERROR "Die Datei konnte nicht runtergeladen werden.\nBitte prüfen sie, ob eine Verbindung zum Internet besteht." + IDS_VERSION "Version: " + IDS_LICENCE "Lizenz: " + IDS_MAINTAINER "Maintainer: " END diff --git a/reactos/base/applications/downloader/translations/en.rc b/reactos/base/applications/downloader/translations/en.rc index c216fb9b4c5..c54fe275daa 100644 --- a/reactos/base/applications/downloader/translations/en.rc +++ b/reactos/base/applications/downloader/translations/en.rc @@ -29,4 +29,7 @@ BEGIN IDS_XMLERROR_1 "Could not find the xml file !" IDS_XMLERROR_2 "Could not parse the xml file !" IDS_DOWNLOAD_ERROR "Unable to download the file.\nPlease check you internet connection." + IDS_VERSION "Version: " + IDS_LICENCE "Licence: " + IDS_MAINTAINER "Maintainer: " END diff --git a/reactos/base/applications/downloader/translations/fr.rc b/reactos/base/applications/downloader/translations/fr.rc index a71295cd7d2..a75b97e2acd 100644 --- a/reactos/base/applications/downloader/translations/fr.rc +++ b/reactos/base/applications/downloader/translations/fr.rc @@ -29,4 +29,7 @@ BEGIN IDS_XMLERROR_1 "Impossible de trouver le fichier xml !" IDS_XMLERROR_2 "Impossible d'analyser le fichier xml !" IDS_DOWNLOAD_ERROR "Impossible de télécharger le fichier.\nVeuillez vérifier votre connexion Internet." + IDS_VERSION "Version: " + IDS_LICENCE "Licence: " + IDS_MAINTAINER "Maintainer: " END diff --git a/reactos/base/applications/downloader/translations/it.rc b/reactos/base/applications/downloader/translations/it.rc index 58f6d7422cb..bd3c2a6ad66 100644 --- a/reactos/base/applications/downloader/translations/it.rc +++ b/reactos/base/applications/downloader/translations/it.rc @@ -29,4 +29,7 @@ BEGIN IDS_XMLERROR_1 "File xml non trovato !" IDS_XMLERROR_2 "Impossibile trattare il contenuto del file xml !" IDS_DOWNLOAD_ERROR "Download del file impossibile.\nVerifica la connessione a Internet." + IDS_VERSION "Version: " + IDS_LICENCE "Licence: " + IDS_MAINTAINER "Maintainer: " END diff --git a/reactos/base/applications/downloader/xml.c b/reactos/base/applications/downloader/xml.c index b2129fc46f8..edf21468b06 100644 --- a/reactos/base/applications/downloader/xml.c +++ b/reactos/base/applications/downloader/xml.c @@ -2,7 +2,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: base\applications\downloader\xml.c * PURPOSE: Parsing of application information xml files - * PROGRAMMERS: Maarten Bosma + * PROGRAMMERS: Maarten Bosma, Lester Kortenhoeven */ #include @@ -81,6 +81,15 @@ void tag_opened (void* usrdata, const char* tag, const char** arg) CurrentApplication = Current->Apps; } + int currentlengt = lstrlenW(CurrentApplication->Maintainer); + MultiByteToWideChar(CP_ACP, 0, 0, 0, &CurrentApplication->Maintainer[currentlengt], 0x100-currentlengt); + currentlengt = lstrlenW(CurrentApplication->RegName); + MultiByteToWideChar(CP_ACP, 0, 0, 0, &CurrentApplication->RegName[currentlengt], 0x100-currentlengt); + currentlengt = lstrlenW(CurrentApplication->Version); + MultiByteToWideChar(CP_ACP, 0, 0, 0, &CurrentApplication->Version[currentlengt], 0x100-currentlengt); + currentlengt = lstrlenW(CurrentApplication->Licence); + MultiByteToWideChar(CP_ACP, 0, 0, 0, &CurrentApplication->Licence[currentlengt], 0x100-currentlengt); + for (i=0; arg[i]; i+=2) { if(!strcmp(arg[i], "name")) @@ -103,12 +112,16 @@ void text (void* usrdata, const char* data, int len) if (!CurrentApplication) return; - // FIXME: handle newlines e.g. in Description if(!strcmp(CurrentTag, "maintainer")) { - int currentlengt = lstrlenW(CurrentApplication->Location); + int currentlengt = lstrlenW(CurrentApplication->Maintainer); MultiByteToWideChar(CP_ACP, 0, data, len, &CurrentApplication->Maintainer[currentlengt], 0x100-currentlengt); } + else if(!strcmp(CurrentTag, "regname")) + { + int currentlengt = lstrlenW(CurrentApplication->RegName); + MultiByteToWideChar(CP_ACP, 0, data, len, &CurrentApplication->RegName[currentlengt], 0x100-currentlengt); + } else if(!strcmp(CurrentTag, "description")) { int currentlengt = lstrlenW(CurrentApplication->Description); @@ -119,6 +132,16 @@ void text (void* usrdata, const char* data, int len) int currentlengt = lstrlenW(CurrentApplication->Location); MultiByteToWideChar(CP_ACP, 0, data, len, &CurrentApplication->Location[currentlengt], 0x100-currentlengt); } + else if(!strcmp(CurrentTag, "version")) + { + int currentlengt = lstrlenW(CurrentApplication->Version); + MultiByteToWideChar(CP_ACP, 0, data, len, &CurrentApplication->Version[currentlengt], 0x400-currentlengt); + } + else if(!strcmp(CurrentTag, "licence")) + { + int currentlengt = lstrlenW(CurrentApplication->Licence); + MultiByteToWideChar(CP_ACP, 0, data, len, &CurrentApplication->Licence[currentlengt], 0x100-currentlengt); + } } void tag_closed (void* tree, const char* tag)