Create BOM (bill-of-material) file on Windows - windows

I have to create (or rather modify) software package for MacOSX on Windows. I can do what I need with .pax files, so the only thing left is bill-of-material.
Does anyone know of a library that can do it? Is there BOM file format (Apple-version) available?
TIA

There is now an open source version of mkbom which also compiles for windows at:
http://hogliux.github.io/bomutils/
The windows version still contains some bugs (no special characters in file names and limitations on file path length). However, it should work for simple installers.
The website also has an easy to follow step-by-step tutorial on how to create a Mac OS X installer (however, the tutorial is for linux, see http://hogliux.github.io/bomutils/tutorial.html ).

Well, BOM is not necessary, MacOSX package is a simple directory structure with optional elements, BOM being one of them.

Related

How to install CBC for Pyomo locally on Windows machine?

My goal is to connect the open-source CBC solver with Pyomo in Spyder. I am working on a Windows 10 machine and it is not an option for me to use the NEOS server due to company policy.
I have downloaded the binaries from Bintray (https://bintray.com/coin-or/download/Cbc#files) that include a cbc.exe file. However when trying to run it, several errors come up stating that I am missing files (among other libbz2-1.dll and zlib1.dll). I do not know much about linux or software development but after a lot of time on google I understand that these are used for unpacking data among other things. I found all files except zlib1.dll in a developer chat on the same subject and zlib1.dll I found on another page. However when running I now get the error: “The application was unable to start correctly (0xc000007b).
I have also tried downloading MSYS2 MinGW and followed instructions from CBC. I don’t know if I require this or if it is only for developers.
Can anyone tell me what to do? I suspect other people than myself want to use CBC in Pyomo as an alternative to GLPK.
If you already have the .exe file, make sure it is in your current working folder (set as the working directory in Spyder, simply opening your file is not enough) and call it using the SolveFactory function:
opt = SolverFactory("cbc.exe")
results = opt.solve(model)
It works for me.
You will find some general information here where i outlined some approaches.
While this was targeted at Clp, it also applies to Cbc.
It's a bit strange as i observed too, that some libs are not statically linked (zlib) while it's certainly doable. But as mentioned in the thread, this should not be the case anymore (see the restriction about which files are fully statically linked) and therefore your observation is strange (and you did not say, which file you downloaded).
So i would trying one of the following (in this order):
Try again with your source, but stick to the master-versions (see first link) as the maintainer only guaranteed fully-static builds for those!
Use the builds from AMPL
(tested and works for me; generally recommended in terms of quality/stability of builds)
Use the builds from coin-or/pulp, another modelling-tool for python
(tested and works for me)
Compile from source using mingw64
(Use any build and provide some external dll of zlib and co -> hard to debug)
Of course i completely ignored other potential issues:
license-stuff (what's part of those builds)
not sure if a company can afford to use binaries not build themself in regards to legal stuff
version-compatibility with python
does every version of Cbc work
cbc version + configuration
modern version
compiled with multi-threading
...

Versioning Binaries on OSX

I have a C program that I build using Makefiles on OS X and I'd like to add the version/build number so that it is included in any crash reports. How can this be done without putting the binary as part of an app bundle?
As you may have realised, the standard OSX method is to create a bundle and add the version in the Info.plist and there isn't the usual attributes available within the binary executable, as you'd find in Windows.
Many terminal apps will allow you to discover their version with a -v option, but this is usuallly just a function returning the version number.
If you want to add meta data without hard coding it, you could use the extended file attributes to store the version number, which you can read, write and view with the xattr command.

qt lrelease windows binary?

can someone give a link to lrelease binary for windows?
I can't seem to find it everywhere.
I have a server app that translates the ui dynamically via web translate engine (like google translate) and translates the entries in the .ts file. Now I need to generate a .qm from .ts and return it to the client.
So I need to put the lrelease utility on the server. Don't want to install the whole qt framework. Just the .exe and maybe some depending .dll-s.
// UPDATE
Thanks for replies. I managed to get it working in Windows.
Same question, but looking for Linux (Ubuntu) binary.
How can I check just lrelease dependencies.
I know it is in the qt4-dev-tools package, but it depends on almost whole Qt.
So is there any way to check only the lrelease dependencies?
You could download e.g. [QT for VS 2008][1], install it on some machine and copy lrelease and the required DLLs (I'd assume QtCore and QtXml) from there to the server. I don't think you'll find up-to-date standalone binaries on the net.

pygtk import gtk error

I downloaded everything described as in pygtk for installation. Everything went fine until when I tried to type "import gtk", it threw an ImportError as follows:
from gtk import _gtk
ImportError: DLL load failed: ...(something unreadable)
Then I re-install the pygtk-2.22.0 again, the same problem existed. So what to do please? Thanks in advance!
The error you describe is usually caused by the python bindings (pygtk/pygobject/pycairo) being unable to load a dll it needs to function properly. Most of those errors are either caused by:
the GTK+ runtime not being on your PATH environment variable. This has long been
the advice on how to get pygtk working on Windows. Please don't change your user
or system PATH environment variable, it is no longer needed with the all-in-one
installer.
multiple GTK+ runtime versions are on your PATH environment variable and the first
(leftmost) one is not compatible with the pygtk/pygobject/pycairo versions you use.
This is why adding the GTK+ runtime to your PATH environment variable is a bad idea:
it is easy to mix up versions (sometimes GTK+ related installers add their bin
directory to PATH on installation which contains an older or incomplete runtime).
a rare case where some software package installed libintl.dll and iconv.dll into
%WINDIR%\system or %WINDIR%\sytem32
The most straightforward way to avoid the dll hell described above is to use the
PyGTK All-in-one installer (http://download.gnome.org/binaries/win32/pygtk/2.22/).
It contains both the Python bindings, the GTK+ runtime and even Glade and does
no longer require you to change the PATH environment variable.
Small warning: if you decide to use the all-in-one installer, you'll have to uninstall
the separate pygtk/pygobject/pycairo packages you've used before (or you'll be in
a world of trouble...)
read the source code, perhaps there is a need for a specific version of pygtk
edit the source code to work with your pygtk version
I had this issue as well. You didn't mention for sure in your answer, so I'll suggest the obvious (well...the obvious to people that have used it a while, perhaps). Did you use the following three lines of code to import? You have to use these, in order, to import PyGTK.
I'm assuming your version here is 2.24 like mine. If not, change it to the version you have.
import pygtk
pygtk.require('2.24')
import gtk
That should suffice in importing gtk.
Problem
As others have noted, don't put gtk in the path. I know, its tempting, and it works for XYZ, but it (to say the least) gets confusing. Dependency hell is bad enough on a platform like Linux which tries to make it easy for you.
For clarification, what the PyGTK All In One does for you is to install (what appears to be) a full gtk+ runtime directly in your python packages folder, so e.g. in C:\Python\Lib\site-packages\gtk-2.0\runtime
Solution
NOTE: %YOURPYTHONPATH% is an EXAMPLE variable which contains the path of your Python installation (e.g. C:\Python, or C:\Python27, or whatever it actually is). I suggest setting %PYTHON_DIR% or %PYTHON_PATH% if you want to use a variable to do this, as more programs are likely to use this.
To get your XYZ program requiring GTK to work, add %YOURPYTHONPATH%\Lib\site-packages\gtk-2.0\runtime\bin to the PATH when running your program; the correct versions of the DLLs it needs to link against are in that folder. All other GTK+ runtimes I had installed (GTK+/GTK2-Runetime) gave me errors.
Again; Do not attempt to set a user or system level variable (don't open up the dialog pictured below) as this will likely cause problems for you later unless you VERY sure you know what you are doing. If you are reading this, you most likely don't know as much as you think you do. Instead, alter the path in a cmd prompt, or use a batch/script file to set it up for you.
After you install the pygtk.org package, install each of these in the following order:
pycairo-1.8.6.win32-py2.6.exe
pygobject-2.20.0.win32-py2.6.exe
pygtk-2.16.0+glade.win32-py2.6.exe
gtk+-bundle_2.16.6-20100912_win32.zip
For more information:
http://freetstar.com/windows7-pygtk-gtk/
I got the secusses according the link on my PC.

Qt4 Program Crashing Unless SDK Installed

I've written a Open Source program that I've released as GPL built using the Qt4 LGPL SDK. This program has the ability to search an optional Sqlite3 database for data.
Here is what is making me lose my mind. I compile the program on the development machine. When I try to run it, I can errors about missing DLLs. I copy those dlls into the same directory as the executable and it now works fine ( mingwm10.dll, libgcc_s_dw2-1.dll, QtCore4.dll, QtSql4.dll, QtGui4.dll ), including the database search.
Now, if I copy that folder with the executable and the DLLs to a new machine that has not had the SDK installed on it, it runs fine until I try to search. As soon as I hit the search button, I can the following error:
Title: Microsoft Visual C++ Runtime Library
Runtime Error!
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I then download and install the SDK, doing nothing else, I can now run the program and search the sqlite3 file just fine!
What magic am I missing?
P.S. Both machines are freshly installed Windows XP systems.
You may have some libs or Qt plugins that are not deployed to the target machine. It most likely is the SQL driver plugin. Here's some info about it: http://doc.trolltech.com/latest/deployment-windows.html#qt-plugins
You'll need to copy the needed Qt plugins to a directory next to your executable. And add something like this in your main():
QApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins");
(Edited link and added code)
I found the problem.
Stephen Chu was correct in that I was missing the sqlite driver. However, I can into more complications along the way.
The SDK comes with two sets of dlls. One set resides in $BASEDIR/bin and the other in $BASEDIR/qt/bin. The former contains the dlls used by Qt Creator, while the latter are the dlls that you want to ship with your executable.
I needed to take the sqlite plugin ( qsqlite4.dll ) and copy it to APP_DIR/sqlplugins. My problem was I was using the wrong qsqlite4.dll file.
A big thanks to everyone who contributed to this question.
For future reference, this issue was also discussed here: http://www.qtforum.org/article/34639/qt4-program-crashing-unless-sdk-installed.html

Resources