mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
- rename apps.xml to downloader.xml
- look first for the xml file in system32 then in current dir. svn path=/trunk/; revision=25262
This commit is contained in:
parent
3aa0dd271b
commit
4e8d28cf9f
4 changed files with 10 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
|
||||
<installfile base="system32">apps.xml</installfile>
|
||||
<installfile base="system32">downloader.xml</installfile>
|
||||
<module name="downloader" type="win32gui" installbase="system32" installname="downloader.exe">
|
||||
<include base="downloader">.</include>
|
||||
<include base="expat">.</include>
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include "resources.h"
|
||||
#include "structures.h"
|
||||
|
||||
#define XML_PATH "C:\\ReactOS\\system32\\downloader.xml"
|
||||
|
||||
HWND hCategories, hApps, hDownloadButton, hUpdateButton, hHelpButton;
|
||||
HBITMAP hLogo, hUnderline;
|
||||
WCHAR* DescriptionHeadline = L"";
|
||||
|
@ -97,7 +99,7 @@ BOOL SetupControls (HWND hwnd)
|
|||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||
|
||||
// Parse the XML file
|
||||
if (ProcessXML ("apps.xml", &Root) == FALSE)
|
||||
if (ProcessXML (XML_PATH, &Root) == FALSE)
|
||||
return FALSE;
|
||||
|
||||
// Set up the controls
|
||||
|
|
|
@ -156,10 +156,14 @@ BOOL ProcessXML (const char* filename, struct Category* Root)
|
|||
|
||||
FILE* file = fopen(filename, "r");
|
||||
if(!file)
|
||||
{
|
||||
file = fopen("downloader.xml", "r");
|
||||
if(!file)
|
||||
{
|
||||
MessageBoxW(0,Strings[IDS_XMLERROR_1],0,0);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
XML_SetElementHandler(parser, tag_opened, tag_closed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue