maphew / apt

command line package manager for Osgeo4W
http://trac.osgeo.org/osgeo4w/wiki/pkg-apt
GNU General Public License v2.0
4 stars 2 forks source link

Move apt install location from `bin` to `apps` #20

Closed maphew closed 9 years ago

maphew commented 9 years ago

I believe this will enable:

amr66 commented 9 years ago

How do you build apt.exe? I tried to use "build-exe.bat", but it leaves out the dll's in directory "dist"

maphew commented 9 years ago

Curious, it still works for me. Pyinstaller reports version 2.1dev-. I don't recall doing anything special when I set it up.

apt.spec

# -*- mode: python -*-
a = Analysis(['apt.py'],
             pathex=['B:\\code\\apt'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='apt.exe',
          debug=False,
          strip=None,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=None,
               upx=True,
               name='apt')

build output

B:\code\apt>python b:\code\pyinstaller\pyinstaller.py --distpath=..\..\dist --workpath=..\..\build apt.py
75 INFO: wrote B:\code\apt\apt.spec
106 INFO: Testing for ability to set icons, version resources...
549 INFO: ... resource update available
1208 INFO: UPX is available.
1248 INFO: Processing hook hook-os
1485 INFO: Processing hook hook-time
1493 INFO: Processing hook hook-cPickle
1602 INFO: Processing hook hook-_sre
1817 INFO: Processing hook hook-cStringIO
1985 INFO: Processing hook hook-encodings
2008 INFO: Processing hook hook-codecs
2750 INFO: Processing hook hook-httplib
2766 INFO: Processing hook hook-email
2980 INFO: Processing hook hook-email.message
3552 WARNING: library python%s%s required via ctypes not found
3875 INFO: Extending PYTHONPATH with B:\code\apt
3875 INFO: checking Analysis
3875 INFO: building Analysis because out00-Analysis.toc non existent
3876 INFO: running Analysis out00-Analysis.toc
3878 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
5744 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
5746 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_
bcb86ed6ac711f91.manifest
5748 INFO: Searching for file msvcr90.dll
5750 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f
91\msvcr90.dll
5750 INFO: Searching for file msvcp90.dll
5750 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f
91\msvcp90.dll
5750 INFO: Searching for file msvcm90.dll
5751 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f
91\msvcm90.dll
5907 INFO: Analyzing b:\code\pyinstaller\PyInstaller\loader\_pyi_bootstrap.py
5929 INFO: Processing hook hook-os
5953 INFO: Processing hook hook-site
6207 INFO: Processing hook hook-time
6212 INFO: Processing hook hook-cPickle
6326 INFO: Processing hook hook-_sre
6556 INFO: Processing hook hook-cStringIO
6715 INFO: Processing hook hook-encodings
6737 INFO: Processing hook hook-codecs
7434 INFO: Processing hook hook-httplib
7441 INFO: Processing hook hook-email
7652 INFO: Processing hook hook-email.message
8235 WARNING: library python%s%s required via ctypes not found
8589 INFO: Processing hook hook-pydoc
8758 INFO: Analyzing b:\code\pyinstaller\PyInstaller\loader\pyi_importers.py
9270 INFO: Analyzing b:\code\pyinstaller\PyInstaller\loader\pyi_archive.py
9746 INFO: Analyzing b:\code\pyinstaller\PyInstaller\loader\pyi_carchive.py
10241 INFO: Analyzing b:\code\pyinstaller\PyInstaller\loader\pyi_os_path.py
10281 INFO: Analyzing apt.py
10879 INFO: Processing hook hook-distutils
11046 INFO: Hidden import 'encodings' has been found otherwise
11047 INFO: Looking for run-time hooks
11049 INFO: Analyzing rthook b:\code\pyinstaller\PyInstaller\loader\rthooks\pyi_rth_encodings.py
12412 INFO: Using Python library B:\o4w\bin\python27.dll
12550 INFO: Warnings written to ..\..\build\apt\warnapt.txt
12560 INFO: checking PYZ
12562 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
12562 INFO: building PYZ (ZlibArchive) out00-PYZ.toc
14092 INFO: checking PKG
14092 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
14092 INFO: building PKG (CArchive) out00-PKG.pkg
14136 INFO: checking EXE
14138 INFO: rebuilding out00-EXE.toc because apt.exe missing
14138 INFO: building EXE from out00-EXE.toc
14759 INFO: Appending archive to EXE ..\..\build\apt\apt.exe
15139 INFO: checking COLLECT
WARNING: The output directory "..\..\dist\apt" and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y
27506 INFO: Removing dir ..\..\dist\apt
27816 INFO: building COLLECT out00-COLLECT.toc

resultant files

B:\code\apt>dir b:\dist\apt
 Volume in drive B is Dropbox
 Volume Serial Number is 301C-BF3D

 Directory of b:\dist\apt

03/03/2015  02:52 PM    <DIR>          .
03/03/2015  02:52 PM    <DIR>          ..
03/03/2015  02:52 PM         1,479,175 apt.exe
03/03/2015  02:52 PM               470 apt.exe.manifest
06/04/2013  06:55 PM            33,792 bz2.pyd
03/03/2015  02:52 PM    <DIR>          include
26/11/2009  10:14 AM             1,857 Microsoft.VC90.CRT.manifest
26/11/2009  10:14 AM           224,768 msvcm90.dll
26/11/2009  10:14 AM           335,872 msvcp90.dll
26/11/2009  10:14 AM           252,928 msvcr90.dll
12/07/2005  05:50 PM           154,624 msvcrt.dll
06/04/2013  06:55 PM           858,112 python27.dll
27/02/2011  07:13 AM            52,736 pywintypes27.dll
06/04/2013  06:55 PM             9,216 select.pyd
06/04/2013  06:55 PM           181,248 unicodedata.pyd
20/11/2010  04:08 AM           571,392 user32.dll
26/02/2011  09:00 AM            33,280 win32api.pyd
26/02/2011  08:59 AM            11,776 win32evtlog.pyd
06/04/2013  06:55 PM            36,352 _ctypes.pyd
06/04/2013  06:55 PM           133,120 _hashlib.pyd
06/04/2013  06:55 PM            21,504 _socket.pyd
06/04/2013  06:58 PM           329,216 _ssl.pyd
              19 File(s)      4,721,438 bytes
               3 Dir(s)   5,453,996,032 bytes free
maphew commented 9 years ago

here's my note-to-self from last November:

Seem to have lost all my notes on creating apt.exe, so here goes again. ... Oh. that's why no notes, it's just pyinstaller --onefile apt.py

This is for making the .exe which goes into the package on osgeo.

amr66 commented 9 years ago

Thank you very much, i'll try. Never used pyinstaller before, do i need both steps or just the last one?

maphew commented 9 years ago

No, just use one or the other. --onefile is to stuff all the extra DLL's inside the .exe, while the default is to put them alongside, in the dist folder.

I'm not very pyinstaller knowledgeable, I pretty much just installed and said "do it". :-) On 4 Mar 2015 05:10, "Andreas" notifications@github.com wrote:

Thank you very much, i'll try. Never used pyinstaller before, do i need both steps or just the last one?

— Reply to this email directly or view it on GitHub https://github.com/maphew/apt/issues/20#issuecomment-77154656.

maphew commented 9 years ago

Moved to apps folder round about 27e4da1f92e5f7ead3bce4ae313351001bbd959b. Still some testing to do before pushing to final and closing. Also see mailing list announcement of test release http://lists.osgeo.org/pipermail/osgeo4w-dev/2015-March/002887.html