Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Custom Build Step
Forum Updated to NodeBB v4.3 + New Features

Custom Build Step

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 548 Views 2 Watching
  • 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.
  • R Offline
    R Offline
    Redman
    wrote on last edited by
    #1

    Hello,

    I built the repc (https://doc.qt.io/qt-6/qtremoteobjects-repc.html) from sources with some adjustments needed for my project.

    Now I want to invoke repc.exe on all repc-qualified files (.rep files) when building.

    How can I do that

    jsulmJ 1 Reply Last reply
    0
    • R Offline
      R Offline
      Redman
      wrote on last edited by
      #4

      Solution:
      .qmake.conf

      OUT_ROOT=$$shadowed($$PWD)
      # Build rep_class_source.h with customized repc
      c_repc_source.output  = rep_${QMAKE_FILE_BASE}_source.h
      c_repc_source.commands = $$OUT_ROOT/bin/repc -i rep -o source ${QMAKE_FILE_NAME} rep_${QMAKE_FILE_BASE}_source.h
      c_repc_source.input = C_REPC_SOURCE
      QMAKE_EXTRA_COMPILERS += c_repc_source
      
      # Build rep_class_replica.h with customized repc
      c_repc_replica.output  = rep_${QMAKE_FILE_BASE}_replica.h
      c_repc_replica.commands = $$OUT_ROOT/bin/repc -i rep -o replica ${QMAKE_FILE_NAME} rep_${QMAKE_FILE_BASE}_replica.h
      c_repc_replica.input = C_REPC_REPLICA
      QMAKE_EXTRA_COMPILERS += c_repc_replica
      

      usage

      C_REPC_SOURCE += \
          ExampleClass/ExampleClass.rep \
      
      C_REPC_REPLICA += \
          ExampleClass/ExampleClass.rep \
      
      1 Reply Last reply
      1
      • R Redman

        Hello,

        I built the repc (https://doc.qt.io/qt-6/qtremoteobjects-repc.html) from sources with some adjustments needed for my project.

        Now I want to invoke repc.exe on all repc-qualified files (.rep files) when building.

        How can I do that

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Redman The link you posted explains what you need to do

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        R 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Redman The link you posted explains what you need to do

          R Offline
          R Offline
          Redman
          wrote on last edited by
          #3

          @jsulm It does not. It tells me how to define .rep files which get recognized by the repc.exe to generate the corresponding .h files.

          I'm asking how to use my own compiled repc as part of the build process

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Redman
            wrote on last edited by
            #4

            Solution:
            .qmake.conf

            OUT_ROOT=$$shadowed($$PWD)
            # Build rep_class_source.h with customized repc
            c_repc_source.output  = rep_${QMAKE_FILE_BASE}_source.h
            c_repc_source.commands = $$OUT_ROOT/bin/repc -i rep -o source ${QMAKE_FILE_NAME} rep_${QMAKE_FILE_BASE}_source.h
            c_repc_source.input = C_REPC_SOURCE
            QMAKE_EXTRA_COMPILERS += c_repc_source
            
            # Build rep_class_replica.h with customized repc
            c_repc_replica.output  = rep_${QMAKE_FILE_BASE}_replica.h
            c_repc_replica.commands = $$OUT_ROOT/bin/repc -i rep -o replica ${QMAKE_FILE_NAME} rep_${QMAKE_FILE_BASE}_replica.h
            c_repc_replica.input = C_REPC_REPLICA
            QMAKE_EXTRA_COMPILERS += c_repc_replica
            

            usage

            C_REPC_SOURCE += \
                ExampleClass/ExampleClass.rep \
            
            C_REPC_REPLICA += \
                ExampleClass/ExampleClass.rep \
            
            1 Reply Last reply
            1
            • R Redman has marked this topic as solved on
            • K Offline
              K Offline
              Kim Nancy
              wrote on last edited by
              #5

              Absolutely! To run repc.exe on all .rep files during builds, add a custom step in your project config. Utilize the relevant build system (e.g., CMake or qmake) to integrate repc.exe with the needed options for .rep file processing, ensuring automatic execution in each build.

              1 Reply Last reply
              0

              • Login

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