diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-10-10 09:38:32 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-10-10 09:38:32 +0000 |
commit | 50bdf566650d42211ace7ba7fd7a56023beda9a2 (patch) | |
tree | b91ff38b95e4690494a4dd3d113f2413d35600b5 | |
parent | 69b1523fb32107a486a730b473a5304f26d8f15d (diff) |
some improvements to the win32 installer
-rw-r--r-- | src/installer.nsi | 242 | ||||
-rw-r--r-- | src/trg-about-window.c | 14 |
2 files changed, 244 insertions, 12 deletions
diff --git a/src/installer.nsi b/src/installer.nsi index 04b7742..bab3f6b 100644 --- a/src/installer.nsi +++ b/src/installer.nsi @@ -100,6 +100,55 @@ Section $(NAME_SecTransmissionRemoteGTK) SecTransmissionRemoteGTK SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
File "..\..\gtk-2.24-win32-bin\share\themes\MS-Windows\gtk-2.0\gtkrc"
+
+ SetOutPath $INSTDIR\share\locale\uk\LC_MESSAGES
+
+ File "C:\MinGW\msys\1.0\lib\locale\uk\LC_MESSAGES\transmission-remote-gtk.mo"
+
+ SetOutPath $INSTDIR\share\locale\ru\LC_MESSAGES
+
+ File "C:\MinGW\msys\1.0\lib\locale\ru\LC_MESSAGES\transmission-remote-gtk.mo"
+
+SetOutPath $INSTDIR\share\locale\pl\LC_MESSAGES
+
+File "C:\MinGW\msys\1.0\lib\locale\pl\LC_MESSAGES\transmission-remote-gtk.mo"
+
+SetOutPath $INSTDIR\share\locale\ko\LC_MESSAGES
+
+File "C:\MinGW\msys\1.0\lib\locale\ko\LC_MESSAGES\transmission-remote-gtk.mo"
+
+SetOutPath $INSTDIR\share\locale\es\LC_MESSAGES
+
+File "C:\MinGW\msys\1.0\lib\locale\es\LC_MESSAGES\transmission-remote-gtk.mo"
+
+SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES
+
+File "C:\MinGW\msys\1.0\lib\locale\de\LC_MESSAGES\transmission-remote-gtk.mo"
+
+SetOutPath $INSTDIR\share\icons\hicolor\scalable\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg"
+
+SetOutPath $INSTDIR\share\icons\hicolor\48x48\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png"
+
+SetOutPath $INSTDIR\share\icons\hicolor\32x32\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png"
+
+SetOutPath $INSTDIR\share\icons\hicolor\24x24\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png"
+
+SetOutPath $INSTDIR\share\icons\hicolor\22x22\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png"
+
+SetOutPath $INSTDIR\share\icons\hicolor\16x16\apps
+
+File "C:\MinGW\msys\1.0\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png"
+
!ifndef PORTABLE
; Write the installation path into the registry
@@ -167,11 +216,75 @@ Section $(NAME_SecGlibGtkEtc) SecGlibGtkEtc File "..\..\gtk-2.24-win32-bin\lib\gtk-2.0\modules\libgail.dll"
- SetOutPath $INSTDIR\share
+ SetOutPath $INSTDIR\share\locale\uk\LC_MESSAGES
+
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\libiconv.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\gtk20.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\gtk20-properties.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\glib20.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\gettext-tools.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\gettext-runtime.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\gdk-pixbuf.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\uk\LC_MESSAGES\atk10.mo"
- File /r "..\..\gtk-2.24-win32-bin\share\icons"
- File /r "..\..\gtk-2.24-win32-bin\share\locale"
- File /r "C:\MinGW\msys\1.0\lib\locale"
+ SetOutPath $INSTDIR\share\locale\ru\LC_MESSAGES
+
+ File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\libiconv.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\gtk20.mo"
+ File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\gtk20-properties.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\glib20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\gettext-tools.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\gettext-runtime.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\gdk-pixbuf.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ru\LC_MESSAGES\atk10.mo"
+
+SetOutPath $INSTDIR\share\locale\pl\LC_MESSAGES
+
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\libiconv.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\gtk20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\gtk20-properties.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\glib20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\gettext-tools.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\gettext-runtime.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\gdk-pixbuf.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\pl\LC_MESSAGES\atk10.mo"
+
+SetOutPath $INSTDIR\share\locale\ko\LC_MESSAGES
+
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\gtk20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\gtk20-properties.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\glib20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\gettext-tools.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\gettext-runtime.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\gdk-pixbuf.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\ko\LC_MESSAGES\atk10.mo"
+
+SetOutPath $INSTDIR\share\locale\es\LC_MESSAGES
+
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\libiconv.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\gtk20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\gtk20-properties.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\glib20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\gettext-tools.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\gettext-runtime.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\gdk-pixbuf.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\es\LC_MESSAGES\atk10.mo"
+
+SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES
+
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\libiconv.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\gtk20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\gtk20-properties.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\glib20.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\gettext-tools.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\gettext-runtime.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\gdk-pixbuf.mo"
+File "..\..\gtk-2.24-win32-bin\share\locale\de\LC_MESSAGES\atk10.mo"
+
+SetOutPath $INSTDIR\share\icons\hicolor
+
+File "..\..\gtk-2.24-win32-bin\share\icons\hicolor\index.theme"
+File "..\..\gtk-2.24-win32-bin\share\icons\hicolor\icon-theme.cache"
SectionEnd
@@ -268,7 +381,84 @@ Section "Uninstall" Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
Delete "$INSTDIR\lib\gtk-2.0\modules\libgail.dll"
Delete "$INSTDIR\etc\gtk-2.0\gtkrc"
- Delete "$INSTDIR\share\themes\MS-Windows\gtk-2.0\gtkrc"
+
+ Delete "$INSTDIR\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png"
+ Delete "$INSTDIR\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png"
+ Delete "$INSTDIR\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png"
+ Delete "$INSTDIR\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png"
+Delete "$INSTDIR\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png"
+Delete "$INSTDIR\share\icons\hicolor\icon-theme.cache"
+Delete "$INSTDIR\share\icons\hicolor\index.theme"
+Delete "$INSTDIR\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libiconv.mo"
+Delete "$INSTDIR\share\locale\de\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\libiconv.mo"
+Delete "$INSTDIR\share\locale\es\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libiconv.mo"
+Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\libiconv.mo"
+Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\atk10.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gdk-pixbuf.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-runtime.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-tools.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\glib20.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk20-properties.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk20.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\libiconv.mo"
+Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\transmission-remote-gtk.mo"
+Delete "$INSTDIR\share\themes\MS-Windows\gtk-2.0\gtkrc"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Script.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Script.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\TPJ13.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\GutsLoader.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\Guts.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Language.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Language.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Currency.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Currency.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Country.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Country.pm"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Constants.pod"
+Delete "$INSTDIR\share\perl5\5.8\Locale\Constants.pm"
; Remove shortcuts, if any
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
@@ -282,10 +472,41 @@ Section "Uninstall" !endif
; Remove directories used
- RMDir "$INSTDIR\share\themes\MS-Windows\gtk-2.0"
- RMDir "$INSTDIR\share\themes\MS-Windows"
- RMDir "$INSTDIR\share\themes"
- RMDir "$INSTDIR\share"
+ RMDir "$INSTDIR\share\themes\MS-Windows\gtk-2.0"
+ RMDir "$INSTDIR\share\themes\MS-Windows"
+ RMDir "$INSTDIR\share\themes"
+ RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\uk"
+ RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\ru"
+ RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\pl"
+ RMDir "$INSTDIR\share\locale\ko\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\ko"
+ RMDir "$INSTDIR\share\locale\es\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\es"
+ RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
+ RMDir "$INSTDIR\share\locale\de"
+ RMDir "$INSTDIR\share\locale"
+ RMDir "$INSTDIR\share\icons\hicolor\scalable\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\scalable"
+ RMDir "$INSTDIR\share\icons\hicolor\48x48\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\48x48"
+ RMDir "$INSTDIR\share\icons\hicolor\32x32\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\32x32"
+ RMDir "$INSTDIR\share\icons\hicolor\24x24\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\24x24"
+ RMDir "$INSTDIR\share\icons\hicolor\22x22\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\22x22"
+ RMDir "$INSTDIR\share\icons\hicolor\16x16\apps"
+ RMDir "$INSTDIR\share\icons\hicolor\16x16"
+ RMDir "$INSTDIR\share\icons\hicolor"
+ RMDir "$INSTDIR\share\icons"
+ RMDir "$INSTDIR\share\perl5\5.8\Locale\Maketext"
+ RMDir "$INSTDIR\share\perl5\5.8\Locale"
+ RMDir "$INSTDIR\share\perl5\5.8"
+ RMDir "$INSTDIR\share\perl5"
+ RMDir "$INSTDIR\share"
RMDir "$INSTDIR\etc\gtk-2.0"
RMDir "$INSTDIR\etc"
RMDir "$INSTDIR\lib\gtk-2.0\modules"
@@ -295,8 +516,9 @@ Section "Uninstall" RMDir "$INSTDIR\lib"
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR"
+
- DeleteRegKey /ifempty HKCU "SOFTWARE\TransmissionRemoteGTKGTK"
+ DeleteRegKey /ifempty HKCU "SOFTWARE\TransmissionRemoteGTK"
!ifndef PORTABLE
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK"
!endif
diff --git a/src/trg-about-window.c b/src/trg-about-window.c index d173251..d24cbeb 100644 --- a/src/trg-about-window.c +++ b/src/trg-about-window.c @@ -33,8 +33,17 @@ GtkWidget *trg_about_window_new(GtkWindow * parent) GtkWidget *dialog; GdkPixbuf *logo; gchar *licenseText = NULL; - const gchar *trgAuthors[] = { "Alan Fitton <alan@eth0.org.uk>", NULL }; + gchar *licenseFile; + gchar *moddir; + +#ifdef WIN32 + moddir = g_win32_get_package_installation_directory_of_module(NULL); + licenseFile = g_build_filename(moddir, "..", "COPYING.TXT", NULL); + g_free(moddir); +#else + licenseFile = g_strdup(TRGLICENSE); +#endif dialog = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(dialog), parent); @@ -50,7 +59,7 @@ GtkWidget *trg_about_window_new(GtkWindow * parent) g_object_unref(logo); } - if (g_file_get_contents(TRGLICENSE, &licenseText, NULL, NULL)) { + if (g_file_get_contents(licenseFile, &licenseText, NULL, NULL)) { gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), licenseText); } else { @@ -81,6 +90,7 @@ GtkWidget *trg_about_window_new(GtkWindow * parent) "* Y3AVD (Russian)\n" "* ROR191 (Ukranian)\n"); + g_free(licenseFile); g_free(licenseText); return dialog; |