D4koon / WhatsappTray

Minimize Whatsapp Desktop-Client to Tray
GNU General Public License v3.0
388 stars 31 forks source link

Whatsapp Portable #11

Closed timea-techgirl closed 5 years ago

timea-techgirl commented 6 years ago

I have extracted whatsapp setup to my usb and I run from there. Whatsapp tray doesn't work if whatsapp is not "installed" to the default location. I tried copying whatsapptray to my whatsapp directory and running from there. I hope this enhancement can be made. I want it to be portable and personal.

If whatsapptray detects whatsapp.exe in the folder, it has to work. Please make it that way. Thanks.

rvanbekkum commented 6 years ago

Looking at the implementation it seems like WhatsAppTray launches WhatsApp from the shortcut under the start-menu programs (i.e., .....\Start Menu\Programs\WhatsApp\WhatsApp.lnk). As a work-around you could create the same short-cut. Nonetheless, it might be useful to be able to specify a custom directory and/or auto-detect WhatsApp in the same directory.

nihilistaX commented 6 years ago

I wondered why all newer Versions didn't work for me....but now its clear. Some kind of detection will be better, as i don't have the link in start menu.

D4koon commented 6 years ago

I wondered why all newer Versions didn't work for me....but now its clear. Some kind of detection will be better, as i don't have the link in start menu.

If i remeber correctly it hat some benefits/made it easier for me to use the shortcut. Atleas i could add a notification that the shortcut wasn't found...

Regarding the portable version: I think its not a trivial change... dont know if i will implement this in the near future since i think that will be rarely used. But if you want to implement it yourself im happy to add it.

timea-techgirl commented 6 years ago

I really hoped you could add it. I don't know coding. I'm not a computer student. :(

nihilistaX commented 6 years ago

I think it will be goog enough to have configurable path for the link, or maybe just multiple search paths like start menu and install path of WAtray. Its easy to put the link in another folder, but i like to have a clean start menu ;-)

timea-techgirl commented 6 years ago

@rvanbekkum Thank you for the tip! It helped.

And I used this: https://gist.github.com/milolav/f7a12285761db9726bce2aff11adb3af

Now I have a portable whatsapp installation that I can run anywhere.

I just need to copy the shortcut to start menu and whatsapp tray works. I have copied whatsapptray.exe and hook.dll to my portable folder.

The only thing missing now is WhatsappTray config.ini is still in appdata folder. Can it be made portable @D4koon ? I have the setting "Close to tray" enabled. I have to change it always. I want the config.ini in my portable folder.

Thanks everyone!

TrYkeRm4N commented 6 years ago

Using same version of whatsapp so I can tunnel that application via 4G network instead main one. Whatsapp works great. Whatsapp minimize to tray doesn't :(

Thanks in advance if you implement it!.

TrYkeRm4N commented 6 years ago

@malitech this program works for me: 4T TRAY MINIMIZER It got a free version and it's working :)

D4koon commented 5 years ago

I have now added the ability to set the path to WhatsApp and also moved the config-file in the folder where the binary lies. So that it should be easy to make portable.

If you want to set your own path for the WhatsApp-binary(exe), you can do so by using the 'WHATSAPP_STARTPATH'-config in the appData.ini

timea-techgirl commented 5 years ago

Settings are not being saved after restarting whatsapptray: Close to tray and Start minimized are ticked before exiting.

If I manually set the values to 1, whatsapptray doesn't work at all.

D4koon commented 5 years ago

Hello timikesmarsky,

thx for your feedback. I uploaded a version 1.4.1 which may fix the problem.

timea-techgirl commented 5 years ago

w Getting this error on launching whatsapp. Tried editing path. Same error. After this error, whatsapp launches.

timea-techgirl commented 5 years ago

Whatsapp opens after the error if the path is: ...\WhatsApp.exe There's an error in Readme.md I think.

Also the version number shows as 1.0.0.0.

D4koon commented 5 years ago

ok the level db is used for the new message detection. on my pc this is located under C:\Users\<username>\AppData\Roaming\WhatsApp\IndexedDB can you please tell me which folders you have there.

i dropped the fileversion to have less numbers to update :D The one i maintain is shown in the about dialog. But good to know maybe i try to find a way to improve that. The resource files are a pain in ...

timea-techgirl commented 5 years ago

There is just whatsapp > logs (It's all empty) My whatsapp is portable. The whatsapp data folder is within whatsapp program folder under "Profile" folder.

timea-techgirl commented 5 years ago

Oh ok. :D

D4koon commented 5 years ago

Are you sure you looking in the "Roaming" folder and not the Local folder in AppData Local normaly contains the WhatsApp.exe on a non-portable setup and Roaming has some other stuff

timea-techgirl commented 5 years ago

Yes, I know. I extract whatsapp nupkg to my portable location and edit a file so that the data in roaming folder is created within the portable folder under a folder named "Profile".

The method is here: https://gist.github.com/milolav/f7a12285761db9726bce2aff11adb3af

D4koon commented 5 years ago

ok then i have to make that configurable too...

D4koon commented 5 years ago

So here it is: https://github.com/D4koon/WhatsappTray/releases/tag/v1.4.2 Let me know if it is ok or still needs changes.

D4koon commented 5 years ago

I Just realized that the new config can not be made relative which is probably a problem. Will fix this with the next version.

D4koon commented 5 years ago

Done now: https://github.com/D4koon/WhatsappTray/releases/tag/v1.4.3

timea-techgirl commented 5 years ago

Hey, thanks for the effort. I'm getting the same error no matter what path I set for Roaming directory.

Another bug: If I right click and close from the taskbar, Whatsapp Tray process doesn't exit. I've to kill the process from task manager. It exits properly if I right click and close it from the tray icon.

timea-techgirl commented 5 years ago

My Whatsapp data is located in D:\WhatsApp Portable\Profile\IndexedDB\file__0.indexeddb.leveldb

I tried all combinations and relative paths. It didn't work.

D4koon commented 5 years ago

Another bug: If I right click and close from the taskbar, Whatsapp Tray process doesn't exit. I've to kill the process from task manager. It exits properly if I right click and close it from the tray icon.

Can you please make a seperate issue for that. Thanks

D4koon commented 5 years ago

My Whatsapp data is located in D:\WhatsApp Portable\Profile\IndexedDB\file__0.indexeddb.leveldb

I tried all combinations and relative paths. It didn't work.

Yeah that is expected. The rest of the path has to be 'WhatsApp\IndexedDB\file__0.indexeddb.leveldb' If you Rename 'WhatsApp Portable' to 'WhatsApp' and use path D: for the config it should work

timea-techgirl commented 5 years ago

I think I have to rename "Profile" to "WhatsApp"

timea-techgirl commented 5 years ago

I liked the Profile name because Profile1, Profile2 could be created portably with multiple instances and different whatsapp numbers.

Anyway, I renamed Profile folder to "WhatsApp" in the electron.asar > browser > init.js script.

Paths are set like this. WHATSAPP_STARTPATH=..\WhatsApp.exe WHATSAPP_ROAMING_DIRECTORY=..\

Now, it works. You've to update your README regarding relative paths.