Home Download Buy Blog Forum Support

OS specific Run configuration?

OS specific Run configuration?

Postby AnnanFay on Wed Oct 31, 2012 8:58 pm

I would like to create 4 build options for building Actionscript files. One for Building and one for Running in Linux, and the same for Windows.

Is it possible to do this?

Currently it seems 'windows' and 'linux' sections can only overwrite the default build option?

My current broken .sublime-build file is:

Code: Select all
{
    "selector": "source.actionscript",

    "windows":
    {
        "cmd": [
            "${packages}\\User\\Flash-build.bat",
            "${project_path}",
            "${file}"
        ],

        "variants":
        [
            {
                "name": "Run",
                "cmd": [
                    "${packages}\\User\\Flash-run.bat",
                    "${file_path}",
                    "${file_base_name}"
                ]
            }
        ],
    },

    "linux":
    {
        "cmd": [
            "${packages}/User/Flash-build.sh",
            "${packages}",
            "${project_path}",
            "${file_path}",
            "${file_base_name}"
        ],

        "variants":
        [
            {
                "name": "Run",
                "cmd": [
                    "${packages}/User/Flash-run.sh",
                    "${packages}",
                    "${project_path}",
                    "${file_path}",
                    "${file_base_name}"
                ]
            }
        ]
    }
}
AnnanFay
 
Posts: 2
Joined: Wed Oct 31, 2012 8:50 pm

Re: OS specific Run configuration?

Postby AnnanFay on Wed Nov 21, 2012 8:51 pm

As this doesn't seem possible I've added it to the UserEcho site.
AnnanFay
 
Posts: 2
Joined: Wed Oct 31, 2012 8:50 pm

Re: OS specific Run configuration?

Postby bizoo on Wed Nov 21, 2012 9:19 pm

I think that this must work:
Code: Select all
{
    "selector": "source.actionscript",

    "windows":
    {
        "cmd": [
            "${packages}\\User\\Flash-build.bat",
            "${project_path}",
            "${file}"
        ]
    },
    "linux":
    {
        "cmd": [
            "${packages}/User/Flash-build.sh",
            "${packages}",
            "${project_path}",
            "${file_path}",
            "${file_base_name}"
        ]
    },   
   
    "variants":
    [
        {
            "name": "Run",
            "windows":
            {               
                "cmd": [
                "${packages}\\User\\Flash-run.bat",
                "${file_path}",
                "${file_base_name}"
                ]
            },
            "linux":
            {               
                "cmd": [
                "${packages}/User/Flash-run.sh",
                "${packages}",
                "${project_path}",
                "${file_path}",
                "${file_base_name}"
                ]
            }
        }
    ]
}
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 32 guests