[Wine-patches] etermsg: Add message about the licence file does not correspond with product type(eterbug #3914)

Konstantin Kondratyuk =?iso-8859-1?q?kondratyuk_=CE=C1_etersoft=2Eru?=
Ср Май 6 13:51:28 MSD 2009


-- 
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From 919357f95ee39c1bd7d0687def06cb41331023fa Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Wed, 6 May 2009 13:44:56 +0400
Subject: [PATCH] etermsg: Add message about the licence file does not correspond with product type(eterbug #3914)

---
 dlls/kernel32/process.c     |    8 ++++++--
 programs/etermsg/Ru.rc      |    3 ++-
 programs/etermsg/etermsg.c  |    8 ++++++++
 programs/etermsg/resource.h |    1 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index fb0ab00..7153df6 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1177,8 +1177,12 @@ void CDECL __wine_kernel_init(void)
             }
 
             LOADETER_FUNC(etersoft_valid_license)
-            if (!etersoft_valid_license() && !strlen(cmdline))
-                sprintf(cmdline, "etermsg -ld %s", etersoft_getlicense(ETERSOFT_LICENSE_END_DATE, 0));
+            if (!etersoft_valid_license() && !strlen(cmdline)) {
+                if (etersoft_license_status() == 5)
+                    sprintf(cmdline, "etermsg -le");
+                else
+                    sprintf(cmdline, "etermsg -ld %s", etersoft_getlicense(ETERSOFT_LICENSE_END_DATE, 0));
+            }
 
             ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &info);
             if (ret)
diff --git a/programs/etermsg/Ru.rc b/programs/etermsg/Ru.rc
index 9242924..a7ec99d 100644
--- a/programs/etermsg/Ru.rc
+++ b/programs/etermsg/Ru.rc
@@ -29,5 +29,6 @@ BEGIN
     IDS_FILE_CORRUPT    "???? ???????? ?????????"
     IDS_LICENSE_EXP     "???? ???????? ???????? ?????"
     IDS_ERROR_DIR       "Wine ??? ??????? ?? ??????????? ?????"
-    IDS_ERROR_APP      "?????????? ?????????? ?? ??????????"
+    IDS_ERROR_APP       "?????????? ?????????? ?? ??????????"
+    IDS_LICENSE_ACCORD  "???? ???????? ?? ????????????? ?????????????? ????????"
 END
diff --git a/programs/etermsg/etermsg.c b/programs/etermsg/etermsg.c
index f729b67..754049e 100644
--- a/programs/etermsg/etermsg.c
+++ b/programs/etermsg/etermsg.c
@@ -68,6 +68,14 @@ int main(int argc, char** argv)
         MessageBoxW(NULL, Text, Msg, MB_ICONWARNING | MB_OK);
         return 0;
     }
+    else if (argc && !strcmp(argv[0], "-le"))
+    {
+        ret = LoadStringW(GetModuleHandleW(NULL), IDS_LICENSE_ACCORD, Text, LOADSTRING_SIZE);
+        if (!ret) return 0;
+
+        MessageBoxW(NULL, Text, Msg, MB_ICONWARNING | MB_OK);
+        return 0;
+    }
     else if (argc && !strcmp(argv[0], "-ld"))
     {
         WCHAR date[ARG_SIZE];
diff --git a/programs/etermsg/resource.h b/programs/etermsg/resource.h
index 6a37488..bb7c63c 100644
--- a/programs/etermsg/resource.h
+++ b/programs/etermsg/resource.h
@@ -25,3 +25,4 @@
 #define IDS_LICENSE_EXP     5
 #define IDS_ERROR_DIR       6
 #define IDS_ERROR_APP       7
+#define IDS_LICENSE_ACCORD  8
-- 
1.6.1.3.GIT



Подробная информация о списке рассылки Wine-patches