Where do I specify the text of a Pocket PC app's shortcut? - deployment

I'm unfamiliar with Pocket PC development, but I have to make a few minor changes to an VS2005, Pocket PC 2003 Device application. One of the changes (which I thought would be trivial) is changing the text of app's shortcut, but I can't figure out where this text is set. The solution includes a setup project, so I'm looking for it in there, but I can't find it. I know it's got to be in there somewhere because building the setup project generates an AppSetup.inf file that contains the shortcut information.
This can't be that difficult. Surly I'm suffering from what my wife refers to as "male vision" when I can't find the bottle of mustard in the refrigerator that's right in front of my face. Where do I specify this text?

It depends on exactly how the shortcut is generated. There are generally 3 mechanisms that are used.
Via the CEShortcuts section of the INF. For this, it's the text before the first comma
Via copying an LNK file via the CopyFiles section of the INF. With this mechanism, you create a physical LNK file on the desktop that gets rolled into the CAB and it's copied like any other file. The name on the device is again the first string before the comma.
Via a programmatic call (usually to SHCreateShortcut) in a custom CE Setup DLL.
You'll have to figure out which is being used in your deployment scenario to know exactly what needs to be changed.

Thinking more about this, are you trying to simply find where in the Studio UI of the installer project to change the shortcut? If so, this MSDN article may help. What is very non-intuitive is that there are little icons at the top of the Solution Explorer that change the view of the installer, allowing you to see things like files, registry entries, etc. It may be that you simply aren't looking at the right view and you need to select a different icon. There are no menu items that do what these icons do, and they are hard to notice the first time you start using an installer project.

Well, as I suspected, it was right in front of my face. We'll call this project PDAProject. In the solution explorer, under the PDAProjectSetup project is an item labeled Primary output from PDAProject (Active). If I double-click on this item two panes appear in the code editor window. The one on the far left shows a folder tree labeled File System on Target Machine. Under this are three folders labeled Application Folder, Program Files Folder, and Programs Folder. When I click on the Programs Folder, the application shortcut appears in the pane on the right and I can modify its text.
I don't know why I was never compelled to double click on that Primary output from PDAProject (Active) project item even though that's how you open any class or form for editing. I kept right-clicking and opening the Properties. Maybe it's time to give up programming and take up basket weaving.

Related

Packing an Actionscript (Flash Builder) application for iPhone

Recently I tried to build a flash application in Flash Builder, and I wanted to export it to my iPhone. I have gone through all the required steps in order to certify my application.
Now, with all that done, all that was left to be done is building the ".ipa" file in Flash Builder. Now, this gives the following error:
'Launching TestGame' has encountered a problem.
Error occurred while packaging the application:
NotBefore: Wed Apr 11 18:52:40 CEST 2012
Google didn't give me a decent answer, nor does Adobe's information regarding mobile application development. All I can think off, is that I can't build the application before that date. That's ridiculous, I can't imagine a certain check like that.
I'm pretty sure my ".p12" key file is generated correctly.
Is anyone else familiar with this error? Please, be so kind to guide me in the right direction.
Kind regards,
Matthias.
The error occurs because the compiler didn't find the files under the corresponding directory such as debug-bin or release-bin folder. (explains from: http://forums.adobe.com/thread/893772)
For example, if you are doing a debug-build, and you didn't select the project option: copy non-embeded files to the output folder. And debug-build needs some files such as icons files under the debug-bin folder, and it couldn't find it.
Solution: select project compiling option: the copy non-embeded file to the output folder.
Try again, if still not you will need to try the ADT build to get more details http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac35eb7b4e12cddc5fbbb-8000.html
I suggest compiling from command line. I'd ported an AIR app to iOS and compiled using adt dirrectly (without FB or whatever), and there were more meanful messages then yours. Take a look at the manual on how to build ipa wit adt. The other advise is to check your iPhone node in app.xml (take a look here) and icons.
The "error" was thrown because the certificate wasn't valid yet. It became valid on the date shown above.
You could also fix the manifest file in the iOS developers center.
This problem does come up more often than needed. The error reporting is lacking distinctions but is also difficult to asses since there can be many factors causing this error. If it was one factor or even just a few then it would most likely let you know.
A great way to ensure that the error reporting can do its job and tell you where the problem is is to check your error log. It will tell you at least a few of the places that threw the block.
If you are unable to read those strange glyphs then just ensure that all your resources are being packaged. This does mean a little time of list checking but it is well worth it, for the errors and to get rid of development junk.
The first step in the asset list check is to go through each part of your Assets class (flash builder reference). If you do not have a direct Assets class then you may want to make one and move all of your asset calls to that one class - since it will save you time if this happens again.
Your Assets class is not the same as your Assets folder. Your folder is where the files are stored - i.e. images, bitmaps, sounds, etc. Your Assets class is what categorizes and assigns references to each individual file.
Go through your Assets class to ensure that each of those files exist in the folder as well. Then go to the Project menu (top near Navigate and Search) and select Clean. Either clean all your projects or check the current one. Once this is done you need to click on your Assets Folder (right click or highlight and hit edit or whatever), and select Refresh. This will check that all the files are still there and get rid of/update them.
If none of this throws an error -red X- or other errors then you need to check your project .xml file. This may take you some time to ensure that all of your add on packages and details are correct. Make sure you have the correct:
at the top and it matches your current air release.
Make sure all the filenames, names, ids, version numbers, aspect ratios, fullscreen, visible, icons, extensionIDs, and everything else are not only correct but actually there. Most of these statements should have something written and not be blank. If they are blank find out what to put in.
Ensure that you have the proper icon file extension. If it says assets/icon48.png and the icon48.png is actually in assets/pictures/images/icons/toomanyfilesextensions/whatever/icon48.png
you need to fix that link.
The last thing that you will need to check is when you want to either Release Build or Debug. You need to make sure that all assets are checked and selected.
Go to Project - Properties.
then select ActionScript Build Path.
Click the Native Extensions tab and see if there are any red X's. If there are tap the little arrow beside them and see what the matter it. Add the correct ANE or get rid of it or whatever you need to do.
Then in the same menu go to the left and select ActionScript Build Packaging. A little arrow should be beside that one too. Tap the arrow and it will open to Apple iOS, BlackBerry, Gooogle and whatever else you have (probably nothing more). Select the OS your want to use, lets say Apple, and you will have 4 tabs pop up. Make sure you have the correct certificates selected. If you have none or are confused about this you need to spend some time on Google.
The biggest one for this error is under the Package Contents tab. Most people miss this!
Open the tab and see if anything is not checked. There will 99.99% be something or many of them not checked if you are getting this error. Just check them all and you can figure out what you need and don't need later. Some of them will be listed because you just threw in a bunch of ANEs and .SWFs to have some awesome app. Those add on packages will throw in unnecessary contents into this package. That is fine and don't worry until you want to be picky. Just make sure they are all selected and hit Apply and Ok.
That's it. You should have a working Release Build if you did everything else correct and this error should be easy from now on (but time wasting).
You may get a 'slip' error now, but that is another story. But that is a great sign because you are getting closer to that stupid mistake that we all make: the elusive spelling mistake.

Creating a file type with new icon

I have a text based file i have given an extension named .val i have also changed its icon by selecting Computer>Open tools>Open folder options>
however though this changes the icon for the extension it only changes it on my computer, I would like to know how I can do this for all machines. even if that means building somthing that needs to be installed, which is fine with me
I wrote a little program awhile ago. The windows registry thing is a mess. Save yourself a lot of time and use this installer package - it has a wizard that will create an install script for you. Navigate to your program, icon, etc. Pretty easy.
http://hmne.sourceforge.net/
As I recall, in windows icons are set based on what program is opening it, so indirectly the file type. So first you have to create reg entries for your application on your computer. Then you have to associate that file type with your extension. And then the extension gets the icon from your app settings. This of course is different in WinXP vs. Win7. Thus why I think you should avoid a lot of headache and use an installer.
[HKEY_CLASSES_ROOT\Your App\DefaultIcon]

Eclipse incoming synchronization view shows incoming new files as folders

I hope it is okay to ask for strange behaviour/bugs in Eclipse here.
When I use the Eclipse synchronize view with Subclipse, I used to see all incoming files from other developers very nicely with blue arrows pointing to the left. Double click was perfect to open the compare editor and review all changes.
For some time now, whenever a colleague adds a new file it shows up as an incoming new folder in my synchronize view! Even if I update it, I sometimes need to restart Eclipse to have this folder disappear from sync view (or sync a different folder and sync the root again). Also double click to open the compare editor is broken then (It's nice to see the new file, even though the left side of the compare editor is empty, but that does not matter to me)
Does anybody know why this happens? I tried all kinds of preference settings and could not find anything on google. I think I use Granny made or whatever they call it, I can't find a sane version number anywhere. Thanks!

desktop icon functionality in a window

My wife complains that I have too many icons on the Windows XP-Pro desktop.
I like to be able to quickly drop a file onto the icon for application I want to have open it. And I like to follow a link to open often-used deeply nested folders rather than navigate there. Thus, I have over 100 icons on the desktop.
(We share the same user account because we switch back and forth so often and because we both need to access the same e-mail, so separate accounts isn't the answer.)
I'd like to write a program which would have similar functionality to the Windows desktop. Then I could open that window to do the drag and drop work, but, when minimized, would leave the desktop display sparsely populated for my wife. As an added bonus, I could implement better organization of the icons than the desktop allows.
This is similar to what an Explorer window does, with the key exception that the desktop allows you to do some arrangement of icons. (For instance, program icons on the left (with the most used ones near the top), folders at the top, data files on the right.)
How do I go about getting an icon to display in a Windows Form (or on an appropriate control on the form)? (For instance, if I drop in a link to Notepad or a link to a file folder.)
How do I take the same action that the desktop does if the icon is double clicked? (For instance, if a link to a folder is double clicked.)
How do I take the same action that the desktop does if the icon has something dragged onto it? (For instance, a text file is dragged onto the Notepad icon.)
I'm using Visual Studio and C#.NET for programming.
I know how to do basic drag and drop.
I do not know:
A. what controls to use on the form to display the icons
B. how to find the icon
C. what commands are built by the desktop under various situations (so I can emulate the functionality)
I apologize that this is a multi-part question, but it was hard to break apart without explaining the whole story again.
This is a big question, but I'll give you some quick thoughts to get things moving in the right direction. WinForms exposes the functionality needed to make this happen, it's just a matter of wiring everything up the way you want it.
The key piece that you will want to look into is Drag/Drop, which is very well supported by WinForms. If you implement your icons as ImageBoxes you can set the AllowDrop property on the program icons and then handle the DragDrop event and have it call an overload of System.Diagnostics.Process() to start the application with the dropped filename as an argument.
As far as finding icons, most programs have their icon included as a resource in their .EXE file or in a related .DLL.
Regarding question C, the underlying question is what behaviors of the desktop would you like to have in your program? Explorer.exe is a massive application that does far more than what you need or what you will need or want to implement. Once you decide what functionality you want, play around with the IntelliSense list of events for the form and imagebox controls. You'll find that a lot of behavior is given to you for free in the Windows common controls, and additional behavior is fairly easy to add by handling the appropriate events.
Why dont you just use a Virtual Desktop??
Try http://virtuawin.sourceforge.net/
You will skip a lot of coding.
Right from their page:
"VirtuaWin is a virtual desktop manager for the Windows operating system (Win9x/ME/NT/Win2K/XP/Win2003/Vista). A virtual desktop manager lets you organize applications over several virtual desktops (also called 'workspaces'). Virtual desktops are very common in Unix/Linux, and once you get accustomed to using them, they become an essential part of a productive workflow."

How to Change Netbeans Fonts and Colors Preview Document?

Within the Netbeans 6.5's Tools -> Options -> Fonts & Colors -> Syntax dialog, you have the ability to change the look and feel of the Netbeans text editor. When you select a language, you are presented with a preview of your font/color scheme. However, when I preview Java, there are far more options for syntax changes than are being displayed in that preview window. If I were able to view a more robust piece of code, I'd be able to see the immediate effect of more of the options.
How can I supply a preview document to view my font/color changes?
UPDATE:
After looking into this some more, I've been able to narrow down the problem a bit. From what I can tell, everything in Netbeans is considered a plugin. The GUI editor is a plugin, and even the text editor is a plugin. This means that what ever piece of Netbeans that actually analyzes Java code and does syntax highlights is also a plugin (since Java is just one of many languages Netbeans highlights, it makes sense this is a plugin).
I think fromvega is on the right track with his suggestion. The tutorial for creating a manifest file editing plugin pointed me in the right direction. The tutorial eludes to a file used as a sample document used for font/color previews. It tells you how to create one inside this new plugin project. (Located in "Registering the Options in the NetBeans System Filesystem", part 4. About 4/5 of the way down the page.)
My next line of thought was to look for the Java syntax editing mode plugin and find this file and update it with a richer example file. I looked in the installation directory and came up empty, but I found what looks like the appropriate files within my user settings directory. There is a config directory with a lot of subfolders within my user directory (Windows: C:\Documents and Settings\saterus.netbeans\config).
I've been poking around inside this directory a bit, but have only found the xml files the manifest tutorial talks about. I have been unable to find the extensionless sample file for the Java plugin that I believe should be there.
Since I've hit a brick wall for the moment, I thought I'd toss it back to the SO community and see if you guys might make the last leap and find the solution.
Just for anyone who wants to alter this themselves it is possible on a unix machine to use grep to locate the file i.e.
grep -lr "some part of the current sample code" /path/to/netbeans
I used this method to locate the ruby example filename and from that identified that it is kept in org-netbeans-modules-ruby.jar as a file called RubyExample. By simply altering that file I was able to construct a better sample file for my own use.
Hope this helps someone!
The document which is displayed (for each mime type) is specified in a particular folder in the "system file system" (which is a NetBeans concept which is a virtual file system composed from contributions from individual modules; this is how functionality is dynamically registered in NetBeans).
Modules typically specify their system file system contributions in a file named "layer.xml" in the plugin. The create plugin templates typically offer to create this for you.
For example, here's how the Python example is registered:
<filesystem>
...
<folder name="OptionsDialog">
<folder name="PreviewExamples">
<folder name="text">
<file name="x-python" url="PythonExample.py"/>
</folder>
</folder>
...
Here, PythonExample.py is a sample file in the same directory as the layer file.
Therefore, what you need to do is create a plugin which overrides the existing registration(s) for the mime type(s) you care about and provide alternate sample documents. You may need to hide the existing registration first (see the _hidden
part from http://doc.javanb.com/netbeans-api-javadoc-5-0-0/org-openide-filesystems/org/openide/filesystems/MultiFileSystem.html ).
Hopefully this guides you in the right direction.
However, in thinking about it, we probably ought to make the preview area editable - so people can cut & paste whatever codefragment they care about right in there. This wouldn't be persistent, so whenever you change languages you get the original samples back - but it provides a quick way to see your own code. This shouldn't be just for the Fonts & Colors customization, but for the Formatting preview panels as well.
I've filed an issue against NetBeans for this:
http://www.netbeans.org/issues/show_bug.cgi?id=155964
-- Tor
I think you can only accomplish that with a new plugin, since you need somekind of parsing to define what is what.
Give a look a these tutorials, I haven't read them in details but they seem to show you how to do what you want:
http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
http://www.antonioshome.net/kitchen/netbeans/nbms-coloring.php