Size: 1729
Comment: additional datafiles
|
Size: 686
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Question = I got inspired by an article in [http://www.xmldatabases.org/WK/blog/1094?t=item Inspirational Technology] and added some configuration-option to the software as an XML-File. In times before I just did a {{{copy \develeopment\somefile.ini \distribuiton\somefile.ini }}} after runing Py2Exe. But after combining Py2Exe with Innosetup, it was really crucial to get these files copied to the Py2Exe dist-Directory during the Py2Exe Buildrun. = Solution = It was present all times in Py2Exe. But I did not really understand how to use it :))) {{{ #!python setup( options = options, # The lib directory contains everything except the executables and the python dll. zipfile = zipfile, windows = [wxprog], # use out build_installer class as extended py2exe build command cmdclass = {"py2exe": build_installer}, packages = ["encodings"], data_files=[("prog",["kategorien.xml",])] ) }}} The crucial line is {{{ #!python data_files=[ ("prog",["kategorien.xml",])] }}} here you are supposed to supply a list of tuples. [ (,), (,), ...] Each tuple {{{ ("directoy",["list.txt", "of.txt", "files.txt) }}} consists of 2 Elements: 1 the subdirctory of the dist-base directory, where the files are copied to 1 a list of files, which are supposed to be copied there So in my example I have some configuration data in {{{ kategorien.xml }}} and want to get this file copied to the program-directory. (Maybe that is bad style and whe should put it within \documents and settings\currentuser\ApplicationSettings\MyCompany\MyProduct\MySettings.XML, but for distribution WITHIN one company I want to be able to support filepaths by phone :-)) ) |
[[HTML(<iframe src="https://www.ustream.tv/embed/10526595" width="480" height="480"></iframe>)]]Friends call her Vonnie and her husband doesn't like it at a lot of. For a while he's experienced Utah and when he will never move. The favorite hobby for my children and me is body building but I struggle to find time so as. Data processing exactly what he does in his day job role. If you want to get the full story check out his website: http://www.streamingsmile.com/profile.php?u=[[http://www.telegraph.Co.uk/search/?queryText=AmeePressu|AmeePressu]]<<BR>><<BR>> <<BR>><<BR>> Take a look at my website - [[http://www.streamingsmile.com/profile.php?u=AmeePressu|gas furnace repair]] |
HTML(<iframe src="https://www.ustream.tv/embed/10526595" width="480" height="480"></iframe>)Friends call her Vonnie and her husband doesn't like it at a lot of. For a while he's experienced Utah and when he will never move. The favorite hobby for my children and me is body building but I struggle to find time so as. Data processing exactly what he does in his day job role. If you want to get the full story check out his website: http://www.streamingsmile.com/profile.php?u=[[http://www.telegraph.Co.uk/search/?queryText=AmeePressu|AmeePressu]]<<BR>><<BR>>
Take a look at my website - gas furnace repair