Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. rename .user file? multiple .user files?
Forum Update on Monday, May 27th 2025

rename .user file? multiple .user files?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
2 Posts 2 Posters 1.0k Views
  • 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.
  • D Offline
    D Offline
    davecotter
    wrote on 8 Jul 2017, 20:51 last edited by davecotter 7 Aug 2017, 21:28
    #1

    I have one computer running both mac and windows (mac with parallels)
    i have one cross platform project, accessed from the same file system folder in both mac and windows
    obviously, the .user file is going to be a problem.
    i can extract the shared .user file stuff into a shared user file, no prob there.
    but it would really solve the problem if i could RENAME the user file based on platform, eg:

    Proj.pro.user_win
    Proj.pro.user_mac
    

    the obvious place to do this would be in QT Creator prefs, but i see no place to do so.

    i thought i could MAYBE change the "environment variable" for the file extension, like this

    but i am not sure how to set the environment variable.

    also thought maybe i'll make a hard link "Proj_Mac.pro" that points to "Proj.pro", hoping the .user file created would be called "Proj_Mac.pro.user", but that didn't work. tried with Alias as well, also fail.

    I've googled around and found many people with this same pain point, but no solutions.

    updateQ: wait would it work to have a Proj_mac.pro who's ONLY line is [#include "Proj.pri"] ? as described here? then the user file names would be different!!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on 8 Jul 2017, 22:03 last edited by davecotter
      #2

      YES! You can have separate .pro files with different names, and one pri file, eg:

      Proj_mac.pro
      Proj_win.pro
      Proj.pri
      

      and each .pro file has one line:

      include(Proj.pri)
      

      problem solved! each user gets a separate user file, but you have only one project file (the ".pri" one)

      YAY!

      1 Reply Last reply
      0

      1/2

      8 Jul 2017, 20:51

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved