diff options
Diffstat (limited to 'plugins/PluginLoader')
34 files changed, 1141 insertions, 0 deletions
diff --git a/plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h b/plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h new file mode 100644 index 0000000..f9b5349 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_PLUGIN_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_PLUGIN_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins/PluginLoader/catchcopy-v0002/Environment.h b/plugins/PluginLoader/catchcopy-v0002/Environment.h new file mode 100644 index 0000000..265a5a6 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Environment.h @@ -0,0 +1,10 @@ +/** \file Environment.h
+\brief Define the environment variable and global function
+\author alpha_one_x86
+\licence GPL3, see the file COPYING */
+
+#include "Variable.h"
+/// \brief The global include
+#include "StructEnumDefinition.h"
+#include "DebugEngineMacro.h"
+
diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/ar/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts new file mode 100644 index 0000000..dd3552b --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/de/translation.ts @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="de" sourcelanguage="en"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation>Im Normalfall ist für 32 oder 64-Bit-Beriebsysteme nur die jeweilige dll wichtig. Die UAC kann geöffnet werden um die dll zu laden.</translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translatorcomment>fix english</translatorcomment> + <translation>Alle DLLs sind wichtig (32Bit + 64Bit)</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/el/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts new file mode 100644 index 0000000..e4aa3ce --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/en/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="en"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts new file mode 100644 index 0000000..577444d --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/es/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="es" sourcelanguage="en"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation>Todas las dlls son importantes</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts new file mode 100644 index 0000000..809ffee --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/fr/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="fr" sourcelanguage="en"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation>Dans la plupart des cas, seule la DLL 64 bits est importante pour un OS 64 bits, et la DLL 32 bits pour un OS 32 bits. Lorsqu'elle est importante,le chargement d'une DLL peut nécessiter une confirmation (UAC).</translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation>Toutes les dlls sont importantes</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/hi/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts new file mode 100644 index 0000000..30fce33 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/hu/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="hu"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation>Normális esetben csak a 64 bites dll fontos a 64 bites és a 32 bites dll a 32 bites operációs rendszer számára.Amikor lényeges, az UAC megnyitható a dll betöltéséhez.</translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation>Az összes dll fontos</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/id/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts new file mode 100644 index 0000000..ba6fb10 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/it/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="it_IT"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation>Solitamente, la dll 64Bit è indispensabile solo per sistemi operativi a 64Bit, e la dll 32Bit per sistemi operativi a 32Bits. Quando è necessario, l' UAC (il controllo dell'account utente) può essere aperto per caricare la dll.</translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation>Tutte le dll sono necessarie</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/ja/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts new file mode 100644 index 0000000..48aea93 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/ko/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="ko_KR"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="+17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/nl/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/no/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/pl/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/pt/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts new file mode 100644 index 0000000..239b785 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/ru/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="ru" sourcelanguage="en"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation>Все библиотеки являются важным</translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/th/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/tr/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts b/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts new file mode 100644 index 0000000..a1b2048 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Languages/zh/translation.ts @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>OptionsWidget</name> + <message> + <location filename="../../OptionsWidget.ui" line="17"/> + <source>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../OptionsWidget.ui" line="20"/> + <source>All the dlls are importants</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp new file mode 100644 index 0000000..563e855 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.cpp @@ -0,0 +1,39 @@ +#include "OptionsWidget.h"
+#include "ui_OptionsWidget.h"
+
+OptionsWidget::OptionsWidget(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::OptionsWidget)
+{
+ ui->setupUi(this);
+}
+
+OptionsWidget::~OptionsWidget()
+{
+ //delete ui;//attached to the main program, then it's the main program responsive the delete
+}
+
+void OptionsWidget::setAllDllIsImportant(bool allDllIsImportant)
+{
+ ui->allDllIsImportant->setChecked(allDllIsImportant);
+}
+
+void OptionsWidget::setDebug(bool Debug)
+{
+ ui->Debug->setChecked(Debug);
+}
+
+void OptionsWidget::on_allDllIsImportant_toggled(bool checked)
+{
+ emit sendAllDllIsImportant(checked);
+}
+
+void OptionsWidget::retranslate()
+{
+ ui->retranslateUi(this);
+}
+
+void OptionsWidget::on_Debug_toggled(bool checked)
+{
+ emit sendDebug(checked);
+}
diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h new file mode 100644 index 0000000..cbbf61c --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.h @@ -0,0 +1,30 @@ +#ifndef OptionsWidget_H
+#define OptionsWidget_H
+
+#include <QWidget>
+
+namespace Ui {
+class OptionsWidget;
+}
+
+class OptionsWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit OptionsWidget(QWidget *parent = 0);
+ ~OptionsWidget();
+ void setAllDllIsImportant(bool allDllIsImportant);
+ void setDebug(bool Debug);
+ void retranslate();
+private:
+ Ui::OptionsWidget *ui;
+signals:
+ void sendAllDllIsImportant(bool allDllIsImportant);
+ void sendDebug(bool Debug);
+private slots:
+ void on_allDllIsImportant_toggled(bool checked);
+ void on_Debug_toggled(bool checked);
+};
+
+#endif // OptionsWidget_H
diff --git a/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui new file mode 100644 index 0000000..c741676 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/OptionsWidget.ui @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OptionsWidget</class>
+ <widget class="QWidget" name="OptionsWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>195</width>
+ <height>58</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QCheckBox" name="allDllIsImportant">
+ <property name="toolTip">
+ <string>In normal case, only the dll 64Bits is important with 64Bits OS, and 32Bits dll with 32Bits OS. When it's important, the UAC can be opened to load the dll.</string>
+ </property>
+ <property name="text">
+ <string>All the dlls are importants</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="Debug">
+ <property name="text">
+ <string notr="true">Debug</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h b/plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h new file mode 100644 index 0000000..f7586b0 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/PlatformMacro.h @@ -0,0 +1 @@ +#include "../../../PlatformMacro.h" diff --git a/plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h b/plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h new file mode 100644 index 0000000..c1758f4 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins/PluginLoader/catchcopy-v0002/Variable.h b/plugins/PluginLoader/catchcopy-v0002/Variable.h new file mode 100644 index 0000000..90e1557 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/Variable.h @@ -0,0 +1,16 @@ +/** \file Variable.h
+\brief Define the environment variable
+\author alpha_one_x86
+\licence GPL3, see the file COPYING */
+
+#ifndef VARIABLE_H
+#define VARIABLE_H
+
+//Un-comment this next line to put ultracopier plugin in debug mode
+#define ULTRACOPIER_PLUGIN_DEBUG
+//#define ULTRACOPIER_PLUGIN_ALL_IN_ONE
+
+#endif // VARIABLE_H
+
+
+
diff --git a/plugins/PluginLoader/catchcopy-v0002/documentation.dox b/plugins/PluginLoader/catchcopy-v0002/documentation.dox new file mode 100644 index 0000000..b9c9d13 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/documentation.dox @@ -0,0 +1,33 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage catchcopy-v0002 + + \section mainpage_overview Overview + + Is the plugin to load the catchcopy plugin into the windows file manager. Mostly it use the command: regsvr32 /s catchcopy32.dll/catchcopy64.dll\n + More informations on <a href="http://ultracopier-wiki.first-world.info/">the wiki of ultracopier</a>. + + \section mainpage_platforms Platforms + + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. + + \section mainpage_downloads Downloads + + You can find the link on <a href="http://ultracopier.first-world.info/">Ultracopier</a> project page, via git, snapshot sources, ... + + \section mainpage_algorithm Requirements + + You can see the documentation on <a href="http://catchcopy.first-world.info/">Catchcopy web site</a>. It use catchcopy32.dll/catchcopy64.dll as explorer plugin for the windows's file manager. Need it into the plugins.\n + In function if Ultracopier is compiled by portable version, try load the dll by other way. + + \section license GPL Version 3 + The code source is under GPL3. + +*/ diff --git a/plugins/PluginLoader/catchcopy-v0002/informations.xml b/plugins/PluginLoader/catchcopy-v0002/informations.xml new file mode 100644 index 0000000..95861a6 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/informations.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package> + <title xml:lang="en"><![CDATA[Plugin loader for catchcopy v0002]]></title><!-- english is required --> + <title xml:lang="fr"><![CDATA[Chargeur de plugin pour catchcopy v0002]]></title> + <!-- What kind of plugin this is --> + <category>PluginLoader</category> + <!-- Who wrote this plugin --> + <author><![CDATA[BRULE Herman, alpha_one_x86 (alpha_one_x86@first-world.info)]]></author> + <!-- URL of page or site for this plugin (may provide additional information, bug reports, feature requests). --> + <website xml:lang="en"><![CDATA[http://ultracopier.first-world.info/]]></website><!-- not required --> + <website xml:lang="fr"><![CDATA[http://ultracopier-fr.first-world.info/]]></website><!-- not required --> + <!-- the date-time format should be in timestamps format --> + <pubDate>1287496800</pubDate> + <!-- the architecture code of this plugin, found PlatformMacro.h into ultracopier source --> + <architecture>windows-x86</architecture> + <!-- Detailed description --> + <description xml:lang="en"><![CDATA[Plugin loader for catchcopy v0002. Allow to receive copy list from plugin/explorer compatible with catchcopy.]]></description> + <description xml:lang="fr"><![CDATA[Chargeur de plugin pour catchcopy v0002. Permet de recevoir un liste de copie venant d'un plugin/explorateur avec catchcopy.]]></description> + <!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number --> + <version>1.4.0.4</version> + <!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. --> + <name>catchcopy-v0002</name> + <!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. --> + <dependencies><![CDATA[ + ]]></dependencies> +</package>
\ No newline at end of file diff --git a/plugins/PluginLoader/catchcopy-v0002/plugin.json b/plugins/PluginLoader/catchcopy-v0002/plugin.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/plugin.json @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp new file mode 100644 index 0000000..363f372 --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp @@ -0,0 +1,450 @@ +/** \file pluginLoader.cpp +\brief Define the session plugin loader test +\author alpha_one_x86 */ + +#include "pluginLoader.h" +#include "PlatformMacro.h" +#include "../../../cpp11addition.h" + +#include <QFile> +#include <QDir> +#ifdef ULTRACOPIER_PLUGIN_ALL_IN_ONE +#include <QCoreApplication> +#endif + +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #define NORMAL_EXT "d.dll" + #define SECOND_EXT ".dll" +#else + #define NORMAL_EXT ".dll" + #define SECOND_EXT "d.dll" +#endif +#define CATCHCOPY_DLL_32 "catchcopy32" +#define CATCHCOPY_DLL_64 "catchcopy64" + +WindowsExplorerLoader::WindowsExplorerLoader() +{ + //set the startup value into the variable + dllChecked=false; + optionsEngine=NULL; + allDllIsImportant=false; + Debug=false; + needBeRegistred=false; + changeOfArchDetected=false; + is64Bits=false; + optionsWidget=new OptionsWidget(); + connect(optionsWidget,&OptionsWidget::sendAllDllIsImportant,this,&WindowsExplorerLoader::setAllDllIsImportant); + connect(optionsWidget,&OptionsWidget::sendDebug,this,&WindowsExplorerLoader::setDebug); + +#if defined(_M_X64)//64Bits + is64Bits=true; +#else//32Bits + char *arch=getenv("windir"); + if(arch!=NULL) + { + QDir dir; + if(dir.exists(QString(arch)+"\\SysWOW64\\")) + is64Bits=true; + /// \note commented because it do a crash at the startup, and useless, because is global variable, it should be removed only by the OS + //delete arch; + } +#endif +} + +WindowsExplorerLoader::~WindowsExplorerLoader() +{ + //delete optionsWidget;//attached to the main program, then it's the main program responsive the delete + setEnabled(false); +} + +void WindowsExplorerLoader::setEnabled(const bool &needBeRegistred) +{ + if(!checkExistsDll()) + { + #ifdef ULTRACOPIER_PLUGIN_ALL_IN_ONE + if(needBeRegistred) + emit newState(Ultracopier::Caught); + else + emit newState(Ultracopier::Uncaught); + #else + emit newState(Ultracopier::Uncaught); + #endif + if(!needBeRegistred) + correctlyLoaded.clear(); + return; + } + if(this->needBeRegistred==needBeRegistred) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Double event dropped: %1").arg(needBeRegistred).toStdString()); + if(needBeRegistred) + emit newState(Ultracopier::Caught); + else + emit newState(Ultracopier::Uncaught); + return; + } + this->needBeRegistred=needBeRegistred; + unsigned int index=0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start, needBeRegistred: %1, allDllIsImportant: %2").arg(needBeRegistred).arg(allDllIsImportant).toStdString()); + + bool oneHaveFound=false; + index=0; + while(index<importantDll.size()) + { + if(QFile::exists(QString::fromStdString(pluginPath+importantDll.at(index)))) + { + oneHaveFound=true; + break; + } + index++; + } + if(!oneHaveFound) + { + index=0; + while(index<secondDll.size()) + { + if(QFile::exists(QString::fromStdString(pluginPath+secondDll.at(index)))) + { + oneHaveFound=true; + break; + } + index++; + } + } + if(!oneHaveFound) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"No dll have found"); + emit newState(Ultracopier::Uncaught); + if(!needBeRegistred) + correctlyLoaded.clear(); + return; + } + + index=0; + bool importantDll_is_loaded=false,secondDll_is_loaded=false; + bool importantDll_have_bug=false,secondDll_have_bug=false; + int importantDll_count=0,secondDll_count=0; + while(index<importantDll.size()) + { + if(!RegisterShellExtDll(pluginPath+importantDll.at(index),needBeRegistred, + !( + (needBeRegistred) + || + (!needBeRegistred && correctlyLoaded.find(importantDll.at(index))!=correctlyLoaded.cend()) + ) + )) + { + if(changeOfArchDetected) + { + setEnabled(needBeRegistred); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the important dll have failed: "+importantDll.at(index)); + importantDll_have_bug=true; + } + else + { + importantDll_is_loaded=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the important dll have been loaded: "+importantDll.at(index)); + } + importantDll_count++; + index++; + } + index=0; + while(index<secondDll.size()) + { + if(!RegisterShellExtDll(pluginPath+secondDll.at(index),needBeRegistred, + !( + (needBeRegistred && allDllIsImportant) + || + (!needBeRegistred && correctlyLoaded.find(secondDll.at(index))!=correctlyLoaded.cend()) + ) + )) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the second dll have failed: "+secondDll.at(index)); + secondDll_have_bug=true; + } + else + { + secondDll_is_loaded=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the second dll have been loaded: "+secondDll.at(index)); + } + secondDll_count++; + index++; + } + + Ultracopier::CatchState importantDll_state,secondDll_state; + if(importantDll_count==0) + { + if(needBeRegistred) + importantDll_state=Ultracopier::Caught; + else + importantDll_state=Ultracopier::Uncaught; + } + else + { + if(importantDll_is_loaded) + { + if(!importantDll_have_bug) + importantDll_state=Ultracopier::Caught; + else + importantDll_state=Ultracopier::Semiuncaught; + } + else + importantDll_state=Ultracopier::Uncaught; + } + if(secondDll_count==0) + if(needBeRegistred) + secondDll_state=Ultracopier::Caught; + else + secondDll_state=Ultracopier::Uncaught; + else + { + if(secondDll_is_loaded) + { + if(!secondDll_have_bug) + secondDll_state=Ultracopier::Caught; + else + secondDll_state=Ultracopier::Semiuncaught; + } + else + secondDll_state=Ultracopier::Uncaught; + } + + if((importantDll_state==Ultracopier::Uncaught && secondDll_state==Ultracopier::Uncaught) || !needBeRegistred || (importantDll_count==0 && secondDll_count==0)) + emit newState(Ultracopier::Uncaught); + else if(importantDll_state==Ultracopier::Caught) + emit newState(Ultracopier::Caught); + else + emit newState(Ultracopier::Semiuncaught); + + if(!needBeRegistred) + correctlyLoaded.clear(); +} + +bool WindowsExplorerLoader::checkExistsDll() +{ + if(dllChecked) + { + if(importantDll.size()>0 || secondDll.size()>0) + return true; + else + return false; + } + dllChecked=true; + + if(is64Bits) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"64Bits is important"); + importantDll.push_back(CATCHCOPY_DLL_64); + secondDll.push_back(CATCHCOPY_DLL_32); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"32Bits is important"); + importantDll.push_back(CATCHCOPY_DLL_32); + secondDll.push_back(CATCHCOPY_DLL_64); + } + + unsigned int index=0; + while(index<importantDll.size()) + { + if(!QFile::exists(QString::fromStdString(pluginPath+importantDll.at(index)+NORMAL_EXT))) + { + if(!QFile::exists(QString::fromStdString(pluginPath+importantDll.at(index)+SECOND_EXT))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"file not found, drop to the list: "+ + pluginPath+importantDll.at(index)+NORMAL_EXT+ + " and "+ + pluginPath+importantDll.at(index)+SECOND_EXT + ); + importantDll.erase(importantDll.cbegin()+index); + index--; + } + else + importantDll[index]+=SECOND_EXT; + } + else + importantDll[index]+=NORMAL_EXT; + index++; + } + index=0; + while(index<secondDll.size()) + { + if(!QFile::exists(QString::fromStdString(pluginPath+secondDll.at(index)+NORMAL_EXT))) + { + if(!QFile::exists(QString::fromStdString(pluginPath+secondDll.at(index)+SECOND_EXT))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning, + "file not found, drop to the list: "+pluginPath+secondDll.at(index)+NORMAL_EXT+ + " and "+pluginPath+secondDll.at(index)+SECOND_EXT + ); + secondDll.erase(secondDll.cbegin()+index); + index--; + } + else + secondDll[index]+=SECOND_EXT; + } + else + secondDll[index]+=NORMAL_EXT; + index++; + } + if(importantDll.size()>0 || secondDll.size()>0) + return true; + else + return false; +} + +void WindowsExplorerLoader::setResources(OptionInterface * options, const std::string &writePath, const std::string &pluginPath, const bool &portableVersion) +{ + Q_UNUSED(options); + Q_UNUSED(writePath); + Q_UNUSED(pluginPath); + Q_UNUSED(portableVersion); + #ifdef ULTRACOPIER_PLUGIN_ALL_IN_ONE + this->pluginPath=QCoreApplication::applicationDirPath().toStdString()+"/"; + #else + this->pluginPath=pluginPath; + #endif + this->optionsEngine=options; + if(optionsEngine!=NULL) + { + std::vector<std::pair<std::string, std::string> > KeysList; + KeysList.push_back(std::pair<std::string, std::string>("allDllIsImportant","false")); + KeysList.push_back(std::pair<std::string, std::string>("Debug","false")); + optionsEngine->addOptionGroup(KeysList); + allDllIsImportant=stringtobool(optionsEngine->getOptionValue("allDllIsImportant")); + Debug=stringtobool(optionsEngine->getOptionValue("Debug")); + optionsWidget->setAllDllIsImportant(allDllIsImportant); + optionsWidget->setDebug(Debug); + } +} + +bool WindowsExplorerLoader::RegisterShellExtDll(const std::string &dllPath, const bool &bRegister, const bool &quiet) +{ + if(Debug) + { + std::string message; + if(bRegister) + message+="Try load the dll: %1, and "+dllPath; + else + message+="Try unload the dll: %1, and "+dllPath; + if(quiet) + message+="don't open the UAC"; + else + message+="open the UAC if needed"; + QMessageBox::information(NULL,"Debug",QString::fromStdString(message)); + } + if(bRegister && correctlyLoaded.find(dllPath)!=correctlyLoaded.cend()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Try dual load: "+dllPath); + return false; + } + ////////////////////////////// First way to load ////////////////////////////// + QStringList arguments; + if(!Debug) + arguments.append("/s"); + if(!bRegister) + arguments.append("/u"); + arguments.append(QString::fromStdString(dllPath)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start: regsvr32 "+arguments.join(" ").toStdString()); + int result; + #ifdef Q_OS_WIN32 + QProcess process; + process.start("regsvr32",arguments); + if(!process.waitForStarted()) + result=985; + else if(!process.waitForFinished()) + result=984; + else + { + result=process.exitCode(); + QString out=QString::fromLocal8Bit(process.readAllStandardOutput()); + QString outError=QString::fromLocal8Bit(process.readAllStandardError()); + if(!out.isEmpty()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"regsvr32 output: "+out.toStdString()); + if(!outError.isEmpty()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"regsvr32 error output: "+outError.toStdString()); + } + #else + result=0; + #endif + bool ok=false; + if(result==0) + { + if(bRegister) + correctlyLoaded.insert(dllPath); + ok=true; + } + #if ! defined(_M_X64) + if(result==999 && !changeOfArchDetected)//code of wrong arch for the dll + { + changeOfArchDetected=true; + std::vector<std::string> temp; + temp = importantDll; + secondDll = importantDll; + importantDll = temp; + return false; + } + #endif + if(result==5) + { + if(!quiet || (!bRegister && correctlyLoaded.find(dllPath)!=correctlyLoaded.cend())) + { + arguments.last()=QStringLiteral("\"%1\"").arg(arguments.last()); + ////////////////////////////// Last way to load ////////////////////////////// + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"try it in win32"); + // try with regsvr32, win32 because for admin dialog + + #ifdef Q_OS_WIN32 + wchar_t arrayArg[65535]; + int size_lenght=arguments.join(" ").toWCharArray(arrayArg); + //size_lenght*sizeof(wchar_t) + wcscpy(arrayArg+size_lenght*sizeof(wchar_t),TEXT("\0")); + SHELLEXECUTEINFO sei; + memset(&sei, 0, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_UNICODE; + sei.lpVerb = TEXT("runas"); + sei.lpFile = TEXT("regsvr32.exe"); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"in win32 mode: arrayArg: "+QString::fromWCharArray(arrayArg,size_lenght).toStdString()); + sei.lpParameters = arrayArg; + sei.nShow = SW_SHOW; + ok=ShellExecuteEx(&sei); + #else + ok=true; + #endif + if(ok && bRegister) + correctlyLoaded.insert(dllPath); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"not try because need be quiet: "+dllPath); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"regsvr32 terminated with: "+std::to_string(result)); + if(!bRegister) + correctlyLoaded.erase(dllPath); + return ok; +} + +/// \brief to get the options widget, NULL if not have +QWidget * WindowsExplorerLoader::options() +{ + return optionsWidget; +} + +void WindowsExplorerLoader::newLanguageLoaded() +{ + optionsWidget->retranslate(); +} + +void WindowsExplorerLoader::setAllDllIsImportant(bool allDllIsImportant) +{ + this->allDllIsImportant=allDllIsImportant; + optionsEngine->setOptionValue("allDllIsImportant",std::to_string(allDllIsImportant)); +} + +void WindowsExplorerLoader::setDebug(bool Debug) +{ + this->Debug=Debug; + optionsEngine->setOptionValue("Debug",std::to_string(Debug)); +} diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h new file mode 100644 index 0000000..d18248d --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.h @@ -0,0 +1,64 @@ +/** \file pluginLoader.h +\brief Define the plugin loader +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef PLUGIN_LOADER_TEST_H +#define PLUGIN_LOADER_TEST_H + +#include <QObject> +#include <QMessageBox> +#include <unordered_set> + +#include <QString> +#include <QStringList> +#include <QProcess> +#include <QSet> +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include <windows.h> + #include <tlhelp32.h> +#endif + +#include "../../../interface/PluginInterface_PluginLoader.h" +#include "Environment.h" +#include "OptionsWidget.h" + +/// \brief \brief Define the plugin loader +class WindowsExplorerLoader : public PluginInterface_PluginLoader +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.PluginLoader/1.2.4.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_PluginLoader) +public: + WindowsExplorerLoader(); + ~WindowsExplorerLoader(); + /// \brief try enable/disable the catching + void setEnabled(const bool &needBeRegistred); + /// \brief to set resources, writePath can be empty if read only mode + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion); + /// \brief to get the options widget, NULL if not have + QWidget * options(); +public slots: + /// \brief to reload the translation, because the new language have been loaded + void newLanguageLoaded(); +private: + std::string pluginPath; + std::vector<std::string> importantDll,secondDll; + std::unordered_set<std::string> correctlyLoaded; + bool RegisterShellExtDll(const std::string &dllPath, const bool &bRegister,const bool &quiet); + bool checkExistsDll(); + bool dllChecked; + bool needBeRegistred; + OptionInterface * optionsEngine; + OptionsWidget *optionsWidget; + bool allDllIsImportant,Debug; + bool changeOfArchDetected,is64Bits; +private slots: + void setAllDllIsImportant(bool allDllIsImportant); + void setDebug(bool Debug); +}; + +#endif // PLUGIN_LOADER_TEST_H diff --git a/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro new file mode 100644 index 0000000..40d5e5e --- /dev/null +++ b/plugins/PluginLoader/catchcopy-v0002/pluginLoader.pro @@ -0,0 +1,53 @@ +CONFIG += c++11
+QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra"
+mac:QMAKE_CXXFLAGS+="-stdlib=libc++"
+
+QT += widgets
+TEMPLATE = lib
+CONFIG += plugin
+HEADERS = \
+ $$PWD/StructEnumDefinition.h \
+ $$PWD/pluginLoader.h \
+ $$PWD/DebugEngineMacro.h \
+ $$PWD/Environment.h \
+ $$PWD/Variable.h \
+ $$PWD/PlatformMacro.h \
+ $$PWD/../../../interface/PluginInterface_PluginLoader.h \
+ $$PWD/../../../cpp11addition.h \
+ $$PWD/OptionsWidget.h
+SOURCES = \
+ $$PWD/pluginLoader.cpp \
+ $$PWD/OptionsWidget.cpp \
+ $$PWD/../../../cpp11addition.cpp \
+ $$PWD/../../../cpp11additionstringtointcpp.cpp
+TARGET = $$qtLibraryTarget(pluginLoader)
+TRANSLATIONS += \
+ $$PWD/Languages/ar/translation.ts \
+ $$PWD/Languages/de/translation.ts \
+ $$PWD/Languages/el/translation.ts \
+ $$PWD/Languages/en/translation.ts \
+ $$PWD/Languages/es/translation.ts \
+ $$PWD/Languages/fr/translation.ts \
+ $$PWD/Languages/hi/translation.ts \
+ $$PWD/Languages/hu/translation.ts \
+ $$PWD/Languages/id/translation.ts \
+ $$PWD/Languages/it/translation.ts \
+ $$PWD/Languages/ja/translation.ts \
+ $$PWD/Languages/ko/translation.ts \
+ $$PWD/Languages/nl/translation.ts \
+ $$PWD/Languages/no/translation.ts \
+ $$PWD/Languages/pl/translation.ts \
+ $$PWD/Languages/pt/translation.ts \
+ $$PWD/Languages/ru/translation.ts \
+ $$PWD/Languages/th/translation.ts \
+ $$PWD/Languages/tr/translation.ts \
+ $$PWD/Languages/zh/translation.ts
+
+win32:LIBS += -lole32 -lshell32
+
+FORMS += \
+ $$PWD/OptionsWidget.ui
+
+CONFIG(static, static|shared) {
+DEFINES += ULTRACOPIER_PLUGIN_ALL_IN_ONE
+}
|