I write an GUI application in QT running in MAC SIERRA OS the work of this GUI is to execute some scripts and edit some that are located in the directory that the app exists!!
When i run the app from the QT IDE environment the app finds all the scripts and files which are included in the directory and it works as it has to work!
If now I try to run the app just double clicking it in the file explorer(finder in Mac) then the app can't find any script and file that need to find!!
The reason is that when I double click in the app the app is executed always in the "/" directory or in "Users/username" directory and IT IS NOT executed in the directory that it exists!!
Is there some way to change that behavior in this OS???
P.S:the same code works excellent in UBUNTU OS
Related
I have created a python application and can install it perfectly fine on Windows. I run pyinstaller to generate the executable, and then use NSIS to create an actual installer. I run the installer and it installs the application to my Program Files folder and gives me a nice desktop shortcut, etc.
What is the process to do the same for Mac? Essentially, I want to give my user a single file. When they run the file, it installs my program and any necessary libraries, and let's them launch it with a single click. I believe on Mac this is done with a .dmg or a .pkg file. What software/tools do I need to generate such a file? Do I need to restructure the project in anyway to create this?
For more info, pyinstaller creates a folder 'dist' which contains the unix executable of the application, and copies of python and any required libraries.
Note that I do not want to use the onefile option for pyinstaller because it would take a while to unpack everything each time the program is ran.
I have developed a set of shell scripts that work on Windows and Linux and would like to distribute them for macos 10.4 and following. (They are to help language development workers in minority languages keep their software up-to-date. You can read about the project at lingtransoft LangTran.)
I make the Windows installer with Inno Setup and the .deb file for Linux with EPM. I have been able to make a .pkg installer by running EPM on a Mac, and it installs the shell scripts to the right place, and they work properly when I run them from a Terminal window, but I would like to provide clickable icons. If I can work out the macos/OS X equivalent of a Linux .desktop file, I should be able to get the EPM package maker to install the launcher files in the right place.
For Linux, EPM will package my hand-crafted .desktop files and install them in the right place for them to appear in the menu. (Here is one of the .desktop files:
[Desktop Entry]
Name=LangTranUpdate
X-GNOME-FullName=LangTran Update Script
GenericName=Software Distribution System updater
Comment=For updating a local software repository
Path=/usr/local/langtran
Exec=/usr/local/langtran/LangTranUpdate.sh
Icon=/usr/local/langtran/Progs/LangTran-icon.ico
Terminal=true
Type=Application
Categories=Network
StartupWMClass=gpodder
)
The script needs to run in the folder /usr/local/langtran because it looks for other files in the same place, so the "Path" key is set to that. The Windows shortcut files work the same way.
Since macos doesn't have a START button to open a menu tree, I would like the installer to put clickable objects on the desktop so the user can drag them to the Dock if desired.
So my question is: How do I make the macos/OSX equivalent of a Linux .desktop file or a Windows shortcut?
I have anyProject.tcl script application. It working properly in MAC OSX from terminal using wish tclfileName.tcl. I want to create it like .app or some other way without terminal. eg. user tap on file and it will launch like other MAC OSX application works.
You could take a look at Platypus, an open source tool which lets you create Mac .app bundles from command line scripts, including Tcl scripts.
Running my Electron app via command-line works fine, but when I double-click the .exe of the packaged app, nothing happens other than my cursor doing a quick "busy" animation. I assume my app is silently crashing.
Is there a way I can get an error message or a crash report from the .exe to help me see what's going on?
From the root of my app directory, both these methods result in my app running fine:
node_modules\.bin\electron.cmd .
electron-packager .
node_modules\.bin\electron.cmd my_app-win32-x64\resources\app
Environment
OS: Windows 10 Anniversary x64
Node: 4.3.1
Npm: 1.14.12
Local electron: 1.4.3
Local and Global electron-packager: 8.1.0
electron-rebuild (for native module "serialport"): 1.2.1
This was not an Electron problem. This was my app trying to access a path relative to process.cwd(), which, when double-clicking the .exe file in the output folder, was not the expected one.
I was able to debug this by running the .exe from the command line, instead of double-clicking the .exe:
my_app-win32-x64\my_app.exe
This causes console.log() output to be visible in the command prompt, which allowed me to finally see the exception that was occurring.
One way to debug such issues is to open a terminal or cmd and drag the exe to it or launch the exe from the terminal or cmd. this will print any uncaught error the app might be throwing.
This can be an issue with paths if you're spawning sub processes - you can use https://github.com/jonluca/node-fix-path to fix the paths on linux and macos
I am working on BeagleBone Black(Debian 3.8.13 running on it). I want to run QT GUI application on startup(show GUI on screen just after login).
I am able to run console applications on startup by editing rc.local file in /etc/ directory and placing executable in /bin/ directory. But it didn't work for GUI applications.
I have searched for it also but couldn't make much out of it.
I want to know how it is to be done.