Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8afdb3f

Browse files
authored
Merge pull request#205 from feipinxiang/master
fix: Improve project creation and template handling
2 parents8e8b25c +3e3bd65 commit8afdb3f

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

‎ULauncherPro/MainWindow.xaml.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,7 @@ void CreateNewEmptyProject(string targetFolder = null)
21282128
if(results==true)
21292129
{
21302130
// TODO check if that folder already exists (automatic naming avoids it, but manual naming could cause it)
2131+
rootFolder=NewProject.targetFolder;
21312132
Console.WriteLine("Create project "+NewProject.newVersion+" : "+rootFolder);
21322133
if(string.IsNullOrEmpty(rootFolder))return;
21332134

‎ULauncherPro/NewProject.xaml.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public partial class NewProject : Window
2222
intpreviousSelectedTemplateIndex=-1;
2323
intpreviousSelectedModuleIndex=-1;
2424

25-
staticstringtargetFolder=null;
25+
publicstaticstringtargetFolder{get;privateset;}=null;
2626

2727
publicNewProject(stringunityVersion,stringsuggestedName,stringtargetFolder,boolnameIsLocked=false)
2828
{
@@ -355,6 +355,7 @@ private void txtNewProjectFolder_TextChanged(object sender, TextChangedEventArgs
355355
{
356356
txtNewProjectFolder.BorderBrush=null;
357357
btnCreateNewProject.IsEnabled=true;
358+
targetFolder=txtNewProjectFolder.Text;
358359
}
359360
}
360361
}

‎ULauncherPro/Tools.cs‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,11 +1708,18 @@ public static Project FastCreateProject(string version, string baseFolder, strin
17081708
// unzip or copy template
17091709
if(templateZipPath!=null)
17101710
{
1711-
//Console.WriteLine(templateZipPath);
1711+
//Console.WriteLine(templateZipPath);
17121712

17131713
if(File.Exists(templateZipPath))
17141714
{
1715-
TarLib.Tar.ExtractTarGz(templateZipPath,newPath);
1715+
try
1716+
{
1717+
TarLib.Tar.ExtractTarGz(templateZipPath,newPath);
1718+
}
1719+
catch(Exceptionex)
1720+
{
1721+
SetStatus("Error extract template file:"+ex.Message);
1722+
}
17161723
}
17171724
elseif(Directory.Exists(templateZipPath))
17181725
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp