I've created ASP.NET MVC project in MonoDevelop on Ubuntu.
Using Nuget, I added LibGit2Sharp package, but it doesn't have libgit2 library compiled for linux environment.
Then I downloaded libgit2 sources and compiled them.
Now I have libgit2-06d772d.so, but when I put it into the bin folder of my asp.net mvc project, I get System.DllNotFoundException git2-06d772d
NOTE
When I create Console project and put libgit2-06d772d.so into the bin folder of this project, application works fine.
Shared objects are not loaded when they are next to a particular file, but when their directory is in the library load path. The operating system sets a few paths that are valid for all programs, but if you have your library elsewhere, you need to specify the directory yourself.
Exporting LD_LIBRARY_PATH with the dir of the library will let the library loader know what other paths you expect to load a library from. E.g. if you built libgit2 with the libgit2sharp script you might run
export LD_LIBRARY_PATH=$HOME/libgit2sharp/libgit2/build
in the console to let the OS know that any program you start from that shell where to find libgit2.
It's common for mono-based apps to provide a script for the user to run which sets up the environment before calling mono to start the actual .exe with the program.
Related
How to change the MSIX installation path??
Referred this url - "https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes"
Always installer package is created in default location "C:\Program Files\WindowsApps"
Need to set the installer location to different location.
The installation path of an MSIX package cannot be changed. All the files you have included in your package are installed inside an app-specific folder under "C:\Program Files\WindowsApps<your app>\".
This is a design decision from Microsoft. Only for MSI/EXE installers you can change the install path.
If you want to add files in other folders too, you need to copy them the first time your application is launched. For that, you have multiple options. You can write your own code inside your application to copy the files in other folders or you can use tools like Advanced Installer to do it for you.
To understand more about MSIX and how files outside of the installation path can be managed I recommend this article/presentation I wrote last month.
Background, I currently use Izpack for my Windows installer, I bundle a java runtime and use winrun4j as a wrapper both for the installation and the actual program once installed. It worked for a long time but there are a number of problems with the installer that I have not been able to solve and have been looking to replace it.
Oracle now provide the JPackage installer so it seems like a sensible choice. But the folder structure created by the installer is different to what I currently have, I have a number of config and non java files and I have not been able to get the .exe that JPackage creates to do anything.
So is it possible to use JPackage to create the installer but in a strcuture better matching my existing structure, and use continue to use WInRun4j to actyally run my application
Existing Folder Structure
ROOT
---App.exe
---Config Files
---lib
-------jar files
---JVM64
------- Java runtime
---help
JPackage structure
ROOT
---App.exe
---Runtime Dlls
---app
----- jar files
Config files
--runtime
------Java runtime
------Runtime Dlls (again)
The structure of directories generated by jpackage is mainly set up for you and does not seem possible to change, and makes installation of Java app dependencies very easy with self contained JRE. The basic structure for Windows is as you say:
ROOT
---App.exe (for --main-class parameter)
---xyz.exe (for each --add-launcher parameter)
---Runtime Dlls (these appear to be unused except for applauncher.dll, see SO 62607300)
---app/
------App.cfg (for --main-class)
------xyz.cfg (for per --add-launcher)
---runtime/
------Java runtime
------Runtime Dlls
With --input and --main-jar params you are free to setup additional directory structure under app/ folder for anything else you want for your application. So if you used lib/myappjar.jar it would add:
---app/
-------lib/
----------myappjar.jar
If you used --input build\mypath it would copy the entire tree of files under that folder, so if build\mypath dir contained
bin/
---Scripts
---xyz.properties
README.txt
Then app would also contain:
---app/
------bin/
---------Scripts
---------xyz.properties
------README.txt
By the way the Runtime DLLs placed at top level appear to be copies of some of the DLLs under runtime/bin
[https://stackoverflow.com/questions/62607300/why-is-java-jpackage-installing-windows-dll-files-in-two-places]
I want to make Dart app that has flexible deployment. It can be started as a web server or standalone app in browser as well. My directory structure:
bin
- httpserver.dart
lib
- commonlib.dart
web
- web.html
- web.dart
pubspec.yaml
I wanto start either httpserver.dart providing web's content or web.html directly in Chromium. I have troubles with the lib visibility from bin/httpserver.dart. using the "import 'package:prj/commonlib.dart'" does not work. But from the web.dart is works fine.
Please advice how to share libs among bin's and web's code. Or I should I make structure of dirs somehow different?
Note: there is no packages sub-dir in the bin directory created by pub get. I am using dart sdk 1.7.2.
Thank you, Ladislav.
In the bin directory there should be a packages symlink created automatically but it is not in subdirectories of prj/bin. If the symlink isn't created just create it manually.
This may be somewhat trivial, but I am attempting to work on an Action Script / Flash project and need to make some changes to it and attempt to rebuild the .SWF file associated with it.
The project itself is fairly straightforward and is available on github here It is jwagener's recorder.js, which consists of several Action Script files and a single compiled .SWF file.
I am not terribly familiar with the build process for Action Scripts and I am sure that I have all of the necessary tools (Flash Builder, Adobe Flash Professional etc.) but I am not sure about how to go about it.
I've attempted to simply create a new ActionScript project and add all of the necessary ActionScript files from his repository, but upon building the .SWF it didn't function at all and lacked all of the External Interface elements that I need to use.
Any ideas, walk-throughs, or tutorials that would point me in the right direction would be extraordinarily helpful.
The project you want to compile actually includes a Make file.
MXMLC = "/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/bin/mxmlc"
build:
$(MXMLC) -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as
clean:
rm recorder.swf
It looks setup for osx, but you get the idea.
If you only need to do minor changes and could do without an IDE that shows error/warnings/etc. you can do this:
Download the FlexSDK
Setup an environment variable so you can access the mxmlc compiler from anywhere on your system
Navigate to your project and compile from the command line
Step 1 is trivial.
Step 2 depends on your os a bit. On Windows should be something like My Computer > Properties > Advanced > Environment variables (I remember this is on XP, should still be somewhere on the Computer Properties properties on Windows 7) and add to the PATH variable the location of the FlexSDK's bin folder. On unix you should add something like this to either ~/.profile or ~/.bash_profile : export PATH=/your/path/to/FlexSDK/bin:$PATH
At this you should be able to run mxmlc -version from the command line
Step 3 means navigating to the project and running:
mxmlc -warnings=false -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as
So that's the command line option in a nutshell.
If you have a bit more editing to do you can use an IDE.
If you're on Windows I warmly recommend FlashDevelop: it's fast/lightweight/free/opensource. It downloads the sdk and setups everything for you.
If you're on OSX you can use FDT 5 Free or a trial version of Flash Builder(60 days by default) or setup TextMate with the actionscript 3 bundle.
The app I work on needs to use the wpftoolkit.extended.dll (i.e. no source, no msi/installer, we've only got the dll). So far we've placed the dll in a c:\libs folder on both the dev's laptop and the teambuild server and it built ok on both; now for deploying we want to add it to an installer (.vdproj) and we think we'll need it in tfs's repository somewhere. However, when tested the app now only builds on the dev's laptop and not on the teambuild server (looks like a relative path thing).
So... rather than fixing the actual problem, I'm wondering what's the best/cleanest/commonlyAccepted way to do this? where should I keep the dll in the repository and where should I place the dll on the host we're deploying to?
You should use folder structure on the source control like the following
/Main Contains the .sln file
/Source
/MyApp1 Contains MyApp1.sln file
/Source Contain folder for all
/ClassLibrary1 Contains ClassLibrary1.csproj
/MyApp1Web Contains Default.aspx
/Build Contains build output (binaries)
/Docs Contains product docs etc
/Tests
**/3rdpartyDlls** Contains all vesions of third-party dlls
For more information about the source control folders and best practices, it's recommended to read the book patterns & practices Team Development with TFS Guide (Final Release)