What CEF Sharp files can I safely delete? - cefsharp

I use CEFSharp solely to complete an OAUTH login sequence for a desktop app. It is a pretty heavy tool for that job.
Looking at the files in the x86 and x64 folders that get added by CEFSharp, which ones can I safely delete?
Can I get rid of Locales? What about SwiftShader? What about the PDB and PAK files?
Thanks so much!

You can delete the optional files in this link as long as your application will still be loading well.
https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)

Related

Is there any addin for Visual Studio to synchronize files?

I want to know if there is any addin to synchronize files with a remote server (like a file upload (FTP) for deployment). (in a Website)
Something that can identify the files I change and check them for a later upload.
Is there an addin for that?
That sounds remarkably like source control to me... and there are lots of source control add-ins for Visual Studio.
Even if you don't really want the full power of source control, it can be a pretty simple way of syncing with another machine... in fact, that's how I end up "deploying" to csharpindepth.com - I check everything into a repository on the server, and a hook updates the web site directory.
You are probably looking for something like this. Dispatch is pretty good indeed, but it´s not a free alternative.
If you are talking about just file syncing and not source control, then Microsoft's Live Mesh is the tool for you. It will sync files across whatever devices you want - quite handy if you need to take work home with you but don't have remote access to your source control (or you do but don't want to be checking in stuff that is still WIP).
Note that it isn't a VS plugin, it operates separately and watches for file system changes.
What do you mean by synchronize files? Synchronize with what?
If you mean with a repository, then ankhsvn is one such add-in that works with subversion.
If you mean with the deployment location then clickonce is built-in and manages file versioning on the server whenever you click 'publish'.
edit>
ClickOnce calculates all necessary dependencies for the project. Additionally, you can click the 'application files' button in the publish tab of project config and select 'show all files'. For each file you can mark them as:
include: They'll be deployed with the project
Pre-requisites: they must be on the system at the time of installation/deployment
Exclude: Don't deploy them
Likewise, the pre-requisites button allows you to ensure that certain application dependencies are present (framework version, sql server is installed, etc.).
AnkhSVN http://ankhsvn.open.collab.net/ is an integrated Subversion interface and as with all version control systems you can check in code (and other files as well). I would recommend something of that nature unless you synchronization files are not project related, in which case I recommend pretty much any of the file synchronization utilities that are available out there. I'm partial to Delta Copy http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp for general purpose file copies.

How can I convert a JAR file to an EXE file?

I want to created a JAR file and I want to run it on a client machine.So, I have a couple of questions:
How can I convert the JAR file to an EXE file?
How can I encrypt the JAR file's contents? The jar file could be extracted with WinRAR and the classes could be decompiled with any Java decompiler.
How can I create an installer? My clients doesn't have any JVM and I don't want to ship JDK or JRE along, because they have big size.
See this link: Java to Exe. It also explains what valid reasons are to do this, and when you should not.
You can't really encrypt binaries as the machine has to understand them. That said, an optimized executable is very difficult to decompile, while plain class files are ease.
If you have an exe there are installers enough.
JSmooth is a application which will wrap your Jar in an exe
it also allows you to check if the correct version of JRE is available on the system you're deploying to
http://jsmooth.sourceforge.net/
As for 1): I guess you can not. There may be tools out there, but you cannot do that with standard tools shipped with JDK, as it would destroy platform independance. (See other answers providing links to such 3rd party tools)
As for 3): Use InnoSetup to create the installer. Include JRE within setup and let InnoSetup install it on the fly.
You can't prevent decompilation. The best you can do is make it harder or more time-consuming to do so. As an answer to your question though, I believe you can use gcj to compile Java into EXEs.
May be Excelsior JET will satisfy your needs.) IMHO very mature product.
1) I have recently tried the program jarToExe and like it.
Some features are:
free basic version or very cheap ($30) for 'enterprise'
ability to have windows task manager list your app's name instead of the default java.exe
extra obfuscation
runtime check that java is installed
2) You can make it harder to reverse engineer using proguard or other obfuscator
3) nsis is a very powerful, free scripting language to create windows installers. Good documentation on the site wiki and support on stack overflow as well.
Launch4j worked for me while some tools hadn't been working. It also have a good guide here.
Hope this help!
We use a 7zip SFX install launcher. This is an open source simple tool. It will package your jar, a version of jre so it's not mandatory for the installing systems to have jre installed and a self extracting version of 7zip. Here is a tutorial which explains how to bundle and GitHub link
The project is not maintained but works perfectly(tested until Java 1.8)
1) To create the exe, you can use Launch4j
2) As I have seen, you cannot encrypt the jar contents. I'm not sure though.
3) To create the installer you can use the exe you just created and use InnoSetup to create the files. You have to embed the jre inside the installer and also any other libraries and extra files that may need in the runtime. When embedding the jre, the setup gets large and if you want to avoid that, you can ask the clients to install java in the machines. That way, you wont need to ship with the jre.

How to package an ASP.NET application to prevent customers from modifying it?

Is there a tool or some general approach to packaging all the files of an ASP.NET application into binary form to prevent modification once its deployed? I am thinking there would be a set of signed binaries and a config file for settings that we allow the customer to modify. Has anyone attempted this, is it even possible?
I would pay a reasonable amount for a slick commercial product that did this with minimal hassle.
UPDATE
Sorry, from the answers I can see that I wasn't clear. I meant literally packaging ALL files, not just the code files. This means aspx, scripts, images etc. I'm not trying to prevent reverse engineering... this is a supportability issue, i.e. to avoid dealing with problems brought about by customer messing with the files.
If you made a web application project than you can compile your code into a single dll file. You can find it in the bin folder.
Just use aspnet_compiler.exe to precomple everything and then use aspnet_merge.exe to roll up all of the compiled assemblies into a single assembly. You can use an obfuscation tool like DotFuscator if you want to make it more difficult to reverse-engineer. Visual Studio pro and up include a "lite" edition of Dotfuscator that you can use for this.
Your codebehind files will be compiled in a single dll as ZippyV already mentioned. The aspx files will get deployed normally on the webserver.
But still, your dll files can be disassembled quite easily. So to be sure you have to use an obfuscator.
If you mean ALL files including the aspx you could also consider ngen. It precompiles everything into a dll so you can't even get at the aspx pages.
Although, ngen was designed to get rid of the JIT compiling feature of the framework and is definitely not a generally recommended approach but it may work in your case well.
From VS2008 select the menu option "Tools" and then "Dotfuscator Community Edition". You will have a "Learn More" link after it starts up.
I also sign mine using SN.exe to make it have a strong name. Given all this, I think it is complicated enough to figure out a system if you are given the source code and help.... so I don't worry about it anymore.
maybe Dotfuscator your customer won't be able to modify it nor reverse-engineer it :)

Don't publish particular folder in ASP.NET

Is it possible to exclude a folder in a web project from being published? We've got some documentation and scripts that included in a particular project folder, and are added to the project, but when I do a VS publish, I don't want them to go up to the production server.
I know they shouldn't be in the project, but I thought I'd find a workaround before I try to convince the owner to modify the way he's doing things.
Old question, but I found if I mark the folder as hidden in Windows Explorer, it doesn't show/publish in your solution.
This is good for example to stop original photoshop images being included in uploads which aren't used and are big. Anything more complex though you'll probably want to write your own publish tool.
This doesn't answer your question, exactly, but my feeling is that unless you are a single developer publishing to a server, you would be better off doing builds on a dedicated workstation or server using MSBuild (or some other building and deploying solution) directly (and thereby would be able to very granularly control what goes up to production). MSBuild can not only build, but using some extensions (including open source types), it can also deploy. Microsoft has a product called MSDeploy in beta, and that might be an even better choice, but having no experience with it, I cannot say for certain.
In our situation, we have a virtual workstation as a build box, and all we have to do is double click on the batch file that starts up an MSBuild project. It labels all code using VSS, gets latest version, builds the solution, and then deploys it to both servers. We deploy exactly what we want to deploy and nothing more. We're quite happy with it.
The only downside, if it could be considered a downside, is that at least one of us had to learn how to use MSBuild. VS itself uses MSBuild.
For the files you don't want to go, loop at the properties and set the 'Copy to Output Directory' to 'Do not copy'
This option is not available for directories, however.
Can you not exclude them from the project through visual studio to stop them being published. They will the still exist in the filesystem
The only way that you can do this to my knowledge would be to exclude it from the project, do the publish, then re-include it in the project. That can be an issue.
There are probably much better ways to solve this problem but when we publish a build for our dev servers, we'll run a batch file when the build is complete to remove the un-needed folders and web.configs (so we don't override the ones that are already deployed).
According to http://www.mahingupta.com/mahingupta/blog/post/2009/12/04/AspNet-website-Exclude-folder-from-compilation.aspx you can just give the folder the "hidden" attribute in windows explorer and it won't publish. I tested this and it works for me.
Seems like a straightforward solution for quick and dirty purposes, but I don't think it will carry through our version control (mercurial).
Select all the files that should not be published.
Go to Properties
Set
Build Action -> None
Have to repeat the process for each sub-directory.

Compress Script Resources of ASP.Net

How do you compress Script Resources of ASP.Net? I saw a file there reached up to 255 KB! I tried finding solutions, but so far it only talks about scripting dynamic and static files. I checked the compression temp folder of IIS and found no compressed scripted resource there. That led me to the conclusion that these files are transferred over with high bandwidth.
I don't know about tying something into ASP.net but there are a number of standalone compressors. Packer is available as a .Net app. JSMin is available in a number of languages but none of them .Net, and there's ShrinkSafe which requires java. It should be pretty simple to tie any of them into your build process.
the best would be to implement an httpHandler in the web.Config.
see http://blog.madskristensen.dk/post/Optimize-WebResourceaxd-and-ScriptResourceaxd.aspx
If you're running IIS6 the guys at OrcsWeb have a nice wee article -
http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx
We have customers running the port80 software because they get more control:
http://www.port80software.com/products/zipenable/
http://www.port80software.com/products/httpzip/
Check out the JSCompress task in the MSBuild Community Tasks (http://msbuildtasks.tigris.org/). It'll strip out the whitespace from a JS file for you.

Resources