Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Flash Приложения: AIR, Zinc и тд. (http://www.flasher.ru/forum/forumdisplay.php?f=94)
-   -   Air & Linux - запуск терминала (http://www.flasher.ru/forum/showthread.php?t=172654)

kyzi007 14.12.2011 19:35

Air & Linux - запуск терминала
 
Сборка - федора.
Собственно - вообще можно ли?
По виндой то можно...

alatar 15.12.2011 13:31

NativeProcess

Добавлено через 2 минуты
Или в опишите все в *.sh и File#openWithDefaultApplication()

Genzo 15.12.2011 13:57

Цитата:

Или в опишите все в *.sh и File#openWithDefaultApplication()
не получиться, должно быть +x
Процесс просто вызовите и передайте параметром код :
Код AS3:

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var file:File = new File("/bin/sh");
nativeProcessStartupInfo.executable = file;
 
var processArgs:Vector.<String> = new Vector.<String>();
processArgs[0] = "-c 'echo 123'";
nativeProcessStartupInfo.arguments = processArgs;
 
process = new NativeProcess();
process.start(nativeProcessStartupInfo);


kyzi007 15.12.2011 14:49

О!!! просветление!
Только как оказалось даже на винде (и в лине) я тупила и не заметила что NativeProcess.isSupported == false
а работало оно у меня только под дебагом.
В конфиге сборки
<supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles>
(если поставить просто <supportedProfiles>extendedDesktop</supportedProfiles> начинает ругатся)
Надо еще что то поменять?

alexcon314 15.12.2011 16:12

Версия AIR?

kyzi007 15.12.2011 17:02

<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/2.0">
<id>Test41</id>
<version>0.1</version>
<filename>Test4_1</filename>
<name>Test4_1</name>
<initialWindow>
<content>Test4_1.swf</content>
<title></title>
<visible>true</visible>
<width>400</width>
<height>300</height>
</initialWindow>
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
</application>

Конфиг, собираю 4,5 сдк


<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/3.0">
<id>example.HelloWorld</id>
<versionNumber>1.0.1</versionNumber>
<filename>Hello World</filename>
<name>Example Co. AIR Hello World</name>
<description>
</description>
<copyright>Copyright (c) 2010 Example Co.</copyright>
<initialWindow>
<title>Hello World</title>
<content>
Test4_1.swf
</content>
</initialWindow>
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
</application>

4,6 - та же фигня


Часовой пояс GMT +4, время: 13:50.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.