From c7f6de52e532259ef27751b0ec3da7cf6b00e8f6 Mon Sep 17 00:00:00 2001 From: zeffy Date: Mon, 3 Jul 2017 18:55:41 -0700 Subject: [PATCH] migrate to advanced installer! --- .gitignore | 5 +- CONTRIBUTING.fr-FR.md | 1 - CONTRIBUTING.md | 1 - CONTRIBUTING.ru-RU.md | 1 - README.fr-FR.md | 20 -- README.md | 26 +- README.ru-RU.md | 20 -- appveyor.yml | 2 +- {setup-wix => setup-ai}/LICENSE.rtf | 10 +- setup-ai/wufuc.aip | 316 ++++++++++++++++++ .../disable_wufuc.bat | 21 +- .../enable_wufuc.bat | 0 .../repair_wuaueng.dll.bat | 0 setup-batch/install_wufuc.bat | 6 +- setup-batch/uninstall_wufuc.bat | 3 +- setup-wix/Product.wxs | 179 ---------- setup-wix/setup-wix.wixproj | 70 ---- wufuc.sln | 19 +- wufuc/wufuc.vcxproj | 8 +- wufuc_aihelper/aihelper.c | 12 + wufuc_aihelper/dllmain.c | 13 + wufuc_aihelper/exports.def | 2 + wufuc_aihelper/wufuc_aihelper.vcxproj | 169 ++++++++++ 23 files changed, 542 insertions(+), 362 deletions(-) rename {setup-wix => setup-ai}/LICENSE.rtf (97%) create mode 100644 setup-ai/wufuc.aip rename setup-batch/{utility scripts => Helper Scripts}/disable_wufuc.bat (80%) rename setup-batch/{utility scripts => Helper Scripts}/enable_wufuc.bat (100%) rename setup-batch/{utility scripts => Helper Scripts}/repair_wuaueng.dll.bat (100%) delete mode 100644 setup-wix/Product.wxs delete mode 100644 setup-wix/setup-wix.wixproj create mode 100644 wufuc_aihelper/aihelper.c create mode 100644 wufuc_aihelper/dllmain.c create mode 100644 wufuc_aihelper/exports.def create mode 100644 wufuc_aihelper/wufuc_aihelper.vcxproj diff --git a/.gitignore b/.gitignore index 7b378af..28ab44b 100644 --- a/.gitignore +++ b/.gitignore @@ -251,5 +251,6 @@ paket-files/ .idea/ *.sln.iml -# MSI -SetupWufuc/msi/ +# Advanced Installer +**/*-cache/ +**/*-SetupFiles/ diff --git a/CONTRIBUTING.fr-FR.md b/CONTRIBUTING.fr-FR.md index 2702501..e7b1fc1 100644 --- a/CONTRIBUTING.fr-FR.md +++ b/CONTRIBUTING.fr-FR.md @@ -7,7 +7,6 @@ #### Avant de créer un ticket d'issue, veuillez vous assurer d'avoir vérifié les points suivants : - Utilisez-vous bien la [dernière version stable](../../releases/latest)? -- Si vous avez utilisé l'une des versions < 0.6, avez-vous restauré l'état initial du système en exécutant `repair_wuaueng.dll.bat` ? - Avez-vous essayé de redémarrer l'ordinateur ? #### Après avoir confirmé ces éléments, veuillez créer un ticket en incluant les informations suivantes : diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcc0901..42bf869 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,6 @@ #### Before you create an issue, please make sure of the following: - Are you using at least the [latest stable version](../../releases/latest)? -- If you previously used any of the old batchfile patches (versions < 0.6), did you revert it by running `repair_wuaueng.dll.bat`? - Have you tried restarting your computer? #### After you've confirmed those things, please create an issue and include the following information: diff --git a/CONTRIBUTING.ru-RU.md b/CONTRIBUTING.ru-RU.md index 94f82f5..23f3eab 100644 --- a/CONTRIBUTING.ru-RU.md +++ b/CONTRIBUTING.ru-RU.md @@ -7,7 +7,6 @@ #### Перед созданием баг-репорта убедитесь, что: - Вы используете [последнюю стабильную версию](../../releases/latest); -- Если вы пользовались предыдущей версией (.bat-патчером), убедитесь, что вы откатили его, запустив `repair_wuaueng.dll.bat`; - Вы пытались перезагружать компьютер. #### После проверки и подтверждения вышеизложенных пунктов, создавайте баг-репорт и включите в него следующую информацию: diff --git a/README.fr-FR.md b/README.fr-FR.md index 2e8a1a3..a9ac519 100644 --- a/README.fr-FR.md +++ b/README.fr-FR.md @@ -55,23 +55,3 @@ Mon patch tire avantage de comportement à mettre en cache le résultat en assig - Patch avec une base heuristique, ce qui signifie que cela devrait continuer de fonctionner même si d'autres updates sortent. - Le langage C était le plus adapté. - Pas de dépendances externes. - -## FAQ - -### Comment installer/désinstaller ? - -Téléchargez simplement la [dernière version](../../releases/latest), et extrayez l'archive `wufuc` dans un dossier permanent (comme par exemple `C:\Program Files\wufuc`) puis exécutez `install_wufuc.bat` en tant qu'administrateur. - -Pour désinstaller, exécutez `uninstall_wufuc.bat` en tant qu'administrateur. - -### Comment mettre à jour quand une nouvelle version sort ? - -À moins que cela ne soit précisé différemment, vous devriez avoir à faire : - -- Exécutez `uninstall_wufuc.bat` en tant qu'administrateur. -- Copier les nouveaux fichiers dans le dossier permanent (comme par exemple `C:\Program Files\wufuc`) en écrasant les anciens fichiers. -- Exécutez `install_wufuc.bat` en tant qu'administrateur. - -### Comment enlever l'ancien patch des versions < 0.6 et utiliser celui-ci à la place > - -J'ai inclus un script appelé `repair_wuaueng.dll.bat`. Quand vous l'exécutez, il va lancer une commande `sfc scan` et rétablir tous les changements effectués à `wuaueng.dll`. diff --git a/README.md b/README.md index b4fb4f4..da76d91 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ If you are interested, you can read my original write up on discovering the CPU ## How it works -Basically, inside a file called `wuaueng.dll` there are two functions: [`IsDeviceServiceable(void)`](https://gist.github.com/zeffy/e5ec266952932bc905eb0cbc6ed72185) and [`IsCPUSupported(void)`](https://gist.github.com/zeffy/1a8f8984d2bec97ae24af63a76278694). `IsDeviceServiceable(void)` is essentially a wrapper around `IsCPUSupported(void)` that caches the result it receives and recycles it on subsequent calls. +Basically, inside a file called `wuaueng.dll` there are two functions: [`IsDeviceServiceable(void)`](https://gist.github.com/zeffy/e5ec266952932bc905eb0cbc6ed72185) and [`IsCPUSupported(void)`](https://gist.github.com/zeffy/1a8f8984d2bec97ae24af63a76278694). `IsDeviceServiceable(void)` is essentially a wrapper around `IsCPUSupported(void)` that caches the result it receives and recycles it on subsequent calls. My patch takes advantage of this result caching behavior by setting the "first run" value to `FALSE` and the cached result to `TRUE`. @@ -51,26 +51,6 @@ My patch takes advantage of this result caching behavior by setting the "first r ### Several improvements over my batchfile method: - **No system files are modified!** -- Heuristic-based patching, which means it will usually keep working even after new updates come out. -- C is best language. +- Heuristic-based patching, which means it will usually keep working even after new updates come out. +- C is best language! - No external dependencies. - -## Q & A - -### How to install/uninstall? - -Just download the [latest release](../../releases/latest), and extract the `wufuc` folder to a permanent location (like `C:\Program Files\wufuc`) and then run `install_wufuc.bat` as administrator. - -To uninstall run `uninstall_wufuc.bat` as administrator. - -### How to update when a new version comes out? - -Unless otherwise noted, you should only have to: - -- Run `uninstall_wufuc.bat` as administrator. -- Copy the new files into the install folder, overwriting the old ones. -- Run the new `install_wufuc.bat` as administrator. - -### How do I remove your old patch and use this instead? - -I've included a utility script called `repair_wuaueng.dll.bat`. When you run it, it will initiate an `sfc` scan and revert any changes made to `wuaueng.dll`. diff --git a/README.ru-RU.md b/README.ru-RU.md index 86fc87b..a92af98 100644 --- a/README.ru-RU.md +++ b/README.ru-RU.md @@ -55,23 +55,3 @@ - Эвристический патчер - продолжит работать (я надеюсь) даже после выхода новых обновлений. - C - лучший язык! - Нет внешних зависимостей. - -## Вопросы и ответы - -### Как установить/удалить? - -Просто скачайте [последний релиз](../../releases/latest), распакуйте папку `wufuc` куда-нибудь в надежное место (наподобие `C:\Program Files\wufuc`) и запустите `install_wufuc.bat` от имени Администратора. - -Для удаления запустите `uninstall_wufuc.bat` от имени Администратора. - -### Как обновиться на новую версию? - -Если не указано иного, всё просто: - -- Запустите `uninstall_wufuc.bat` от имени Администратора. -- Скопируйте новые файлы в папку установки, перезаписывая поверх старых. -- Запустите новый `install_wufuc.bat` от имени Администратора. - -### Как удалить ваш старый патчер и воспользоваться этим? - -Я включил в дистрибутив вспомогательный скрипт `repair_wuaueng.dll.bat`. Он запустит сканирование `sfc` и откатит любые изменения, сделанные в `wuaueng.dll`. diff --git a/appveyor.yml b/appveyor.yml index d6bc52f..dfe5a57 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ before_build: after_build: - cmd: >- - copy /Y "wufuc\bin\%CONFIGURATION%\%PLATFORM%\wufuc*.dll" "setup-batch\" + copy /Y "wufuc\bin\%CONFIGURATION%\%PLATFORM%\wufuc.dll" "setup-batch\" copy /Y "LICENSE" "setup-batch\COPYING.txt" diff --git a/setup-wix/LICENSE.rtf b/setup-ai/LICENSE.rtf similarity index 97% rename from setup-wix/LICENSE.rtf rename to setup-ai/LICENSE.rtf index 4de997f..bad0d02 100644 --- a/setup-wix/LICENSE.rtf +++ b/setup-ai/LICENSE.rtf @@ -1,8 +1,8 @@ -{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}{\f2\fnil\fcharset0 Courier New;}} +{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}{\f2\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Msftedit 5.41.21.2512;}\viewkind4\uc1\pard\sa180\lang9\b\fs22 GNU GENERAL PUBLIC LICENSE\par \b0\fs20 Version 3, 29 June 2007\par -Copyright \'a9 2007 Free Software Foundation, Inc. <{\field{\*\fldinst{HYPERLINK "http://fsf.org/"}}{\fldrslt{\ul\cf1 http://fsf.org/}}}\f0\fs20 >\par +Copyright \'a9 2007 Free Software Foundation, Inc. {\field{\*\fldinst{HYPERLINK "http://fsf.org/"}}{\fldrslt{\ul\cf1 http://fsf.org/}}}\f0\fs20\par Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par \b\fs22 Preamble\par \b0\fs20 The GNU General Public License is a free, copyleft license for software and other kinds of works.\par @@ -114,12 +114,12 @@ END OF TERMS AND CONDITIONS\par \b\fs22 How to Apply These Terms to Your New Programs\par \b0\fs20 If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\par To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the \f1\ldblquote\f0 copyright\f1\rdblquote\f0 line and a pointer to where the full notice is found.\par -\f2\fs18 \line Copyright (C) \line\line This program is free software: you can redistribute it and/or modify\line it under the terms of the GNU General Public License as published by\line the Free Software Foundation, either version 3 of the License, or\line (at your option) any later version.\line\line This program is distributed in the hope that it will be useful,\line but WITHOUT ANY WARRANTY; without even the implied warranty of\line MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\line GNU General Public License for more details.\line\line You should have received a copy of the GNU General Public License\line along with this program. If not, see <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f2\fs18 >.\fs20\par +\f2\fs18 \line Copyright (C) \line\line This program is free software: you can redistribute it and/or modify\line it under the terms of the GNU General Public License as published by\line the Free Software Foundation, either version 3 of the License, or\line (at your option) any later version.\line\line This program is distributed in the hope that it will be useful,\line but WITHOUT ANY WARRANTY; without even the implied warranty of\line MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\line GNU General Public License for more details.\line\line You should have received a copy of the GNU General Public License\line along with this program. If not, see {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f2\fs18 .\fs20\par \f0 Also add information on how to contact you by electronic and paper mail.\par If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:\par \f2\fs18 Copyright (C) \line This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\line This is free software, and you are welcome to redistribute it\line under certain conditions; type `show c' for details.\fs20\par \f0 The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an \f1\ldblquote\f0 about box\f1\rdblquote\f0 .\par -You should also get your employer (if you work as a programmer) or school, if any, to sign a \f1\ldblquote\f0 copyright disclaimer\f1\rdblquote\f0 for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f0\fs20 >.\par -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/philosophy/why-not-lgpl.html"}}{\fldrslt{\ul\cf1 http://www.gnu.org/philosophy/why-not-lgpl.html}}}\f0\fs20 >.\par +You should also get your employer (if you work as a programmer) or school, if any, to sign a \f1\ldblquote\f0 copyright disclaimer\f1\rdblquote\f0 for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f0\fs20 .\par +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/philosophy/why-not-lgpl.html"}}{\fldrslt{\ul\cf1 http://www.gnu.org/philosophy/why-not-lgpl.html}}}\f0\fs20 .\par } \ No newline at end of file diff --git a/setup-ai/wufuc.aip b/setup-ai/wufuc.aip new file mode 100644 index 0000000..165845c --- /dev/null +++ b/setup-ai/wufuc.aip @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup-batch/utility scripts/disable_wufuc.bat b/setup-batch/Helper Scripts/disable_wufuc.bat similarity index 80% rename from setup-batch/utility scripts/disable_wufuc.bat rename to setup-batch/Helper Scripts/disable_wufuc.bat index d377310..e28bad9 100644 --- a/setup-batch/utility scripts/disable_wufuc.bat +++ b/setup-batch/Helper Scripts/disable_wufuc.bat @@ -27,26 +27,7 @@ fltmc >nul 2>&1 || ( goto :die ) -if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( - goto :is_x64 -) else ( - if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" ( - goto :is_x64 - ) - if /I "%PROCESSOR_ARCHITECTURE%"=="x86" ( - goto :is_x86 - ) -) -goto :die - -:is_x86 -set "wufuc_dll=%~dp0..\wufuc32.dll" -goto :disable - -:is_x64 -set "wufuc_dll=%~dp0..\wufuc64.dll" - -:disable +set "wufuc_dll=%~dp0..\wufuc.dll" set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}" rundll32 "%wufuc_dll%",Rundll32Unload net start Schedule diff --git a/setup-batch/utility scripts/enable_wufuc.bat b/setup-batch/Helper Scripts/enable_wufuc.bat similarity index 100% rename from setup-batch/utility scripts/enable_wufuc.bat rename to setup-batch/Helper Scripts/enable_wufuc.bat diff --git a/setup-batch/utility scripts/repair_wuaueng.dll.bat b/setup-batch/Helper Scripts/repair_wuaueng.dll.bat similarity index 100% rename from setup-batch/utility scripts/repair_wuaueng.dll.bat rename to setup-batch/Helper Scripts/repair_wuaueng.dll.bat diff --git a/setup-batch/install_wufuc.bat b/setup-batch/install_wufuc.bat index 3fd95ab..3860bb1 100644 --- a/setup-batch/install_wufuc.bat +++ b/setup-batch/install_wufuc.bat @@ -43,13 +43,13 @@ goto :unsupported_os :is_x86 set "WINDOWS_ARCHITECTURE=x86" -set "wufuc_dll=%~dp0wufuc32.dll" -goto :get_ver +goto :dll_exists :is_x64 set "WINDOWS_ARCHITECTURE=x64" -set "wufuc_dll=%~dp0wufuc64.dll" +:dll_exists +set "wufuc_dll=%~dp0wufuc.dll" if exist "%wufuc_dll%" ( goto :get_ver ) diff --git a/setup-batch/uninstall_wufuc.bat b/setup-batch/uninstall_wufuc.bat index 0ad0626..839f103 100644 --- a/setup-batch/uninstall_wufuc.bat +++ b/setup-batch/uninstall_wufuc.bat @@ -41,14 +41,13 @@ goto :die :is_x86 set "WINDOWS_ARCHITECTURE=x86" -set "wufuc_dll=%~dp0wufuc32.dll" goto :get_ver :is_x64 set "WINDOWS_ARCHITECTURE=x64" -set "wufuc_dll=%~dp0wufuc64.dll" :get_ver +set "wufuc_dll=%~dp0wufuc.dll" for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i" title wufuc uninstaller - v%Version% diff --git a/setup-wix/Product.wxs b/setup-wix/Product.wxs deleted file mode 100644 index b304871..0000000 --- a/setup-wix/Product.wxs +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - APPLICATIONFOLDER="" - - - - - - - - - - - - - - - - NOT Installed - NOT Installed - NOT Installed - REMOVE ~= "ALL" - - - - diff --git a/setup-wix/setup-wix.wixproj b/setup-wix/setup-wix.wixproj deleted file mode 100644 index 768cfb0..0000000 --- a/setup-wix/setup-wix.wixproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - Debug - x86 - 3.10 - 2761679f-06d6-4ab0-ba47-01f1bd7bf55f - 2.0 - wufuc_setup - Package - - - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\$(Platform)\ - Debug - - - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\$(Platform)\ - - - Debug - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\$(Platform)\ - - - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\$(Platform)\ - - - - - - - wufuc - {00f96695-ce41-4c2f-a344-6219dfb4f887} - True - - - Binaries;Content;Satellites - INSTALLFOLDER - - - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - $(WixExtDir)\WixUIExtension.dll - WixUIExtension - - - - - - - - - - - - \ No newline at end of file diff --git a/wufuc.sln b/wufuc.sln index c4b19be..7c5eaf5 100644 --- a/wufuc.sln +++ b/wufuc.sln @@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "setup-wix", "setup-wix\setup-wix.wixproj", "{2761679F-06D6-4AB0-BA47-01F1BD7BF55F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wufuc_aihelper", "wufuc_aihelper\wufuc_aihelper.vcxproj", "{C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -32,15 +32,14 @@ Global {00F96695-CE41-4C2F-A344-6219DFB4F887}.Release|x64.Build.0 = Release|x64 {00F96695-CE41-4C2F-A344-6219DFB4F887}.Release|x86.ActiveCfg = Release|Win32 {00F96695-CE41-4C2F-A344-6219DFB4F887}.Release|x86.Build.0 = Release|Win32 - {00F96695-CE41-4C2F-A344-6219DFB4F887}.Release|x86.Deploy.0 = Release|Win32 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Debug|x64.ActiveCfg = Debug|x64 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Debug|x64.Build.0 = Debug|x64 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Debug|x86.ActiveCfg = Debug|x86 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Debug|x86.Build.0 = Debug|x86 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Release|x64.ActiveCfg = Release|x64 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Release|x64.Build.0 = Release|x64 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Release|x86.ActiveCfg = Release|x86 - {2761679F-06D6-4AB0-BA47-01F1BD7BF55F}.Release|x86.Build.0 = Release|x86 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Debug|x64.ActiveCfg = Debug|x64 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Debug|x64.Build.0 = Debug|x64 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Debug|x86.ActiveCfg = Debug|Win32 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Debug|x86.Build.0 = Debug|Win32 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Release|x64.ActiveCfg = Release|x64 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Release|x64.Build.0 = Release|x64 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Release|x86.ActiveCfg = Release|Win32 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/wufuc/wufuc.vcxproj b/wufuc/wufuc.vcxproj index f85c591..aa53eb5 100644 --- a/wufuc/wufuc.vcxproj +++ b/wufuc/wufuc.vcxproj @@ -74,28 +74,28 @@ true $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName)$(PlatformArchitecture) + $(ProjectName) false true $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName)$(PlatformArchitecture) + $(ProjectName) false false $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName)$(PlatformArchitecture) + $(ProjectName) false false $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName)$(PlatformArchitecture) + $(ProjectName) false diff --git a/wufuc_aihelper/aihelper.c b/wufuc_aihelper/aihelper.c new file mode 100644 index 0000000..d098e0e --- /dev/null +++ b/wufuc_aihelper/aihelper.c @@ -0,0 +1,12 @@ +#include +#include +#include + +UINT __stdcall AIHelper_SetUnloadEvent(MSIHANDLE hInstall) { + HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, _T("Global\\wufuc_UnloadEvent")); + if (hEvent) { + SetEvent(hEvent); + CloseHandle(hEvent); + } + return 1; +} diff --git a/wufuc_aihelper/dllmain.c b/wufuc_aihelper/dllmain.c new file mode 100644 index 0000000..b8eb2f6 --- /dev/null +++ b/wufuc_aihelper/dllmain.c @@ -0,0 +1,13 @@ +#include + +BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { + switch (ul_reason_for_call) { + case DLL_PROCESS_ATTACH: + break; + case DLL_PROCESS_DETACH: + break; + default: + break; + } + return TRUE; +} diff --git a/wufuc_aihelper/exports.def b/wufuc_aihelper/exports.def new file mode 100644 index 0000000..f93cca8 --- /dev/null +++ b/wufuc_aihelper/exports.def @@ -0,0 +1,2 @@ +EXPORTS + AIHelper_SetUnloadEvent diff --git a/wufuc_aihelper/wufuc_aihelper.vcxproj b/wufuc_aihelper/wufuc_aihelper.vcxproj new file mode 100644 index 0000000..7d68274 --- /dev/null +++ b/wufuc_aihelper/wufuc_aihelper.vcxproj @@ -0,0 +1,169 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {C1AE00F8-D223-4462-B6A8-5A5D138A5D1F} + Win32Proj + wufuc_aihelper + 10.0.15063.0 + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ + $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ + $(ProjectName) + false + + + true + $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ + $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ + $(ProjectName) + + + true + $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ + $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ + $(ProjectName) + + + false + $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ + $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ + $(ProjectName) + false + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;WUFUC_AIHELPER_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + + + Windows + true + true + Msi.lib;%(AdditionalDependencies) + false + exports.def + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;WUFUC_AIHELPER_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDebug + + + Windows + exports.def + + + + + Level3 + Disabled + _DEBUG;_WINDOWS;_USRDLL;WUFUC_AIHELPER_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDebug + + + Windows + exports.def + + + + + Level3 + MaxSpeed + true + true + NDEBUG;_WINDOWS;_USRDLL;WUFUC_AIHELPER_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + + + Windows + true + true + Msi.lib;%(AdditionalDependencies) + false + exports.def + + + + + + + + + + + + + \ No newline at end of file