Menu

Changes for Linux-systems

2016-04-30
2016-05-12
  • Andreas Winter

    Andreas Winter - 2016-04-30

    In order to prepare QtGrace for the generation of rpm-files (or similar) the file-system structure of QtGrace has been altered for Linux (and also slightly for other platforms as well).
    There is also a Makefile present which should be used for Linux to copy the QtGrace-file to the new appropriate destinations.
    executable --> /usr/bin/qtgrace
    most files --> /usr/share/qtgrace/
    documentation --> /usr/share/doc/qtgrace/
    icons --> /usr/share/icons/qtgrace/
    There is no bin-folder in /usr/share/qtgrace/ any more. The Default.agr goes into a templates-folder (as well as the default binary-format-specifications).

    This work is incomplete and may be subject to change before the actual release of QtGrace v0.2.6.

    QtGrace v0.2.6

     
  • sanfo

    sanfo - 2016-05-12

    Hi Andreas, I have been working on this during the last few days.

    I would say the Makefile is unneeded, given that Qmake can deal with all these tasks, and can even call bison/yacc appropriately. It can also prepare a package version ready to be distributed, that is it can create a tar.gz file (like a package build with autotools) ready to be shipped in a clean state to any interested user, or to be compiled by package builder do create a deb file (I will talk about this later).

    In order to accomplish these task I have found that

    a) the .pro file must go into the main folder, and all references to file from SOURCES list modified to src/, all ../type1 changed into type1/, etc etc. For the sake of clarity I would renamed it into qtgrace.pro

    b) all executable bit spouriously associated with source and other files (e.g. gracerc file, icons, etc) must be removed, otherwise the installation procedure treat them as compiled binaries and makes a mess:

    chmod a-x file1 file2 ... 
    

    and for the sake of completeness I would remove also the
    unneeded bits from folder, with

    chmod 740 folder1 folder2 fodler3...
    

    c) some headers from type1 folder must be added to the .pro list, otherwise they are not shipped in the distributed file, and they are not found at compilation time

    d) files and folders containg icons and font must be added to the "DISTFILES" list, such as:

    DISTFILES += \
       ./gracerc \
       ./gracerc.user \
     ...
    

    e) all the bits that have to be installed must be specified, such as:

    fonts.path = /usr/share/qtgrace/
    fonts.files = ./fonts/
    INSTALLS += fonts
    
    templates.path = /usr/share/qtgrace/
    templates.files = ./templates/Default.agr
    INSTALLS += templates
    
    qtgrace.path = /usr/bin/
    qtgrace.files = ./bin/qtgrace
    INSTALLS += qtgrace
    
    ...
    

    Having done this, creating a tarball with all the source needed to compile and ready to be shipped is very simple:

    qmake ..
    make dist
    

    this will create a file named "qtgrace1.0.0.tar.gz" (well, version must be provided somewhere, I will find out).

    Now you can take this, move somewhere, uncompress, compile and install

    mv qtgrace1.0.0.tar.gz /tmp
    cd /tmp
    tar xzvf qtgrace1.0.0.tar.gz
    cd qtgrace1.0.0
    make
    sudo make install
    

    I am still finalizing the icons installation and I have to experiment a bit.
    Please give your impression/feeling!

     
  • Andreas Winter

    Andreas Winter - 2016-05-12

    Dear Francesco;

    Yes, I would as well be much more comfortable with a qmake-approach than with manually generating Makefiles.
    a) I will try to reorganize the folders and create a new qtgrace.pro-file.
    b) This will have to wait till I am finished with everything else because I often copy the qtgrace-files and -folders between Mac OS X / Linux and Windows and the access control lists gets lost.
    c) I will have to look through the sourcefiles for all the header-files from type1-folder. Maybe I even reorganize the files and put ALL sources in the src-folder.
    d) like a)
    e) like a)
    In general: Would the qmake-approach work an any platform? Would it work still as simple with qtcreator as it does now?

    Best regards
    andwin

     
    • sanfo

      sanfo - 2016-05-12

      Dear Francesco;

      Yes, I would as well be much more comfortable with a qmake-approach than with manually generating Makefiles.
      a) I will try to reorganize the folders and create a new qtgrace.pro-file.

      I have played a bit with it, I can tell you more specifically

      b) This will have to wait till I am finished with everything else because I often copy the qtgrace-files and -folders between Mac OS X / Linux and Windows and the access control lists gets lost.

      I think a versioning control would be able to deal with that

      c) I will have to look through the sourcefiles for all the header-files from type1-folder. Maybe I even reorganize the files and put ALL sources in the src-folder.

      I think having differen folders is a good idea to organize sources relative to different part of the program, but you know better their relation

      d) like a)
      e) like a)
      In general: Would the qmake-approach work an any platform? Would it work still as simple with qtcreator as it does now?

      I think so! It should be only the matter of putting "unix:" in front of all of this... am I wrong?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.