Author: dreimer
Date: Thu Jan 15 12:14:03 2009
New Revision: 38775
URL:
http://svn.reactos.org/svn/reactos?rev=38775&view=rev
Log:
Fix my stupid mistake.
Of course it does not fill stuff into the PS config if I return true directly after it
finished the CMD config file and before doing anything in the PS config file. Additionally
it did not close a file handle too.
Works now for both PS and CMD the same way.
Added another error message for the new file if not exitant
Modified:
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/es-ES.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/pl-PL.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/uk-UA.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -50,7 +50,8 @@
CLR14, "Gelb"
CLR15, "Weiß"
MSG_NOGCCFOUND, "Kein MinGW/GCC Compiler gefunden! Bitte überprüfen sie ihren
Pfad."
- MSG_FILEFAILED, "rosbe-options.cmd konnte nicht erstellt werden!"
+ MSG_CMDFFAILED, "rosbe-options.cmd konnte nicht erstellt werden!"
+ MSG_PS1FFAILED, "rosbe-options.ps1 konnte nicht erstellt werden!"
MSG_DIREFAILED, "Ordner konnte nicht erstellt werden!"
MSG_SETLOADSUC, "Vorherige Einstellungen erfolgreich geladen."
MSG_FINDLOGDIR, "Bitte wählen Sie einen Ordner, in dem die Logs gespeichert werden
sollen:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -50,7 +50,8 @@
CLR14, "Light Yellow"
CLR15, "Bright White"
MSG_NOGCCFOUND, "No MinGW/GCC found! Please check your directory."
- MSG_FILEFAILED, "Failed to create rosbe-options.cmd!"
+ MSG_CMDFFAILED, "Failed to create rosbe-options.cmd!"
+ MSG_PS1FFAILED, "Failed to create rosbe-options.ps1!"
MSG_DIREFAILED, "Failed to create directory!"
MSG_SETLOADSUC, "Previous settings loaded successfully."
MSG_FINDLOGDIR, "Please choose a directory where the the logs should be
stored:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/es-ES.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -50,7 +50,8 @@
CLR14, "Amarillo claro"
CLR15, "Blanco brillante"
MSG_NOGCCFOUND, "¡No se ha encontrado MinGW/GCC! Por favor, comprueba tu
directorio."
- MSG_FILEFAILED, "¡Fallo al crear rosbe-options.cmd!"
+ MSG_CMDFFAILED, "¡Fallo al crear rosbe-options.cmd!"
+ MSG_PS1FFAILED, "¡Fallo al crear rosbe-options.ps1!"
MSG_DIREFAILED, "¡Fallo al crear directorio!"
MSG_SETLOADSUC, "Opciones cargadas satisfactoriamente."
MSG_FINDLOGDIR, "Por favor, seleccione un directorio donde los logs (registros)
serán almacenados:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -50,7 +50,8 @@
CLR14, "Jaune Clair"
CLR15, "Blanc Brillant"
MSG_NOGCCFOUND, "Impossible de trouver MinGW/GCC ! Veuillez vérifier votre
répertoire."
- MSG_FILEFAILED, "Impossible de créer rosbe-options.cmd !"
+ MSG_CMDFFAILED, "Impossible de créer rosbe-options.cmd !"
+ MSG_PS1FFAILED, "Impossible de créer rosbe-options.ps1 !"
MSG_DIREFAILED, "Impossible de créer le répertoire !"
MSG_SETLOADSUC, "Paramètres précédents chargés avec succès."
MSG_FINDLOGDIR, "Veuillez choisir le répertoire où seront stockés les journaux
:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/pl-PL.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -50,7 +50,8 @@
CLR14, "Jasno¿ó³ty"
CLR15, "Bia³y"
MSG_NOGCCFOUND, "Nie znaleziono MinGW/GCC! Sprawd nazwê folderu."
- MSG_FILEFAILED, "Nie uda³o siê stworzyæ pliku rosbe-options.cmd!"
+ MSG_CMDFFAILED, "Nie uda³o siê stworzyæ pliku rosbe-options.cmd!"
+ MSG_PS1FFAILED, "Nie uda³o siê stworzyæ pliku rosbe-options.ps1!"
MSG_DIREFAILED, "Nie powiod³o siê stworzenie folderu!"
MSG_SETLOADSUC, "Za³adowano ostatnio zapisane ustawienia."
MSG_FINDLOGDIR, "Proszê wybraæ folder, gdzie zostan¹ zapisane dzienniki
budowania:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -52,7 +52,8 @@
CLR14, "ßðêî-æ¸ëòûé"
CLR15, "ßðêî-áåëûé"
MSG_NOGCCFOUND, "Êîìïèëÿòîð GCC íå íàéäåí! Ïðîâåðüòå ïðàâèëüíîñòü
óñòàíîâêè."
- MSG_FILEFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë rosbe-options.cmd"
+ MSG_CMDFFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë rosbe-options.cmd"
+ MSG_PS1FFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë rosbe-options.ps1"
MSG_DIREFAILED, "Íå óäàëîñü ñîçäàòü äèðåêòîðèþ!"
MSG_SETLOADSUC, "Ðàíåå ñîõðàíåííûå íàñòðîéêè çàãðóæåíû."
MSG_FINDLOGDIR, "Óêàæèòå êàòàëîã ñîõðàíåíèÿ ëîã-ôàéëîâ:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/uk-UA.rc [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -58,7 +58,8 @@
CLR14, "ßñíî-æîâòèé"
CLR15, "ßñêðàâî-á³ëèé"
MSG_NOGCCFOUND, "Íå çíàéäåíèé MinGW/GCC! Ïåðåâ³ðòå ñâîþ ïàïêó."
- MSG_FILEFAILED, "Íåìîæëèâî ñòâîðèòè ôàéë rosbe-options.cmd!"
+ MSG_CMDFFAILED, "Íåìîæëèâî ñòâîðèòè ôàéë rosbe-options.cmd!"
+ MSG_PS1FFAILED, "Íåìîæëèâî ñòâîðèòè ôàéë rosbe-options.ps1!"
MSG_DIREFAILED, "Íåìîæëèâî ñòâîðèòè ïàïêó!"
MSG_SETLOADSUC, "Ïîïåðåäí³ íàñòðîéêè óñï³øíî çàâàíòàæåí³."
MSG_FINDLOGDIR, "Âêàæ³òü ïàïêó äëÿ çáåðåæåííÿ ôàéë³â æóðíàëà:"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -140,8 +140,6 @@
if (mingwpath[0] != 0) fwprintf(pFilecmd, L"set _ROSBE_MINGWPATH=%s\n",
mingwpath);
if ((objdir[0] != 0) && objstate) fwprintf(pFilecmd, L"set
_ROSBE_OBJPATH=%s\n", objdir);
if ((outdir[0] != 0) && outstate) fwprintf(pFilecmd, L"set
_ROSBE_OUTPATH=%s\n", outdir);
- fclose(pFilecmd);
- return TRUE;
}
if (pFileps1)
@@ -150,22 +148,42 @@
fwprintf(pFileps1, L"# This file has been automatically generated by the
ReactOS\n");
fwprintf(pFileps1, L"# Build Environment options utility.\n");
fwprintf(pFileps1, L"#\n\n");
- fwprintf(pFileps1, L"# color %X%X\n", background, foreground);
- fwprintf(pFileps1, L"$_ROSBE_SHOWTIME=%d\n", showtime);
- fwprintf(pFileps1, L"$_ROSBE_USECCACHE=%d\n", useccache);
- fwprintf(pFileps1, L"$_ROSBE_STRIP=%d\n", strip);
- fwprintf(pFileps1, L"$_ROSBE_NOSTRIP=%d\n", nostrip);
- fwprintf(pFileps1, L"$_ROSBE_WRITELOG=%d\n", writelog);
- if (logdir[0] != 0) fwprintf(pFileps1, L"$_ROSBE_LOGDIR=%s\n",
logdir);
- if (mingwpath[0] != 0) fwprintf(pFileps1, L"$_ROSBE_MINGWPATH=%s\n",
mingwpath);
- if ((objdir[0] != 0) && objstate) fwprintf(pFileps1,
L"$_ROSBE_OBJPATH=%s\n", objdir);
- if ((outdir[0] != 0) && outstate) fwprintf(pFileps1,
L"$_ROSBE_OUTPATH=%s\n", outdir);
+ fwprintf(pFileps1, L"(Get-Host).UI.RawUI.ForegroundColor = 0x%X\n",
foreground);
+ fwprintf(pFileps1, L"(Get-Host).UI.RawUI.BackgroundColor = 0x%X\n",
background);
+ fwprintf(pFileps1, L"clear-host\n");
+ fwprintf(pFileps1, L"$_ROSBE_SHOWTIME = %d\n", showtime);
+ fwprintf(pFileps1, L"$_ROSBE_USECCACHE = %d\n", useccache);
+ fwprintf(pFileps1, L"$_ROSBE_STRIP = %d\n", strip);
+ fwprintf(pFileps1, L"$_ROSBE_NOSTRIP = %d\n", nostrip);
+ fwprintf(pFileps1, L"$_ROSBE_WRITELOG = %d\n", writelog);
+ if (logdir[0] != 0) fwprintf(pFileps1, L"$_ROSBE_LOGDIR =
\"%s\"\n", logdir);
+ if (mingwpath[0] != 0) fwprintf(pFileps1, L"$_ROSBE_MINGWPATH =
\"%s\"\n", mingwpath);
+ if ((objdir[0] != 0) && objstate) fwprintf(pFileps1,
L"$_ROSBE_OBJPATH = \"%s\"\n", objdir);
+ if ((outdir[0] != 0) && outstate) fwprintf(pFileps1,
L"$_ROSBE_OUTPATH = \"%s\"\n", outdir);
+ }
+
+ if (pFilecmd && pFileps1)
+ {
+ fclose(pFilecmd);
fclose(pFileps1);
return TRUE;
}
- LoadString(hInstance, MSG_FILEFAILED, msgerror, 256);
- MessageBox(infoPtr->hwndDlg, msgerror, NULL, MB_ICONERROR);
+ if (!pFilecmd)
+ {
+ fclose(pFilecmd);
+ fclose(pFileps1);
+ LoadString(hInstance, MSG_CMDFFAILED, msgerror, 256);
+ MessageBox(infoPtr->hwndDlg, msgerror, NULL, MB_ICONERROR);
+ }
+
+ if (!pFileps1)
+ {
+ fclose(pFilecmd);
+ fclose(pFileps1);
+ LoadString(hInstance, MSG_PS1FFAILED, msgerror, 256);
+ MessageBox(infoPtr->hwndDlg, msgerror, NULL, MB_ICONERROR);
+ }
return FALSE;
}
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h [iso-8859-1] Thu Jan 15
12:14:03 2009
@@ -53,29 +53,29 @@
/* Strings */
#define MSG_NOGCCFOUND 0x27
-#define MSG_FILEFAILED 0x28
-#define MSG_DIREFAILED 0x29
-#define MSG_SETLOADSUC 0x2a
-#define MSG_FINDLOGDIR 0x2b
-#define MSG_FINDMGWDIR 0x2c
-#define MSG_FINDOBJDIR 0x2d
-#define MSG_FINDOUTDIR 0x2e
-#define MSG_WARNINGBOX 0x2f
-#define MSG_EXITCHANGE 0x30
-#define MSG_INVALIDDIR 0x31
+#define MSG_CMDFFAILED 0x28
+#define MSG_PS1FFAILED 0x29
+#define MSG_DIREFAILED 0x2a
+#define MSG_SETLOADSUC 0x2b
+#define MSG_FINDLOGDIR 0x2c
+#define MSG_FINDMGWDIR 0x2d
+#define MSG_FINDOBJDIR 0x2e
+#define MSG_FINDOUTDIR 0x2f
+#define MSG_WARNINGBOX 0x30
+#define MSG_EXITCHANGE 0x31
+#define MSG_INVALIDDIR 0x32
/* Help Strings */
-#define HLP_BACKCOLORC 0x32
-#define HLP_FONTCOLORC 0x33
-#define HLP_SBUILDTIME 0x34
-#define HLP_CCACHEUSED 0x35
-#define HLP_STRIPEDEXE 0x36
-#define HLP_FINDMGWDIR 0x37
-#define HLP_FINDLOGDIR 0x38
-#define HLP_FINDOBJDIR 0x39
-#define HLP_FINDOUTDIR 0x3a
-#define HLP_SAVEBUTTON 0x3b
-#define HLP_QUITBUTTON 0x3c
-#define HLP_DEFAULTMSG 0x3d
-#define HLP_NOSTRIP 0x3e
-
+#define HLP_BACKCOLORC 0x33
+#define HLP_FONTCOLORC 0x34
+#define HLP_SBUILDTIME 0x35
+#define HLP_CCACHEUSED 0x36
+#define HLP_STRIPEDEXE 0x37
+#define HLP_FINDMGWDIR 0x38
+#define HLP_FINDLOGDIR 0x39
+#define HLP_FINDOBJDIR 0x3a
+#define HLP_FINDOUTDIR 0x3b
+#define HLP_SAVEBUTTON 0x3c
+#define HLP_QUITBUTTON 0x3d
+#define HLP_DEFAULTMSG 0x3e
+#define HLP_NOSTRIP 0x3f