Friday, October 29, 2010

Remote virtual host testing without a DNS server

Assume 184.1.1.1 is the IP of your server.
Assume mywebsite.com is one of the domains your hosting on your server.

----------------------
- On Local Machine
----------------------
#sudo vi /etc/hosts
Add this to the bottom

184.1.1.1 mywebsite.testing


----------------------
- On Server
----------------------
#vi /etc/hosts
Add this to the bottom

184.1.1.1 mywebsite.com mywebsite.testing


#vi /etc/httpd/conf.d/vhosts.conf
Add this virtual host entry

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/mywebsite.com/httpdocs
ServerName mywebsite.com
ServerAlias www.mywebsite.com mywebsite.testing

<Directory "/var/www/vhosts/mywebsite.com/httpdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


#service httpd restart



You should now be able to put mywebsite.testing in your browser and be
directed to the appropriate vhost.

Friday, August 13, 2010

How to migrate your AIR certificate (Air 2.0)

1] Determine your application's current publisher ID. In an installed application, this is found in the package's META-INF/AIR/publisherid file.

2] Open your application's descriptor file, e.g. My-App.xml and add in:
<publisherID>mypublisheridstringfoundinabovefile</publisherID>

3] Export a release build with your new certificate

4] Run this command to tell adt you are migrating from a old certificate:
#/Applications/Adobe\ Flash\ Builder\ 4/sdks/4.1.0/bin/adt -migrate -storetype pkcs12 -keystore ./src/MYOLDCERT.p12 -storepass MYCERTPASS -keypass MYCERTPASS my-app-v2.air my-app-v2-migrated.air

Point your application's updater to my-app-v2-migrated.air and it should update fine

Tuesday, August 3, 2010

TLF Bugs

I recently ran into a couple hard to diagnose TLF bugs, this might help save someone else a couple days of debugging time..

1] Redraw bug when using Linked Containers
http://forums.adobe.com/message/2782649#2782649

2] Embedded fonts break if your program uses spark text containers
http://marcel-panse.blogspot.com/2010/03/embedded-fonts-in-tlf-and-swfcontexts.html

Thursday, July 29, 2010

Speed up Flash Builder 4 compile times

1] If your project has multiple application targets, everytime the project rebuilds it rebuilds every application in your project. So if you have 4 targets, things can get slow fast. To remedy this, right click your project, click Properties, goto Flex Applications, and remove the applications your not currently running. Set the remaining application as default.

2] If your project has many files, when the project rebuilds it will copy them into the bin-debug folder which could take a long time, Right click your project, click Properties, click Flex Compiler, uncheck Copy non-embedded files to output folder. You will have to copy files to the bin-debug folder manually if any assets are required.