We need separate Build Automation steps for 64bit builds

  1. ‹ Older
  2. 3 years ago

    Tim J

    16 Nov 2015 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    Very pleased to see this level of Wiki rolling out.

    Are others going to be allowed to edit / submit?

  3. Paul L

    16 Nov 2015 Xojo Inc http://developer.xojo.com

    @Tim J Are others going to be allowed to edit / submit?

    It is not technically a wiki, so others cannot edit it.

    Pages should have a "Was this information helpful?" section at the bottom that you can fill out to send feedback. And of course, Feedback itself can continue to be used for doc suggestions.

  4. 4 months ago

    Jürg O

    Mar 10 Pre-Release Testers, Xojo Pro

    @Tim J the Build Steps enhanced to provide both 32bit and 64bit specific steps

    I've just thought about using a "Copy Files" build step to add an additional .dll for a Windows Build. Obviously, I need to copy a different .dll's for 32Bit and 64Bit build.
    Am I correct that there is still no way to do that?

    @Greg OLone Have you considered triggering the builds externally using the ide communicator?

    Not an option, since I want to debug-run (32Bit for now, 64Bit hopefully soon) and having the appropriate/required .dll's added, too.

    I guess the only option is to use a Post Build Script, and copy the files via a Shell Command?
    And in order to be able to DebugRun and build onWindows, and build on macOS, too - the ShellCommands obviously need to be depending on the Build-on-OS-Target...
    So before I'm going to do that... is there really no built-in and simple way?

  5. Tim J

    Mar 10 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    @Jürg O So before I'm going to do that... is there really no built-in and simple way?

    Might I invite you to check out Feedback Case #51578 :)

  6. Jürg O

    Mar 10 Pre-Release Testers, Xojo Pro

    @Tim J Might I invite you to check out Feedback Case #51578 :)

    I see my name there all over :)
    But I still see no simple way of adding an additional 32Bit or 64Bit .dll, apart from doing it via Shell (with different shell-copy-Code for Builds on macOS vs. Window) in a PostScript Script. The upcoming new constants are convenient, but CurrentBuildTarget does that part of the trick already.

  7. Tim J

    Mar 10 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...
    Edited 4 months ago

    It's coming in a future release. Note that Norman's entries are from yesterday ;)

  8. Jürg O

    Mar 10 Pre-Release Testers, Xojo Pro

    I‘m fully aware of that.
    But it doesn‘t make it any easier to copy different files for 32/64Bit builds... or does it?

  9. Tim J

    Mar 10 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    It's supposed to as that's what the request was for. :)

  10. Jürg O

    Mar 11 Pre-Release Testers, Xojo Pro
    Edited 4 months ago

    I don't think it will... at least not the way I understand it. Feedback Case #51578 is just a couple of convenience constants for post build ide scripts, so that you can easily figure out if the current build is for 32bit or 64bit. you can do that already by checking the constant CurrentBuildTarget.
    that "implemented" upcoming feature doesn't allow to have a build step running depending on the architecture of the current build-in-progress.

    So I guess (and that's still my question) this still doesn't allow us to use a simple "Copy File build step" to copy either a 32bit or 64bit resource... so once again: am I right that currently the only option is to use a post build script, and copy 32/64bit-specific additional files using an (os dependent) shell command (and checking CurrentBuildTarget to figure out if 32bit or 64bit)?

    If so... Feedback Case #41267 seems an overkill to me. Too much "noise" in the list of Targets.

    But a quite simple feature such as this one would be a big help: Feedback Case #51578 - Build Steps: allow to choose the architecture (32Bit, 64Bit, all) the build step applies to
    This would finally allow us to use architecture specific build steps. And if someone needs to "build them all at once", we can additionally use IDECommunicator.

  11. Tim J

    Mar 11 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    Hmmm - I actually confused those two (I have them both in my favorites). 41267 is what I'm looking for so that I can have my Build Steps to copy the proper added files depending on the current build type.

    As it sits now, I have 18 CopyFileStep files (3 for each platform) that have to be swapped from the main navigation level to the proper Build steps and then swapped back once the build completes.

  12. Jürg O

    Mar 11 Pre-Release Testers, Xojo Pro

    @Tim J As it sits now, I have 18 CopyFileStep files (3 for each platform) that have to be swapped from the main navigation level to the proper Build steps and then swapped back once the build completes.

    Ah, that's another idea or possible option...
    So you would suggest to have 2 "Copy Files Steps" (for the above example with a Windows Build): 1 for the additional 32 Bit .dll, 1 for the additional 64 Bit .dll
    But where do you place them, and how do you "swap" them? Do you do that manually, or can this be done auto-magically with yet another Build Step (script)?

  13. Tim J

    Mar 11 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    Create the CopyFileStep files and name them Linux32bitCopy, Linux64bitCopy, etc.
    Copy all of the ones that I'm not building in this run to the bottom of the Navigation list , but outside of the Build Automation section.
    Run the Build
    Copy all of the current steps to the Navigation list and copy in the alternates
    Run the Build
    Revert the copies so that I don't muck up my version control.

    You end up with something that looks like this:

    -image-

    A minor PITA, but it works for now.

  14. Rick A

    Mar 11 (Brazil. GMT-3:00)

    I believe we need something like this:

    -image-

  15. Tim J

    Mar 11 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    Yep - that's what Feedback Case #41267 is asking for.

  16. Jürg O

    Mar 12 Pre-Release Testers, Xojo Pro

    @Tim J Create the CopyFileStep files and name them Linux32bitCopy, Linux64bitCopy, etc.
    Copy all of the ones that I'm not building in this run to the bottom of the Navigation list , but outside of the Build Automation section.
    Run the Build
    Copy all of the current steps to the Navigation list and copy in the alternates
    Run the Build
    Revert the copies so that I don't muck up my version control.
    ...
    A minor PITA, but it works for now.

    Yup - not quite a nice way...

    ...I prefer an auto-magic way :-)
    That's why I ended up writing a PostBuild Script. It copies the appropriate 32Bit/64Bit additional .dll's to the just built app. Works for both DebugRun and Build/Release on Windows, and should work for Builds on macOS/Linux, too (I haven't tested that yet).

    Here's the Post Build Script as "pseudo code" (which can be modified to copy other files and resources, and copy to another subfolder than the main executable):

      Dim sDLLs_SourceFolder As String
      
      'Target
      select case CurrentBuildTarget
      case 3 'Windows 32Bit
        if TargetWin32 then
          sDLLs_SourceFolder = "%PROJECT_PATH%\build\Libraries\Windows\32Bit\"
        elseif (TargetMacOS or TargetLinux) then
          sDLLs_SourceFolder = "$PROJECT_PATH/build/Libraries/Windows/32Bit/"
        end if
      case 19 'Windows 64Bit
        if TargetWin32 then
          sDLLs_SourceFolder = "%PROJECT_PATH%\build\Libraries\Windows\64Bit\"
        elseif (TargetMacOS or TargetLinux) then
          sDLLs_SourceFolder = "$PROJECT_PATH/build/Libraries/Windows/64Bit/"
        end if
      end select
      
      if (sDLLs_SourceFolder <> "") then
        'add the 32Bit or 64Bit .dll's
        Dim sAppBuildPath As String
        if TargetWin32 then
          sAppBuildPath = CurrentBuildLocation
        elseif TargetMacOS or TargetLinux then
          sAppBuildPath = ReplaceAll(CurrentBuildLocation, "\", "") 'don't escape Path
        end if
        
        if TargetWin32 then
          call DoShellCommand("copy """ + sDLLs_SourceFolder + "MyAdditional.dll" + """ """ + sAppBuildPath + """ /y /v", 0)
        else
          call DoShellCommand("cp -f """ + sDLLs_SourceFolder + "MyAdditional.dll" + """ """ + sAppBuildPath + """", 0)
        end if
        
      end if
      

    That works for me now (with both REAL Studio 2011r3 and Xojo 2017; without having to fiddle with the Build Steps for every build) - until we finally get some nice and integrated way in the IDE for such a simple task.

  17. Tim J

    Mar 12 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    @Jürg O That works for me now (with both REAL Studio 2011r3 and Xojo 2017; without having to fiddle with the Build Steps for every build) - until we finally get some nice and integrated way in the IDE for such a simple task.

    That's where I came FROM when I finally moved to Automation Build Steps - one IDE Script that handled all of that stuff that I ran from the File menu (when they should have been in the "Project" menu ... ).

    Here's an oldie but a goodie:

    Relocate Project-specific IDE scripts to the Projects Menu - Feedback Case #44657

  18. Beatrix W

    Mar 12 Pre-Release Testers Europe (Germany)

    @Tim Jones: Why did you move to those Copy steps? Granted, writing the IDE scripts is sort of painful. But I still manage to screw up those Copy steps now and then. Then they loose their files and there is no warning when you build.

  19. Tim P

    Mar 12 Pre-Release Testers, XDC Speakers

    I have never had a CopyFiles step "lose" it's files. Do you regularly move projects and files around?

  20. Tim J

    Mar 12 Pre-Release Testers, Xojo Pro Phoenix, AZ USA (desication ce...

    @Beatrix W @Tim Jones: Why did you move to those Copy steps? Granted, writing the IDE scripts is sort of painful. But I still manage to screw up those Copy steps now and then. Then they loose their files and there is no warning when you build.

    Because if you have both the 32bit and 64bit CopyFileStep files in the Build Automation, the Build pass executes both of them.

  21. Jürg O

    Mar 13 Pre-Release Testers, Xojo Pro

    @Tim J Because if you have both the 32bit and 64bit CopyFileStep files in the Build Automation, the Build pass executes both of them.

    It seems there is an easier way than manually moving the 32bit/64bit "Copy Files steps".

    An example for Windows - in a situation where you want to add 32Bit or 64Bit .dll's:
    Build Settings -> Windows -> Build: PostBuildSteps

    1. CopyZlib_Setup (Script, Source see below; needs to be above the next two steps)
    2. CopyZlib_32Bit (CopyFile Step, which adds the 32Bit .dll)
    3. CopyZlib_64Bit (CopyFile Step, which adds the 64Bit .dll)

    BuildScript "CopyZlib_Setup":

      'Reset
      PropertyValue("CopyZlib_32Bit.Applies to") = "3" 'None
      PropertyValue("CopyZlib_64Bit.Applies to") = "3" 'None
      
     'Enable depending on CurrentBuildTarget
      select case CurrentBuildTarget
      case 3 'Windows 32Bit
        PropertyValue("CopyZlib_32Bit.Applies to") = "0" 'Both Debug and Release
      case 19 'Windows 64Bit
        PropertyValue("CopyZlib_64Bit.Applies to") = "0" 'Both Debug and Release
      end select[/code]


    This will dis/enable the CopyFile Steps depending on the CurrentBuildTarget.
    So you can leave both 32Bit/64Bit Copy File Steps in the PostBuild section - and they will get activated depending on the current Build Settings.

    Note: This won't work for 2011r3, as the "Applies to: None" has been introduced somewhen later... It's there in 2016r3.

or Sign Up to reply!