mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 17:00:51 +08:00
PackageManager: Cmdline fix
svn path=/trunk/; revision=14580
This commit is contained in:
@@ -90,6 +90,25 @@ int Help (void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Ask (const WCHAR* question)
|
||||
{
|
||||
char answer[255];
|
||||
|
||||
wprintf(question);
|
||||
|
||||
cout << " [y/n] ";
|
||||
cin >> answer;
|
||||
cout << endl;
|
||||
|
||||
if (answer[0]=='y')
|
||||
return 1;
|
||||
|
||||
else if (answer[0]=='n')
|
||||
return 0;
|
||||
|
||||
return Ask(question);
|
||||
}
|
||||
|
||||
int SetStatus (int status1, int status2, WCHAR* text)
|
||||
{
|
||||
@@ -125,14 +144,14 @@ int Install (void)
|
||||
int id = PML_FindItem(tree, cmdline[i].c_str());
|
||||
|
||||
if(id)
|
||||
PML_SetAction(tree, id, 1, NULL);
|
||||
PML_SetAction(tree, id, 1, NULL, Ask);
|
||||
|
||||
else
|
||||
cout << "Could not find the Package \"" << cmdline[i] << "\"\n";
|
||||
}
|
||||
|
||||
// do it
|
||||
error = PML_DoIt (tree, SetStatus);
|
||||
error = PML_DoIt (tree, SetStatus, Ask);
|
||||
if(error)
|
||||
{
|
||||
wprintf(L"%s\n", PML_TransError(error));
|
||||
@@ -168,15 +187,12 @@ int Show (void)
|
||||
{
|
||||
int id = PML_FindItem(tree, cmdline[i].c_str());
|
||||
|
||||
cout << i << "<" << cmdline.size() << endl;
|
||||
|
||||
if(id)
|
||||
cout << PML_GetDescription (tree, id) << "\n";
|
||||
|
||||
else
|
||||
cout << "Could not find the Package \"" << cmdline[i] << "\"\n";
|
||||
}
|
||||
cout << i << "<" << cmdline.size() << endl;
|
||||
|
||||
// clean up
|
||||
PML_CloseTree (tree);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <wine/urlmon.h>
|
||||
|
||||
// Server there all the files lie
|
||||
const char* tree_server = "http://maarten-online.de/xml/";
|
||||
const char* tree_server = "http://svn.reactos.com/viewcvs/*checkout*/trunk/rosapps/packmgr/tree/";
|
||||
|
||||
HRESULT WINAPI URLDownloadToFileA(
|
||||
LPUNKNOWN pCaller,
|
||||
|
||||
@@ -99,7 +99,8 @@ void tree_start (void* usrdata, const char* tag, const char** arg)
|
||||
// do some manipulation at the parent
|
||||
else
|
||||
{
|
||||
tree->addItem(id, tree->packages[id].name, parents.back(), icon);
|
||||
if(tree->addItem)
|
||||
tree->addItem(id, tree->packages[id].name, parents.back(), icon);
|
||||
|
||||
// list as child in the parent node
|
||||
tree->packages[parents.back()].children.push_back(id);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<package>
|
||||
<name>MozillaControl</name>
|
||||
<description>Provide the Gekko Engine for ReactOS.</description>
|
||||
<scripts inst="mozillacontrol.inst.rps" srcinst="mozillacontrol.inst.rps"/>
|
||||
|
||||
<name>MozillaControl</name>
|
||||
<description>Provide the Gekko Engine for ReactOS.</description>
|
||||
<scripts inst="mozillacontrol.inst.rps" srcinst="mozillacontrol.inst.rps"/>
|
||||
<depent>abiword</depent>
|
||||
</package>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user