From 0b6d2a809bc57eb1073a5c85d76fcfa74a71e167 Mon Sep 17 00:00:00 2001 From: Maarten Bosma Date: Mon, 16 May 2005 10:53:46 +0000 Subject: [PATCH] PackageManager: German Translation and CreateOptions() svn path=/trunk/; revision=15332 --- rosapps/packmgr/cmd-line/options.xml | 3 --- rosapps/packmgr/gui/options.xml | 3 --- rosapps/packmgr/gui/res/blank.ico | Bin 11502 -> 3638 bytes rosapps/packmgr/lib/cz.rc | 2 ++ rosapps/packmgr/lib/en.rc | 2 ++ rosapps/packmgr/lib/es.rc | 2 ++ rosapps/packmgr/lib/log.cpp | 14 +++++++----- rosapps/packmgr/lib/options.cpp | 31 ++++++++++++++++++++++++--- rosapps/packmgr/lib/package.rc | 1 + 9 files changed, 44 insertions(+), 14 deletions(-) delete mode 100644 rosapps/packmgr/cmd-line/options.xml delete mode 100644 rosapps/packmgr/gui/options.xml 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 96c1bdd7ddc14117a37281700931847d017640b8..0d50a5c2a835426ce7ae6cb08e0daf1a29048815 100644 GIT binary patch literal 3638 zcmZQzU}Ruo5D;JhgA7&%1~ni{K>@;F!NI`L2Ncr)azRQ!!i)?+K_GBo1XCEq|Ns9n z#6|^1Ltr!nhJOe!j&J}f`mo_2_6!W@7@Im!IjaD~4nPbmXB$|694uh8oW&9-qe7!0 fFaknggcq|T&HKR0052dUk5}`k$A;0 zS;no2`FR8oKmY**5I_I{1Q4hy5c8B+B3PXNd5YHx%BcELybJ*Z5I_I{1Q0*~0R#|0 e009ILKmY**5I_I{1Q0*~fhq#AA25P*ZHEK;7MLogfile", 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"