• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Per-platform database location path ?

    Scheduled Pinned Locked Moved
    Development
    2
    3
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fiveangleF
      fiveangle
      last edited by fiveangle

      I tried to dig into where the db path was being set, but it seem's is being handled differently on every platform ? On macOS (which I'm currently typing on) it is obtained by GetApplicationSupportPath() but that's in mac_startup.h/.mm only and a quick search didn't even show something similar for Windows (I'm sure I'm not using the magic necessary string search, but I didn't find any win_startup.h/mm so I'm guessing each platform kludges along in it's own way in this respect ?)

      My goal was to see if I could, without too much pain, add a configurable "database location" feature to Strawberry settings so I could easily make Strawberry launchable from a separate directory for each platform (e.g. "./Strawberry/win/strawberry.exe", "./Strawberry/mac/Strawberry.app", and "./Strawberry/lin/strawberry*" each located in a common Strawberry directory on an external exfat-formatted USB drive, then configure each platform binary to point the same db, e.g. "../db/strawberry.db", but it's not looking so slam-dunk.

      I'm a self-taught "hack it until it does what I need" guy and not a trained dev, so I'm just stabbing in the dark here.

      Any pointers to how I might accomplish what I'm trying to do ? And if the answer is "no" then I'll humbly take my marbles to the requests forum to toss them in the air, then move on 🙂

      Thanks !

      -=dave

      EDIT: Context - I hacked a USB3 hub+uSD cardreader inside a mini back-packable MIDI DJ Controller (Numark Party Mix) that has my Mixxx library on it so trying to get the ability to plug the controller into any Mac, Win, (and maybe Linux ?) box and be into both my Strawberry (for general song play and smart playlist features) or my Mixxx deejay libary.

      jonasJ 1 Reply Last reply Reply Quote 0
      • jonasJ
        jonas @fiveangle
        last edited by

        @fiveangle
        The GetApplicationSupportPath() function isn't used for anything.
        Strawberry uses QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
        The DB path is set here:
        https://github.com/strawberrymusicplayer/strawberry/blob/master/src/core/database.cpp#L81

        fiveangleF 1 Reply Last reply Reply Quote 1
        • fiveangleF
          fiveangle @jonas
          last edited by

          @jonas thanks !

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors