diff --git a/rosapps/packmgr/cmd-line/options.xml b/rosapps/packmgr/cmd-line/options.xml deleted file mode 100644 index 4ab54ba090c..00000000000 --- a/rosapps/packmgr/cmd-line/options.xml +++ /dev/null @@ -1,3 +0,0 @@ - - http://svn.reactos.com/viewcvs/*checkout*/trunk/rosapps/packmgr/tree/ - \ No newline at end of file diff --git a/rosapps/packmgr/gui/options.xml b/rosapps/packmgr/gui/options.xml deleted file mode 100644 index 4ab54ba090c..00000000000 --- a/rosapps/packmgr/gui/options.xml +++ /dev/null @@ -1,3 +0,0 @@ - - http://svn.reactos.com/viewcvs/*checkout*/trunk/rosapps/packmgr/tree/ - \ No newline at end of file diff --git a/rosapps/packmgr/gui/res/blank.ico b/rosapps/packmgr/gui/res/blank.ico index 96c1bdd7ddc..0d50a5c2a83 100644 Binary files a/rosapps/packmgr/gui/res/blank.ico and b/rosapps/packmgr/gui/res/blank.ico differ diff --git a/rosapps/packmgr/lib/cz.rc b/rosapps/packmgr/lib/cz.rc index 53987e65b75..2f27e92f1bf 100644 --- a/rosapps/packmgr/lib/cz.rc +++ b/rosapps/packmgr/lib/cz.rc @@ -20,4 +20,6 @@ BEGIN ERR_READY "Zvolili jste si instalaci %d balíčkú. Aby jste je nainstalovali je třeba abyste přečetli a souhlasili s jejich licencemi. \n\nChcete nadále pokračovat ?" END +123 RCDATA "options.xml" + /* EOF */ diff --git a/rosapps/packmgr/lib/en.rc b/rosapps/packmgr/lib/en.rc index 0eb49624c0c..3b63408fbc0 100644 --- a/rosapps/packmgr/lib/en.rc +++ b/rosapps/packmgr/lib/en.rc @@ -20,4 +20,6 @@ BEGIN ERR_READY "You choosen to install %d package(s). To install them you have to read and agree with each of thier licences. \n\nDo you want still want to ?" END +123 RCDATA "options.xml" + /* EOF */ diff --git a/rosapps/packmgr/lib/es.rc b/rosapps/packmgr/lib/es.rc index cdb0e0cccc8..bc07e60db88 100644 --- a/rosapps/packmgr/lib/es.rc +++ b/rosapps/packmgr/lib/es.rc @@ -20,4 +20,6 @@ BEGIN ERR_READY "You choosen to install %d package(s). To install them you have to read and agree with each of thier licences.\n\n Do you want still want to ?" END +123 RCDATA "options.xml" + /* EOF */ diff --git a/rosapps/packmgr/lib/log.cpp b/rosapps/packmgr/lib/log.cpp index a60d9baf2c6..06f608bff2b 100644 --- a/rosapps/packmgr/lib/log.cpp +++ b/rosapps/packmgr/lib/log.cpp @@ -34,7 +34,7 @@ void Log (const char *message) LogCreated = true; //HTML Header - fputs("Logfile", file); + fputs("Logfile\n", file); // date and time time_t now; @@ -53,15 +53,19 @@ void Log (const char *message) KERNEL_VERSION_MINOR, KERNEL_VERSION_PATCH_LEVEL); - fputs("

ReactOS Package Manager - Log File


\n", file); - fputs("WARNING: This is still pre-alpha software.
\n", file); + // write the head + fputs("

ReactOS Package Manager - Log File

\n", file); + //fputs("WARNING: This is still pre-alpha software.
\n", file); fputs("Date: ", file); fputs(GTime, file); fputs("
\n", file); + fputs("Version: ", file); fputs(version, file); fputs("
\n", file); + + fputs("OS: ", file); fputs(versionos, file); fputs("
\n", file); } @@ -84,11 +88,11 @@ void Log (const char *message) time_t now; now = time(NULL); - strftime(GTime,sizeof GTime,"%I:%M:%S %p ",localtime(&now)); + strftime(GTime,sizeof GTime,"%I:%M:%S %p",localtime(&now)); fputs("", file); fputs(GTime, file); - fputs("", file); + fputs(" ", file); fputs(message, file); fclose(file); diff --git a/rosapps/packmgr/lib/options.cpp b/rosapps/packmgr/lib/options.cpp index c6160b01bbc..a437511e39c 100644 --- a/rosapps/packmgr/lib/options.cpp +++ b/rosapps/packmgr/lib/options.cpp @@ -14,6 +14,8 @@ #include "log.h" #include "expat.h" +#include + int PML_XmlDownload (pTree tree, const char* url, void* usrdata, XML_StartElementHandler start, XML_EndElementHandler end, XML_CharacterDataHandler text) ; @@ -53,13 +55,36 @@ void opt_text (void* usrdata, const char* data, int len) } + // ! ! ! F I X M E ! ! ! // +/* int CreateOptions (TREE* tree) { -// string source; + ofstream file ("options.xml"); -// ifstream file ("help.txt", ios_base::in); - Log("* Creating options,xml"); + Log("* Creating options.xml from Resources"); + HRSRC hres = FindResource(GetModuleHandle(L"package"), MAKEINTRESOURCE(123), RT_RCDATA); + if (!hres) + { + Log("! ERROR: Could not load it !"); + return ERR_GENERIC; + } + + MessageBox(0,(WCHAR*)LockResource(LoadResource(NULL, hres)), 0, 0); // is empty + //file << (WCHAR*)LockResource(LoadResource(NULL, hres)); + + return ERR_OK; +} +*/ + +char* PML_Download (pTree, const char* url, const char* server, const char* filename); + +int CreateOptions (TREE* tree) +{ + Log("* Load options.xml from the Internet (Temporary Hack)"); + + CopyFileA( PML_Download(tree, "http://svn.reactos.com/viewcvs/*checkout*/trunk/rosapps/packmgr/gui/options.xml", NULL, "options.xml"), "options.xml", TRUE); + return ERR_OK; } diff --git a/rosapps/packmgr/lib/package.rc b/rosapps/packmgr/lib/package.rc index 0963a164f6d..b4f03d811ee 100644 --- a/rosapps/packmgr/lib/package.rc +++ b/rosapps/packmgr/lib/package.rc @@ -11,6 +11,7 @@ /* Language specific */ #include "en.rc" +#include "de.rc" #include "cz.rc" #include "es.rc"