Code Monkey home page Code Monkey logo

asconfigc's People

Contributors

dependabot[bot] avatar joshtynjala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

asconfigc's Issues

"type": "lib" is not working

I have a asconfig.json file which looks like this:

{
    "config": "royale",
    "type": "lib",
    "compilerOptions": {
        "debug": true,
        "js-output-type": "royale",
        "define": [
            {
                "name": "COMPILE::SWF",
                "value": false
            },
            {
                "name": "COMPILE::JS",
                "value": true
            }
        ]
    },
    "files":
    [
        "src/main/royale/TestingClasses.as"
    ]
}

I'm getting an error when trying to compile it:

Error: Invalid asconfig.json file. /Users/harbs/Documents/ApacheRoyale/royale-asjs/frameworks/projects/Testing/asconfig.json
[ { path: '', keyword: 'oneOf' } ]

Removing the "lib" option or changing it to "app", makes the error go away.

A target file must be specified

Hey, there has been sometime I've not been using asconfigc. I don't know why I'm getting:

a target file must be specified.

Any idea? This is my asconfig.json:

{
    "config": "air",
    "type": "app",
    "mainClass": "Main",
    "compilerOptions": {
        "source-path": ["src"],
        "library-path": ["libs"],
        "output": "build/phantasy-star-3.swf"
    }
}

I did try adding compilerOptions.targets = ['SWF'], but still nothing.

Constant bad formating

Currently string constants are not generated properly, which will lead to the compilation error:
col: 95 Error: The initializer for a configuration value must be a compile time constant.

in asconfig:

        "define": [
          { "name": "CONFIG::DEBUG_NS", "value": "*" }
       ]

generated line:

--define+=CONFIG::DEBUG_NS,*

Double or single quote have to be used(1), what it should look like:

--define+=CONFIG::DEBUG_NS,"*"

even using additionalOptions will trim double quote and single quote out:

   "additionalOptions": "--define+=CONFIG::DEBUG_NS,\"*\""

(1) "Using conditional compilation" in https://help.adobe.com/archive/en_US/flex/using/flex_4.6_help.pdf

Inconsistencies with airOptions->files between debug and build

I have separated embedded and non-embedded assets in my project, so that I can avoid embedded assets being copied to the release build. I don't want to enable copySourcePathAssets as there are a lot of assets I don't want copied over.

Please see this basic project example, which exhibits the issue: https://www.dropbox.com/s/0q1ny9os8y3x2tm/asconfigc%20Files%20Issue.zip?dl=0

In bin-release, the folder is correctly copied to assets/images/, but in bin-debug it's copied to images/ - the assets parent folder is somehow ignored.

application.xml fwritesync

Can I just say first Josh thanks very much for all the great work here...

I am working on an air-mobile project that I am trying to port to FlexJS (using 0.8.0 - I will switch to Royale when its official). I was getting a failure when trying to build, is seems that there is call to fwritesync after compiling the FlexJS output, that wants to make a copy of the AIR descriptor xml file, but is pointing to a bin/bin/js-debug and not bin/js-debug and that causes a crash in the build:

Error: ENOENT: no such file or directory, open '/Volumes/LocalData/Users/mick/flex-projects/MobileStocks/MobileStocks/bin/bin/js-debug/MobileStocks-app.xml'
at Object.fs.openSync (fs.js:663:18)
at Object.fs.writeFileSync (fs.js:1314:33)

It may well be due to my setup, and I have been trying to follow your instructions and use the sample MobileStocks app rather than my own as a test, but I still get the same error. I made a folder called MobileStocks and then copied the MobileStocks example into that. My workaround is just to copy the air descriptor xml file into a bin/js-debug folder in the bin folder.
My asconfig.json is:

{
    "config": "airmobile",
	"compilerOptions": {
		"output": "MobileStocks/bin/MobileStocks.swf"
    },
    "application": "MobileStocks/MobileStocks-app.xml",
	"files":
	[
		"MobileStocks/src/main/flex/MobileStocks.mxml"
	]
}

tasks.json is:

{
	"version": "2.0.0",
	"tasks": [
		{
			"identifier": "build-debug",	
			"type": "actionscript",
			"debug": true,
			"group": {
				"kind": "build",
				"isDefault": true
			}
		}
	]
}

Specify minimum engine in package.json

Should be a recent LTS release. Probably Node 6 or newer.

Right now, if someone tries to use an older version of Node, it will fail without a clear reason why.

Issues with building and running animate based projects

A few little issues with building via Animate:

  1. With an asconfig.json that uses an "animateOptions" section, I can successfully build using this method (i.e. where vscode launches animate) but it leaves Animate open, and the fla file is also in a modified state. Very little hope of any kind of tidy automated builds of a whole bunch of fla's this way?
  2. Cannot launch the compiled swf to play or debug in vscode. Error is "Error launching SWF debug session ... runtime not found for program xyz.swf". Building a non-animate project in vscode works fine however.
  3. vscode flags warnings/errors in the "main" class file that are properties defined for the movieclip inside the fla project. So I can see how vscode can't know about these, but is there a suggested way to suppress these warnings safely?

Readme update, or added functionality, for jvmargs support.

Ran into an issue where embedding fonts into a swc failed because the JVM ran out of memory.

Solution:
asconfigc.cmd '--sdk', 'c:\airsdk\32.0.0.116', '--debug=false', '--project', '.\font\asconfig.embed-fonts.json' '--jvmargs=-Xmx1000m'

Couldn't figure out any other way to do it other than calling this manually. Would be awesome to have either the default maximum of the JVM just increased, since it doesn't matter, or adding a configurable option to increase it.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.