6 Replies Latest reply on Feb 21, 2009 5:55 PM by injpix

    Need help with 'Output Folder URL'

    injpix Level 3
      How can I compile my application and have it get posted on a server?

      When I create a project, in the “Flex Build Path” I add my server URL in the 'Output Folder URL' field. But when I Run my project, it doesn't even seem to attempt to push any files to the server. It just brings up my browser with the path to it, which it obviously gets a 404 error. And its going to need a username and password to post files to a server. Where would I assign theses value to Flex Builder?
        • 1. Re: Need help with 'Output Folder URL'
          John Hall Level 4
          I have only one solution that I've used, I'm sure there are others. It's dependent upon your server but in my situation, I map the web server to a local drive letter (Windows) so it sees it as a local drive that I can get into (I have to use VPN from outside the domain) and then use the regular URL as a testing target.
          • 2. Re: Need help with 'Output Folder URL'
            thebouv Level 2
            quote:

            Originally posted by: myIP
            How can I compile my application and have it get posted on a server?

            When I create a project, in the “Flex Build Path” I add my server URL in the 'Output Folder URL' field. But when I Run my project, it doesn't even seem to attempt to push any files to the server. It just brings up my browser with the path to it, which it obviously gets a 404 error. And its going to need a username and password to post files to a server. Where would I assign theses value to Flex Builder?


            It isn't supposed to work the way you're trying to make it work.

            Why would you want to build directly to a production environment anyway?

            Regardless, probably the smartest way to do this is to hook Flex Builder into a version control system that is on your target server. There is a plugin available that works for CVS and Subversion.

            Me, personally? I build locally (faster), test locally (faster) and when I'm satisfied I export a build release and upload it to my server via SFTP. I don't know why you'd want to build to a remote server.
            • 3. Need help with 'Output Folder URL'
              levancho Level 3
              it will work, and its the very good way to test internaly, while you work withthe code, of course if you can have integration server as well, on amazon cloud or something thats even better :/
              here is how you do it,

              change output directory to pount to , for example deployed java app in tomcat

              example :
              webapps
              -your-java-app
              --flexdir
              --- (here you put your flex)
              --WEB-INF
              so in output you say /path/to/webapps/your-java-app/flexdir
              then you also need to change output url value so that Fb does not launch filesystem protocol.

              and finally (this is a mini bug in FB, it does not seem to fully update .actionScriptProperties and/or .flexProperties file correctly when you change output folder), so open .ActionScriptPorperties and/or .flexProperties files and make sure they do not contain path to your old location anymore.
              also if you find that they do and decide to change path there make sure (if its windows machine) to put path with double-slash for example instead of c:\yourdir\somemoredir you need to do C:\\yourid\\somemoredir\\etc

              oh and very important to clean your project after it and rebuild it.
              (P.S: you should get a symlink created that will point to that dir automatically after you make all these changes in your project.)
              • 4. Need help with 'Output Folder URL'
                injpix Level 3
                John Hall, currently my host is receiving my 'Output folder' from a virtual machine through mapping. And it works great. But it would be ideal for me, to have my bin get duplicated and sent to 2 different locations in my “intranet”. This doesn't seem possible with FB alone.

                thebouv, I don't have a production environment and my server isn't remote. I suppose I could have Subversive or Subclipse commit my dirty files to my server, but I was hoping FB would be more automated for this process, by having it duplicate my bin as mentioned above.

                “...its the very good way to test internaly...” -levancho

                Nice and that is exactly what I am doing. I have 2 virtual machines (Windows Server 2003 and Windows 7 beta) and a host OS, all on the same CPU. Currently my web server is IIS, that is running MySQL and Openfire XMPP. And on deck for experiment is Coldfusion and Flash Media Server. And soon, some sort of Continuous Integration server, perhaps Hudson. So from my Windows 7 perspective, I want my source and bin files pushed to my host and have a second copy of my bin directory pushed to my server, for immediate viewing through a browser.

                And thanks levancho for the info to configure FB to make the 'Output Folder URL' useful. :)

                I will take a look a whats best and decide then. Perhaps Apache Ant is what I need. Thanks everyone for the input.
                • 5. Re: Need help with 'Output Folder URL'
                  injpix Level 3
                  After I installed Apache Ant and tinkered with it for about 5 hours, I have what initially wanted. The code below will compile, copy and launch. I also made a splash logo that appears when its building. Ant is a nice utility for automated development.

                  Ref:
                  http://blog.jodybrewster.net/2008/04/09/installing-ant-in-flex-builder-3/
                  http://ant.apache.org/manual/tasksoverview.html

                  <project name="buildXIFF" default="main">
                  <property name="compiler" value="C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\mxmlc.exe"/>
                  <property name="firefox" location="C:\Program Files\Mozilla Firefox\firefox.exe"/>
                  <property name="projectURL" value=" http://vmwinserver2003/flex/tests/XIFF/XIFF.html"/>
                  <property name="baseDirectory" value="Z:\Documents\Programming\Flex\Tests\XIFF"/>
                  <property name="baseServerDirectory" value="Y:\flex\tests\XIFF"/>

                  <target name="main">
                  <splash imageurl="file:${baseDirectory}/build/FxAntBuildLogo.png" showduration="2000"/>
                  <antcall target="compile" />
                  <antcall target="copy" />
                  <antcall target="launch" />
                  </target>

                  <target name="compile" description="Build XIFF project">
                  <echo>Building files in bin directory in repository</echo>
                  <exec executable="${compiler}">
                  <arg line="-file-specs '${baseDirectory}/src/XIFF.mxml' "/>
                  <arg line="-output= '${baseDirectory}/bin-debug/' "/>
                  </exec>
                  </target>

                  <target name="copy" description="Copy XIFF bin directory to server">
                  <echo>Copying bin directory from repository to server. Overwriting all files in destination directory.</echo>
                  <copy todir="${baseServerDirectory}" overwrite="true">
                  <fileset dir="${baseDirectory}/bin-debug/"/>
                  </copy>
                  </target>

                  <target name="launch">
                  <echo>Launching browser, URL is the project's html page on the server.</echo>
                  <exec executable="${firefox}" spawn="true">
                  <arg value="${projectURL}"/>
                  </exec>
                  </target>

                  </project>
                  • 6. Re: Need help with 'Output Folder URL'
                    injpix Level 3
                    Also, for a more "convenient way to build your Flex projects" use Adobe® Flex® Ant with Apache Ant.

                    Livedocs - Adobe® Flex® Ant