From 512854e30cc644b2c07cbf442e4a82bf9751583a Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Wed, 4 Jul 2012 03:50:01 +0000 Subject: [PATCH] Fixes log folder script on WinXP/2000. Moves script inside source/tools. Adds start menu shortcut to the installer. Updates README. Fixes #1438 This was SVN commit r12068. --- OpenLogsFolder.bat | 2 -- README.txt | 16 +++------------- source/tools/dist/0ad.nsi | 4 +++- source/tools/openlogsfolder/OpenLogsFolder.bat | 3 +++ source/tools/openlogsfolder/OpenLogsFolder.vbs | 5 +++++ 5 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 OpenLogsFolder.bat create mode 100644 source/tools/openlogsfolder/OpenLogsFolder.bat create mode 100644 source/tools/openlogsfolder/OpenLogsFolder.vbs diff --git a/OpenLogsFolder.bat b/OpenLogsFolder.bat deleted file mode 100644 index f7c7ee6911..0000000000 --- a/OpenLogsFolder.bat +++ /dev/null @@ -1,2 +0,0 @@ -cd /D "%appdata%\0ad\logs\" -start . \ No newline at end of file diff --git a/README.txt b/README.txt index 655fbc5144..503c4f4ffb 100644 --- a/README.txt +++ b/README.txt @@ -28,7 +28,7 @@ Open the "binaries\system" folder. To launch the game: Run pyrogenesis.exe -To launch the map editor: Run Atlas.bat +To launch the map editor: Run Atlas.bat or "pyrogenesis.exe -editor" ----------------------------------- @@ -43,15 +43,5 @@ http://trac.wildfiregames.com/wiki/BuildInstructions Reporting problems ------------------ -Bugs should be reported on Trac: http://trac.wildfiregames.com/ - -On Windows: If the game crashes, it should generate 'crashlog' files that will -help us debug the problem. Run OpenLogsFolder.bat to find the files -("%appdata%\0ad\logs\"), and attach crashlog.txt and crashlog.dmp to the bug -report. - -On Linux / OS X: If the game detects an error, it should generate crashlog.txt -in ~/.config/0ad/logs/ . If it doesn't, it should at least print some -information on stdout. Attach crashlog.txt or the other information to the -bug report. It might also help to run the game in gdb and copy the output of -the "bt full" command, if possible. +Bugs should be reported on Trac. For information on reporting problems +and finding logs, see http://trac.wildfiregames.com/wiki/ReportingErrors diff --git a/source/tools/dist/0ad.nsi b/source/tools/dist/0ad.nsi index 5b857b576d..3b3196d2e4 100644 --- a/source/tools/dist/0ad.nsi +++ b/source/tools/dist/0ad.nsi @@ -75,7 +75,7 @@ Section "!Game and data files" GameSection SetOutPath "$INSTDIR" File "${CHECKOUTPATH}\*.txt" - File "${CHECKOUTPATH}\*.bat" + File "${CHECKOUTPATH}\source\tools\openlogsfolder\*.*" File /r /x "public" "${CHECKOUTPATH}\binaries" SetOutPath "$INSTDIR\binaries\data\mods\public" @@ -107,6 +107,7 @@ Section "!Game and data files" GameSection CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\0 A.D..lnk" "$INSTDIR\binaries\system\pyrogenesis.exe" "" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Map editor.lnk" "$INSTDIR\binaries\system\pyrogenesis.exe" "-editor" "$INSTDIR\binaries\data\tools\atlas\icons\ScenarioEditor.ico" + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Open logs folder.lnk" "$INSTDIR\OpenLogsFolder.bat" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Web site.url" "InternetShortcut" "URL" "http://wildfiregames.com/0ad/" @@ -185,6 +186,7 @@ Section "Uninstall" !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder + Delete "$SMPROGRAMS\$StartMenuFolder\Open logs folder.lnk" Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" Delete "$SMPROGRAMS\$StartMenuFolder\Map editor.lnk" Delete "$SMPROGRAMS\$StartMenuFolder\0 A.D..lnk" diff --git a/source/tools/openlogsfolder/OpenLogsFolder.bat b/source/tools/openlogsfolder/OpenLogsFolder.bat new file mode 100644 index 0000000000..94d85aa3ca --- /dev/null +++ b/source/tools/openlogsfolder/OpenLogsFolder.bat @@ -0,0 +1,3 @@ +@REM We prefer to use the %localappdata% variable when available +@REM but it's not on XP/2000, so we use a VBScript as an alternative +(cd /D "%localappdata%\0ad\logs\" && start .) || cscript //Nologo OpenLogsFolder.vbs diff --git a/source/tools/openlogsfolder/OpenLogsFolder.vbs b/source/tools/openlogsfolder/OpenLogsFolder.vbs new file mode 100644 index 0000000000..aae0b39ec8 --- /dev/null +++ b/source/tools/openlogsfolder/OpenLogsFolder.vbs @@ -0,0 +1,5 @@ +' Simple VBScript to open the 0 A.D. logs folder +' the path varies on different versions of Windows +Set objShell = CreateObject("Shell.Application") +' 0x1C is equivalent to the ssfLOCALAPPDATA constant in VB +objShell.Explore objShell.Namespace(&H1C&).Self.Path & "\0ad\logs"