Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work on a Mac? #158

Open
jacquesnoris opened this issue Apr 19, 2019 · 16 comments
Open

Does this work on a Mac? #158

jacquesnoris opened this issue Apr 19, 2019 · 16 comments

Comments

@jacquesnoris
Copy link

Sorry, I'm a total newbie, TTwatch looks great, exactly what I was looking for, any chance to get this running (pun intended ;) on a Mac?

@jacquesnoris jacquesnoris changed the title Does this work on a Mac Does this work on a Mac? Apr 19, 2019
@ryanbinns
Copy link
Owner

I don't have access to a Mac and I've never done any software development (and never really even used) a Mac, so I have no idea at all. It may be able to be done, but I won't be doing it.

@uded
Copy link

uded commented Apr 25, 2019 via email

@jacquesnoris
Copy link
Author

Okay, thanks for your answers!

@sanderevers
Copy link
Contributor

sanderevers commented Sep 23, 2023

Just compiled it on MacOS Monterey without problems. Installed the dependencies (cmake, openssl, curl, libusb, protobuf, protobuf-c) via Homebrew.
Only thing is that ttwatch only works using sudo (can't access the USB device otherwise).
Glad I can keep using my TomTom Spark Music like this despite the discontinuation. Thanks a lot developers!

@Lenahic
Copy link

Lenahic commented Oct 5, 2023

Hey !
What do you mean by "ttwatch only works using sudo" ? what are the instructions you wrote ?

@Lenahic
Copy link

Lenahic commented Oct 5, 2023

@sanderevers : I guess I have managed to open the app using "sudo open TomTomWatch.jar", yet, the software doesn't detect the watch ...

@sanderevers
Copy link
Contributor

sanderevers commented Oct 6, 2023

I don't know what TomTomWatch.jar is, but it has nothing to do with the ttwatch software in this repo. To install ttwatch on a Mac you first need to install the Homebrew package manager and then use that to install the dependencies:

brew install cmake openssl curl libusb protobuf protobuf-c

Then

git clone https://github.com/ryanbinns/ttwatch
cd ttwatch

and follow the build instructions which should install ttwatch into /usr/local/bin. You can test if that went right by just running

ttwatch

and see if it prints a help text.
If that works, you should be able to plug in your watch and do

sudo ttwatch --list-history

to see your latest activities on the watch. At least, this is what worked for me (on MacOS Monterey). Hope it does the trick for you too.

@scubajorgen
Copy link
Contributor

@sanderevers : I guess I have managed to open the app using "sudo open TomTomWatch.jar", yet, the software doesn't detect the watch ...

Your confusing with my project: https://github.com/scubajorgen/TomTomWatch

@Lenahic
Copy link

Lenahic commented Oct 6, 2023

I started from scratch after my last message and I'm stuck at the "make" command of the build process that always lead to errors :
Undefined symbols for architecture x86_64:
"_protobuf_c_message_free_unpacked", referenced from:
_root_container__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_metadata__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_data_container__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_sub_data_container__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_device_info__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_software_version__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)
_unknown01__free_unpacked in libttbin.a(activity_tracking.pb-c.c.o)

and 4 other errors like this :
"_protobuf_c_message_get_packed_size", referenced from:
"_protobuf_c_message_pack", referenced from:
"_protobuf_c_message_pack_to_buffer", referenced from:
"_protobuf_c_message_unpack", referenced from:

@Lenahic
Copy link

Lenahic commented Oct 6, 2023

And i also have this error about the 'sprintf' function :
ttwatch/src/libttwatch.cpp:1011:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(timestr, "%s %d. %s %02d:%02d:%02d %04d",

@sanderevers
Copy link
Contributor

I don't know much about C, but my guess is it cannot find the protobuf-c headers. I noticed a typo in my brew install instructions (I wrote libusd instead of libusb), maybe that's the reason. Can you try brew install cmake openssl curl libusb protobuf protobuf-c again and do a new build?

@Lenahic
Copy link

Lenahic commented Oct 6, 2023

done but it doesn't change anything. Yet, running brew instal cmake etc ... I've some errors about the formula used :

Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.27.6 is already installed and up-to-date.
To reinstall 3.27.6, run:
brew reinstall cmake
openssl@3 3.1.2 is already installed but outdated (so it will be upgraded).
Warning: curl 8.3.0 is already installed and up-to-date.
To reinstall 8.3.0, run:
brew reinstall curl
Warning: libusb 1.0.26 is already installed and up-to-date.
To reinstall 1.0.26, run:
brew reinstall libusb
Warning: protobuf 24.3 is already installed and up-to-date.
To reinstall 24.3, run:
brew reinstall protobuf
Warning: protobuf-c 1.4.1_7 is already installed and up-to-date.
To reinstall 1.4.1_7, run:
brew reinstall protobuf-c
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.3
############################################################################################################### 100.0%
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:2cc86941823ff633c21ef3533d7a106c4bddbcb35adac8
############################################################################################################### 100.0%
==> Upgrading openssl
3.1.2 -> 3.1.3

==> Pouring [email protected]
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl@3/certs

and run
/usr/local/opt/openssl@3/bin/c_rehash
==> Summary
🍺 /usr/local/Cellar/openssl@3/3.1.3: 6,495 files, 30.0MB
==> Running brew cleanup openssl@3...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
Removing: /usr/local/Cellar/openssl@3/3.1.2... (6,495 files, 30.0MB)

It looks like it's fine but it's not ...

@sanderevers
Copy link
Contributor

Yes, your packages look fine. The cmake formula is also the one I have installed. I don't know what's wrong then...

@Lenahic
Copy link

Lenahic commented Oct 6, 2023

I managed to create all folders (ttbincnv, ttwatchd ...) manually and complete all the installation using "-i" to ignore errors. These folders are empty (normal ?)

Also, I complete the last instruction (sudo make install) and I found ttwatch into /usr/local/bin with all other files. All files previoulsy mentionned are still empty
When i try "ttwatch" instruction i've got "zsh: permission denied:"
And when i try : "sudo ttwatch" i've got "sudo: ttwatch: command not found"
:'(

@sanderevers
Copy link
Contributor

@Lenahic today I tried to install ttwatch on a clean MacOS Sonoma and got the same error. And I found the solution!

brew install pkg-config

After that, the build process worked.

@sanderevers
Copy link
Contributor

Also, to update the GPS data, I needed to create a file /etc/ttwatch.conf with the following line in it:

EphemerisURL=https://gpsquickfix.services.tomtom.com/fitness/sifgps.f2p{DAYS}enc.ee

I first tried to put this in ~/.ttwatch but for some reason that doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants