Handling Different Versions of an Application

  • What is the best way to start with a new version of a application? I have an application that i have received a lot of feedback from the users and i will be implementing many of those changes. I want to keep what i have now static for reference if necessary. My current application folder is GRCRV1.0 inside is a folder called GRCR, where the program resides (here is the GRCR.pro and GRCR.pro.user and all my code). I copied the contents of GRCR to GRCRV1.1/GRCRV1.1 but the compiler got bent out of shape not finding things, i think is because the "pro" and the "pro.user" file have the same name in both directories.
    What is the best way to start a new version of an application?

  • Moderators

    why so complicated when there are version control systems (like GIT for example) available for everyone nowadays.
    You then simply create a new branch for your 2.0 version and start coding and purge all unneeded code away. Simply switch back to the branch if you want to create a 1.2 version for example.

  • @raven-worx Thanks for the quick answer. I have not used version control, not very familiar with it. With GIT, doesn't the source code becomes public?

  • @Dan3460 As stated by @raven-worx what you need is a tool implementing what is called "Version Control". You may choose from a bunch of them, although I may suggest (as @raven-worx already did) Git (book about it), which Qt Creator integrates along your work environment and there are also several online repositories to host your developments (i.e. Bitbucket, Github)

  • Moderators

    @Dan3460 said in Handling Different Versions of an Application:

    With GIT, doesn't the source code becomes public?

    When you use a GIT server hosting which doesn't allow private repositories, then yes (like github for example)
    You could use bitbucket which also allowes private repositories.

    Or you create your own repository somewhere in your network. You do not even need a real "server" for it. Just an accessible network path is already sufficient.

  • Thanks for the answers, I'm heading in that direction. It is anything spacial that i need to do if i have an application already created and i add git to it?

  • Using Git, you're not even constrained to have an "accessible network path", the tool is good enough to work properly with local filesystems.

  • @Dan3460 You need to create a Git repository and then add all your existing files in what's called an initial commit. You'll essentially be creating a new repository from existing project.

  • I have setup git on my computer and test on a dummy project, seems to work but is not as intuitive as i thought. In any case, i have two problems i think.
    1- from the dummy application I can create a repository on a network location but, when a tried to push something up there i get a message that says: No configured push destination, but is i click on git->remote repository->manage remote i see the location there.
    2 - from a application that already exit, i don't see how you link it to git. all the option but two are grayed out on the git menu.

    Thanks for the help

  • @Dan3460 so the post turned into a version control tutorial, focused on git. I guess this is not related to Qt framework itself so you may need to check specific documentation about that (very very abundant these days in Internet)

  • So, i'm in the wrong forum for this? Which forum should i post to. I see abundant doc regarding Git but there is not that much that can clear some concepts for a newbie. One of them is my second question, don't know where to go for answers.

  • Lifetime Qt Champion

    Note on the copy folder thing.
    That should just have worked.
    As you mentioned, deleting the pro.user file might help
    if compiler barks. Or can also happen if you use absolute paths in the
    .pro file.

    Anyway, using something like GIT , you get a history for each file and you can
    create a test version and easy put the changes back to the normal app and all kinds of stuff that
    are very hard to live without once you gotten used to it.

    That said, GIT is Distributed and such powers comes with a price.
    It takes some time to learn. And some reading too.

    Reading the book as @Pablo-J-Rogina suggest would be a really good start.
    Its well written and explains well.

    2 - from a application that already exit, i don't see how you link it to git. all the option but two are grayed out on the git menu.
    You dont exactly link it. you import it and its then the first revision 1.
    something like
    git init
    git add --all
    git commit -m "Initial Commit"

    But it should also be possible via the menus, i guess.

    But you must read some docs to learn the words and workings.
    Else it will be like trying to fly a complicated UFO blind folded.

Log in to reply