HISE Logo Forum
    • Categories
    • Register
    • Login

    Preprocessor/Compiler directives...

    Scheduled Pinned Locked Moved Feature Requests
    7 Posts 2 Posters 310 Views
    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.
    • LindonL
      Lindon
      last edited by

      So I think preprocessor/compiler directives would be a good addition to the editor. I'm building slightly different versions of products so I'm thinking of:

      #DEF DEMOMODE = 1
      
      // then later...
      
      #IFDEF DEMOMODE
        //some code here....
      #ELSEDEF
       //some other code here
      #ENDIFDEF
      

      unless of course "I'm being stupid..." and this is already available somehow...

      HISE Development for hire.
      www.channelrobot.com

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Lindon
        last edited by

        @Lindon Couldn't you just do that with a regular if statement and a constant?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by Lindon

          @d-healey said in Preprocessor/Compiler directives...:

          @Lindon Couldn't you just do that with a regular if statement and a constant?

          no, this isnt code logic... it code includes/excludes - so your final shipped code includes some code or not. Thus "preprocessor"

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD 1 Reply Last reply Reply Quote 1
          • d.healeyD
            d.healey @Lindon
            last edited by

            @Lindon

            I put all my code into namespaces and just comment out or remove ones that I don't want to ship in the final product but I can see how this would be a more automated solution.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey said in Preprocessor/Compiler directives...:

              @Lindon

              I put all my code into namespaces and just comment out or remove ones that I don't want to ship in the final product but I can see how this would be a more automated solution.

              yeah its been in the KSP editor(Sublime) for a long time - I used to use it a LOT.

              HISE Development for hire.
              www.channelrobot.com

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lindon
                last edited by

                @Lindon The only use case I can think of in my projects is removing UI factory stuff. What kind of things will you use it for?

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey the example is mostly a give away....

                  I want to build a demo version of my app -that times out after and is run-able only a fixed number of times, and may have reduced functionality...

                  I want a "full" version of my app that doesnt do (or is missing) any of that stuff - but it always asks for the serial first time thru.

                  So really this gives me the flexibility to build a demo version and a full version from (nearly) the same codebase...

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  33

                  Online

                  1.8k

                  Users

                  12.0k

                  Topics

                  104.4k

                  Posts