I have no development experience in Qt/KDE and Python, but I know Windows CE development using Visual Studio for mobile platforms. My requirement is to build the open object client https://launchpad.net/openobject-client-kde for Windows CE 5.2 devices.
I have downloaded the sources from http://sourceforge.net/p/ktiny/code/HEAD/tree/ but don't know what to do with it. I understood those source contains Python and Qt files.
Could someone please let me know how I can build/compile the downloaded sources? I am using Windows 8, and what are the SDK/IDE/Libs that are to be configured
Thanks in Advance
#nish
The source you downloaded does contain "Qt files" only in a sense. What it really has is various build scripts, C++ source files, .ui xml and .qml files for user interface generation. The C++ and .ui sources need to be run through code generators (moc and uic, respectively), to generate more C++ code.
"All" you do to get this code to work is to compile it using whatever build system it uses and link it with the Qt library.
The first step is to get a working Qt build for your target platform. You need to get to a point where you have the examples included with Qt running on your Windows CE 5.2 device. Until you get to that point, there's no reason whatosever to even look at the openproject files themselves. If you can't get bare Qt to work on your target, you're toast.
The second step is to figure out the dependencies of the openobject client project - does it really need KDE, and to what extent?
Thirdly, you have to acquire and build those dependencies, and make sure that they work on your target platform. For KDE, there's plenty of example applications that you can use to try things out.
Lastly, you'll get to build the openobject code itself.
Note that it's very likely that none of the projects you'll be building include any Visual Studio project files, so you'll be running all of the build using various commandline build tools.
It'll be, in fact, likely easiest to do the builds using Qt Creator rather than Visual Studio, since Visual Studio doesn't really support out-of-the-box any build systems other than its own. Note that Visual Studio has two main components: the IDE, and the compilers with requisite runtime libraries. You don't need to use the former to use the latter.
As-is, though, your question is way too broad and you'll need to come back and ask separate questions as you run into individual problems.
Related
I'm working on an app, it's in the final stages of development, and I want to help design an installation interface for it, can anyone guide me?
This question largely depends on how thorough you want your installer to be, since installing a program basically translates to embed this complex piece of software on my pc for me to use hassle-free. To make a common one click installer, it will be a long process that is explained better here. I wont get too deep into this because there's many builders and tools that do the heavy lifting and simplify this process significantly. Just an example anyways, these can be built in Visual Studio and are formatted as .msi or .exe, or packaged up as self-extracting in InstallSheild. On a side note mac/linux installations work very differently. This is for Windows only!
If you are leaning towards making a much more indie-friendly installer that just moves a file to a location, a simple Windows VB program that is ran with admin privileges would do the trick. Simply fetch some files from a http source to a location on your computer, and VB supports a lot of very nice GUI elements to guide the user through the process.
As ironic as this sounds, you could even make the downloader in python and bundle that as an exe installer. It could utilize PyQT5, or just stay plain-jane command line and spit out the log as it executes.
At the end of the day, a bare-bones method would just be to host your application through a github repo and have clients git clone, or add your code to pypi.
I currently work on a Python project, which I'd like to upload to the Microsoft Store in the future.
As far as I am aware, in order to upload applications to the Microsoft Store, it is necessary that the application will be packed into the MSIX format.
Now the question is - is it possible to pack a Python project into the MSIX format?
I already tried two possible approaches
The first approach
I assumed that it will be much easier to pack an .exe file into an MSIX package. Since .py files require an interpreter in order to run, I managed to freeze the Python project into a standalone .exe runnable file - and it works pretty good.
I found a useful tool made by Microsoft, which is supposed to pack .exe files under the MSIX format. The tool is MSIX Packaging Tool which is available at the Microsoft Store. I did manage to create an .msix file but I can't run in since Windows says that I have to sign the .exe first.
The second approach
I found out that it is possible to pack a project into an MSIX package, by using built-in tools inside Visual Studio 2019. So I managed to move my whole python project into Visual Studio, and follow the next steps in order to pack my project.
The problem is that already in the early stages, when adding the reference to my python project, the next error occurs:
I'd love to know if you have any other possible approaches for packing a Python project into an MSIX package.
I've downloaded the python 3.6.6 source from here...
https://www.python.org/downloads/release/python-366/
...and followed the instruction on how to build on Windows (run ../PCbuild/build.bat). Python compiles and seems to be working (funny and scary: while fetching externals, it actually downloads python-3.7.0 as a dependency... :/ ). However, it looks like the build is somehow 'in place', and the binaries end up in some sub-folder of the source (../PCbuild/amd64/python.exe). This means I'm left with source and compiled code mixed up instead of some clean/lean and deployable package.
can I somehow provide '--prefix=/target/build/path' to define a target location to build to, like I would on linux?
is there a way of removing all src files/folders and leave only the required files/folders (../lib, ../include, etc...).
Or in general, is there a way of making the build process more behave like on linux?
Thanks for your help,
Max
The build.bat from PCBuild is intended for developers, that is, for testing purposes. What you want is under \Tools\msi\buildrelease.bat. This creates a subdirectory under \PCBuild\ that places all msi, cab and exe files ready for later installation. According to the readme, there doesn't seem to be an option to pack all those files in a single .exe file, like all installers eventually do, but another option is under \Tools\msi\build.bat which does have an option for packing (namely build.bat --pack). "But", the readme does state that the buildrelease.bat should be used for an official release. The advantage of doing so is that Pyhton would be optimized using PGO to your own hardware. I am also trying to compile from source using this method but I am having an issue with a recurring error (and other ones):
PGO run did not succeed (no python36!*.pgc files) and there is no data to merge [E:\RepoGiT\3.6\PCbuild\pythoncore.vcxproj]
so, if you do go this route, and find this, or other errors, please send the bug report to python's bug tracker webpage. And better yet, if you find errors and their solution, please report back here!
I am wondering how to intelligently manage the building and installation for some of our 3rd party C++ dependencies on Linux(Ubuntu). The way I currently have it set up is a git-lfs with all the necessary compressed 3rd party sources. I then use a shell script I wrote to install all the necessary system dependencies and then unzip and build the desired library. This shell script also takes care setting up all the paths so that our source code can easily link to the 3rd party libraries.
Example commands for our script are ./install opencv or ./install everything
However, over the months the script has gotten quite large and breaks sometimes when certain libraries are already installed or other minor issues. Thus I would like to replace it with something a bit more intelligent and useful. I have currently been looking into writing some kind of python script, but just changing the language from shell to python is not that big of an advantage. So I am looking if there are any specific python libraries that can help me with managing these libraries.
I have looked into things like chef and other automated builds stuff, but that is overkill for the small project I am working on.
I was wondering what other people used for this 3rd party management stuff, as sadly C++ does not have anything like pip.
I use jhbuild for this kind of thing (if I understand what you are doing correctly). It came out of the GNOME project (they use it to build the whole desktop from source), but it's easy to customize for any set of projects. The jhbuild packaged in recent Ubuntus works fine.
You write a little XML to describe each project: where to download the sources, what patches to apply, what configure flags to use, what projects it depends on, and so on; then when you enter jhbuild build mything it works out what to build and in what order and gets on with it. It's reasonably smart about changes, so if you edit a source file in one of the projects that makes up your stack, it'll only rebuild the affected parts.
For example, I have this for fftw3, the excellent fast Fourier transform library:
<autotools id="fftw3"
autogen-sh="configure"
autogenargs="--disable-static --enable-shared --disable-threads"
>
<branch
repo="fftw"
module="fftw-3.3.4.tar.gz"
/>
<dependencies>
<dep package="libiconv"/>
</dependencies>
</autotools>
With probably obvious meanings. That's building from a release tarball, but it can build from git as well. It's happy with cmake projects. jhbuild is written in Python, so it's simple to customize. Thanks to GNOME, many common libraries are included.
I actually use it to build Windows binaries. You can set it up to build everything with a cross-compiler, then put it inside Docker. It makes it a one-liner for anyone to be able to build a large and complex application on (almost) any platform. You can use it to do automated nightly builds as well, of course.
There are probably better things around, but it has worked well for me.
I'm testing different languages to developp a desktop application for Mac&Windows.
I thought that Python+Wx worth a try so I wrote a simple hello world.
Then, I tried the py2app to package my application as a Mac application.
What a surprise to find that my hellworld.app weight as much as 75 MB !! (then I have an error at runtime but that's not the question)
Here is my question : is there a way to distribute a standalone wxPython application that weight less than a few MB ? (for instance, an adress book app).
(a Swing HelloWorld is around 3KB, plus around 20MB for the JRE)
Thank you
I would highly remmoend you using PyINstaller, which can be found here: link
it works like a chamr for me so far and it support most of the major libraries:
wxpython pyqt and even django (although i dont really understand the whole django support thing ;-) )
PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X. Its main advantages over similar tools are that PyInstaller works with any version of Python since 2.2, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility.
The main goal of PyInstaller is to be compatible with 3rd-party packages out-of-the-box. This means that, with PyInstaller, all the required tricks to make external packages work are already integrated within PyInstaller itself so that there is no user intervention required. You'll never be required to look for tricks in wikis and apply custom modification to your files or your setup scripts. As an example, libraries like PyQt, Django or matplotlib are fully supported, without having to handle plugins or external data files manually. Check our compatibility list of SupportedPackages.
i hope this helps, good luck and tell if you need anymore help