-
-
Notifications
You must be signed in to change notification settings - Fork 86
How to build and debug
Jingang Guo, KK edited this page Jul 15, 2015
·
10 revisions
This project is build under VisualStudio Express 2013 for Desktop, you can download the tool on Microsoft.com for free.
git clone https://github.com/kkguo/apkshellext.git
cd apkshellext/ApkShellext2
git submodule init
git submodule update
git clone --recursive https://github.com/kkguo/apkshellext.git
- Start the project with VS express
- Create a key for yourself. see MSDN
- Build the solution
- Go to bin/Debug, run install to register
- You need to run the build first time, and get the language resource dll under bin/debug/< lang-code >/ApkShellext2.resources.dll, create a new folder named as < lang-code > under Resources/ in your solution view and add the dll into that folder.
- Set the property BuildOperation as "Embedded Resource".
- Build the second time. The language will be included and enumerated automatically.
- Change the PostBuildEvent so the dll will be updated after each build.
- Log, Using the diagnostics feature from SharpShell
HKEY_LOCAL_MACHINE\Software\SharpShell\LogMode = 4
HKEY_LOCAL_MACHINE\Software\SharpShell\LogPath = <your log file path>
- Stepping the register process, you need to manually change the debug option, as C# express is not officially supporting this (but actually it does work)
- Close up VS express.
- open ApkShellext2.csproj.user with a text editor.
- un-comment
<!-- Debug the registry process, please uncomment this part
<StartAction>Program</StartAction>
<StartProgram>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe</StartProgram>
<StartWorkingDirectory>C:\Users\guojin\Documents\Brews\ApkShellext2\ApkShellext2\bin\Debug\</StartWorkingDirectory>
<StartArguments>/codebase apkshellext2.dll</StartArguments> -->
-
change the path according to your setting
-
Open VS express as administrator
-
set your break point
-
Click Run button.
-
Stepping the handlers
- Build the whole project, if you cannot write into the dll, run restart_explorer.bat under bin/Debug
- Debug -> attach to process, find explorer.exe, OK
- set break point in the handler code
- Open a folder with apk files, and if you are triggering the handler, you should get to the break point.
-
Some Hints
- if you cannot set the break point, check following registry key, it's listing one or more version numbers. remove those version you are not using, or remove the whole sub key if you don't know and restart the install.bat.
HKEY_CLASSES_ROOT\CLSID\{1F869CEE-4FDA-35D9-896F-43975A87D1F6}\InprocServer32
HKEY_CLASSES_ROOT\CLSID\{dcb629fc-f86f-456f-8e24-98b9b2643a9b}\InprocServer32
HKEY_CLASSES_ROOT\CLSID\{946435a5-fe96-416d-99db-e94ee9fb46c8}\InprocServer32