Using PlayScript without Xamarin?

316 views
Skip to first unread message

Thomas Weiss

unread,
Apr 12, 2013, 8:48:52 AM4/12/13
to plays...@googlegroups.com
Hi there,

So excited to find PlayScript, which basically bridges the gap between .NET/Mono (my 'historical' background) and AS3/Stage3D (my current interest). It couldn't have arrived at a better time!
Most of the documentation I've read mentions the usage of Xamarin but as far as I understand, PlayScript can be used to compile some AS3 targeting a desktop application, right? So is there any short tutorial showing how to compile some Hello World in AS3, resulting in a desktop exe?

Thanks a lot and long life to PlayScript!

IngweLand

unread,
Apr 12, 2013, 9:38:10 AM4/12/13
to plays...@googlegroups.com
I did a test with Windows Console app

1) Download and unzip binaries
2) Add it as new net runtimes in Xamarin Studio/Monodevelop (i guess there is similar option in VisualStudio)
3) Add references to pscorlib.dll and Playscript.Dynamic.dll
4) Create AS3 file
5) Set its build action to Compile 
6) compile

Note, that current version of Xamarin Studio (and I guess monodevelop too) does not have syntax highlight etc

Thomas Weiss

unread,
Apr 12, 2013, 12:24:36 PM4/12/13
to plays...@googlegroups.com
I can just say... wow! My C# using an AS3 class, all in the same project. I really had to sit back a minute and imagine what possibilities this opens.
Just wanted to mention that I got an assertion when exiting the console app ; don't know if that's because of my quick&dirty test or my young knowledge of Mono/Xamarin.

IngweLand

unread,
Apr 12, 2013, 12:45:57 PM4/12/13
to plays...@googlegroups.com
>>Just wanted to mention that I got an assertion

I have it too. I do not know what it is. But it does not show if you make release build and run the app from CommandLine

Ben Cooley

unread,
Apr 12, 2013, 1:33:51 PM4/12/13
to plays...@googlegroups.com
Hi Thomas,

There should not be any issues running any AS code .net from the command line.  The version of the ascorlib.dll and ActionScript.Dynamic.dll that builds with the framework, along with the msc.exe compiler should just work in any .NET environment (including Microsofts).

One thing we haven't tried yet is to rename msc.exe to csc.exe in Windows and try using it from within Visual Studio.   The command line parameters for msc.exe and csc.exe are the same, so I'm thinking it probably should work.  Would be an interesting experiment.

IngweLand

unread,
Apr 12, 2013, 1:46:57 PM4/12/13
to plays...@googlegroups.com
>>ascorlib.dll and ActionScript.Dynamic.dll
Did you mean pscorlib.dll etc? Because I can not find ascorlib.dll

IngweLand

unread,
Apr 12, 2013, 2:34:52 PM4/12/13
to plays...@googlegroups.com
I took mcs.exe, renamed it to csc.exe and replaced original csc compiler which is used by Xamarin Studio. However, id did not work. I tried to compile Console and Android projects, but got following error
1) Console - error CS2007: Unrecognized command-line option: `/utf8output'
2) Android - CSC : error CS2007: Unrecognized command-line option: `/errorendlocation'

radulDev

unread,
Sep 25, 2013, 6:11:33 AM9/25/13
to plays...@googlegroups.com
So, did anyone successfully managed to get the playscript compiler working with something other than xamarin?

Ben Cooley

unread,
Sep 25, 2013, 5:10:28 PM9/25/13
to plays...@googlegroups.com
You mean swapping out csc.exe in Visual Studio?   I don't know, but was not certain at the time what the real use case was.  It's pretty cool to mix AS and CS code together in a project in Visual Studio, but since Xamarin Studio works well and actually has PlayScript language support, and uses either the MS or Mono runtime on Windows.. not sure what the win is there.

As far as being tied to the Xamarin runtime, the core libraries have no direct dependencies on Xamarin libs.  Only the iOS, Android, and Mac OSX versions have any platform sepecific code in them.

The output executables and assemblies are all standard .NET so they should just run anywhere you have a .NET runtime. 

The one missing piece is a DirectX/Windows implementation of the pscorlib which allows Stage3D games/apps to run.  We have not done this as we generally have the option of having the IT department just hand us a MacBook Pro (problem solved) to do mobile development for iOS and Android.
Reply all
Reply to author
Forward
0 new messages