Hello im trying to use the InAppBrowser in my cordova project.
But i dont get it working.
I have downloaded the files InAppBrowser.cs and InAppBrowser.js and put the .cs file inside the project root folder and the .js file inside the www folder.
I also add to the root folder config.xml file the plugin tag.
<widget>
<access origin="*"/>
<feature name="InAppBrowser" value="InAppBrowser" />
</widget>
Unfortunately it doenst work.
Someone knows what im missing?
Am i too late answering this ? Anyway.. i think you should make use of CLI.
First install node.js.
http://nodejs.org/download/
Then git installer.
http://git-scm.com/downloads
Then Hit Windows+R and type cmd to open command prompt.
After that follow these steps to create a new project, then add your platform(ie WP8)
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
Windows Phone 8 Plugin Resource.
http://plugreg.com/plugins#platform=wp8
Select any plugin
For eg, File plugin by apache.
just copy and paste the code to your command prompt.
Hit enter, the plugin will be installed automatically.
Then use it normally. or just read the plugin documentations.
:-)
Related
I have finished a very basic application (wpf/c#). The solution is made of 3 projects:
The main project for the app
The Class Library Project to store app resources (images and txt files)
The Setup project which I use to create exe file for distribution to other
machines.
While the project works fine in debug mode when I deploy it using the Setup project and install on the computer I can access the image files from the Library Project (I can see there is a dll file for the library project in the application folder) but it fails to access the text files, complaining the path was not found. This is my very first time I completed the application and attempted to deploy it so am a bit at a loss why the setup does not provide correct references to the text files and yet it seems to work fine with image files which are located in the same library project.
Can someone point me in the right direction where to look at it to troubleshoot?
I have cleaned and rebuilt all projects in the solution. retested in debug mode (works fine). tried to search msdn and StackOverflow but I cannot find any guidance I could use or follow.
I would like to be able to display text from the text files in the released/installed application version the same way it works in debug mode. At the moment it fails to find the relevant txt files.
Finally, I have managed to crack it. Posting the answer for anyone having the same problem.
The issue here was not with the file path, even though I came up with a more clearer technique of building it, see my comments above. The problem was with the way Setup Project in VS2017 was creating a package. It is handling differently images and text files, even though both are in the same Library Project, essentially for text files I had to do the following to get it working:
Open File System in Setup Project
Create the 'Resources' Folder under 'Application Folder'
Set the 'Resource' folder 'AlwaysCopy' property to 'true'
In 'Resources' folder right-click and select Add> File...
Navigate to the folder with the files and select them all (make sure the files are setup as Resources or embedded resources)
Rebuild the Setup Project
.
So summarising I had to specifically tell Visual Studio to build the folder structure in the Application Folder during the install.
Now when I run the installer the text files are included in the package and created during standalone installation. Also included a screenshot below.
I'm writing an UWP Store app that calls other executables, such as OpenSSL and FFmpeg.exe. I successfully included those in a WPF app. However, with UWP, how to build them into the final package to upload to the Windows Store?
I'm thinking of these solutions:
Add the needed file (for example, FFmpeg.exe) to the project. Then chose the Build Action property to 'Content' and copy to Output Directory. But this option seems not possible with the whole folder with sub-folders and files in them (for example, OpenSSL portable folder).
Write a method to copy the file (FFmpeg.exe) into the Local Folder of UWP app when the program starts.
...
Is there a better way to do this? Thanks.
You have to leverage the build powershell commands.
1 Step, Setting up
Go to your Solution Folder, and create a new Folder Called "MyExeFolder"
inside that folder put your desired .exe, like FFmpeg.exe
2 Step, Automating
Right click your entry Uwp Project and go to Properties and then go to Build Events
on your the Post Build event commands enter this :
xcopy /y /s "$(SolutionDir)MyExeFolder\FFmpeg.exe" "$(SolutionDir)\UWP\bin\x86\$(ConfigurationName)\AppX\"
If you are building for x64 too, then you also add the same command with x64 instead for x86 too, if you are building the win32 project along and grouping it under the same solution, you have to define the appropriate bin folder.
3 Step Executing
In order to launch win32 apps from uwp you will have to use an a capability called runFullTrust, it is hard to list all the xml modifications you will have to do to the app manifest to enable such feature but once you figure it out, you will have to add this to the Extension node:
<desktop:Extension Category="windows.fullTrustProcess"
Executable="FFmpeg.exe" />
here is more info on how to set up the manifest
Once you pull all this off you can just launch your win32 part from anywhere on your uwp app by :
try {
await Windows.ApplicationModel.FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
catch (Exception Ex)
{
//failed to Launch
}
As for Further reading, i suggest you visit stefan wicks blog as he has a great wealth of samples and tuts on how to overcome uwp limitations by using .Net native extensibility.
Trying to create a code that helps me get a passeport scan so i'm following the tesseract download and insrall in this link https://github.com/tesseract-ocr/tesseract/wiki/Compiling#windows.
i did all of the above but when it comes to this
cd tesseract
cppan
mkdir build && cd build
cmake ..
i just get in the tesseract directory and can't open cppan , it says No spec file found
please help !
This isn't a tesseract error, it is a cppan error.
Make sure the cppan installation went well, if needed go here https://github.com/cppan/cppan
and install the latest version yourself.
The last option you might consider is creating the spec file yourself.
Make sure you understand the stage 4 is comprised of 4 different commands.
Did you run this in Cygwin? I did, and got the same error but it worked fine in a cmd command window. The install script seems to insist on using Windows filesystem references, because I found the failed script had created a subdirectory under my tesseract directory named "C:".
The cppan instructions should have added: "In a cmd window, navigate to the tesseract root directory. Either add cppan to your system PATH variable, or give the correct directory path to cppan.exe in the following command..."
(I think it will work fine in a command shell like cmder too, as long as it recognizes the Windows directory syntax.)
(I don't think cppan needs to remain in your system PATH permanently unless you plan to use it for other things.)
When we publish mvc-3 project to windos azure, Is it copy all files and folder under the project name folder, means likes Scripts, Contents, etc ?. I am asking this because i just publish my mvc-3 application to windowsazure and after that when i run it using staging url then it not shown the images, plugin are stop working and when i inspect under chrome then it shows :
If you notice than there are few Scripts ( like sammy.js ) and stylesheets ( like Site.css ) which are present but maximums are not. Can please anybody explain me how can i fix this?
Ok , i found out the root cause, this is happening because each time when i was downloaded the new plugin
i just copy the .js from its source folder and then paste it into my project's Scripts folder. But only after
putting the file inside the Scripts folder does not includes it in the project. You can`t see that file in the
solution explorer until you explicitly include it in the project.There is a button in the solution explorer on the top
of it for show all file, included the files which are not the part of the project.Then Just right click on the
file which you want to included in the project and select option Include in the project. Then only that
file becomes the part of your project. Now you can publish the project and everything will works fine.
Make sure they are included in the .csproj file
Make sure they are marked as Build Action: Content
I have a swf file (little animation) created in swish and I want to put it in my windows form app like a header, I was reviewing the below link but it doesn't say too much, could someone give an example of how to do this?
Embedding Flash in a Windows Forms .NET app
Your link is to an old page. (Circa 2003)
Next, there is a SO question similar to this: AxShockwaveFlashObjects and ShockwaveFlashObjects from Flash ocx
To get the two DLL Files needed, do the following:
Open your command prompt. Switch to the directory that contains the aximp.exe file. Typically; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>
Enter the following command (you may need to change the name of your COX file to match your version.
aximp.exe -source "C:\WNDOWS\system32\Macromed\Flash\Flash10a.ocx"
Look in the C:\WNDOWS\system32\Macromed\Flash\ directory. Your files should be there.
Add these two files as reference in Visual Studio.
Here is a sample app on MSDN: http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/5815e676-50b0-47f4-964a-c1bcebfdb9a4