How to change ID in "application.xml" to run multiple instance of an AIR application? - actionscript-3

I wants to run more than one instance of my Adobe Air Application, So to do this it needs to be change the ID in "application.xml" file of the application which is present in the folder META-INF of installation directory.
But i don't know how to change this ID at run-time.
Does anyone have an idea how to do this or any other process is there to solve this problem ?

You can't change ID at run-time. The only way to run several instances is to prepare several packages with different appID in app descriptor xml - so to have several app descriptors.

Related

Is there a way to compare two .exes to see what differs between them?

Is there a tool / process by which I can decompile two .exes (one of which runs on a handheld device, the other which doesn't) so that I can get a glimpse into what differs/what the problem may be?
Of course, seeing that one has "00xA" where the other has "00xB" won't help me. I mean a way to see code that differs, or more likely, a compiled resource or config file difference, or some build option or so?
I'm almost positive the problem has nothing to do with code per se (if/while/switch statements, etc.) but with the project setup.
I cannot compare the working source, as it does not exist - I only have the .exe from which it came. The source I have available is a "reasonable facsimile" of it, but not exactly the same, at least not in project settings and configurations, etc.
UPDATE
Re: this page, I'm not familiar with some of the terminology; specifically, where it talks about a "FLATRELEASEDIR" - WTH?
Will this work to test my CE-bound* .exe on my PC:
Run depends.exe*
Open my CE-bound** .exe
Stare in wonder at the amazing plethora of errata and data
?
*Supposedly not to be confused with "adult diapers"
** "bound" as in, "that's where it's headed"
UPDATE 2
Here's what I see when running Dependency Walker on my app:
...but note my dilemma here.
UPDATE 3
Here's what I did to try to replicate my handheld environment on my PC as best as possible:
I wanted to just copy over the whole dad-burned thing (the entire handheld device representation from Windows Explorer), but it won't let me do that - it's not copyable, so I copied over just the "Program Files" folder (which contains the subfolder of my app and a couple of other folders which I don't know are standard or custom/peculiar to us).
This is from the handheld device where the .exe in question does run properly, so obviously (theoretically?) there should be no missing modules - Dependency Walker should run it and say all is well.
However, it doesn't; I get the same results as the one p[a,o]sted above.
Note: This is true even after selecting "Options > Configure Module Search Order... > The Application Directory > Move Up in Dependency Walker.
So since even an .exe that runs fine tests out as being "not ready for CE-time", how can I use this to accurately test which, if any, necessary files are missing?
Do I need to copy over other folders, too, or what?
UPDATE 4
So, the (supposedly?) missing modules are:
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL
If true, then why does the .exe run on the handheld?
Note: Other folders on the handheld are:
Application Data => only contains "desktop.ini"
BTExplorer
My Documents => contains a "desktop.ini" and several SQLCE databases (*.SDF)
profiles => contains an empty "default" folder
Recycled => contains a single ".lnk" file
Temp => contains a handful of ".tmp" files
Windows => contains a slew of folders and files, including several .DLLs, but none of those listed above
The "Program Files" folder has a ".NET Compact Framework" subfolder, but it is empty.
In the \Windows\AppMgr folder, there are some interesting files, such as:
Microsoft .NET Compact Framework.DAT
Microsoft .NET Compact Framework.DLL
...several other DAT/DLL pairs, including:
Symbol Managed Class Libraries.DAT (no corresponding DLL)
...and even a pair:
SSCS HHS.[DAT,DLL]
-- which is our company acronym (SSCS) and name of the project (HHS)
What generates these? From where are they referenced??
Another possible piece of the puzzle is that the handheld device on which the .exe does not work does not have a \Windows\AppMgr folder, and thus does not have those .DAT/.DLL files listed above...
UPDATE 5
Another oddity:
After reading this: "Files that install in the GAC go in the\Windows directory" in the book "Microsoft .NET Compact Framework" by Andy Wiggly, et al, I tried copying the Windows folder from the handheld device to the spot on my PC below the folder named "3910ProgramFilesFolderCopy" which looks like this in Explorer:
C:
3910ProgramFilesFolderCopy
Program Files
Windows <= tried to copy the "Windows" folder from the handeld on top of "3910ProgramFilesFolderCopy" so it would end up here
...but it only copies a few files before borborygmas occurs (electronic borborygmas, that is) and it tells me, "the system cannot find the file specified"
Heavens to Murgratroid!?! Why does it find some but not all? Looking at the Windows folder on the handheld in Windows Explorer, I see that many of the precious DLLs are greyed out:
Arggh, double-arg, and (&c)
For PC you could try .NET Reflector.
http://www.red-gate.com/products/dotnet-development/reflector/
You may try to use dependency walker to undestand wich DLL/APIs they need and check if those are supported on your device.
http://geekswithblogs.net/WindowsEmbeddedCookbook/archive/2011/02/02/using-dependency-walker.aspx

Building Windows Store app programmatically

We have a requirement of creating several Windows 8 apps for tablets. There is a common solution and news apps are created by passing different resource to the same code.
For Mobile it was a cakewalk - Used the Microsoft.Build.Evaluation.Project class to get the xap file.
But for Surface, building from code does not give the direct appx output, while building using MSBuild gives appx as the output.
I tried several methods to avoid calling MSBuild from C#(by creating a Command Process) like creating a zip file - myapp.appx - and then signing it using this c++ code. It didn't workout because of an extern reference and I gave up.
Then I tried to use SignTool.exe by creating a Command Process in C#. That too failed.
So, I am wondering if there is any way to build an appx directly from C# without MSBuild.
The reason why I am trying to avoid MSBuild is to get a status from the build process, which Microsoft.Build.Evaluation.Project.Build() provides.
First try adding a pfx key to your project and then try the build via Microsoft.Build.Evaluation.Project.Build() again. The pfx is required from what I read:
See Candy's answer here:
MSBuild target to create the .appx package
So then the trick would be to use SignTool to get the pfx in the first place and update the project with that pfx, but first see if the above works.

Deploy support files from secondary assembly

I'm, porting a phone application written using MVVMCross to Windows RT. The application uses SQLite and has a database that is not empty at deploy so I want it to be packaged in the installation folder anc copied to LacalFolder when the application starts.
The database really belongs to the "Core" assembly shared between phone and WinRT but if I put the file in the Core project (in a custom directory called Data), define it as Content and set the Copy Always flag the file does not get copied to the application installation folder.
If I put the file in a directory under the UI project the file gets copied as expected. Any suggestion to avoid keeping two files for the same resource (and the troubles this will cause) ?
Thanks for help
Windows 8 WinRT projects by default use the Content type which does loose packing of files (they are not included in the assembly). If your Core assembly is part of your solution as a project - VS will properly package it copying all the content to the "Core" subfolder of the appx. If you simply have the dll file referenced in your solution - the resource files will not be packaged. The solution in that case is to do something to get these additional files to deploy with the dll. One option is to package the dll as a .vsix together with the assets as described in Tim Heuer's blog post. Another is to do what you did and put the file in the app project. You can add the file to the app project "As Link" to avoid having a copy of the file - it makes Visual Studio create a sort of logical/symbolic link to the file instead of creating a copy - simply right click a folder in the Solution Explorer/app project, select "Add/Existing Item", browse to the file and instead of hitting the "Add" button - use the dropdown triangle on the button to select "Add As Link".

How do you collaborate on Flash Builder projects?

Flash builder project files can't be opened on another computer even if the files were copied, for e.g. through version control like git or svn.
Importing and Exporting fxp projects is not possible as we do not want to overwrite files for git or svn unnecessarily.
How do people collaborate on Flash Builder projects without creating new project in Flash Builder and having to set up all the settings for the project again and again for multiple collaborators?
If you import the project using its folder location as per #Sean Fujiwara answer then:
One useful way to collaborate in Flash Builder projects is to utilise environment variables. You can access these using - Window > Preferences > General > Workspace > Linked Resources:
From here you can add a new variable or edit an existing one, from the example above you can see that we use a FRAMEWORK_SOURCE variable which points to the source for our shared framework code, we use a swc but this is handy for debugging errors.
We also have another variable called OUTPUT_FOLDER which in our case points to a folder where we run our project over localhost see example below, to use this in a project, you go to right click project name > Properties > ActionScript Build Path, here you enter the folder name you want creating inside the folder that OUTPUT_FOLDER points to:
When you do a Project > Clean from the menu, all resources from your html-template folder will be copied across to this folder and it should open in a browser.
Now we have been able to check in to SVN our .project and .actionScriptProperities files with few issues. When someone new to the project checks them out, they will get an Error in the Problems panel telling them they don't have for example - OUTPUT_FOLDER\MyProjectName, therefore the project leader should have a document listing all the required variables to be setup in your environment.
Other things you can share are paths to raw font files etc.
The only problem I've had with this approach is sometimes it asks for the path to the SDK if it is different from your location, not had chance to figure this one out yet.
Flash builder project files can't be opened on another computer even
if the files were copied, for e.g. through version control like git or
svn.
Flash builder projects can be imported into the workspace just like other Eclipse projects.
Once you copy them to another computer:
Right click in package explorer and go to Import....
Select General/Existing Projects into Workspace.
Select the folder containing the .project directory.
If you make sure Copy projects into workspaces is deselected, you can commit the files directly from wherever you checked the code out.
This is now solved in Flash Builder 4.7 where you can actually import the project folder as is.

SSIS Deployment: Dev Stage Live AppSettings

The main problem is: How do i incorporate an appSettings.Config file with a particular build(dev, stage, live)? My appSettings.Config changes the conx strings for data sources based on which server the package is being deployed to. I am able to go through Package configurations and add my appSettings.Config, however, I can only specifically add one file dev, stage, or live. What i need to do is be able to build the solution and based on teh build type incorporate the dev/stage/live appsettings. How could I do this?
You could include all of the configuration files in the install and then just point to the correct one through an environment variable. I know you're wanting to switch the configuration file based on the solution build configuration, but you'll be looking at a complex solution when a simpler alternative exists.
Its quite straight-forward to add registry information during the package install that will set the machine's environment variable under the key:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\MyVariable
...to the path of the .dtsConfig for the current environment.