Run software from USB device - c++

I am developing a desktop based application using VC++.
I have stuck on one problem that the application should run through USB too.
I have searched for the answer I get to know that I can do it by changing installation path to USB device from this Link.
But my application needs some supporting platform like .Net Framework 4.0 Client Profile, and some redistributables for running application.
So, Can anyone tell me how can I make my application running through USB?
Thanks in advance.

regarding .Net Framework 4.0 Client Profile
As far as i know the .Net runtime can not be included in an Application.
The PC you want to execute your Application on needs to have the proper Runtime Version installed, it doesn't matter if its running from USB or not.
Here is a good article about the topic:
http://johnhaller.com/useful-stuff/dot-net-portable-apps
it basically concludes that you have to chose the .Net version depending on your target OS.
for Windows Vista and Windows 7 it would be .Net 2.0,
for Windows 8 it would be .Net 4.0
There might be a solution using Portable.Net or Mono but thats a bit above my developer skills :)
regarding redistributables
it really depends on what kind of redists you mean, if its the visual c++ redist you only need to include the right DLL, for other redists im not sure.
Btw Apps running from USB Sticks are usually called 'portable app', if you search for dotnet portable apps you can find quite some information.

Related

Running .net based exe application without .NET Framework

I just created a clr c++ aplication that combine c++ code and windows form
as resoalt the exe prodused from visual studio cannot use /mt and its not standalone (it require the wright .net installed on the computer)
are there ANY way to make a fully standalone exe from clr c++ exe?
i tried to check out spoon studio and Cameyo but it's look like they work only on files that includes instalation ...
The point is what a standalone application would buy you here? There is no such thing as a "standalone application" anyway - depending on how hard you look at it. You'll always have dependencies at least on the Windows version you intent your application to run on.
In the end it boils down to deployment or distribution issues. If you don't want your users to install a (newer) version of the .NET framework just to run your application, then start by determining the lowest Windows version you want to support with your application. Then check here for the .NET version that comes preinstalled with that version of windows. Then target your application against that version of .NET.

How to include .NET framework library in executable

I've recently made a Windows Forms Application in VS 2010 Express. When running on my machine it works fine but on other machines it needs to install the .NET framework first. Is there anyway around this? By including the library in my executable? By not using the .NET framework?
I would really appreciate some help.
Typically this kind of problem would be handled by your Windows Forms Application's installation package.
Opinions vary but I'd suggest the safest/most polite thing to do is to treat .NET as a prerequisite. If .NET is not present, display a message that it is required before the install will succeed and perhaps point to a Microsoft download page like this one or this one. The risk is that you point them to an obsolete download page or that the page moves and invalidates your link.
That said, I would have expected most machines to have some version of the .NET Framework installed (by Windows Update for example) so it's a bit surprising that you're being told it needs to be installed.
I suggest you follow the instructions in How to: Determine Which .NET Framework Versions Are Installed to check one of your failing machines to confirm that .NET is not installed (very unlikely) or to determine which version (or versions) of .NET is (are) installed.
Update 6/21/2015 From the comment below, we have evidence of two systems without .NET installed so my "very unlikely" comment above is a bit off base!
Update 7/4/2015 I have a bad habit of forgetting that not everyone configures their Windows systems exactly the same way I configure mine. From this blog post it seems that the .NET Framework is 'only' a Recommended Update.

Programming for Windows Phone 8 (and beyond) on GNU/ Linux

Since the VideoLAN programmers do write Windows 8/RT/Phone apps using Linux based operating systems and GCC I was wondering, whether there is some progress in regard to how to program for Windows in a Linux environment, where Windows is used only for testing. How easy/ hard is it, to program a Windows RT (modern UI whatever)/ Windows Phone 8 application on Linux?
I imagine a situation, where you use tools such as Git, Emacs/ VIM, GCC, Mono etc. to do the job. How about submitting the app without Visual Studio?
I ask, because Microsoft open-sourced so much stuff now, using Linux based OS for development could (should?) become feasible while developing apps for their systems. Does anybody have some behind the scenes information on this? It is very hard to find some relevant info.
Note I edited this question to be more "straight to the point"
Links:
This is the VLC Kickstarter page: https://www.kickstarter.com/projects/1061646928/vlc-for-the-new-windows-8-user-experience-metro
I'm a software engineer at Microsoft so I think I could give you some insights on this.
From a testing perspective, you should definitely have a Windows machine to test against. You can install Windows 8 as a VM using Virtual Box or something similar. You could also remote into a Windows machine if you have access to one.
Visual Studio can't be installed in Linux, as you know, but there are other C#/ASP.NET/etc. IDE's that you can use natively on Linux. Look into Wine for Linux: http://www.winehq.org/about/. It may help you somewhat.
As an aside, developing applications for Windows will be getting easier in the coming months. As was announce at MS Build, Microsoft is moving towards a universal app store that will make your app run on all Windows devices: PC, tablet, phone, and Xbox. This doesn't help with developing apps on Linux, but if you're a Windows developer, you might want to keep your eyes open about the new universal-style apps.

Programming on an ARM tablet

Not sure whether to ask this here or on SuperUser... so please migrate it if required.
I was recently gifted an Asus Vivo WinRT tablet by my boss and I was looking forward to having a little portable testing environment.
Unfortunately, it contains an ARM processor and, as far as I can see, there are no development tools that will run on it. Everything is x86/x64.
Is there anything I can use to develop on the actual tablet itself? If not .NET, then perhaps a C and/or C++ compiler? SQL even? Anything? I'm having heaps of trouble finding anything myself.
No, there is not. You'll need to use visual studio 2012 and create a windows store application. From there you can build your app and side load it to the tablet. There is a component you can install on rt that will enable you to debug the app as it runs on the tablet however, this comes with vs.
Most apps for any tablet are developed this way, as tablets usually less than ideal development machines.
The only way at the moment is to use remote desktop. use the RDP client on the RT slate to connect to a PC with visual studio installed.

Is it possible to program for Windows Phone 7 in standard C++ only?

I know that the recommended language for Windows Phone 7 development is C#.
However, for various reasons, I very much prefer continuing to program in standard C++, if possible.
Is it possible to program for Windows Phone 7 in standard C++ only?
If the answer is yes, what tools and resources do I need to accomplish that?
EDIT, finally: for WP7 it won't ever be, but for Windows Phone 8 - yes you can. Native apps, C/C++, iOS/Android portability and code sharing, DirectX. You'll need Visual Studio 2012 and Windows 8 for WP8 development, though. VS2010 is not getting the requisite SDK. To run the emulator, you'll need a 64-bit physical Windows 8 box with a SLAT-enabled CPU. You can still develop on a virtual machine, but you'd need a device to run apps, the emulator won't start.
The nongame UI, however, will still be XAML-based and managed. The entirety of Win32 API will not be supported. They're pushing a model with managed UI layer and a native middleware beneath it. Purely native development is still not an option; although one might try with WinMD classes as code-behind for XAML. The visual XAML designer will probably choke, and you'll need a dummy managed DLL anyway.
EDIT: even assembly, as long as it's targeting Thumb-2 and the mnemonics are UAL-style. For running on the simulator, you'd have to produce an alternative set of assembly files (or other sources) targeting Intel.
For the sake of posterity, here's the pre-06/20/2012 answer:
If you work for Microsoft or an OEM, then yes. Otherwise, no (for now).
There's hope though. Google did relent and issued their NDK after a while; Microsoft might, too. The native code capability is already there. Once they come up with a sensible sandboxing solution, why not.
Also, there's already some pressure from big-name software vendors to open up native development. Mozilla people stated outright that there will be no Firefox on WP7 unless it's native. Similar rumors about Flash.
EDIT: if you want a native SDK on WP7, like I do, please go sign the petition here and/or the one over there. Thank you!
EDIT2: see this. It's a leak and therefore not official, but still, I say there's some hope.
EDIT3: also this. Still not official, but this rumor moves the timeframe for native app support even closer - to the upcoming Tango release.
EDIT4: Microsoft seems to be pretty keen to promote WinRT, their new tablet-oriented XAML-based app platform, which allows for (among other things) unmanaged C++. Now, on every other major mobile OS the tablet and the phone app stacks are one and the same. Just sayin'.
EDIT5: there's been some proof-of-concept work along the lines of C++ => LLVM => MSIL and C++ => LLVM => C#, but nothing production-quality so far.
Phone manufacturers such as Samsung can deploy applications written in unmanaged code, but all other developers can not.
No that is not possible. Microsoft has made a decision to only allow application developers to use managed code on the Windows Phone 7 devices.
According to Wikipedia Windows Phone 7.0 runs Windows CE 6.0 R3/7.0 hybrid as operating system.
In theory one could use C++ to build standard* C++ programs targeting Windows CE 6.0 R3 and 7.0 (supposed to come out on Q1 2011). I mean all the standard* dlls should be there (gdi32.dll, user32.dll) Internet Explorer and other C++ programs are still running on Windows Phone 7.
The how to get the application on the phone? and how to run the application on the phone? are the next questions which at the moment I don't know how to answer.
This interview tells something about it: Writing the WP7 App Platform in C# and C++ I haven't watched it yet, so you might add respective comments :)
Windows Phone 7 supports Silverlight and XNA.
All programs for Windows Phone 7 are written in .NET managed code. It is also possible to write Windows Phone 7 applications in Visual Basic .NET.
Visual Studio 2010 Express for Windows Phone includes XNA Game Studio 4.0 and an on-screen phone emulator, and also integrates with Visual Studio 2010. You can develop visuals and animations for Silverlight applications using Microsoft Expression Blend.
The Silverlight and XNA platforms for Windows Phone 7 share some libraries, and you can use some XNA libraries in a Silverlight program and vice versa.
But you can’t create a program that mixes visuals from both platforms. Maybe that will be possible in the future, but not now.
EDIT:
to be more clear..there is no native C++ support you'll have to use either Silverlight or XNA,both are based on .net framework.