Группа :: Обучение
Пакет: goldendict
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: goldendict-1.0.1-git-f71c0ac7a7c3.patch.bz2
Скачать
Скачать
goldendict.pro | 2 +-
goldendict.rc | 4 +-
locale/uk_UA.ts | 2 +-
nsis/GoldenDict-EnRuEn.nsi | 29 +++----------
nsis/GoldenDict.nsi | 28 +++----------
nsis/gen_uninstall/gen_uninstall.cc | 77 ++++++++++++++++++++++++++++++++++
nsis/gen_uninstall/gen_uninstall.pro | 11 +++++
nsis/makensis.sh | 14 ++++++
8 files changed, 118 insertions(+), 49 deletions(-)
diff --git a/goldendict.pro b/goldendict.pro
index cab7b0d..4f358a6 100644
--- a/goldendict.pro
+++ b/goldendict.pro
@@ -3,7 +3,7 @@
# #####################################################################
TEMPLATE = app
TARGET = goldendict
-VERSION = 1.0.1
+VERSION = 1.0.1+git
# Generate version file. We do this here and in a build rule described later.
# The build rule is required since qmake isn't run each time the project is
diff --git a/goldendict.rc b/goldendict.rc
index 4ada679..8641427 100644
--- a/goldendict.rc
+++ b/goldendict.rc
@@ -1,6 +1,6 @@
IDI_ICON1 ICON DISCARDABLE "icons/programicon.ico"
-#define GOLDENDICT_VER 1,0,0,0
-#define GOLDENDICT_VER_STR "1.0.0"
+#define GOLDENDICT_VER 1,0,1,0
+#define GOLDENDICT_VER_STR "1.0.1"
1 VERSIONINFO
FILEVERSION GOLDENDICT_VER
diff --git a/locale/uk_UA.ts b/locale/uk_UA.ts
index f77edcb..1a397fc 100644
--- a/locale/uk_UA.ts
+++ b/locale/uk_UA.ts
@@ -2782,7 +2782,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="../sources.ui" line="480"/>
- <source>Full list of language codes is avaiable <a href="http://www.forvo.com/languages-codes/">here</a>.</source>
+ <source>Full list of language codes is available <a href="http://www.forvo.com/languages-codes/">here</a>.</source>
<translation>п÷п╬п╡п╫п╦п╧ п©п╣я─п╣п╩я√п╨ п╨п╬п╢я√п╡ п╪п╬п╡ <a href="http://www.forvo.com/languages-codes/">я┌я┐я┌</a>.</translation>
</message>
<message>
diff --git a/nsis/GoldenDict-EnRuEn.nsi b/nsis/GoldenDict-EnRuEn.nsi
index 22432cc..0787594 100644
--- a/nsis/GoldenDict-EnRuEn.nsi
+++ b/nsis/GoldenDict-EnRuEn.nsi
@@ -1,7 +1,7 @@
!include "MUI2.nsh"
Name "GoldenDict"
- OutFile "GoldenDict-1.0.1-EnRuEn-Install.exe"
+ OutFile "GoldenDict-1.0.1-1-EnRuEn-Install.exe"
InstallDir "$PROGRAMFILES\GoldenDict"
@@ -203,6 +203,8 @@ LangString stopMsg ${LANG_ENGLISH} "Stopping ${WND_TITLE}"
System::Call 'kernel32.dll::TerminateProcess(i r2, i 0) i .r1'
close:
System::Call 'kernel32.dll::CloseHandle(i r2) i .r1'
+ ; Make sure all process files are released
+ Sleep 2000
done:
Pop $2
Pop $1
@@ -404,33 +406,14 @@ Section "Uninstall"
skip_cfg:
- Delete $INSTDIR\content\morphology\*
- RMDir $INSTDIR\content\morphology
- Delete $INSTDIR\content\*
- RMDir $INSTDIR\content
-
- Delete $INSTDIR\locale\*
- RMDir $INSTDIR\locale
-
- Delete $INSTDIR\imageformats\*
- RMDir $INSTDIR\imageformats
-
- Delete $INSTDIR\phonon_backend\*
- RMDir $INSTDIR\phonon_backend
+ !insertmacro MUI_STARTMENU_GETFOLDER GDApplication $StartMenuFolder
- Delete $INSTDIR\*.dll
- Delete $INSTDIR\LICENSE.txt
- Delete $INSTDIR\GoldenDict.exe
+; This file is auto-generated
+ !include "uninst.nsh"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
-
- !insertmacro MUI_STARTMENU_GETFOLDER GDApplication $StartMenuFolder
-
- Delete "$SMPROGRAMS\$StartMenuFolder\GoldenDict.lnk"
- Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GoldenDict"
diff --git a/nsis/GoldenDict.nsi b/nsis/GoldenDict.nsi
index 9832c64..6c00d41 100644
--- a/nsis/GoldenDict.nsi
+++ b/nsis/GoldenDict.nsi
@@ -1,7 +1,7 @@
!include "MUI2.nsh"
Name "GoldenDict"
- OutFile "GoldenDict-1.0.1-Install.exe"
+ OutFile "GoldenDict-1.0.1-1-Install.exe"
InstallDir "$PROGRAMFILES\GoldenDict"
@@ -201,6 +201,8 @@ LangString stopMsg ${LANG_ENGLISH} "Stopping ${WND_TITLE}"
System::Call 'kernel32.dll::TerminateProcess(i r2, i 0) i .r1'
close:
System::Call 'kernel32.dll::CloseHandle(i r2) i .r1'
+ ; Make sure all process files are released
+ Sleep 2000
done:
Pop $2
Pop $1
@@ -402,32 +404,14 @@ Section "Uninstall"
skip_cfg:
- Delete $INSTDIR\content\morphology\*
- RMDir $INSTDIR\content\morphology
- RMDir $INSTDIR\content
-
- Delete $INSTDIR\locale\*
- RMDir $INSTDIR\locale
-
- Delete $INSTDIR\imageformats\*
- RMDir $INSTDIR\imageformats
-
- Delete $INSTDIR\phonon_backend\*
- RMDir $INSTDIR\phonon_backend
+ !insertmacro MUI_STARTMENU_GETFOLDER GDApplication $StartMenuFolder
- Delete $INSTDIR\*.dll
- Delete $INSTDIR\LICENSE.txt
- Delete $INSTDIR\GoldenDict.exe
+; This file is auto-generated
+ !include "uninst.nsh"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
-
- !insertmacro MUI_STARTMENU_GETFOLDER GDApplication $StartMenuFolder
-
- Delete "$SMPROGRAMS\$StartMenuFolder\GoldenDict.lnk"
- Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GoldenDict"
diff --git a/nsis/gen_uninstall/gen_uninstall.cc b/nsis/gen_uninstall/gen_uninstall.cc
new file mode 100644
index 0000000..cbbd8d5
--- /dev/null
+++ b/nsis/gen_uninstall/gen_uninstall.cc
@@ -0,0 +1,77 @@
+// This program generates uninstallation script automatically, using the
+// output of the makensis command.
+// Why is this not part of NSIS? Ask NSIS developers.
+
+#include <QtCore>
+
+int main( int argc, char *argv[] )
+{
+ QCoreApplication app( argc, argv );
+
+ QTextStream stream( stdin );
+
+ QRegExp setOutPath( "^SetOutPath: \"(.*)\"$" );
+ QRegExp createDirectory( "^CreateDirectory: \"(.*)\"$" );
+ QRegExp file( "^File: \"([^\"]*)\"(->\"([^\"]*)\")?.*$" );
+ QRegExp createShortCut( "^CreateShortCut: \"([^\"]*)\"(->\"([^\"]*)\")?.*$" );
+
+ QStringList log;
+
+ QString currentOutPath;
+
+ for( QString line; !( line = stream.readLine() ).isNull(); )
+ {
+ if ( setOutPath.exactMatch( line ) )
+ {
+ qDebug( "Setting out path to %s", qPrintable( setOutPath.cap( 1 ) ) );
+
+ currentOutPath = setOutPath.cap( 1 );
+ }
+ else
+ if ( createDirectory.exactMatch( line ) )
+ {
+ qDebug( "Creating directory %s", qPrintable( createDirectory.cap( 1 ) ) );
+
+ log.append( "RMDir \"" + createDirectory.cap( 1 ) + "\"" );
+ }
+ else
+ if ( file.exactMatch( line ) )
+ {
+ QString command( "Delete \"" );
+
+ if ( file.cap( 3 ).isEmpty() )
+ {
+ // Using the current out path
+ command += currentOutPath + "\\" + file.cap( 1 );
+ }
+ else
+ {
+ // Use the complete path available
+ command += file.cap( 3 );
+ }
+
+ command += "\"";
+
+ log.append( command );
+
+ qDebug( "Writing file %s (%s)", qPrintable( file.cap( 1 ) ),
+ qPrintable( file.cap( 3 ) ) );
+ }
+ else
+ if ( createShortCut.exactMatch( line ) )
+ {
+ qDebug( "Creating shortcut %s", qPrintable( createShortCut.cap( 1 ) ) );
+
+ log.append( "Delete \"" + createShortCut.cap( 1 ) + "\"" );
+ }
+ }
+
+ // Ok, replay the log back
+
+ for( int x = log.size(); x--; )
+ {
+ printf( "%s\n", qPrintable( log[ x ] ) );
+ }
+
+ return 0;
+}
diff --git a/nsis/gen_uninstall/gen_uninstall.pro b/nsis/gen_uninstall/gen_uninstall.pro
new file mode 100644
index 0000000..fce778b
--- /dev/null
+++ b/nsis/gen_uninstall/gen_uninstall.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.01a) ?? ???. 4 17:15:56 2010
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += gen_uninstall.cc
diff --git a/nsis/makensis.sh b/nsis/makensis.sh
new file mode 100755
index 0000000..6bc2e6a
--- /dev/null
+++ b/nsis/makensis.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [ $# != 1 ]; then
+ echo Usage: $0 infile.nsi
+ exit 1
+fi
+
+echo > uninst.nsh || exit 1
+
+( makensis "-XSetCompress off" "$1" | tee log; exit ${PIPESTATUS[0]} ) || exit 1
+
+./gen_uninstall/gen_uninstall < log > uninst.nsh || exit 1
+
+exec makensis "$1"