]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2200 final touches
authorToni Wilen <twilen@winuae.net>
Mon, 28 Jun 2010 08:13:44 +0000 (11:13 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 28 Jun 2010 08:13:44 +0000 (11:13 +0300)
od-win32/makeexe.cmd
od-win32/win32.cpp

index 760674d57743ba09adcb3b310acf79944555daf3..cb9f40ee47105cf35eaa963fd8e7eb85100a2438 100644 (file)
@@ -11,8 +11,7 @@ copy resourcedll\release\resourcedll.dll d:\amiga\WinUAE_default.dll
 cdd d:\amiga
 zip -9 WinUAE%1_translation WinUAE_default.dll translation.txt
 del translation.txt
-rem zip -9 WinUAEMini%1 winuae_mini.exe
 cdd c:\projects\winuae\src\od-win32
-zip -9 winuaedebug%1 winuae_msvc\release\winuae.pdb winuae_msvc\fullrelease\winuae.pdb
+zip -9 winuaedebug%1 winuae_msvc10\release\winuae.pdb winuae_msvc10\fullrelease\winuae.pdb
 copy winuaedebug%1.zip d:\amiga\winuaepackets
 del *.zip
index 45c9c565e2991a665943e4952ce86e104ff225c7..7d291cdb72688078a6e94c5f138e2452e4b5f4f9 100644 (file)
@@ -3817,6 +3817,39 @@ static void getstartpaths (void)
        if((posn = _tcsrchr (start_path_exe, '\\')))
                posn[1] = 0;
 
+       if (path_type < 0 && start_data == 0 && key) {
+               if (SUCCEEDED (SHGetFolderPath (NULL, CSIDL_PROGRAM_FILES, NULL, 0, tmp))) {
+                       // installed in Program Files?
+                       if (_tcsnicmp (tmp, start_path_exe, _tcslen (tmp)) == 0) {
+                               if (SUCCEEDED (SHGetFolderPath (NULL, CSIDL_COMMON_DOCUMENTS, NULL, 0, tmp))) {
+                                       fixtrailing (tmp);
+                                       _tcscpy (tmp2, tmp);
+                                       _tcscat (tmp2, L"Amiga Files");
+                                       CreateDirectory (tmp2, NULL);
+                                       _tcscat (tmp2, L"\\WinUAE");
+                                       CreateDirectory (tmp2, NULL);
+                                       v = GetFileAttributes (tmp2);
+                                       if (v != INVALID_FILE_ATTRIBUTES && (v & FILE_ATTRIBUTE_DIRECTORY)) {
+                                               _tcscat (tmp2, L"\\");
+                                               path_type = PATH_TYPE_NEWWINUAE;
+                                               _tcscpy (tmp, tmp2);
+                                               _tcscat (tmp, L"Configurations");
+                                               CreateDirectory (tmp, NULL);
+                                               _tcscpy (tmp, tmp2);
+                                               _tcscat (tmp, L"Screenshots");
+                                               CreateDirectory (tmp, NULL);
+                                               _tcscpy (tmp, tmp2);
+                                               _tcscat (tmp, L"Savestates");
+                                               CreateDirectory (tmp, NULL);
+                                               _tcscpy (tmp, tmp2);
+                                               _tcscat (tmp, L"Screenshots");
+                                               CreateDirectory (tmp, NULL);
+                                       }
+                               }
+                       }
+               }
+       }
+
        _tcscpy (tmp, start_path_exe);
        _tcscat (tmp, L"roms");
        if (isfilesindir (tmp)) {
@@ -3870,7 +3903,7 @@ static void getstartpaths (void)
                        _tcscpy (tmp, tmp2);
                        _tcscat (tmp, L"WinUAE");
                        v = GetFileAttributes (tmp);
-                       if (v == INVALID_FILE_ATTRIBUTES || (v & FILE_ATTRIBUTE_DIRECTORY)) {
+                       if (v != INVALID_FILE_ATTRIBUTES && (v & FILE_ATTRIBUTE_DIRECTORY)) {
                                TCHAR *p;
                                _tcscpy (xstart_path_new1, tmp2);
                                _tcscat (xstart_path_new1, L"WinUAE\\");