View previous topic :: View next topic |
Author |
Message |
Sputnik
Joined: 23 Apr 2007 Posts: 80
|
Posted: Mon Dec 20, 2010 2:37 am Post subject: Don't understand Bootstrap concept |
|
|
Just recently bought .Net Encryptor.
I've never heard of or have done a bootstrapp app and I surely don't know how to 'incorporate' it within my app. I hate to admit this, but I started reading the How .NET Encryptor Works section of help and I'm totally lost. I opened up the AnyCPU bootstrap program, thinking I could at least figure out what I needed to do - - but it was WPF and boom - I'm lost again.
I do understand the prebuild stuff, but not your sample - you have 2 sections which include an output dir - - I thought there would just be a commandline command to run on my exe, encrypt it and send it to my FinalEXE folder
I have a WinForms exe (in a basic VS2010 Solution) - simple enough - I want to encrypt my exe
I'm just totally confused as to what steps I need to do, in order to get this accomplished.
I know I probably seem pretty stupid to you, but since I don't even understand your entire concept, is there any way you could break it down in basic English? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Dec 20, 2010 10:28 am Post subject: |
|
|
OK - have a look at the Bootstrapx86 project. The target application in this sample project is a Windows Forms application (TestApp). We would probably recommend using the x86 bootstrapper unless you really need to have native x64 support. x86 applications will still run happily on x64 systems - usually faster then native x64 applications and often with less issues.
The bootstrap application is just a small application that contains your actual application assemblies as encrypted resources. It decrypts your application assemblies from the resources and then runs it. To the end user the bootstrap application IS your application (ie it is what they run) - so you change the name of the output bootstrap assembly, icon etc so that they are what you want the user to see.
Then see the section "Modifying the Bootstrap Project" in the help which describes how to add a build event to the project which encrypts your application assembly. Then you add the encrypted assembly as a resource to the bootstrap project (again following the instructions in this section). _________________ Infralution Support |
|
Back to top |
|
|
Sputnik
Joined: 23 Apr 2007 Posts: 80
|
Posted: Thu Dec 23, 2010 12:46 am Post subject: |
|
|
Infralution wrote: | OK - have a look at the Bootstrapx86 project. The target application in this sample project is a Windows Forms application (TestApp). We would probably recommend using the x86 bootstrapper unless you really need to have native x64 support. x86 applications will still run happily on x64 systems - usually faster then native x64 applications and often with less issues.
The bootstrap application is just a small application that contains your actual application assemblies as encrypted resources. It decrypts your application assemblies from the resources and then runs it. To the end user the bootstrap application IS your application (ie it is what they run) - so you change the name of the output bootstrap assembly, icon etc so that they are what you want the user to see.
Then see the section "Modifying the Bootstrap Project" in the help which describes how to add a build event to the project which encrypts your application assembly. Then you add the encrypted assembly as a resource to the bootstrap project (again following the instructions in this section). |
So, you're saying add the bootstrap part as an extra project to my app's solution, or ar you saying to somehow add the code from the bootstrap to my application?
I don't understand what the process is and how it gets encrypted and then, how my application runs afterwards..... |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Dec 23, 2010 5:03 am Post subject: |
|
|
Quote: | So, you're saying add the bootstrap part as an extra project to my app's solution |
That's correct. Instead of running your application directly your customers will actually run the bootstrap project exe. This loads your application from an encrypted resource and runs it. It also displays the splash screen while your application is being loaded.
The "Modifying the Bootstrap Project" section in the help describes how to add a build event to the bootstrap project which will encrypt your application assembly each time the solution is built. You add the encrypted assembly as an embedded resource to the bootsrap project (in the Assemblies folder). The bootstrap main method just shows the splash screen then calls ExecuteAssembly passing it the name of your application assembly - which uses the AssemblyLoader dll to decrypt, load and execute your application:
Code: | SplashForm.DisplaySplash(500, 500);
ExecuteAssembly("TestApp");
SplashForm.CloseSplash(); |
The bootstrap sample projects show how this is done for a Windows Forms (TestApp) application or WPF (TestWpfApp) application. _________________ Infralution Support |
|
Back to top |
|
|
|