diff --git a/source/Info.plist b/source/Info.plist
index 76a10275..4de4d46b 100755
--- a/source/Info.plist
+++ b/source/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(PRODUCT_NAME)
CFBundleGetInfoString
- $(PRODUCT_NAME) (c) 2023 Ravbug
+ $(PRODUCT_NAME) (c) 2024 Ravbug
CFBundleIconFile
wxmac.icns
CFBundleIdentifier
@@ -22,13 +22,13 @@
it
CFBundleLongVersionString
- (c) 2023 Ravbug
+ (c) 2024 Ravbug
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.53
+ 1.54
CFBundleSignature
UNHn
CFBundleVersion
@@ -36,7 +36,7 @@
LSApplicationCategoryType
public.app-category.developer-tools
NSHumanReadableCopyright
- Copyright 2023 Ravbug
+ Copyright 2024 Ravbug
NSPrincipalClass
wxNSApplication
diff --git a/source/create_dialog_derived.cpp b/source/create_dialog_derived.cpp
index 0a9719dd..61e767ff 100644
--- a/source/create_dialog_derived.cpp
+++ b/source/create_dialog_derived.cpp
@@ -12,6 +12,7 @@
#endif
#include
#include
+#include
using namespace std;
@@ -69,6 +70,8 @@ void CreateProjectDialogD::OnCreate(wxCommandEvent& event){
//validate form
string message = validateForm();
if (message == ""){
+
+
//assemble the command that will create the project described by the dialog
editor& e = editors[GetSelectedEditorIndex()];
@@ -76,6 +79,19 @@ void CreateProjectDialogD::OnCreate(wxCommandEvent& event){
auto executableTemplatesPath = e.path / e.name / templatesDir;
string projName = projNameTxt->GetValue().ToStdString();
string projPath = projLocTxt->GetValue().ToStdString();
+
+ auto outPath = filesystem::path(projPath) / projName;
+
+ // extra check: ensure that the location to write the project doesn't already have a project
+ {
+ auto projectversionpath = outPath / "ProjectSettings" / "ProjectVersion.txt";
+ if (std::filesystem::exists(projectversionpath)){
+ auto answer = wxMessageBox(fmt::format("A Unity project already exists at {}. Overwrite it?", outPath.string()),"Project Already Exists", wxYES_NO);
+ if (answer != wxYES){
+ return;
+ }
+ }
+ }
//get the selected template
long itemIndex = wxListCtrl_get_selected(templateCtrl);
@@ -88,7 +104,7 @@ void CreateProjectDialogD::OnCreate(wxCommandEvent& event){
#if defined __APPLE__
string command = fmt::format("\"{}\" -createProject \"{}\" -cloneFromTemplate \"{}{}.{}\"",
executablePath.string(),
- (filesystem::path(projPath) / projName).string(),
+ outPath.string(),
executableTemplatesPath.string(),
templatePrefix,
templateName
diff --git a/source/globals.h b/source/globals.h
index 756751fc..28344cf8 100644
--- a/source/globals.h
+++ b/source/globals.h
@@ -14,7 +14,7 @@
static constexpr std::string_view projectsFile = "projects.txt";
static constexpr std::string_view editorPathsFile = "editorPaths.txt";
static constexpr std::string_view templatePrefix = "com.unity.template";
-static constexpr std::string_view AppVersion = "v1.53";
+static constexpr std::string_view AppVersion = "v1.54";
struct wxListCtrl;
struct wxWindow;