I made a nativefier app for google calendar. But i wanted the apps to be installed from single executable file like .exe in window and .deb in Linux. how to do that ?
Related
I want to access an sqlite database file which I have bundled to my iOS application.
This works fine, because I can see I can read/write from/to the database by the application logic.
If I run the application by the simulator I can find the database here:
file:///Users/<Username>/Library/Developer/CoreSimulator/Devices/<DeviceID>/data/Containers/Bundle/Application/<ApplicationID>/<AppName>/test.db
But if I run the application on a real device it seems difficult to access the data, In Xcode I've tried to export the container in "Devices and simulators", download it, open the package content of the .xcappdata file but I can't find the file "test.db":
Where and How can I access the file?
Xcode will not import the Application part which contains the binary and all the files you bundle with it.
When working with an file which is bundled in your app it is better to copy it into Library or Document directory the first time the application is run. So you never modify the bundle one which should only be a init file and not a working file.
When it is in Document or Library, you can then get it via xCode.
I'm not able to build an executable file of an Electron App with the following command:
electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --prune=true --out=release-builds
The build file, which is a shared library file (application/x-sharedlib), is not executing on Ubuntu 18. Instead, I'm getting the following error message when opening the file in Nautilus:
Could not display "electron-tutorial-app"
There is no application installed for "shared library" files. Do you
want to search for an application to open this file?
[No] [Yes]
Is there any way around to do this?
TL;DR: the produced files are actually executables of a new format. There's nothing wrong with them. Nautilus/file managers mistakenly don't recognize them as executables. There are solutions, such as creating a *.desktop file to launch the application.
Analysis
This phenomenon occurs as a side-effect of a change in how Electron builds Linux binaries. The commit 9294facf changed the binary format from ELF to PIE. The change is quite small and only affects a single file (BUILD.gn). The change has landed in Electron starting with version 4.0.0.
File managers utilize the file command to decide what to do with a file (e.g. open an image viewer, a text editor or execute the file). file cannot distinguish between shared libraries and PIE executables and therefore misclassifies PIE files (see the corresponding bug report).
Solutions
Run from terminal
Since the problem only exists for graphical file managers, you can simply run the executable from the terminal or from a script. This is somewhat involved for non-technical end users and not what the OP wants.
Wait for upstream fix
Wait for file to recognize PIE as executable files. In turn, this will likely lead to file managers such as Nautilus to launch the PIEs correctly. It's not clear if or when this will happen. If it happens, it will likely only be included in future distro releases.
Use a desktop file
Create a desktop file to launch the application. This is a common way desktop applications are launched anyway.
Create a file called myapp.desktop with the following contents.
[Desktop Entry]
Name=My Application
Exec=/path/to/binary
Terminal=false
Type=Application
StartupNotify=true
Encoding=UTF-8
Then, mark the desktop file executable by issuing chmod +x myapp.desktop. Double clicking the file should launch the application as expected.
Further information
The corresponding discussion in the electron-packager project: https://github.com/electron-userland/electron-packager/issues/901. (Gist: This issue was not caused by electron-packager, look upstream)
The corresponding issue in the electron project is https://github.com/electron/electron/issues/15406. (Gist: they wanted to enable PIE on Linux. Not our bug, look upstream)
For Linux(Ubuntu):
Downgrade Electron package:
npm install electron#3.1.6 --save-dev
For global (If needed)
npm install -g electron#3.1.6
Execute electron-packager command - for linux:
electron-packager . electron-tutorial-app --overwrite --asar --platform=linux --arch=all --prune=true --out=release-builds
This will result in 4 Linux folders(arch=all). Select a working executable according to your OS.
This is an issue when electron-packager is used to package a Linux app with Electron version 4.0.x, whereas there was no problem with previous Electron versions, such as 3.1.x.
For some reason, in Electron 4.0.x, the produced app file is a shared library instead of an executable.
From a Terminal window, running the file command on the app file path gives:
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0,
BuildID[sha1]=b9e8ba37118dad1bf605affef41026f813215bc6, stripped
while it used to be:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32,
stripped
Fortunately, it is still possible, albeit cumbersome, to run the app by launching it from a Terminal window, for instance by dragging the app file icon onto the terminal prompt, then typing Enter.
I'm building an electron app and I need GraphicsMagick. The documentation suggest that you have to download and install the program itself before using it with node.js. So just installing the npm package is not enough.
How do I do it then? Do I actually have to have my Electron app download binaries (or bundle it with binaries) and then install the program on the first app launch in order to be able to use it?
It doesn't even support CLI commands like for example ffmpeg does, so I cannot just bundle the binaries and execute commands like gm.exe convert test.jpg
I'd say yes, you have to bundle the binaries together with your app, if you don't want to distribute your app via a package repository or require your user to install GraphicsMagick previously.
It does support CLI commands like gm.exe convert test.jpg. If your using electron-builder for packaging, you must add a configuration to prevent the binaries from being asar-packed:
"build": {
"asarUnpack": [
"path/to/your/GraphicsMagick/binary/**"
],
From electron you can call the program e.g. with
const child_process = require('child_process')
child_process.execFile('relative/path/to/your/gm.exe', ['version'],
(error, stdout, stderr) => {
console.log(stdout)
} )
You can download the windows binaries e.g. from the sourceforge host. After installing those binaries you have to copy the installed folder to your app.
I have developed an iOS app, this app saves some of the log, that appears in the applications container. I can download this container using Xcode > Device > Select App > Download Container menu option.
Then I can see my log file in directory ..../AppData/Documents/mylog.log
Basically process describe here https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/articles/manage_containers.html
However I want to automate this, is there way to download an applications container using Xcode via command line?
There is a project called ios-deploy on github. https://github.com/phonegap/ios-deploy
// Download your app's Documents, Library and tmp folders
ios-deploy --bundle_id 'bundle.id' --download --to MyDestinationFolder
// List the contents of your app's Documents, Library and tmp folders
ios-deploy --bundle_id 'bundle.id' --list
// Download the Documents directory of the app only
ios-deploy --download=/Documents --bundle_id my.app.id --to ./my_download_location
Also, if you have a jailbreaked phone, you would have the most flexibility of do anything relative to file operations.
For example you could copy files using tools like 'scp', 'rsyn';
I want to tell my blackberry app in blackberry device. I searched and found that you have to place .cod, .jad and .alx file and then download and install the .jad file in the device. I did this but it said Class net.rim.device.api.command.Command not found.
I think I have to add more files or what should I do?
Thanks!
If you created this cod file , than before installing it on Blackberry Device you need to Signed it first.
See this video how to sign .
http://supportforums.blackberry.com/t5/Java-Development/Deploying-and-Signing-Applications-in-the-BlackBerry-JDE-Plug-in/ta-p/446877
Once you sign your cod file , you can install it on BB phone by .COD file or by .JAD file.
If you want to install using .JAD file , copy your .COD file into SDCARD & .JAD too. Remember if you have more than 60KB .COD file size than you need to extract it to divide into 60KB Sizes(Use 7 Zip to extract) & put in same folder as in .jad File & open .Jad file from Phone & Follow the icstruction.
If you want to install by .COD File , than you may have used BB Eclipse Env.
GOTO
<installed Eclipse folder>/plugins\net.rim.ejde.componentpack<SDK Ver>\components\bin
& paste your cod file in bin folder. Now open COmmand prompt point to this folder & use this command before it connect your BB Phone by USB to computer
JavaLoader load <cod file name>
Follow this link for more guidance
http://www.bbgeeks.com/blackberry-guides/blackberry-guide-how-to-install-third-party-applications-onto-your-blackberry-88400/
cod files with alx file are for desktop installation via usb-cable. Launch BB Desktop Manager, specify alx file and BB Desktop Manager will install cod files (described in alx-file) to the connected device.
cod files and jad file are for wireless installation. Device opens jad file in browser, and downloads and installs all cod files described in jad file.
That's it.