tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Independent executable path to the data file path

Open 2wayne opened this issue 12 years ago • 26 comments

I've packaged TDesktop as a PortableApp and noticed on the first run that the created files e.g. log.txt, data_config and the tdata dir aren't in the Telegram.exe directory <TelegramDestkopPortable/App/Telegram>. The files are located in the launcher folder<TelegramDesktopPortable>. So could you change that the files are going to be created where the Telegram.exe is stored and not where it is executed.

2wayne avatar Dec 01 '14 19:12 2wayne

Also after every update it save files on home (~) in Linux, its annoying.

stychos avatar Dec 01 '14 22:12 stychos

2wayne in Windows version files are located in current working directory, you can choose it how you like.

stychos in Linux version files are always saved in "~/.Telegram Desktop/", you need a custom build for other behaviour.

ghost avatar Dec 11 '14 09:12 ghost

How is the working directory defined? Is it the locatation of the telegram.exe or the directory where it's launched? For instance if I run the Telegram.exe on the desktop with a .bat file, all the telegram files will be created on the desktop.

2wayne avatar Dec 11 '14 09:12 2wayne

2telegramdesktop I'm afraid that not only in ~/.TelegramDesktop — after every update it creates ~/Telegram ~/Updater and ~/tdata folder, after which I move them manually into the ~/.TelegramDesktop. I am maked Telegram.desktop file in /usr/share/applications, pointing to the ~/.TelegramDesktop/Telegram, and everything goes fine, but time to time I see this files in my home and need to move them into ~/.TelegramDesktop

stychos avatar Dec 11 '14 17:12 stychos

Fix this please otherwise it won't working as a PortableApp. Because there actually should be a 'data' file created but can't because there is already a 'Data' folder. Could you make a settings.ini saving all the settings? Because I'd like to set some default values e.g. deactivate automatic updates and set default download location.

2wayne avatar Jan 11 '15 13:01 2wayne

.bat file is not a good idea, I'm afraid it changes the working directory to where it is placed. If you use a .lnk shortcut it has a working directory string, by default it is where the .exe is located. So I suggest you launch it by a .lnk shortcut.

To use it as a portable app you should save Telegram.exe in some empty folder, for example Telegram. Then when you launch it, "data" and "data_config" files and "tdata" folder are created in that folder, near Telegram.exe, which store your configuration, including download path and updates disabled.

About Linux version: there were some bugs related to launch-by-symlink, can you please install the last version from scratch and tell me, if autoupdates still behave so, creating files outside two places: the folder, where your binaries "Telegram" and "Updater" are located and "~/.Telegram Desktop"?

ghost avatar Jan 14 '15 05:01 ghost

After your message, I am deleted Telegram, ~/.TelegramDesktop and downloaded fresh 0.7.6 version. Next, I created empty ~/.TelegramDesktop, and place Telegram and Updater applications there. Also, I've maked desktop shortcut in /usr/share/applications, and ln -s ~/.TelegramDesktop/Telegram /usr/bin/telegram Shortcut text is:

[Desktop Entry]
Name=Telegram
Comment=Telegram Messenger
Exec=telegram %U
Icon=telegram.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;

Right now it was updated to 0.7.7, and there new files in home again: Files, created by the Updater

stychos avatar Jan 16 '15 16:01 stychos

Please add the ability to set path to the data dir via the command line. Something like this:

./Telegram --data-path "/some/path/to/telegram/desktop/dir"

For Linux it also would be nice to implement XDG Base Directory Specification as it's not a very good idea to just dump all configs in /home/user/ directory.

DarkPark avatar Feb 03 '15 09:02 DarkPark

I fixed the misplaced files issue by setting a working directory. Could you add a settings.ini saving all Telegram's settings?

2wayne avatar Feb 17 '15 13:02 2wayne

stychos

Can you contact me at telegram.me/preston so I could ask you for help in testing of Linux autoupdate?

ghost avatar Mar 03 '15 11:03 ghost

помогите мне скрыть мой номер от всех

2015-03-03 18:15 GMT+07:00 telegramdesktop [email protected]:

stychos

Can you contact me at telegram.me/preston so I could ask you for help in testing of Linux autoupdate?

— Reply to this email directly or view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/297#issuecomment-76927416 .

Altair2015 avatar Mar 03 '15 13:03 Altair2015

@Altair2015, I think it is not a correct issue tree to ask this :-) Try to create a new issue and describe your problem. P.S.: у вас в репозиториях есть репа с именем 961XXXXX46. Скорее всего, Ваш номер и есть +7961XXXXX46 :-)

ezdev128 avatar Mar 03 '15 13:03 ezdev128

@telegramdesktop with happiness if you will wait till tomorrow (I've migrated to hackintosh and haven't Linux for now, will install at night). What time is preferable for you?

stychos avatar Mar 03 '15 14:03 stychos

мне будет удобно после 0:00 по местному, это по Москве 20:00

Altair2015 avatar Mar 03 '15 21:03 Altair2015

any thoughts regarding my proposition? it's about standardization and common ways in Linux

DarkPark avatar Mar 04 '15 08:03 DarkPark

./Telegram --data-Путь " / некоторые / путь / к / телеграмма / настольные / реж " куда это надо ввести????

Altair2015 avatar Mar 04 '15 08:03 Altair2015

я согл

Altair2015 avatar Mar 04 '15 08:03 Altair2015

это пример запуска приложения из командной строки с явным указанием директории с данными

DarkPark avatar Mar 04 '15 08:03 DarkPark

@Altair2015 это такой троллинг, или Вы просто не поняли суть темы и порядок обсуждения?

stychos avatar Mar 04 '15 19:03 stychos

any progress here?

goodmind avatar Oct 25 '15 11:10 goodmind