Red Gate forums :: View topic - Limited support for multiple assemblies
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Limited support for multiple assemblies

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
logandam



Joined: 23 May 2014
Posts: 3

PostPosted: Fri May 23, 2014 11:44 am    Post subject: Limited support for multiple assemblies Reply with quote

My company purchased SmartAssembly because we've had an incident where one of our ex clients started making their own version of our software. I've been tasked with using it to obfuscate our code to make it a little more difficult to do so.

Now I understand that a lot of applications generally have one main executable with one or two libraries, and SmartAssembly makes it really easy to manage everything if that's the case since you can embed your libraries within your main application. That's great for that use case. But I am struggling to come up with ideas on how to do this with our applications, which have several hundred separate executables (our applications have some main processes that monitor for work and fire off separate individual processes based on the work) and each one loads a common set of libraries (and even those can differ). This means we can't do the embedding because then we're going to increase the size of each binary several times their original size which is just a waste of size, and it also makes it a pain to set up a separate project for every single executable.

I know there is a command line interface to SmartAssembly but it still relies on having project files. Ideally I'd like to just be able to use the command line to do something along the lines of "smartassembly -i <input> -o <output> [options]" or have one SmartAssembly project for every binary we have.

I've searched on the net and had a look at the documentation and I haven't come up with anything like this. Is it possible for SA to do what I describe above or am I going to have to set a day where I just make projects for all 400+ assemblies we have?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Tue May 27, 2014 12:07 pm    Post subject: Reply with quote

You could write a batch command that creates projects for your assemblies.
http://documentation.red-gate.com/display/SA6/Using+the+command+line+mode

The /create argument lets you specify an .saproj file that contains the automatically-generated project. You can try this in a batch:

FOR %N in (*.exe) do "c:\program files\red gate\smartassembly 6\smartassembly.com" /create "c:\SAProjects\%N.saproj" /Input "%N" /output "c:\protectesassemblies\%N"

I hope this helps.
Back to top
View user's profile Send private message
logandam



Joined: 23 May 2014
Posts: 3

PostPosted: Tue May 27, 2014 12:10 pm    Post subject: Reply with quote

Thanks, I was hoping to avoid that but it will have to do. Is there perhaps anything planned to make this simpler in a future release?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Fri May 30, 2014 8:22 am    Post subject: Reply with quote

You can use the command-line and it will create the projects for you with one command. Have you got any suggestions as to how to make the process easier?
Back to top
View user's profile Send private message
logandam



Joined: 23 May 2014
Posts: 3

PostPosted: Fri May 30, 2014 8:32 am    Post subject: Reply with quote

Well I don't know how the internals of SA work but I don't see why you can't have multiple assemblies or targets in a project file, or maybe have a solution file tying up several project files like visual studio does just to consolidate things a bit better. Maybe I'm just lazy Very Happy
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Wed Jun 04, 2014 8:27 am    Post subject: Reply with quote

It would not be easy - error reporting and other functions assume a one-to-one relationship between the project and the assembly.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group