Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ULauncherPro/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,7 @@ void CreateNewEmptyProject(string targetFolder = null)
if (results == true)
{
// TODO check if that folder already exists (automatic naming avoids it, but manual naming could cause it)
rootFolder = NewProject.targetFolder;
Console.WriteLine("Create project " + NewProject.newVersion + " : " + rootFolder);
if (string.IsNullOrEmpty(rootFolder)) return;

Expand Down
3 changes: 2 additions & 1 deletion ULauncherPro/NewProject.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial class NewProject : Window
int previousSelectedTemplateIndex = -1;
int previousSelectedModuleIndex = -1;

static string targetFolder = null;
public static string targetFolder { get; private set; } = null;

public NewProject(string unityVersion, string suggestedName, string targetFolder, bool nameIsLocked = false)
{
Expand Down Expand Up @@ -355,6 +355,7 @@ private void txtNewProjectFolder_TextChanged(object sender, TextChangedEventArgs
{
txtNewProjectFolder.BorderBrush = null;
btnCreateNewProject.IsEnabled = true;
targetFolder = txtNewProjectFolder.Text;
}
}
}
Expand Down
11 changes: 9 additions & 2 deletions ULauncherPro/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,11 +1708,18 @@ public static Project FastCreateProject(string version, string baseFolder, strin
// unzip or copy template
if (templateZipPath != null)
{
//Console.WriteLine(templateZipPath);
// Console.WriteLine(templateZipPath);

if (File.Exists(templateZipPath))
{
TarLib.Tar.ExtractTarGz(templateZipPath, newPath);
try
{
TarLib.Tar.ExtractTarGz(templateZipPath, newPath);
}
catch (Exception ex)
{
SetStatus("Error extract template file:" + ex.Message);
}
}
else if (Directory.Exists(templateZipPath))
{
Expand Down