[grisbi-devel] Patch pour packaging Windows Version 1.0.0

Gregory R. boushi69 at gmail.com
Tue Apr 21 09:58:05 CEST 2015


Bonjour,

Voici le patch Git pour la version Windows de Grisbi 1.0.0.

Gregory
-------------- next part --------------
From d179c45e65e45070155af668c85166aa5bca79df Mon Sep 17 00:00:00 2001
From: gregory <boushi69 at gmail.com>
Date: Tue, 21 Apr 2015 09:40:01 +0200
Subject: [PATCH] Packaging Version 1.0.0 pour Windows

---
 src/gsb_dirs.c                    |  6 ++--
 win32-mingw/CMakeLists.txt        | 16 +++++-----
 win32-mingw/prepare_Win32.cmd     |  6 ++--
 win32-mingw/wiki.txt              |  9 ++++--
 win32-mingw/windows_installer.nsi | 66 ++++++++++++++++++++++++---------------
 5 files changed, 60 insertions(+), 43 deletions(-)

diff --git a/src/gsb_dirs.c b/src/gsb_dirs.c
index 769c5ce..b0f07ce 100644
--- a/src/gsb_dirs.c
+++ b/src/gsb_dirs.c
@@ -51,10 +51,10 @@ void gsb_dirs_init ( void )
 
         dir = g_win32_get_package_installation_directory_of_module ( NULL );
 
-        categories_dir = g_build_filename ( dir, "share/grisbi/categories", NULL );
+        categories_dir = g_build_filename ( dir, "share/categories", NULL );
         locale_dir = g_strconcat ( dir, "/share/locale", NULL );
-        pixmaps_dir = g_strconcat ( dir, "/share/pixmaps/grisbi", NULL );
-        ui_dir = g_strconcat ( dir, "/share/grisbi/ui", NULL );
+        pixmaps_dir = g_strconcat ( dir, "/pixmaps", NULL );
+        ui_dir = g_strconcat ( dir, "/share/ui", NULL );
 
         g_free ( dir );
 
diff --git a/win32-mingw/CMakeLists.txt b/win32-mingw/CMakeLists.txt
index 3e5c218..ea8b957 100644
--- a/win32-mingw/CMakeLists.txt
+++ b/win32-mingw/CMakeLists.txt
@@ -33,16 +33,16 @@ SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/target/${PlateformName}/packag
 SET (LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/lib)
 SET (SHARE_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/share)
 SET (PACKAGE_NAME grisbi)
-set (grisbi_MAJOR 0)
-set (grisbi_MINOR 9)
-set (grisbi_PATCH 5)
+set (grisbi_MAJOR 1)
+set (grisbi_MINOR 0)
+set (grisbi_PATCH 0)
 set (grisbi_version "${grisbi_MAJOR}.${grisbi_MINOR}.${grisbi_PATCH} pour windows")
 MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH)
 MARK_AS_ADVANCED(grisbi_version)
 
 configure_file (config.h.cmake config.h)
-SET (MINGW_DIR C:\MinGW)
-SET (GRISBI_SRC_DIR C:\grisbi\src)
+SET (MINGW_DIR C:/MinGW)
+SET (GRISBI_SRC_DIR D:/developpement/git/grisbi/src)
 SET (GTK_DEV_PATH ${PROJECT_SOURCE_DIR}/target/${PlateformName}/gtk-dev)
 SET (PLUGINS_DEV_PATH ${PROJECT_SOURCE_DIR}/target/${PlateformName}/plugins-dev)
 SET (OPENSSL_DIR C:/OpenSSL-Win32)
@@ -303,7 +303,7 @@ if (HELLO_NLS_ENABLED)
 	endforeach (HDR ${Hello_I18N_HEADERS})
 	add_custom_target (prepare_mo COMMENT "Building i18n messages.")
 	file(GLOB po_files ${PROJECT_SOURCE_DIR}/../po/*.po)
-	add_custom_command (TARGET prepare_mo COMMAND ${CMAKE_COMMAND} -E make_directory ${EXECUTABLE_OUTPUT_PATH}/lib/locale)
+	add_custom_command (TARGET prepare_mo COMMAND ${CMAKE_COMMAND} -E make_directory ${EXECUTABLE_OUTPUT_PATH}/share/locale)
 
 	foreach (current_po ${po_files})
 		get_filename_component(
@@ -311,10 +311,10 @@ if (HELLO_NLS_ENABLED)
 			${current_po}
 			NAME_WE
 		)
-		set(mo_file ${EXECUTABLE_OUTPUT_PATH}/lib/locale/${lang}/LC_MESSAGES/${PACKAGE_NAME}.mo)
+		set(mo_file ${EXECUTABLE_OUTPUT_PATH}/share/locale/${lang}/LC_MESSAGES/${PACKAGE_NAME}.mo)
 		add_custom_command(TARGET prepare_mo
 			POST_BUILD
-			COMMAND ${CMAKE_COMMAND} -E make_directory ${EXECUTABLE_OUTPUT_PATH}/lib/locale/${lang}/LC_MESSAGES
+			COMMAND ${CMAKE_COMMAND} -E make_directory ${EXECUTABLE_OUTPUT_PATH}/share/locale/${lang}/LC_MESSAGES
 			COMMAND ${MSGFMT_EXECUTABLE} -c ${current_po} -o ${mo_file}
 			DEPENDS ${current_po}
 		)
diff --git a/win32-mingw/prepare_Win32.cmd b/win32-mingw/prepare_Win32.cmd
index ce061b3..497a166 100644
--- a/win32-mingw/prepare_Win32.cmd
+++ b/win32-mingw/prepare_Win32.cmd
@@ -8,11 +8,11 @@ cd %GRISBISRC%
 ::    Don't include the extension
 SET GTK_DEV_FILE_BASENAME=gtk+-bundle_2.24.10-20120208_win32
 SET GTK_DEV_BUNDLE_VERSION=2.24
-SET ZLIB_DEV_FILE_BASENAME%=zlib_1.2.5-2_win32
+SET ZLIB_DEV_FILE_BASENAME=zlib_1.2.5-2_win32
 SET LIBXML_FILE_BASENAME=libxml2_2.9.0-1_win32
 SET LIBXML_FILE_DEV_NAME=libxml2-dev_2.9.0-1_win32
 SET ICONV_FILE_BASENAME=iconv-1.9.2.win32
-SET OPENSSL_FILE_BASENAME=Win32OpenSSL-1_0_0j
+SET OPENSSL_FILE_BASENAME=Win32OpenSSL-1_0_1L
 SET LIBGSF_FILE_BASENAME=libgsf_1.14.17-1_win32
 SET LIBGSF_FILE_DEV_NAME=libgsf-dev_1.14.17-1_win32
 SET LIBPTHREAD_FILE_BASENAME=libpthread-2.8.0-3-mingw32-dll-2
@@ -26,7 +26,7 @@ SET TARGET_DIR=%CURRENT_DIR%\target\Win32
 IF NOT EXIST target\Win32\plugins-dev MKDIR target\Win32\plugins-dev
 IF NOT EXIST downloads MKDIR downloads
 SET DOWNLOADS_DIR=%CURRENT_DIR%\downloads
-IF NOT EXIST target\Win32/package MKDIR target\Win32\package
+IF NOT EXIST target\Win32\package MKDIR target\Win32\package
 
 echo Downloads directory : %DOWNLOADS_DIR%
 echo Target directory : %TARGET_DIR%
diff --git a/win32-mingw/wiki.txt b/win32-mingw/wiki.txt
index baef6ec..7eeb9ec 100644
--- a/win32-mingw/wiki.txt
+++ b/win32-mingw/wiki.txt
@@ -21,6 +21,9 @@
 
 ==== C compiler ====
 
-  - Lancer le script %GRISBISRC%\win32-mingw\prepare_win32.cmd qui va effectuer les opération suivantes :  il va télécharger le kit de développement de gtk+ et le décompresser et générer les make pour mingw \\
-  - Lancer le script %GRISBISRC%\win32-mingw\build.cmd qui va compiler les versions Debug et Release. \\
-  - Lancer le script %GRISBISRC%\win32-mingw\package.cmd qui va générer un zip <FIXME: pas encore testé>\\
+  - Etape 1 : Lancer le script %GRISBISRC%\win32-mingw\prepare_win32.cmd qui va effectuer les opération suivantes :  il va télécharger le kit de développement de gtk+ et le décompresser et générer les make pour mingw \\
+  - Etape 2 (automatiquement exécuté par l'étape 1)  : Lancer le script %GRISBISRC%\win32-mingw\generate.cmd : cette étape n'est nécéssaire que si vous modifiez le fichier CMakeList.txt pour répondre à vos besoins.
+  - Etape 3 (automatiquement exécuté par l'étape 1): Lancer le script %GRISBISRC%\win32-mingw\build.cmd qui va compiler les versions Debug et Release. \\
+  - Etape 4 :
+		* Option 1 : Compiler le script %GRISBISRC%\windows_installer.nsi pour générer un installateur de grisbi.
+		* Option 2 : Lancer le script %GRISBISRC%\win32-mingw\package.cmd qui va générer un zip <FIXME: pas encore testé>\\
diff --git a/win32-mingw/windows_installer.nsi b/win32-mingw/windows_installer.nsi
index 8891e88..db53783 100644
--- a/win32-mingw/windows_installer.nsi
+++ b/win32-mingw/windows_installer.nsi
@@ -18,13 +18,13 @@
 ;Defining useful parameters
 
 !define PRODUCT "Grisbi" ;Name of the project
-!define MAJOR "0"        ;Major version number
-!define MINOR "9"        ;Minor version number
-!define PATCH "5"        ;Patch version number
-!define STAGE "win32 mingw"     ;Developement stage id (RC, beta, alpha)
-!define SMALL_STAGE "win32_mingw" ;Small dev stage id without spaces
+!define MAJOR "1"        ;Major version number
+!define MINOR "0"        ;Minor version number
+!define PATCH "0"        ;Patch version number
+!define STAGE ""     ;Developement stage id (RC, beta, alpha)
+!define SMALL_STAGE "setup" ;Small dev stage id without spaces
 !define EXE_PATH "target\Win32/package" ;Path to the exe file you want to pack
-!define GRISBI_SRC_DIR "C:\grisbi"
+!define GRISBI_SRC_DIR "D:\developpement\git\grisbi"
 !define PROJECT_SOURCE_DIR "${GRISBI_SRC_DIR}\win32-mingw"
 !define GTK_DEV_PATH "${PROJECT_SOURCE_DIR}\target\Win32\gtk-dev" ;Path to the gtk-dev generated by prepare.cmd
 !define PACKAGE_DIR "${PROJECT_SOURCE_DIR}\target\Win32\package" ;Path to the package generated by prepare.cmd
@@ -143,6 +143,10 @@ Section $(ProgFiles)
   File /r /x Makefile.am /x Makefile.in /x *.lib "${EXE_PATH}\lib\*.*"
   SetOutPath "$INSTDIR\share"
 ;  File /r ..\share\*.*
+
+  SetOutPath "$INSTDIR\share"
+  File /r /x Makefile.am /x Makefile.in "${EXE_PATH}\share\categories"
+
   SetOutPath "$INSTDIR\share\ui"
   File /r "${EXE_PATH}\share\ui\*.ui"
   SetOutPath "$INSTDIR\share\goffice"
@@ -174,25 +178,28 @@ Section $(GTK)
 
   SetOutPath "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
   File "${GTK_DEV_PATH}\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
-
-  SetOutPath "$INSTDIR\share\locale"
-  File /r "${GTK_DEV_PATH}\share\locale\cs"
-  File /r "${GTK_DEV_PATH}\share\locale\da"
-  File /r "${GTK_DEV_PATH}\share\locale\de"
-  File /r "${GTK_DEV_PATH}\share\locale\el"
-  File /r "${GTK_DEV_PATH}\share\locale\eo"
-  File /r "${GTK_DEV_PATH}\share\locale\es"
-  File /r "${GTK_DEV_PATH}\share\locale\fa"
-  File /r "${GTK_DEV_PATH}\share\locale\fr"
-  File /r "${GTK_DEV_PATH}\share\locale\he"
-  File /r "${GTK_DEV_PATH}\share\locale\it"
-  File /r "${GTK_DEV_PATH}\share\locale\lv"
-  File /r "${GTK_DEV_PATH}\share\locale\nl"
-  File /r "${GTK_DEV_PATH}\share\locale\pl"
-  File /r "${GTK_DEV_PATH}\share\locale\pt_BR"
-  File /r "${GTK_DEV_PATH}\share\locale\ro"
-  File /r "${GTK_DEV_PATH}\share\locale\ru"
-  File /r "${GTK_DEV_PATH}\share\locale\zh_CN"
+  
+  SetOutPath "$INSTDIR\share"
+  File /r "${EXE_PATH}\share\locale"
+
+  ;SetOutPath "$INSTDIR\share\locale"
+  ;File /r "${GTK_DEV_PATH}\share\locale\cs"
+  ;File /r "${GTK_DEV_PATH}\share\locale\da"
+  ;File /r "${GTK_DEV_PATH}\share\locale\de"
+  ;File /r "${GTK_DEV_PATH}\share\locale\el"
+  ;File /r "${GTK_DEV_PATH}\share\locale\eo"
+  ;File /r "${GTK_DEV_PATH}\share\locale\es"
+  ;File /r "${GTK_DEV_PATH}\share\locale\fa"
+  ;File /r "${GTK_DEV_PATH}\share\locale\fr"
+  ;File /r "${GTK_DEV_PATH}\share\locale\he"
+  ;File /r "${GTK_DEV_PATH}\share\locale\it"
+  ;File /r "${GTK_DEV_PATH}\share\locale\lv"
+  ;File /r "${GTK_DEV_PATH}\share\locale\nl"
+  ;File /r "${GTK_DEV_PATH}\share\locale\pl"
+  ;File /r "${GTK_DEV_PATH}\share\locale\pt_BR"
+  ;File /r "${GTK_DEV_PATH}\share\locale\ro"
+  ;File /r "${GTK_DEV_PATH}\share\locale\ru"
+  ;File /r "${GTK_DEV_PATH}\share\locale\zh_CN"
 
 SectionEnd
 
@@ -207,6 +214,13 @@ Section $(OFXplug)
   File "${PACKAGE_DIR}\libofx-4.dll"
   File "${PACKAGE_DIR}\libosp-5.dll"
 
+  
+  File "${PACKAGE_DIR}\libpthread-2.dll"
+  File "${PACKAGE_DIR}\libgsf-1-114.dll"
+  File "${PACKAGE_DIR}\libgoffice-0.8-8.dll"
+  File "${PACKAGE_DIR}\pcre3.dll"
+  File "${PACKAGE_DIR}\libxml2.dll"
+
 SectionEnd
 
 Section $(GnuCashPlugin)
@@ -255,7 +269,7 @@ FunctionEnd
 ;--------------------------------
 ;Descriptions
 
-  ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
+  ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGUAGE SPECIFIC
 
   ;Assign descriptions to sections
   ;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-- 
1.9.4.msysgit.0


More information about the devel mailing list