Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add specific ANE in sub-asconfig #29

Open
Adolio opened this issue Aug 10, 2021 · 1 comment
Open

Cannot add specific ANE in sub-asconfig #29

Adolio opened this issue Aug 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Adolio
Copy link

Adolio commented Aug 10, 2021

Hi Josh,

I cannot figure out how to add a specific ANE only for an asconfig extension.

The ANE configuration works fine if I add it in the global asconfig.json:

{
	"config": "air",
	"mainClass": "Main",
	"compilerOptions": {
		"library-path": [
			"lib",
			"ane/com.gameanalytics.sdk.ane"
		],
		"source-path": [
			"src"
		]
	}
	"airOptions": {
		"extdir": [ "ane" ]
	}
}

But I got the following error when adding it only in the asconfig.desktop.json:

ane-issue

asconfig.json

{
	"config": "air",
	"mainClass": "Main",
	"compilerOptions": {
		"library-path": [
			"lib"
		],
		"source-path": [
			"src"
		]
	}
}

asconfig.desktop.json

{
	"extends": "asconfig.json",
	"compilerOptions": {
		"library-path": [
			"lib",
			"ane/com.gameanalytics.sdk.ane"
		]
	},
	"application": "application-desktop.xml",
	"airOptions": {
		"extdir": [ "ane" ]
	}
}
@joshtynjala
Copy link
Member

I know that I responded to this issue last week, but my comment seems to be missing now. How strange! Maybe I was having some kind of network issues.

vscode-swf-debug doesn't know anything about asconfig.desktop.json when automatically populating the launch configuration properties. It only knows to look for asconfig.json. With this in mind, it means that you need to manually add some fields to your launch.json that would normally be populated automatically.

In launch.json, you need to set the "extdir" field. However, it is not the same value as the "extdir" field in asconfig.json. This one should be a directory containing "unpackaged" ANEs (basically, these are the .ane files unzipped). You don't actually need to manually unpackage the ANEs yourself, though. When you build your project with asconfig.desktop.json, the build task will create a directory named .as3mxml-unpackaged-anes in the output directory and populate the files automatically.

So, if you are compiling to bin-debug, you would set "extdir" in launch.json to something like this:

"extdir": "bin-debug/.as3mxml-unpackaged-anes"

@joshtynjala joshtynjala transferred this issue from BowlerHatLLC/vscode-as3mxml Aug 16, 2021
@joshtynjala joshtynjala added the enhancement New feature or request label Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants