Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package creation #21

Closed
ghtmtt opened this issue Jan 7, 2014 · 9 comments
Closed

package creation #21

ghtmtt opened this issue Jan 7, 2014 · 9 comments
Assignees
Labels

Comments

@ghtmtt
Copy link
Contributor

ghtmtt commented Jan 7, 2014

Creation of the installer package for windows with the creatensis.pl script.
Final package should contain:

  • QGIS installer
  • customized gui (.ini configuration file)
  • projects

How to:

  • fork and clone QGIS repo
  • go in ~/QGIS/ms-windows/osgeo directory
  • launch perl creatensis.pl script (add --verbose to the end to increase the message output). It will take a while depending on the internet connection (30-45 minutes)
  • installer QGIS.exe is now in the ms-windows directory
  • run perl createnssis.pl --help to display the options
@ghost ghost assigned ghtmtt Jan 10, 2014
@ghtmtt
Copy link
Contributor Author

ghtmtt commented Jan 20, 2014

2nd possibility: supply a portable QGIS version. Here the http://webgis.arpa.piemonte.it/geoportale/index.php/notizie-e-documentazione/manuali/167-quantum-gis-qgis

What file to edit in order to load our customization.ini GUI file?
What file to edit to start qgis with a default project?

See issue #33

@ghtmtt
Copy link
Contributor Author

ghtmtt commented Jan 22, 2014

creatensis.pl creates the ../Installer-Files/postinstall.bat. Maybe this is the file where to add the customization.ini and the project path

@ghtmtt
Copy link
Contributor Author

ghtmtt commented Apr 11, 2014

it seems that, if perl creatensis has been run once, for the next time, it doesn't need to download all the packages from the server again.
It just removes all the unpackaged packages and re-runs NSIS command.
FYI: the 64 bit packages is around 190 MB, the 32 bit around 320MB

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 6, 2014

Jef suggestions to add customizations to the package:

  • create a folder called addons in the ms-windows/osgeo4w directory
  • put the additional plugins inside it, maintaining the structure of the installation, e.g. ~/ms-windows/osgeo4w/addons/apps/qgis/python/plugins/openlayers (for the openlayers plugin)
  • to add also other customizations (e.g. the .ini file for the GUI) it is necessary to add the (addons/)bin/qgis.bat.tmpl file. But we have to look where this file expects to read the customization files
  • for the splashscreen it is necessary to recompile the package (?)

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 6, 2014

added the ~/ms-windows/osgeo4w/addons/apps/qgis/plugins and put inside the folders of the additionals plugins.
In the final packages these plugins are in the ~/ms-windows/QGIS-OSGeo4W-2.3.0-1-Setup-x86/$_OUTDIR/apps/qgis/plugins rather then ~/ms-windows/QGIS-OSGeo4W-2.3.0-1-Setup-x86/$_OUTDIR/apps/qgis/python/plugin one.
Don't know if it works

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 8, 2014

Tried successfully to create a package with additionals plugins.
Just need to add the ~/ms-windows/osgeo4w/addons/apps/qgis/python/plugins folder and put inside it the folders with the plugins.

Warning: once installed QGIS on windows, plugins are present but not visible. They have to be activated through the manage plugin menu

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 9, 2014

Tried to add, aside the plugins, also the --configpath and the --customizationfile options:

  1. create a bin folder inside ~/ms-windows/osgeo4w/addons
  2. put inside this directory the file qgis.bat.tmpl. WARNING, you have to copy the qgis.bat.tmpl file you can find in the ~ms-windows/osgeo4w/unpacked-x86/bin directory. This directory is available only after you launched creatensis.pl, so if you want to use the qgis.bat.tmpl file of the ~/osgeo4w directory, you have first to edit it
  3. I launched QGIS on my debian machine with the --configpath option the redirect in the ~/osgeo4w/addons/qgisconfig folder. This way you can directly customize QGIS and all edits will be updated in the right path
  4. you can also activate the GUI customization options: the .ini file will be created and put here: ~/osgeo4w/addons/qgisconfig/QGIS (name is QGISCUSTOMIZATION2.ini)
  5. edit the ~/addons/bin/qgis.bat.tmpl final lines, in order that the 2 options (--configpath & --customizationfile) will be included in the package. In detail, replace this line
    start "QGIS" /B "%OSGEO4W_ROOT%"\bin\@[email protected] %*
    with this one
    start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe %* --configpath %OSGEO4W_ROOT%\addons\qgisconfig --customizationfile %OSGEO4W_ROOT%\addons\qgisconfig\QGIS\QGISCUSTOMIZATION2.ini

PROBLEM launching creatensis when both the plugin (so ~/addons/app) and qgisconfig directories have been added, this cause a problem after launching QGIS on windows. Problem seems to be related to the fact that --configpath has already a plugin directory, and this gets in conflict with the ~addons/apps directory.

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 10, 2014

UPDATE:

  • removed the (addons)/apps directory in which I put the additional plugins
  • that's because they go in conflict with the --configpath option
  • so, I started qgis on my debian machine with the --configpath option (the path is (addons)/qgisconfig)
  • then I made some changes (customization of the GUI, moved some buttons, installed some plugin, ecc).. all these changes will be written inside the (addons)/agisconfig directories.
  • it seems that it is not necessary to specify the .ini file and that's because it is included in the --configpath option

PROBLEMS. Packaging and installing qgis on win7 don't give any trouble. But when starting qgis, 2 errors appear:

  • impossibile aggiornare la vista in qgis.db dell'utente. table vw_srs already exists
  • a long error of Processing:
    Impossibile caricare il plugin processing a causa di errore chiamando il metodo classFactory()

Traceback (most recent call last):
File "C:/PROGRA1/QGISMA1/apps/qgis/./python\qgis\utils.py", line 204, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins\processing__init__.py", line 38, in classFactory
return ProcessingPlugin(iface)
File "C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins\processing\ProcessingPlugin.py", line 55, in init
Processing.initialize()
File "C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins\processing\core\Processing.py", line 156, in initialize
ProcessingLog.startLogging()
File "C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins\processing\core\ProcessingLog.py", line 50, in startLogging
encoding='utf-8')
File "C:\PROGRA1\QGISMA1\apps\Python27\lib\codecs.py", line 881, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: u'C:\PROGRA1\QGISMA1\qgisconfig\processing\processing.log'

Versione Python:
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Versione di QGIS:
2.2.0-Valmiera Valmiera, c3a2817

Percorso Python: ['C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins\processing', 'C:/PROGRA1/QGISMA1/apps/qgis/./python', u'C:\PROGRA1\QGISMA1\qgisconfig/python', u'C:\PROGRA1\QGISMA1\qgisconfig/python/plugins', 'C:/PROGRA1/QGISMA1/apps/qgis/./python/plugins', 'C:\PROGRA1\QGISMA1\bin\python27.zip', 'C:\PROGRA1\QGISMA1\apps\Python27\DLLs', 'C:\PROGRA1\QGISMA1\apps\Python27\lib', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\plat-win', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\lib-tk', 'C:\PROGRA1\QGISMA1\bin', 'C:\PROGRA1\QGISMA1\apps\Python27', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\GDAL-1.11.0-py2.7-win32.egg', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\PROGRA1\QGISMA1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA1\QGISMA1\apps\qgis\python\plugins\fTools\tools']`

  • the GUI is in Italian even if all the settings on my machine, virtualbox and qgis itself are in English

But QGIS works fine and the settings of the --configpath (along with the .ini) are included.

@ghtmtt
Copy link
Contributor Author

ghtmtt commented May 10, 2014

CONFIRMED that, if the packaging includes the --configpath option, it is not necessary to specify the --customizationfile in the qgis.bat.tmpl. So, the final line of those file becomes:
start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe %* --configpath %OSGEO4W_ROOT%\qgisconfig

@ghtmtt ghtmtt closed this as completed May 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant