Building exe with py2exe

Asked by VF2NSR

While following the directions in the win-build.txt fileI ran the py2exe file as directed
Going step by step and installing all of the dependencies, I attempted to run the journal.py file file ran and was slow (29 seconds) to load. I then looked at log file and discovered chardet was missing. I searched google, found the file and placed it into Python root directory.

Re-ran journal.py and all was good, loaded in under a second.

Next I went to the creation of the exe file per the directions.Iit created the dist folder as expected, however the command window log showed this:

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll
   USER32.dll - C:\Windows\system32\USER32.dll
   IMM32.DLL - C:\Windows\system32\IMM32.DLL
   SHELL32.DLL - C:\Windows\system32\SHELL32.DLL
   OLE32.dll - C:\Windows\system32\OLE32.dll
   WINMM.DLL - C:\Windows\system32\WINMM.DLL
   WSOCK32.dll - C:\Windows\system32\WSOCK32.dll
   SHLWAPI.DLL - C:\Windows\system32\SHLWAPI.DLL
   ADVAPI32.DLL - C:\Windows\system32\ADVAPI32.DLL
   msvcrt.dll - C:\Windows\system32\msvcrt.dll
   WS2_32.DLL - C:\Windows\system32\WS2_32.DLL
   WINSPOOL.DRV - C:\Windows\system32\WINSPOOL.DRV
   GDI32.dll - C:\Windows\system32\GDI32.dll
   KERNEL32.dll - C:\Windows\system32\KERNEL32.dll
   COMCTL32.DLL - C:\Windows\system32\COMCTL32.DLL
   COMDLG32.DLL - C:\Windows\system32\COMDLG32.DLL
   KERNELBASE.dll - C:\Windows\system32\KERNELBASE.dll
   ntdll.dll - C:\Windows\system32\ntdll.dll

In viewing the Dist directory I see the following files created:

API-MS-Win-Core-Debug-L1-1-0.dll
API-MS-Win-Core-DelayLoad-L1-1-0.dll
API-MS-Win-Core-ErrorHandling-L1-1-0.dll
API-MS-Win-Core-File-L1-1-0.dll
API-MS-Win-Core-Handle-L1-1-0.dll
API-MS-Win-Core-Heap-L1-1-0.dll
API-MS-Win-Core-Interlocked-L1-1-0.dll
API-MS-Win-Core-IO-L1-1-0.dll
API-MS-Win-Core-LibraryLoader-L1-1-0.dll
API-MS-Win-Core-Localization-L1-1-0.dll
API-MS-Win-Core-LocalRegistry-L1-1-0.dll
API-MS-Win-Core-Misc-L1-1-0.dll
API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
API-MS-Win-Core-ProcessThreads-L1-1-0.dll
API-MS-Win-Core-Profile-L1-1-0.dll
API-MS-Win-Core-String-L1-1-0.dll
API-MS-Win-Core-Synch-L1-1-0.dll
API-MS-Win-Core-SysInfo-L1-1-0.dll

The created rednotebooke.exe file fails to run.

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Solved by:
Jendrik Seipp
Solved:
Last query:
Last reply:
Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#1

Am 21.02.2012 22:01, schrieb VF2NSR:
> New question #188433 on RedNotebook:
> https://answers.launchpad.net/rednotebook/+question/188433
>
> While following the directions in the win-build.txt fileI ran the py2exe file as directed
> Going step by step and installing all of the dependencies, I attempted to run the journal.py file file ran and was slow (29 seconds) to load.
Did this happen on every try? This may be the source of the slow loading
then.
> I then looked at log file and discovered chardet was missing. I searched google, found the file and placed it into Python root directory.
>
> Re-ran journal.py and all was good, loaded in under a second.
This is very strange. The program should run completely fine without
chardet.
>
> Next I went to the creation of the exe file per the directions.Iit created the dist folder as expected, however the command window log showed this:
>
>
> *** binary dependencies ***
> Your executable(s) also depend on these dlls which are not included,
> you may or may not need to distribute them.
>
> Make sure you have the license if you distribute any of them, and
> make sure you don't distribute files belonging to the operating system.
>
> OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll
> USER32.dll - C:\Windows\system32\USER32.dll
> IMM32.DLL - C:\Windows\system32\IMM32.DLL
> SHELL32.DLL - C:\Windows\system32\SHELL32.DLL
> OLE32.dll - C:\Windows\system32\OLE32.dll
> WINMM.DLL - C:\Windows\system32\WINMM.DLL
> WSOCK32.dll - C:\Windows\system32\WSOCK32.dll
> SHLWAPI.DLL - C:\Windows\system32\SHLWAPI.DLL
> ADVAPI32.DLL - C:\Windows\system32\ADVAPI32.DLL
> msvcrt.dll - C:\Windows\system32\msvcrt.dll
> WS2_32.DLL - C:\Windows\system32\WS2_32.DLL
> WINSPOOL.DRV - C:\Windows\system32\WINSPOOL.DRV
> GDI32.dll - C:\Windows\system32\GDI32.dll
> KERNEL32.dll - C:\Windows\system32\KERNEL32.dll
> COMCTL32.DLL - C:\Windows\system32\COMCTL32.DLL
> COMDLG32.DLL - C:\Windows\system32\COMDLG32.DLL
> KERNELBASE.dll - C:\Windows\system32\KERNELBASE.dll
> ntdll.dll - C:\Windows\system32\ntdll.dll
This is expected.
>
>
> In viewing the Dist directory I see the following files created:
>
> API-MS-Win-Core-Debug-L1-1-0.dll
> API-MS-Win-Core-DelayLoad-L1-1-0.dll
> API-MS-Win-Core-ErrorHandling-L1-1-0.dll
> API-MS-Win-Core-File-L1-1-0.dll
> API-MS-Win-Core-Handle-L1-1-0.dll
> API-MS-Win-Core-Heap-L1-1-0.dll
> API-MS-Win-Core-Interlocked-L1-1-0.dll
> API-MS-Win-Core-IO-L1-1-0.dll
> API-MS-Win-Core-LibraryLoader-L1-1-0.dll
> API-MS-Win-Core-Localization-L1-1-0.dll
> API-MS-Win-Core-LocalRegistry-L1-1-0.dll
> API-MS-Win-Core-Misc-L1-1-0.dll
> API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
> API-MS-Win-Core-ProcessThreads-L1-1-0.dll
> API-MS-Win-Core-Profile-L1-1-0.dll
> API-MS-Win-Core-String-L1-1-0.dll
> API-MS-Win-Core-Synch-L1-1-0.dll
> API-MS-Win-Core-SysInfo-L1-1-0.dll
Are these the only files that are created? I have never seen them. Which
python version did you use? I used python2.6. Which gtk version? WHich
Windows Version?
>
>
> The created rednotebooke.exe file fails to run.
What is the log output in C:\Users\username\.rednotebook\rednotebook.log?

Revision history for this message
VF2NSR (vf2nsr) said :
#2

>
> While following the directions in the win-build.txt fileI ran the py2exe file as directed
> Going step by step and installing all of the dependencies, I attempted to run the journal.py file file ran and was slow (29 seconds) to load.
Did this happen on every try? This may be the source of the slow loading
then.

# Yes each time I ran it it was slow to load giving me this message in log:
2012-02-21 12:20:41,319 DEBUG sys.stdout logging level: 20
2012-02-21 12:20:41,319 INFO Writing log to file "C:\Users\Aztec\.rednotebook\rednotebook.log"
C:\rednotebook\rednotebook\gui\browser.py:55: GtkWarning: Could not find the icon 'gtk-fullscreen'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
 http://icon-theme.freedesktop.org/releases
  webkit.WebView.__init__(self)
2012-02-21 12:20:50,835 INFO chardet not found. 'utf-8' encoding will be assumed
2012-02-21 12:20:50,835 INFO Running in portable mode: False
2012-02-21 12:20:50,851 INFO First Start: True
2012-02-21 12:20:50,851 INFO RedNotebook version: 1.3.0
2012-02-21 12:20:50,990 INFO System info: machine: x86, platform: Windows-post2008Server-6.1.7601-SP1, processor: AMD64 Family 16 Model 6 Stepping 3, AuthenticAMD, python_version: 2.6.0, release: post2008Server, system: Windows, GTK version: (2, 16, 6), PyGTK version: (2, 17, 0), Yaml version: 3.10
2012-02-21 12:20:52,473 DEBUG Default font: Sans 10
2012-02-21 12:20:52,473 DEBUG Default size: 10
2012-02-21 12:20:52,769 INFO Cloud ignore list: [u'filter', u'these', u'comma', u'separated', u'words']
2012-02-21 12:20:52,785 INFO Cloud include list: [u'mtv', u'spam', u'work', u'job', u'play']
2012-02-21 12:20:52,785 DEBUG Start compiling regexes
2012-02-21 12:20:52,785 DEBUG Finished
2012-02-21 12:20:52,878 INFO Using zeitgeist: False
2012-02-21 12:20:52,910 DEBUG Tray icon visible: False
2012-02-21 12:20:52,924 INFO Opening journal at C:\Users\Aztec\.rednotebook\data
2012-02-21 12:20:52,924 DEBUG Starting to load files in dir "C:\Users\Aztec\.rednotebook\data"
2012-02-21 12:20:52,924 DEBUG Finished loading files in dir "C:\Users\Aztec\.rednotebook\data"
2012-02-21 12:20:52,924 INFO Adding example content on 2012-02-21
2012-02-21 12:20:53,003 INFO Connected Signals: 2 22 15
2012-02-21 12:20:53,003 DEBUG Start took 2.18400001526 seconds
2012-02-21 12:20:53,003 DEBUG Trying to enter the gtk main loop
C:\rednotebook\rednotebook\journal.py:599: GtkWarning: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators
  gtk.main()
2012-02-21 12:20:53,174 DEBUG Update the cloud

> I then looked at log file and discovered chardet was missing. I searched google, found the file and placed it into Python root directory.
>
> Re-ran journal.py and all was good, loaded in under a second.
This is very strange. The program should run completely fine without
chardet.
[...]
This is expected.
# Once I loaded the chardet it ran effortlessly with no errors.

[...]
Are these the only files that are created? I have never seen them. Which
python version did you use? I used python2.6. Which gtk version? WHich
Windows Version?

#All other files needed to run were created
>
>
> The created rednotebooke.exe file fails to run.
What is the log output in C:\Users\username\.rednotebook\rednotebook.log?

# this was log from the run of the created exe file

INFO Writing log to file "C:\Users\Aztec\.rednotebook\rednotebook.log"
INFO Running in portable mode: False
INFO First Start: True
INFO RedNotebook version: 1.3.0
INFO System info: machine: x86, platform: Windows-post2008Server-6.1.7601-SP1, processor: AMD64 Family 16 Model 6 Stepping 3, AuthenticAMD, python_version: 2.6.0, release: post2008Server, system: Windows, GTK version: (2, 16, 6), PyGTK version: (2, 17, 0), Yaml version: 3.10
4 Family 16 Model 6 Stepping 3, AuthenticAMD, python_version: 2.6.0, release: post2008Server, system: Windows, GTK version: (2, 16, 6), PyGTK version: (2, 17, 0), Yaml version: 3.10
Traceback (most recent call last):
  File "rednotebook", line 12, in <module>
  File "rednotebook\journal.pyc", line 592, in main
  File "rednotebook\journal.pyc", line 249, in __init__
  File "rednotebook\gui\main_window.pyc", line 75, in __init__
glib.GError: Couldn't recognize the image file format for file 'C:\Python26\dist\images\rednotebook-icon\rn-128.png'

Revision history for this message
VF2NSR (vf2nsr) said :
#3

As for the chardet I found tha tout in the setup.py file that called for it

starting at line 232
# For the use of py2exe you have to checkout the repository.
# To create Windows Installers have a look at the file 'win/win-build.txt'
includes = ('rednotebook.gui, rednotebook.util, cairo, pango, '
            'pangocairo, atk, gobject, gio, gtk, chardet, zlib, glib, '
            'gtkspell')

Revision history for this message
VF2NSR (vf2nsr) said :
#4

I have now completely uninstalled everything, and reinstalled all dependencies, Now I get errors not finding dll.

I give up. Will just go with the current build and the issues with slowness and deal with them all.

Was just trying to determine what it was that was causing the issues, thought it was the chardet which seemed ot make a big difference, but now can not even get the journal.py to run

this is error I get on running the journal.py

C:\Python26>python C:\Python26\rednotebook\journal.py
Traceback (most recent call last):
  File "C:\Python26\rednotebook\journal.py", line 70, in <module>
    elibintl.install(GETTEXT_DOMAIN, LOCALE_PATH)
  File "C:\Python26\rednotebook\external\elibintl.py", line 472, in install
    _install(domain, localedir, True)
  File "C:\Python26\rednotebook\external\elibintl.py", line 439, in _install
    libintl = cdll.intl
  File "C:\Python26\lib\ctypes\__init__.py", line 423, in __getattr__
    dll = self._dlltype(name)
  File "C:\Python26\lib\ctypes\__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

C:\Python26>

I appreciate your help Jendrik....guess I need to leave the programming to programmers.

Revision history for this message
VF2NSR (vf2nsr) said :
#5

OK an update of sorts:

Totally cleaned system

Reinstalled the Python and dependencies

Ran the journal.py
Everything was good

Started the py2exe

C:\Python26>python c:\python26\rednotebook\jpurnal.py
python: can't open file 'c:\python26\rednotebook\jpurnal.py': [Errno 2] No such
file or directory

C:\Python26>python C:\Python26\rednotebook\journal.py
INFO Writing log to file "C:\Users\Aztec\.rednotebook\rednotebook.log"
INFO Running in portable mode: False
INFO First Start: True
INFO RedNotebook version: 1.3.0
INFO System info: machine: x86, platform: Windows-post2008Server-6.1.7601-SP
1, processor: AMD64 Family 16 Model 6 Stepping 3, AuthenticAMD, python_version:
2.6.0, release: post2008Server, system: Windows, GTK version: (2, 16, 6), PyGTK
version: (2, 17, 0), Yaml version: 3.10
INFO Cloud ignore list: [u'filter', u'these', u'comma', u'separated', u'word
s']
INFO Cloud include list: [u'mtv', u'spam', u'work', u'job', u'play']
INFO Using zeitgeist: False
INFO Opening journal at C:\Users\Aztec\.rednotebook\data
INFO Adding example content on 2012-02-22
INFO Connected Signals: 2 22 15
C:\Python26\rednotebook\journal.py:599: GtkWarning: Invalid text buffer iterator
: either the iterator is uninitialized, or the characters/pixbufs/widgets in the
 buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position ac
ross buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be
referred to by character offset)
will invalidate all outstanding iterators
  gtk.main()
INFO Configuration has been saved to C:\Users\Aztec\.rednotebook\configurati
on.cfg
INFO Goodbye!

C:\Python26>python c:\python26\setup.py py2exe
running on win32. Importing py2exe
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the se
ts module is deprecated
  import sets
Languages: ['ar', 'ast', 'be', 'bg', 'bs', 'ca', 'cs', 'cy', 'da', 'de', 'el',
'en_GB', 'eo', 'es', 'eu', 'fi', 'fo', 'fr', 'gl', 'he', 'hr', 'hu', 'hy', 'id',
 'it', 'ja', 'ka', 'kk', 'ko', 'lt', 'mn', 'ms', 'nb', 'nds', 'nl', 'nn', 'oc',
'pl', 'pt', 'pt_BR', 'ro', 'ru', 'si', 'sk', 'sr', 'sv', 'ta', 'te', 'tl', 'tr',
 'ug', 'uk', 'uz', 'vi', 'wae', 'zh_CN', 'zh_HK', 'zh_TW']
Compiling po\ar.po to rednotebook/i18n/ar\LC_MESSAGES\rednotebook.mo
Compiling po\ast.po to rednotebook/i18n/ast\LC_MESSAGES\rednotebook.mo
Compiling po\be.po to rednotebook/i18n/be\LC_MESSAGES\rednotebook.mo
Compiling po\bg.po to rednotebook/i18n/bg\LC_MESSAGES\rednotebook.mo
Compiling po\bs.po to rednotebook/i18n/bs\LC_MESSAGES\rednotebook.mo
Compiling po\ca.po to rednotebook/i18n/ca\LC_MESSAGES\rednotebook.mo
Compiling po\cs.po to rednotebook/i18n/cs\LC_MESSAGES\rednotebook.mo
Compiling po\cy.po to rednotebook/i18n/cy\LC_MESSAGES\rednotebook.mo
Compiling po\da.po to rednotebook/i18n/da\LC_MESSAGES\rednotebook.mo
Compiling po\de.po to rednotebook/i18n/de\LC_MESSAGES\rednotebook.mo
Compiling po\el.po to rednotebook/i18n/el\LC_MESSAGES\rednotebook.mo
Compiling po\en_GB.po to rednotebook/i18n/en_GB\LC_MESSAGES\rednotebook.mo
Compiling po\eo.po to rednotebook/i18n/eo\LC_MESSAGES\rednotebook.mo
Compiling po\es.po to rednotebook/i18n/es\LC_MESSAGES\rednotebook.mo
Compiling po\eu.po to rednotebook/i18n/eu\LC_MESSAGES\rednotebook.mo
Compiling po\fi.po to rednotebook/i18n/fi\LC_MESSAGES\rednotebook.mo
Compiling po\fo.po to rednotebook/i18n/fo\LC_MESSAGES\rednotebook.mo
Compiling po\fr.po to rednotebook/i18n/fr\LC_MESSAGES\rednotebook.mo
Compiling po\gl.po to rednotebook/i18n/gl\LC_MESSAGES\rednotebook.mo
Compiling po\he.po to rednotebook/i18n/he\LC_MESSAGES\rednotebook.mo
Compiling po\hr.po to rednotebook/i18n/hr\LC_MESSAGES\rednotebook.mo
Compiling po\hu.po to rednotebook/i18n/hu\LC_MESSAGES\rednotebook.mo
Compiling po\hy.po to rednotebook/i18n/hy\LC_MESSAGES\rednotebook.mo
Compiling po\id.po to rednotebook/i18n/id\LC_MESSAGES\rednotebook.mo
Compiling po\it.po to rednotebook/i18n/it\LC_MESSAGES\rednotebook.mo
Compiling po\ja.po to rednotebook/i18n/ja\LC_MESSAGES\rednotebook.mo
Compiling po\ka.po to rednotebook/i18n/ka\LC_MESSAGES\rednotebook.mo
Compiling po\kk.po to rednotebook/i18n/kk\LC_MESSAGES\rednotebook.mo
Compiling po\ko.po to rednotebook/i18n/ko\LC_MESSAGES\rednotebook.mo
Compiling po\lt.po to rednotebook/i18n/lt\LC_MESSAGES\rednotebook.mo
Compiling po\mn.po to rednotebook/i18n/mn\LC_MESSAGES\rednotebook.mo
Compiling po\ms.po to rednotebook/i18n/ms\LC_MESSAGES\rednotebook.mo
Compiling po\nb.po to rednotebook/i18n/nb\LC_MESSAGES\rednotebook.mo
Compiling po\nds.po to rednotebook/i18n/nds\LC_MESSAGES\rednotebook.mo
Compiling po\nl.po to rednotebook/i18n/nl\LC_MESSAGES\rednotebook.mo
Compiling po\nn.po to rednotebook/i18n/nn\LC_MESSAGES\rednotebook.mo
Compiling po\oc.po to rednotebook/i18n/oc\LC_MESSAGES\rednotebook.mo
Compiling po\pl.po to rednotebook/i18n/pl\LC_MESSAGES\rednotebook.mo
Compiling po\pt.po to rednotebook/i18n/pt\LC_MESSAGES\rednotebook.mo
Compiling po\pt_BR.po to rednotebook/i18n/pt_BR\LC_MESSAGES\rednotebook.mo
Compiling po\ro.po to rednotebook/i18n/ro\LC_MESSAGES\rednotebook.mo
Compiling po\ru.po to rednotebook/i18n/ru\LC_MESSAGES\rednotebook.mo
Compiling po\si.po to rednotebook/i18n/si\LC_MESSAGES\rednotebook.mo
Compiling po\sk.po to rednotebook/i18n/sk\LC_MESSAGES\rednotebook.mo
Compiling po\sr.po to rednotebook/i18n/sr\LC_MESSAGES\rednotebook.mo
Compiling po\sv.po to rednotebook/i18n/sv\LC_MESSAGES\rednotebook.mo
Compiling po\ta.po to rednotebook/i18n/ta\LC_MESSAGES\rednotebook.mo
Compiling po\te.po to rednotebook/i18n/te\LC_MESSAGES\rednotebook.mo
Compiling po\tl.po to rednotebook/i18n/tl\LC_MESSAGES\rednotebook.mo
Compiling po\tr.po to rednotebook/i18n/tr\LC_MESSAGES\rednotebook.mo
Compiling po\ug.po to rednotebook/i18n/ug\LC_MESSAGES\rednotebook.mo
Compiling po\uk.po to rednotebook/i18n/uk\LC_MESSAGES\rednotebook.mo
Compiling po\uz.po to rednotebook/i18n/uz\LC_MESSAGES\rednotebook.mo
Compiling po\vi.po to rednotebook/i18n/vi\LC_MESSAGES\rednotebook.mo
Compiling po\wae.po to rednotebook/i18n/wae\LC_MESSAGES\rednotebook.mo
Compiling po\zh_CN.po to rednotebook/i18n/zh_CN\LC_MESSAGES\rednotebook.mo
Compiling po\zh_HK.po to rednotebook/i18n/zh_HK\LC_MESSAGES\rednotebook.mo
Compiling po\zh_TW.po to rednotebook/i18n/zh_TW\LC_MESSAGES\rednotebook.mo
data_base_dir C:\Python26
running py2exe
running build_py
running build_scripts
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'gtkspell' (C:\Python26\lib\site-packages\g
tk-2.0\gtkspell.pyd -> gtkspell.pyd)
creating python loader for extension 'webkit.webkit' (C:\Python26\lib\site-packa
ges\gtk-2.0\webkit\webkit.pyd -> webkit.webkit.pyd)
creating python loader for extension 'select' (C:\Python26\DLLs\select.pyd -> se
lect.pyd)
creating python loader for extension 'unicodedata' (C:\Python26\DLLs\unicodedata
.pyd -> unicodedata.pyd)
creating python loader for extension 'pangocairo' (C:\Python26\lib\site-packages
\gtk-2.0\pangocairo.pyd -> pangocairo.pyd)
creating python loader for extension 'gio._gio' (C:\Python26\lib\site-packages\g
tk-2.0\gio\_gio.pyd -> gio._gio.pyd)
creating python loader for extension 'pango' (C:\Python26\lib\site-packages\gtk-
2.0\pango.pyd -> pango.pyd)
creating python loader for extension 'atk' (C:\Python26\lib\site-packages\gtk-2.
0\atk.pyd -> atk.pyd)
creating python loader for extension '_hashlib' (C:\Python26\DLLs\_hashlib.pyd -
> _hashlib.pyd)
creating python loader for extension 'bz2' (C:\Python26\DLLs\bz2.pyd -> bz2.pyd)

creating python loader for extension '_ssl' (C:\Python26\DLLs\_ssl.pyd -> _ssl.p
yd)
creating python loader for extension 'gobject._gobject' (C:\Python26\lib\site-pa
ckages\gtk-2.0\gobject\_gobject.pyd -> gobject._gobject.pyd)
creating python loader for extension '_ctypes' (C:\Python26\DLLs\_ctypes.pyd ->
_ctypes.pyd)
creating python loader for extension '_yaml' (C:\Python26\lib\site-packages\_yam
l.pyd -> _yaml.pyd)
creating python loader for extension 'gtk._gtk' (C:\Python26\lib\site-packages\g
tk-2.0\gtk\_gtk.pyd -> gtk._gtk.pyd)
creating python loader for extension 'pyexpat' (C:\Python26\DLLs\pyexpat.pyd ->
pyexpat.pyd)
creating python loader for extension 'cairo._cairo' (C:\Python26\lib\site-packag
es\cairo\_cairo.pyd -> cairo._cairo.pyd)
creating python loader for extension 'glib._glib' (C:\Python26\lib\site-packages
\gtk-2.0\glib\_glib.pyd -> glib._glib.pyd)
creating python loader for extension '_socket' (C:\Python26\DLLs\_socket.pyd ->
_socket.pyd)
*** finding dlls needed ***
error: libglib-2.0-0.dll: No such file or directory

C:\Python26>

Now what?

Everything is loaded per instructions and it does run and without issues (after I installed the chardet)

Revision history for this message
VF2NSR (vf2nsr) said :
#6

FYI I thought perhaps this all had something to do with me being on Win7 64 bit
SO just did a complete install cleanly from the win build directions onto an XP machine that has never had Python on it.

Same error results as the last message

*** finding dlls needed ***
error: libglib-2.0-0.dll: No such file or directory

yet the journal.py file loads nd runs properly. Have I missed something in the install?

== Install requirements ==
(view http://faq.pygtk.org/index.py?req=show&file=faq21.001.htp for more details)
  * Install Python 2.6 for Microsoft Windows from the Python website [www.python.org].
  * Download the PyGTK/GTK all-in-one installer and make sure you select
    the following subpackages: PyGTK, PyGObject, PyGTKSpell, PyWebkitGTK w/o Gstreamer
    [http://opensourcepack.blogspot.com/2011/01/conservative-all-in-one-pygtk-installer.html]
  * Install PyYaml from [http://pyyaml.org/wiki/PyYAML]
  * Install Bzr with TortoiseBzr (https://launchpad.net/bzr/+download)
  * Restart the system

do I neeed gtk+ rintime environment?

Revision history for this message
VF2NSR (vf2nsr) said :
#7

btw this is my log file when I run it from python

2012-02-22 23:07:38,088 DEBUG sys.stdout logging level: 20
2012-02-22 23:07:38,088 INFO Writing log to file "C:\Users\Aztec\.rednotebook\rednotebook.log"
2012-02-22 23:07:40,210 INFO Running in portable mode: False
2012-02-22 23:07:40,210 INFO First Start: True
2012-02-22 23:07:40,210 INFO RedNotebook version: 1.3.0
2012-02-22 23:07:40,661 INFO System info: machine: x86, platform: Windows-post2008Server-6.1.7601-SP1, processor: AMD64 Family 16 Model 6 Stepping 3, AuthenticAMD, python_version: 2.6.0, release: post2008Server, system: Windows, GTK version: (2, 16, 6), PyGTK version: (2, 17, 0), Yaml version: 3.10
2012-02-22 23:07:43,111 DEBUG Default font: Sans 10
2012-02-22 23:07:43,111 DEBUG Default size: 10
2012-02-22 23:07:43,625 INFO Cloud ignore list: [u'filter', u'these', u'comma', u'separated', u'words']
2012-02-22 23:07:43,641 INFO Cloud include list: [u'mtv', u'spam', u'work', u'job', u'play']
2012-02-22 23:07:43,641 DEBUG Start compiling regexes
2012-02-22 23:07:43,641 DEBUG Finished
2012-02-22 23:07:43,782 INFO Using zeitgeist: False
2012-02-22 23:07:43,812 DEBUG Tray icon visible: False
2012-02-22 23:07:43,828 INFO Opening journal at C:\Users\Aztec\.rednotebook\data
2012-02-22 23:07:43,828 DEBUG Starting to load files in dir "C:\Users\Aztec\.rednotebook\data"
2012-02-22 23:07:43,828 DEBUG Finished loading files in dir "C:\Users\Aztec\.rednotebook\data"
2012-02-22 23:07:43,828 INFO Adding example content on 2012-02-22
2012-02-22 23:07:43,923 INFO Connected Signals: 2 22 15
2012-02-22 23:07:43,923 DEBUG Start took 3.71300005913 seconds
2012-02-22 23:07:43,923 DEBUG Trying to enter the gtk main loop
C:\Python26\rednotebook\journal.py:599: GtkWarning: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators
  gtk.main()
2012-02-22 23:07:44,109 DEBUG Update the cloud
2012-02-22 23:07:44,109 DEBUG Cloud updated
2012-02-22 23:07:49,990 DEBUG Main frame destroyed
2012-02-22 23:07:50,006 INFO Configuration has been saved to C:\Users\Aztec\.rednotebook\configuration.cfg
2012-02-22 23:07:50,006 INFO Goodbye!

Revision history for this message
VF2NSR (vf2nsr) said :
#8

I think I have figured out the issue Jendrik, I just need one bit of advice, it appears that when I run the setup.py install it looks for files in the gtk-2.0 folder and can not find them, checking the directories finds that they are located in the gtk-2.1.16.6 directory. I have installed nothing but what was suggested in the win-build.txt file. How can I get the setup.py to reconize the gtk-2.1.16.6 as a place to include in its search for the dll files?

Revision history for this message
Best Jendrik Seipp (jendrikseipp) said :
#9

It seems that somehow python finds your gtk runtime environment and
py2exe doesn't. You should make sure that the gtk path is on your system
PATH.

I have downloaded the PA RedNotebook installer on my WinXP machine and
experience the slow loading. Interesting is that it loads fast if
there's already one open RedNotebook instance.

I have done some measurements PA-RN is PortableRedNotebook.exe, RN is
App\RedNotebook\redNotebook.exe

start RN -> fast

start PA-RN -> slow

start PA-RN -> slow
start PA-RN -> fast

start PA-RN -> slow
close PA-RN
start PA-RN -> slow

start PA-RN1 -> slow
start RN -> fast
close RN
start PA-RN2 -> fast

start RN
start PA-RN -> prohibited by PA-RN

start PA-RN1 -> slow
start PA-RN2 -> fast
close PA-RN1 or PA-RN2
start PA-RN3 -> fast

I have repeated those multiple times and always got the same findings.
It seems that whenever PA-RN is already running, starting a new instance
is fast. Can you imagine why? What does the launcher do on exit?

Revision history for this message
MyOtheHedgeFox (a-ztech) said :
#10

Hi again, Jendrik!

> I have downloaded the PA RedNotebook installer on my WinXP machine...

Completely not by the way: are you still a student? Do you have access
to Microsoft's MSDN AA program?
In some universities, full-time students can get free WinXP and Win7 --
and most Microsoft development tools in addition to that!

--
Danila E.

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#11

Well I am a student, but I am trying to stay as far away as possible
from microsoft stuff, as should everybody I think ;)

Revision history for this message
MyOtheHedgeFox (a-ztech) said :
#12

Hi again, Jendrik!

> Well I am a student, but I am trying to stay as far away as possible
> from microsoft stuff, as should everybody I think ;)

Perhaps you are right, but still, having a legal copy of Windows 7 for
these purposes might be nice.
I am grabbing all I can just in case I might need it. =)

--
Danila E.

Revision history for this message
VF2NSR (vf2nsr) said :
#13

Thank you jendrik, I successfully created a builld today. Apparently I needed to add the gtk2.1.16 to path environment. BTW to run the setup.py i18n requires the py2exe to be installed first. Direction had me try to make tehm first before installing the p2exex.

As for the slowness all I can figure is the PA launcher handles the .recently-used.xbel,gtkfilechooser.ini, .gtk-bookmarks, and WebpageIcons.db. As well as the temp files left behind in th elocal appdata\temp directory. So it makes it more portable with less traces left on host computer

Revision history for this message
VF2NSR (vf2nsr) said :
#14

Thanks Jendrik Seipp, that solved my question.

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#15

Am 24.02.2012 05:45, schrieb VF2NSR:
> Thank you jendrik, I successfully created a builld today. Apparently I
> needed to add the gtk2.1.16 to path environment. BTW to run the
> setup.py i18n requires the py2exe to be installed first. Direction
> had me try to make tehm first before installing the p2exex.
Thanks for the hint. Updated it.
>
>
> As for the slowness all I can figure is the PA launcher handles the
> .recently-used.xbel,gtkfilechooser.ini, .gtk-bookmarks, and
> WebpageIcons.db. As well as the temp files left behind in th elocal
> appdata\temp directory. So it makes it more portable with less traces
> left on host computer
Maybe you should ask someone who knows the internals of the PA installer
and send them my findings that a running PA-RN instance is required for
a fast start.
Also it might be a good idea to create a simple PA installer that just
loads RN and does nothing else (file removing etc.), see if the load
time is slow and then incrementally add the file removing features back
one by one and see which one is causing the trouble.

Cheers,
Jendrik

Revision history for this message
VF2NSR (vf2nsr) said :
#16

I have a remake of the launcher and have determined the issue is the way the launcher create a temp holding place for the rn_tmp.html folders and the Fontconfig folders that are normall stored in the C:users\appdata\local\temp directory. The launcher allows removal on exit from the directory so no traces are left behind. I have removed the option and now the launcher loads in >2 seconds. on initial instal. The other files that are mentioned that are written to the local host I have made copies of them and have them copied on first run. As opposed to being saved to the Launcher temp. The only issue is that it can and will over write any existing file on host computer if Rednotebook is also run locally, but after checking the files out it did not seem to affect a local copy of Rednotebook. I am now trying to write some custom code to clean up the extra temp folders that my laucher creates in my Data folder so as not to clutter it up with numerous files that are not needed mainly the rn-tmp*.html files which are empty.

With all of this said, I hope to reelease an update this week.

As a side note it it not just with the PortableApps version of slowness as I have tested out the Winpenpack build and it seems to s uffer from the same poor load speed. Also we might want to ask any users who post comments here about the portable versions to specify which one they are using, PA or Winpen. As I am willing to try to answer any PA related portable questions.

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#17

Nice. Thanks for your work on this! Your approach makes sense for 1.3.
In 1.4 RedNotebook will probably not write the rn-temp*.html anymore.

Although you succeeded building your own rednotebook.exe, I would like
to ask you to package the one I release in your PA package. Otherwise
those bug reports will be even harder to fix, because I will have even
more different versions. Additionally I would like the user experience
to be the same for all windows users (theme, spell-checking languages,
UI options, etc.). Is this ok for you?

Revision history for this message
VF2NSR (vf2nsr) said :
#18

Absolutely will use yours, the only thing I did differently and not sure if at made a difference was to use my folders for the gtk folders. Other than that I did add the chardet to the relase I created. Not sure if either of those made any real difference or not. I also used our file write to use default data in loading the recently used xbel and the webpageicon db files. As in th e"normal launcher" those were handled in the temp area of the launcher as well.

BTW as a side note I did like the 1.4 I got from the repository and it ran smoothly in python natively. Although I did not test it all out, was just was seeing if it would work.

Patrick

Revision history for this message
VF2NSR (vf2nsr) said :
#19

Well after over a week of trying to solve it and thinking I had the "fix" for the portable running it appears I did not. The release that is out is the current one of your sand will not change. Appears all the slow down is coming from the fontconfig. I thought I tricked it out by including a "default" one. But that only worked on my computer. I do have requests out to the gtk+ people to see if there is a way to overcome this obstacle. Hopefully they can help but for now it is what it is

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#20

Am 29.02.2012 06:10, schrieb VF2NSR:
> Appears
> all the slow down is coming from the fontconfig. I thought I tricked
> it out by including a "default" one.
How did you find that out?
> But that only worked on my
> computer. I do have requests out to the gtk+ people to see if there is
> a way to overcome this obstacle.
Can you point me to the relevant bugreport?

Revision history for this message
VF2NSR (vf2nsr) said :
#21

Since it appears more of a fontconfig issue rather than a grk issue I have gone straight it the fontconfig developers here

http://lists.freedesktop.org/archives/fontconfig/2012-February/003790.html

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#22

thanks for the link. I have no clue about fontconfig or how it could
cause delays, but would be interested in how you solve the problem.

Revision history for this message
VF2NSR (vf2nsr) said :
#23

I have included a link to what I have tried and what I have done unfortunately at this time there is not much more I can do. Sorry Jendrik.

http://portableapps.com/node/31239

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#24

Have you tried compiling a PAF that only starts RedNotebook and does
nothing else (no renaming, moving or deleting files)? Does it start
slowly as well?

Revision history for this message
VF2NSR (vf2nsr) said :
#25

Yes it is slow The issue is that it scans for the fonts on the host computer then writes the scan to the AppData/temp folder of the host computer. Depending on the number of fonts it finds determines the time. If the program is used on a different computer it has to rescan and create the new fontconfig for that machine. The scanning and creation of hte initail fontconfig file is what is slowing it down.

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#26

Ah, thanks for the clarification. Maybe you should clarify this for the
fontconfig devs and ask them if the temp folder for fontconfig can be
maually set.

So, if you don't remove the fontconfig files from the temp directory,
the PAF starts fast?

Revision history for this message
VF2NSR (vf2nsr) said :
#27

Initial load is always slow so that the fontconfig is created. Subsequent loads are faster since it already exists, even on the PAF version as I save the fontconfig then move it back and forth. The only time after that that it slows down is when you move to another computer and it has to rescan the fonts of that computer. Last note I sent to fontconfig I believe I explained that to them. I also explored have default fonts located in the RNB directory and trying to get the fontconfig to look there for the files. Which according to all I have read is possible, but unfortunately I lack the programming knowledge to do that. Something about config the local.conf file to search a specific location for fonts.

Revision history for this message
VF2NSR (vf2nsr) said :
#28

It is supposed to look vaguely like this

User configuration file

This is an example of a per-user configuration file that lives in ~/.fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- ~/.fonts.conf for per-user font configuration -->
<fontconfig>

<!--
 Private font directory
-->
<dir>~/.fonts</dir>

<!--
 use rgb sub-pixel ordering to improve glyph appearance on
 LCD screens. Changes affecting rendering, but not matching
 should always use target="font".
-->
<match target="font">
 <edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
</fontconfig>

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#29

OK, but why was the loading time slow every time for me on the same
computer? It was only fast if a PAF RedNotebook was already running.

I think the initial load can be slow and maybe there's nothing we can do
about it, but if RedNotebook is started on the same machine for the
second time, it should be fast, right? I would guess most PA.com users
switch between 1 or 2 machines at most anyways...

Revision history for this message
VF2NSR (vf2nsr) said :
#30

I have made a few yet unreleased changes so that once the fontconfig is created it gets saved back to the PAF version. However that will speed it up after the initiail scan to under 5 second. And subsequent machines would also get saved. Was trying to find a resolve rather than a fix before I released the update.

From what I am told a few other programs had this issue VLC which changed their code and LibreOffice which I guess has ther own font structure.

Revision history for this message
VF2NSR (vf2nsr) said :
#31

BTW if you use IRC at all you can usually catch me and John on the freenode.net #portableapps channel

I use same name as I do here

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#32

Ah, I see. Nice :)
So if I start RN-PA on machine A it starts slow then on B it starts slow
and subsequently it starts fast on both A and B?

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#33

I prefer good old e-mails ;)

Revision history for this message
VF2NSR (vf2nsr) said :
#34

OK I will email you directly in a bit with a revised copy, your original and a few revisions to the was PA handles things, I think it might be a help. Also will ask John about a secondary splash screen to sort of "warn" the user that initial launches on machine may take a little time but to be patient as it is worth the wait.