MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only
  • 1.  Configuring UEStudio/UltraEdit for MapBasic

    Employee
    Posted 10-04-2017 11:01
      |   view attached

    If you are using a thirdparty text editor to write MapBasic code, you probably would like to be able to call the MapBasic compiler from within this editor.

    This can be done by using the command line parameters of MapBasic to either Compile or Link your source files and projects.

    To Compile you need to specify the parameter -D and then the MapBasic source file or files to compile.

    To Link you must specify the parameter -L and then the MapBasic Project file to link.

    I would recommend in both cases also to use the -NOSPLASH parameter to avoid seeing the splash screen.

    The commands can look like this:

    Compile

    "C:\MapInfo\MapBasic\Mapbasic.Exe" -NOSPLASH -D "MySourceCode.mb"

    Link

    "C:\MapInfo\MapBasic\Mapbasic.Exe" -NOSPLASH -L "MyProject.mbp"

    I have included a PDF that shows how you can configure UEStudio and UltraEdit to call the MapBasic Compiler using a couple of bat files. You can also download my bat files.

    Make sure to change the paths to match your system.

    Attachment(s)



  • 2.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Posted 10-04-2017 07:22

    We are using a setup like this, so it is easy to replace the version of mapbasic compiler. MapBasic 15.2 do not take NOSPLASH parameter.

     

    REM PATH = "C:\Program Files (x86)\MapInfo\MapBasic_152\MAPBASIC.EXE"

    PATH = "C:\Program Files (x86)\MapInfo\MapBasic_100\MAPBASIC.EXE" -NOSPLASH

    %PATH% -D module1.mb

    %PATH% -D module2.mb

    %PATH% -L application.mbp

     



  • 3.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Employee
    Posted 10-04-2017 07:47

    Are you sure about the NOSPLASH for 15.2, Uffe?

    I'm using this for 15.2:

    "C:\MapInfo\MapBasic\15.2\Mapbasic.Exe" -NOSPLASH -D ""%1.mb""



  • 4.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Employee
    Posted 10-04-2017 07:48

    And yes, you can compile multiple source files in one go and that's quite a lot faster than doing them one at a time.

    I had never tried linked the project at the same time, too. Nice idea



  • 5.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Posted 10-04-2017 07:57

    NOSPLASH makes no difference in 15.2. It shows a tiny message window anyway, which is different from the splash screen in 10.0.



  • 6.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Employee
    Posted 10-10-2017 11:27

    Have been using NotePad++ for quite a while to compile, link, and run MapBasic. I do still use original editor as well when I am compiling newer MB programs that are in UTF-8 charset (Unicode support in 15.2x) and using differing characters such as Cyrillic, Japanese, etc.

    http://www.twiav.nl/php/mapbasic.php#shac



  • 7.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Posted 10-25-2017 19:15

    We have a batch script to compile each mb file and then link the project.

    FOR %%I in (*.mb) DO (

    echo Compiling: %%I 

    "C:\Program Files (x86)\MapInfo\MapBasic\mapbasic.exe" -D %%I -nosplash

    )

    echo ----------------------

    "C:\Program Files (x86)\MapInfo\MapBasic\mapbasic.exe" -L Project.mbp

     

    It works in series, but given we have 46 modules to compile, is there a way to compile it in parallel? It can take some time for us to compile our tool.

     



  • 8.  RE: Configuring UEStudio/UltraEdit for MapBasic

    Employee
    Posted 10-26-2017 02:15

    Ashley,

    You can pass multiple files to the compiler each time. That will save you quite some time.

    Like:

    "C:\MapInfo\MapBasic\Mapbasic.Exe" -NOSPLASH -D "ERRORLib.mb" "EXCELLib.mb" "\FILELib.mb"

    I'm really bad at write DOS scripts so I'm not sure how you write this to for example send ten modules to the compiler at a time. I have hard coded it for my common libraries.