Skip to content

Commit 0553dd8

Browse files
committed
Some minor FB project import improvements.
1 parent 5aebeb8 commit 0553dd8

File tree

7 files changed

+17
-9
lines changed

7 files changed

+17
-9
lines changed

External/Plugins/ProjectManager/Actions/ProjectActions.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@ private void PatchFbProject(AS3Project project)
146146
project.TestMovieBehavior = TestMovieBehavior.Custom;
147147
project.TestMovieCommand = "Run.bat";
148148

149+
string path = Path.GetDirectoryName(project.ProjectPath);
150+
char s = Path.DirectorySeparatorChar;
151+
string descriptor = "src" + s + Path.GetFileNameWithoutExtension(project.OutputPath) + "-app.xml";
152+
153+
if (!File.Exists(Path.Combine(path, descriptor)))
154+
{
155+
// Either it's some library project (we'll deal with these later)
156+
// or it's placed in some folder different to the default one (same as above)
157+
return;
158+
}
159+
149160
// We copy the needed project template files
150161
bool isFlex = project.CompileTargets.Count > 0 && Path.GetExtension(project.CompileTargets[0]).ToLower() == ".mxml";
151162
string projectPath;
@@ -168,7 +179,6 @@ private void PatchFbProject(AS3Project project)
168179
ErrorManager.ShowWarning(info, null);
169180
return;
170181
}
171-
string path = Path.GetDirectoryName(project.ProjectPath);
172182
var creator = new ProjectCreator();
173183
creator.SetContext(Path.GetFileNameWithoutExtension(project.OutputPath), string.Empty);
174184
foreach (var file in Directory.GetFiles(projectPath, "*.*", SearchOption.AllDirectories))
@@ -198,8 +208,6 @@ private void PatchFbProject(AS3Project project)
198208
}
199209

200210
// We configure the batch files
201-
char s = Path.DirectorySeparatorChar;
202-
string descriptor = "src" + s + Path.GetFileNameWithoutExtension(project.OutputPath) + "-app.xml";
203211
var configurator = new AirConfigurator { ApplicationSetupBatch = Path.Combine(path, "bat" + s + "SetupApplication.bat") };
204212
configurator.ApplicationSetupParams[AirConfigurator.DescriptorPath] = descriptor;
205213
configurator.ApplicationSetupParams[AirConfigurator.PackageDir] = Path.GetFileName(Path.GetDirectoryName(project.OutputPath));

PluginCore/PluginCore/Helpers/FileInspector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public static bool IsAS3Project(string path, string ext)
125125
public static bool IsFlexBuilderPackagedProject(string path)
126126
{
127127
string ext = Path.GetExtension(path).ToLower();
128-
return ext == ".fxp" || ext == ".zip";
128+
return ext == ".fxp" || ext == ".zip" || ext == ".fxpl";
129129
}
130130

131131
public static bool IsFlexBuilderProject(string path)

PluginCore/PluginCore/Resources/de_DE.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ Bitte bedenken Sie, dass Sie viele Projektoptionen nicht mehr nutzen können, so
24472447
<value>Wählen Sie ein Projekt um es zu importieren</value>
24482448
</data>
24492449
<data name="ProjectManager.Info.ImportProjectFilter" xml:space="preserve">
2450-
<value>Adobe Flash Builder Projekt (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Projekt (*.zip;*.fxp)|*.zip;*.fxp</value>
2450+
<value>Adobe Flash Builder Projekt (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Projekt (*.zip;*.fxp;*.fxpl)|*.zip;*.fxp;*.fxpl</value>
24512451
</data>
24522452
<data name="FlashDevelop.Info.RedirectFilesResults" xml:space="preserve">
24532453
<value>Suchresultate im Resultatsfenster anzeigen</value>

PluginCore/PluginCore/Resources/en_US.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ Please note that with injection enabled, you will not be able to use many projec
24532453
<value>Select Project To Import</value>
24542454
</data>
24552455
<data name="ProjectManager.Info.ImportProjectFilter" xml:space="preserve">
2456-
<value>Adobe Flash Builder Project (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Project (*.zip;*.fxp)|*.zip;*.fxp</value>
2456+
<value>Adobe Flash Builder Project (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Project (*.zip;*.fxp;*.fxpl)|*.zip;*.fxp;*.fxpl</value>
24572457
</data>
24582458
<data name="FlashDevelop.Info.RedirectFilesResults" xml:space="preserve">
24592459
<value>Send results to Results Panel</value>

PluginCore/PluginCore/Resources/eu_ES.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2443,7 +2443,7 @@ Kontutan izan injekzioa gaituz gero, ezin izanen diren proiektuaren hainbat auke
24432443
<value>Inportatzeko Proiektua Aukeratu</value>
24442444
</data>
24452445
<data name="ProjectManager.Info.ImportProjectFilter" xml:space="preserve">
2446-
<value>Adobe Flex Builder Proiektua (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Proiektua (*.zip;*.fxp)|*.zip;*.fxp</value>
2446+
<value>Adobe Flex Builder Proiektua (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Proiektua (*.zip;*.fxp;*.fxpl)|*.zip;*.fxp;*.fxpl</value>
24472447
</data>
24482448
<data name="FlashDevelop.Info.RedirectFilesResults" xml:space="preserve">
24492449
<value>Emaitzak Emaitza Panelera bidali</value>

PluginCore/PluginCore/Resources/ja_JP.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ Never - 起動時にスタートページを表示しません。</value>
24492449
<value>プロジェクトに読み込むものを選択</value>
24502450
</data>
24512451
<data name="ProjectManager.Info.ImportProjectFilter" xml:space="preserve">
2452-
<value>Adobe Flash Builder プロジェクト (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Project (*.zip;*.fxp)|*.zip;*.fxp</value>
2452+
<value>Adobe Flash Builder プロジェクト (.actionScriptProperties)|.actionScriptProperties|Packaged Adobe Flash Builder Project (*.zip;*.fxp;*.fxpl)|*.zip;*.fxp;*.fxpl</value>
24532453
</data>
24542454
<data name="FlashDevelop.Info.RedirectFilesResults" xml:space="preserve">
24552455
<value>結果パネルに表示</value>

PluginCore/PluginCore/Resources/zh_CN.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@
24492449
<value>选择导入的项目</value>
24502450
</data>
24512451
<data name="ProjectManager.Info.ImportProjectFilter" xml:space="preserve">
2452-
<value>Adobe Flash Builder 项目 (.actionScriptProperties)|.actionScriptProperties|打包的 Adobe Flash Builder 项目 (*.zip;*.fxp)|*.zip;*.fxp</value>
2452+
<value>Adobe Flash Builder 项目 (.actionScriptProperties)|.actionScriptProperties|打包的 Adobe Flash Builder 项目 (*.zip;*.fxp;*.fxpl)|*.zip;*.fxp;*.fxpl</value>
24532453
</data>
24542454
<data name="FlashDevelop.Info.RedirectFilesResults" xml:space="preserve">
24552455
<value>发送结果到结果面板</value>

0 commit comments

Comments
 (0)