Can anyone tell me the proper way to deploy a C# WinForms application that uses gstreamer-sharp? The only way I can get it to work is to work is by setting the gstreamer bin directory as my Application's working directory.
I have seen examples trying to temporarily set the application's path to the various gstreamer directories, but this still does not work for me and I get errors that DLL's are missing.
Environment.GetEnvironmentVariable("PATH") + ";C:\\gstreamer\\1.0\\x86\\bin\\");
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH") + ";C:\\gstreamer\\1.0\\");
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH") + ";C:\\gstreamer\\1.0\\x86\\lib\\");
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH") + ";C:\\gstreamer\\1.0\\x86\\");
Should I just deploy all of the gstreamer DLLs inside my application's bin driectory? I was hoping to have them run the installer and then my application could could reference it.
Any help on this would be greatly appreciated.
Adding the bin directory only should be enough. You can look at https://github.com/Vocaluxe/Vocaluxe/blob/develop/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs to see how initialization is done in Vocaluxe.
Probably the easiest solution I can come up with is manually putting the gstreamer bin directory in the system's PATH.
Related
Recently I've been unable to load javascript scripts to my webworkers in react for some reason. It always responds with index.html.
My config is simply a standard create-react-app app. The screenshots are from my actual project but I have confirmed that the problem persists if I create a new project and try to initialize a minimal example.
Each ffmpeg.* file is affected. This is also not specific to ffmpeg since another library had the same issue - thankfully the initialization of that library is simpler so I was able to simply put that libraries worker-file in the public folder - and that worked.
It might be a stupid question but I'm really at my wits end here and I can't figure out how to investigate further.
Thank you <3
EDIT:
It works if I put all the files it is trying to hit in the public folder - so it has to be some kind of context issue(??) This seems like a really stupid way to go about it. It's not in a worker at the point of loading - it's the worker loader that fails to access the stuff it needs in the node_modules folder, (core script, worker script and wasm code). Whet?
I have found numerous articles on StackOverflow and elsewhere stating that if you wanted to output your files to the bin folder using ClickOnce, you should set the
BuildAction: Content
CopyToOuputDirectory : Copy if newer
but some of my binaries are located in a Dependencies subfolder located in the root of my project and when I publish the content, they are being outputted to
<wpf app folder>\dependencies instead of being in the <wpf app folder> causing my app to not function properly.
Any suggestions on how I can change this to force ClickOnce to output specific files to <wpf app folder>\ irrespective of where the Source files are located.
I eventually found a work-around which I don't like but I need to move on. To circumvent this problem I added the required libraries to the root of my project as links and still set the BuildAction to Content and CopyToOutputDirectory to Copy if newer.
I thought I'd explain it with an example as it may make a bit more sense.
Project Path: C:\Work\MyApp and it contains the following sub-folders:
D:\Work\MyApp\MyApp.csproj
D:\Work\MyApp\MyApp.xaml
...
D:\Work\MyApp\Bin\Debug
D:\Work\MyApp\Bin\Release
D:\Work\MyApp\Bin\Release\MyApp.exe
D:\Work\MyApp\Depedencies\LibA.dll
D:\Work\MyApp\Depedencies\LibB.dll
etc...
The libraries are third-party tools and are actually contained in their own folder:
D:\Tools\MyThirdPartyLib\Distributation\LibA.dll
D:\Tools\MyThirdPartyLib\Distributation\LibB.dll
By having the libraries in D:\Work\MyApp\Dependencies did not work as ClickOnce would install the app in:
C:\Users\\AppData\Local\Apps\2.0...\MyApp.exe
and it installed the files located in the Dependencies sub-folder in:
C:\Users\\AppData\Local\Apps\2.0...\Dependencies\LibA.dll
C:\Users\\AppData\Local\Apps\2.0...\Dependencies\LibB.dll
Which caused my app not to work.
To get around it, I ended up adding LibA.dll and LibB.dll to the root of my project as "Linked files" and set their BuildAction and CopyToOutputDirectory but not by pointing the linked files to
D:\Work\MyApp\Depedencies\LibA.dll
D:\Work\MyApp\Depedencies\LibB.dll
but instead pointing them:
D:\Tools\MyThirdPartyLib\Distributation\LibA.dll
D:\Tools\MyThirdPartyLib\Distributation\LibB.dll
And this seems to have done the trick. My only beef about it is that now I've got 10 odd files listed in the root of my project in visual studio which I don't like:
MyApp Solution
- MyApp Project
- MyApp.csproj
- MyApp.xaml
- ...
- LibA.dll
- LibB.dll
- ...
But it will have to do for now.
Hope it helps others!
I'm trying to integrate the cwac-cam2 library with codenameone. The lib is in .aar format but when I build it fails whith the following error:
org.gradle.process.internal.ExecException: Process 'command '/home/ec2-user/android-sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1
I can not find out what is wrong. Can you help me please?
Lib reference: https://github.com/commonsguy/cwac-cam2
Its a bit difficult for me to say what exactly wrong is, but you can try some general steps that I would follow like
1) Check your .aar lib is residing at appropriate location. Normally for Android it will be at ..\YourProject\native\android\YourLib.aar
(also do 'Refresh cn1lib files' once, because I did so.. lol)
2) check build hint and make sure you have
android.enableProguard = false
3) If you are using any activity from that .aar lib then make sure you have added those activity/ies in build hint as android.xapplication = <activity android:name="com.XX.YY.MyActivity" />
I would further suggest you look at Chen's post on ARR integration here: http://www.codenameone.com/blog/integrating-android-3rd-party-libraries-jni.html
Also notice that gradle builds are often harder to work with in terms of result readability. I would suggest trying to disable gradle first and getting it to work without it then re-enabling it so you can test with android studio if necessary. You can disable gradle with the build hint android.gradle=false.
Its a .NET 3.5, x86 application that I built. It works. But when I try to install it using a custom installer, it fails with this error The App has stopped working. In the dialog box, it shows path to two files. In one of the files, I found this.
<ProblemSignatures>
<EventType>CLR20r3</EventType>
<Parameter0>app.installer.exe</Parameter0>
<Parameter1>1.0.0.0</Parameter1>
<Parameter2>5321e224</Parameter2>
<Parameter3>App.Installer</Parameter3>
<Parameter4>1.0.0.0</Parameter4>
<Parameter5>5321e224</Parameter5>
<Parameter6>4</Parameter6>
<Parameter7>e</Parameter7>
<Parameter8>System.IO.FileNotFoundException</Parameter8>
</ProblemSignatures>
Is there a way I can find what file was not found for Parameter8 above?
In the other file, I found this Exception Code: 0xe0434f4d but that didn't help much either.
Update:
I'm installing by adding a separate project that is pointing to the .application file of the actual app like below.
try
{
Uri deploymentUri = new Uri(deployManifestUriStr);
iphm = new InPlaceHostingManager(deploymentUri, false);
}
It was missing a dll. I tried copying that dll to the folder where exe was being run from and it works. But I couldn't still figure out how to find the NAME of the missing file. I just found out it was missing a dll by trial and error.
Unless I get a better answer, this is the answer, I guess. Make sure you have all dlls the exe is expecting in the exe directory.
I have a menu link with the alias "inside" on a joomla 3.1.5 site here: http://naiwellness.com
Every morning I check the site and a folder named "inside" has been created in the root dir which prevents the site from loading as it should, instead displaying a directory contents listing at http://naiwellness.com/inside
Anyone have any ideas how to prevent this please?
Thanks
This is just a theory, but check the xml files of your installed modules and plugins (most likely a plugin) for this line...
<folder>inside</folder>
and if it exists try deleting that line of code - or better still uninstall the extension - that should fix it. It's possible that a plugin requires that folder and has php code to create the folder if it doesn't exist - and so creates the folder each time it is run - i.e. when the site is loaded. The above line of xml code I have asked you to look for will go someway to helping determine if this is the case.