I created a desktop application with pyinstaller. When I double-click on the icon, Ubuntu says:
Can't open the file
Failed to find default application for content type 'application.x-executable'
I *can* run it by right-clicking and choosing "Run as a program".
How can I get double-clicking to launch it?
(Yes, I already set it to be executable from the command line.)
I created an actual "release" today, for my Xiaolong Dictionary language learning tool [1].
I wonder however, why the GNU/Linux built is bigger. Maybe 'cause I ran another command making the executable. Makefile target:
pyinstaller --clean --onefile --noconsole --add-data "$(TCL_LIBRARY):tcl8.6" --add-data "$(TK_LIBRARY):tk8.6" "$(MODULE)")
While on Windows I have no idea how to do that.
[1]: https://codeberg.org/ZelphirKaltstahl/xiaolong-dictionary/releases
#python #tkinter #matplotlib #pillow #pyinstaller #executable
PythonスクリプトをGUI化→exe化し、GitHubでリリースするまでの備忘録
https://qiita.com/Myrune/items/9740b6b4432d55460669?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
If you have #Python installed and want to verify what's going on with #PyInstaller being flagged as malicious, here's all you need to do.
Create a file with the following content; maybe name it "hello.py":
print ("Hello world!")
Then compile it with PyInstaller, doesn't matter if you use the onefile argument or not:
pyinstaller --onefile hello.py
If Defender doesn't nuke it on sight, find your .exe in the dist folder and upload it to virustotal(.)com. It'll pop hot for a trojan.
Иконки прямо в коде: как мы избавились от assets, портируя приложение на Linux и macOS
Привет, Хабр! Мы в ChameleonLab разрабатываем тулкит для стеганографии, который уже работает на Windows и macOS . Сейчас мы портируем его на Linux, и, как это часто бывает, именно на этом этапе классические проблемы с ресурсами (иконками, картинками) проявили себя во всей красе. После релиза пользователи увидели наше решение и стали спрашивать, как оно устроено и почему приложение не тащит за собой папку с картинками. Раз уж сообществу это интересно, мы решили дать развёрнутый ответ. Расскажем, как встроили все иконки прямо в код с помощью SVG, и как внутренние итерации и поиски идеального решения привели нас к финальному варианту.
https://habr.com/ru/articles/940180/
#python #PyQt #PySide #Qt #SVG #векторная_графика #ui #PyInstaller #hidpi #кроссплатформенная_разработка
VPN-клиент для Windows своими руками: L2TP, PPTP, маршруты и Telegram-уведомления
Рабочая задача: развернуть VPN на MikroTik с поддержкой L2TP и PPTP, авторизация — через Radius. В роли серверов — стандартные для нас RouterOS CCR1016-12G. Параллельно возникло требование: подобрать клиент под Windows, чтобы можно было просто передать пользователям исполняемый файл, и они могли подключиться — без инструкций, .bat-файлов и шаманства.
https://habr.com/ru/articles/928242/
#vpnclient #mikrotik #python3 #pyinstaller #gui #l2tp #pptp #powershell
Figured out how to create a Linux, MacOS (ARM) and Windows executable in a GitHub action for our PyGame mini game: https://github.com/jhutar/CatWars/blob/f2e61c4fcfd942d3e6e73ad2e9551fd61bc9ee25/.github/workflows/on-tag.yaml
Uploaded to https://jhutar.itch.io/catwars if you would be able to try if Windows and MacOS "builds" work - thank you 🙂