OK, I should clarify a few things: o I want to build as quick as possible (machine is not that fast; when I'm not doing a release or QA build). o I want to use a JRE, not a full JDK (I shouldn't have to compile Java just to build Royale .swc libs, if I already have a Royale compiler build). o I want to build completely from what I downloaded (not have git pull in the middle of the build; use the exact version I downloaded).
So... I don't do this, but yes, this does work, as you mentioned: set MY_ROYALE_DIST=C:\src\just-for-harbs\apache-royale-nightly-build-beta-0.9.8-bin-js-swf set ROYALE_COMPILER_REPO=%MY_ROYALE_DIST%\royale-compiler set AIR_HOME=c:\adobe-air-sdk set ANT_HOME=c:\apache-ant-1.10.1 set ROYALE_HOME=%MY_ROYALE_DIST%\royale-asjs set JAVA_HOME=c:\jdk\jdk8u252-b09 set PATH=%JAVA_HOME%\bin;%PATH%;%ANT_HOME%\bin cd %ROYALE_HOME% ant -Dskip-tests=1 all And this works (and creates all sorts of directories outside of the MY_ROYALE_WORK directory): set MY_ROYALE_DIST=C:\src\just-for-harbs\apache-royale-nightly-build-beta-0.9.8-bin-js-swf set MY_ROYALE_WORK=C:\src\just-for-harbs\royale-asjs-release-0.9.8 set ROYALE_COMPILER_REPO=%MY_ROYALE_DIST%\royale-compiler set AIR_HOME=c:\adobe-air-sdk set ANT_HOME=c:\apache-ant-1.10.1 set ROYALE_HOME=%MY_ROYALE_WORK% set JAVA_HOME=c:\jdk\jdk8u252-b09 set PATH=%JAVA_HOME%\bin;%PATH%;%ANT_HOME%\bin cd %MY_ROYALE_WORK% ant -Dskip-tests=1 all But I'm doing this (to avoid the "all" target): set MY_ROYALE_DIST=C:\src\just-for-harbs\apache-royale-nightly-build-beta-0.9.8-bin-js-swf set MY_ROYALE_WORK=C:\src\just-for-harbs\royale-asjs-release-0.9.8 set ROYALE_COMPILER_HOME=%MY_ROYALE_DIST%\royale-asjs\js set ROYALE_COMPILER_REPO=%MY_ROYALE_DIST%\royale-compiler set ROYALE_TYPEDEFS_HOME=%MY_ROYALE_DIST%\royale-asjs set AIR_HOME=c:\adobe-air-sdk set ANT_HOME=c:\apache-ant-1.10.1 set JRE_HOME=c:\jre\jdk8u222-b10-jre set PATH=%JRE_HOME%\bin;%PATH%;%ANT_HOME%\bin :: copy needed bits around md %ROYALE_COMPILER_REPO%\compiler\lib %ROYALE_COMPILER_REPO%\compiler-jx\lib %ROYALE_TYPEDEFS_HOME%\js\target copy %ROYALE_COMPILER_REPO%\..\royale-asjs\lib\compiler-mxmlc.jar %ROYALE_COMPILER_REPO%\compiler\lib copy %ROYALE_COMPILER_REPO%\..\royale-asjs\lib\compiler-compc.jar %ROYALE_COMPILER_REPO%\compiler\lib copy %ROYALE_COMPILER_REPO%\..\royale-asjs\js\libs\js.swc %ROYALE_TYPEDEFS_HOME%\js\target :: quick hack (comment out CreateJS and jQueryJS dependencies in %MY_ROYALE_WORK%\frameworks\build.xml) :: run minimal build cd %MY_ROYALE_WORK% ant -Dskip-tests=1 (I normally go to the frameworks/projects/x subdirectory and just build the specific swc, after the first full build.) And that generates this error (because it's not reading the environment variable ROYALE_COMPILER_HOME), unless I modify the build.xml files, as I previously mentioned: c:\src\just-for-harbs\royale-asjs-release-0.9.8\frameworks\projects\Language\build.xml:142: ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK But regardless of what I'm doing... it feels like the build.xml files should honor the environment variable ROYALE_COMPILER_HOME over the internally-generated version. Maybe I'm alone in thinking that. BTW, why are both SWF and JS targets being built for both x.swc and xJS.swc? Seems like double the compile time (both x and xJS get built at the same time, anyway). On 11/27/2020 3:56 AM, Harbs wrote: > The easiest way to build everything is to run `ant all` from the royale-asjs > repo. > > I’m curious why you don’t want to/can’t do that. > >> On Nov 27, 2020, at 11:47 AM, Harbs wrote: >> >> Those scripts are assuming the compiler is copied to the royale-asjs folder >> which is what is supposed to happen as part of the build process. >> >> Why are you using the jars in the compiler repo? >> >>> On Nov 27, 2020, at 4:34 AM, Edward Stangler wrote: >>> >>> >>> If you use a custom ROYALE_COMPILER_HOME, like I do (on Windows), then >>> very few of the build.xml files handle it properly. Most of them ignore >>> the environment variable and just use ${ROYALE_HOME}/js, as you can see >>> in what I wrote earlier. >>> >>> (ROYALE_COMPILER_REPO is not enough, at least on Windows + several >>> things, even with the parent folder as you mentioned.) >>> >>> JewelThemeJS/build.xml is one of the few that do it properly. But most >>> don't. >>> >>> I'll make the changes and submit them. There is also a related change >>> in royale-asjs/js/bin/mxmlc.bat. >>> >>> >>> >>> On 11/26/2020 3:42 AM, Harbs wrote: >>>> You shouldn’t need to adjust anything, and no, it’s not generated. >>>> >>>> I have the following env vars set: >>>> >>>> #!/bin/sh >>>> >>>> export ROYALE_COMPILER_REPO=/Apache/royale-compiler >>>> export AIR_HOME=/Apache/frameworks/AIRSDK_Compiler >>>> export PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player >>>> export FLASHPLAYER_DEBUGGER=/Apache/frameworks/Flash\ Player\ >>>> Debugger.app/Contents/MacOS/Flash\ Player\ Debugger >>>> >>>> export ROYALE_HOME=/Apache/royale-asjs >>>> >>>> I’m pretty sure that you don’t need ROYALE_COMPILER_REPO if >>>> royale-compiler is in the same parent folder as royale-asjs. >>>> >>>> You need the Flash ones only if you’re compiling the SWF swcs (which is >>>> advisable). >>>> >>>> HTH, >>>> Harbs >>>> >>>>> On Nov 26, 2020, at 11:18 AM, Edward Stangler wrote: >>>>> >>>>> Are the build.xml files automatically generated from some other files? >>>>> >>>>> Many of them are not seeing the ROYALE_COMPILER_HOME environment >>>>> variable, so I have to manually adjust this: >>>>> >>>>> >>>>> <target name="check-transpiler-home" >>>>> description="Set ROYALE_COMPILER_HOME to point at the >>>>> cross-compiler."> >>>>> >>>>> <available file="${ROYALE_HOME}/js/lib/jsc.jar" >>>>> type="file" >>>>> property="ROYALE_COMPILER_HOME" >>>>> value="${ROYALE_HOME}/js"/> >>>>> >>>>> >>>>> to this: >>>>> >>>>> >>>>> <target name="check-transpiler-home" >>>>> description="Set ROYALE_COMPILER_HOME to point at the >>>>> cross-compiler."> >>>>> >>>>> <available file="${ROYALE_HOME}/js/lib/jsc.jar" >>>>> type="file" >>>>> property="ROYALE_COMPILER_HOME" >>>>> value="${ROYALE_HOME}/js"/> >>>>> >>>>> <available file="${env.ROYALE_COMPILER_HOME}/lib/jsc.jar" >>>>> type="file" >>>>> property="ROYALE_COMPILER_HOME" >>>>> value="${env.ROYALE_COMPILER_HOME}"/> >>>>> >>>>> >>>>> And there are a lot of files to modify each time I do this. >