<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3799551646171976020</id><updated>2018-03-07T03:17:53.439+01:00</updated><category term="CMake"/><category term="Opensource"/><category term="QT4"/><category term="NSIS"/><category term="QT"/><category term="qmake"/><category term="C++"/><category term="DEB"/><category term="DMG"/><category term="Disk Utility"/><category term="Installation"/><category term="Installationpackage"/><category term="JAVA"/><category term="LRELEASE"/><category term="MINGW"/><category term="Mac"/><category term="OS X"/><category term="Packages"/><category term="QM"/><category term="RCC"/><category term="RPM"/><category term="Skript"/><category term="TGZ"/><category term="Xcode"/><category term="ZIP"/><category term="cd"/><category term="hdiutil"/><category term="ln"/><category term="ls"/><category term="xcodebuild"/><title type='text'>Jürgen&#39;s english blog</title><subtitle type='html'>In my blog my experiences and experiments with QT, Java, and some goes with it are passed.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3799551646171976020.post-5141855954296104400</id><published>2013-07-10T18:51:00.002+02:00</published><updated>2013-07-10T19:19:02.068+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cd"/><category scheme="http://www.blogger.com/atom/ns#" term="Disk Utility"/><category scheme="http://www.blogger.com/atom/ns#" term="DMG"/><category scheme="http://www.blogger.com/atom/ns#" term="hdiutil"/><category scheme="http://www.blogger.com/atom/ns#" term="Installation"/><category scheme="http://www.blogger.com/atom/ns#" term="Installationpackage"/><category scheme="http://www.blogger.com/atom/ns#" term="ln"/><category scheme="http://www.blogger.com/atom/ns#" term="ls"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="OS X"/><category scheme="http://www.blogger.com/atom/ns#" term="Packages"/><category scheme="http://www.blogger.com/atom/ns#" term="Xcode"/><category scheme="http://www.blogger.com/atom/ns#" term="xcodebuild"/><title type='text'>Create OS X Installationpackage</title><content type='html'>For users, it is always pleasant to have an installation package. That&#39;s always a better feeling than to copy anything anywhere.&lt;br /&gt;Typically, the programs for the Mac DMG offered. In these disk images then the APPS are hidden. The installation of the program is then quite simple. Grab the program icon with the left mouse button and release folder on the program. Thus, the application is copied into the program directory, and can be started from there immediately. In many of the DMG&#39;s also a shortcut to the program directory is in addition to the programs available.&lt;br /&gt;So if you yourself write programs you just have to create a disk image, and this can make available for download. This is pretty easy.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Here are the instructions&amp;nbsp;&lt;/h2&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&amp;nbsp;&lt;b&gt;Create a disk image.&lt;/b&gt;&lt;br /&gt;This can be most easily accomplished with the GUI tool &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Disk Utility&lt;/span&gt;&quot; from the &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Utilities&lt;/span&gt;&quot; folder. Just start this program and select from the toolbar &quot;New Image&quot; ... Alternatively, the image with the command line tool to &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html&quot; target=&quot;_blank&quot;&gt;hdiutil&lt;/a&gt;&lt;/span&gt;&quot; generated. In the open terminal the command &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;hdiutil create-size 10m / tmp / tmp.dmg-ov-fs HFS +&lt;/span&gt;&quot; creates a new image with the name &quot;tmp.dmg&quot; in the &quot;/ tmp&quot; folder. The maximum size is 10 MB in this example.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Mount the image (click on it)&lt;/b&gt;&lt;br /&gt;This sounds complicated but is easy. Here I assume the image is in the &quot;/ tmp&quot; folder. Switch to the Finder &quot;Go&quot; in the &quot;/ tmp&quot; folder and open it with a double click the disk image. As a result, the drive icon appears on the desktop and can be selected directly in the Finder window.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Can generate an install with Xcode.&lt;/b&gt;&lt;br /&gt;Xcode also has a command line tool. This is needed now. With &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html&quot; target=&quot;_blank&quot;&gt;xcodebuild&lt;/a&gt;&lt;/span&gt;&quot; We now produce a version intended for installation of our project. For this we need the terminal and have to switch to the directory in which our project is at home. With the command &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;xcodebuild clean install&lt;/span&gt;&quot; we clean up first, and then we performed a new complete build. But this time the result does not end up in the deep of the Library directory but in &quot;/ tmp&quot;. Since we are already in the Finder. A new directory was created by calling xcodebuild here. This directory has the name of the project with the accompanying notes. &quot;.dst&quot;. In this directory we find our files needed for the next step.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Copy the program to the image.&lt;/b&gt;&lt;br /&gt;In the above directory is a subfolder exists. This has the not very surprising name &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Applications&lt;/span&gt;&quot;. Everything that is found here must be copied to the new disk image. Additionally could here a version history and license information to land.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Create a symbolic link to the program directory.&lt;/b&gt;&lt;br /&gt;Since we want to design the processes for our users as easy as possible we have a link to the applications directory. Now we come but without the command line does not continue. First of all we have to switch to the disk image. Since working with the command &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;http://unixhelp.ed.ac.uk/CGI/man-cgi?cd&quot; target=&quot;_blank&quot;&gt;cd&lt;/a&gt; /Volumes/&amp;lt; name of the drive&amp;gt;&lt;/span&gt;&quot;. Since we did not assign a name that is in us &quot;untitled&quot;. Now we can produce short and crisp the symlink. For this, we give in the command line: &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;http://unixhelp.ed.ac.uk/CGI/man-cgi?ln&quot; target=&quot;_blank&quot;&gt;ln&lt;/a&gt; -s /Applications Applications&lt;/span&gt;&quot; a.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Copy the project directory&lt;/b&gt;&lt;br /&gt;Everything &quot;/ tmp&quot; directory is where lives only until the next reboot. Therefore, we need to copy our new plant as the last step in the project directory or even different directory of our choice.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Completion &lt;/b&gt;&lt;br /&gt;That was all. Now we have produced a finished professional looking package for installation of our program. This package we can spread nicely.&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/5141855954296104400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jmuelbert-en.blogspot.com/2013/07/create-os-x-installationpackage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/5141855954296104400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/5141855954296104400'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/2013/07/create-os-x-installationpackage.html' title='Create OS X Installationpackage'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3799551646171976020.post-8779099434683769535</id><published>2011-07-05T20:56:00.000+02:00</published><updated>2013-12-14T19:15:08.366+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="NSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Opensource"/><category scheme="http://www.blogger.com/atom/ns#" term="QT"/><category scheme="http://www.blogger.com/atom/ns#" term="QT4"/><title type='text'>NSIS Installer for QT Projects</title><content type='html'>Hello,&lt;br /&gt;as I promised in the last post, this time I&#39;m on the subject of intense &lt;a href=&quot;http://nsis.sourceforge.net/Main_Page&quot; target=&quot;_blank&quot; title=&quot;NSIS&quot;&gt; NSIS &lt;/a&gt; Installer one. The &lt;a href=&quot;http://nsis.sourceforge.net/Main_Page&quot; target=&quot;_blank&quot; title=&quot;NSIS&quot;&gt; NSIS &lt;/a&gt; (Nullsoft Scriptable Install System) is very highly configurable and therefore can &lt;a href=&quot;http://de.wikipedia.org/wiki/Skriptsprache&quot; target=&quot;_blank&quot; title=&quot;scripts&quot;&gt; script &lt;/a&gt; are great. I occupied myself with this issue now and wrote a first script, with input from existing install scripts aimed at facilitating the creation of Setup.exe.&lt;br /&gt;That&#39;s what I tried to reach where I work at the beginning of this script with a lot of variables. But enough of introduction, here is the script with the appropriate explanations.&lt;br /&gt;The installer is back for the address book example of &lt;a href=&quot;http://de.wikipedia.org/wiki/Qt_%28Bibliothek%29&quot; target=&quot;_blank&quot; title=&quot;QT&quot;&gt;Qt&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;!Define PRODUCT_NAME &quot;AddressBook sample&quot;&lt;br /&gt;Name &quot;$ {PRODUCT_NAME}&quot;&lt;br /&gt;!Define EXE_NAME &quot;part2.exe&quot;&lt;br /&gt;!Define PRODUCT_VERSION &quot;0.2&quot;&lt;br /&gt;!Define VER_MAJOR 0&lt;br /&gt;!Define VER_MINOR 2&lt;br /&gt;!Define VER_REVISION 2&lt;br /&gt;!Define VER_BUILD 10&lt;br /&gt;!Define PRODUCT_PUBLISHER &quot;Jürgen Mülbert&quot;&lt;br /&gt;!Define PRODUCT_WEBSITE &lt;br /&gt;    &quot;http://www.juergen-muelbert.de&quot;&lt;br /&gt;!Define PRODUCT_SUPPORT_SITE &lt;br /&gt;    &quot;http://www.juergen-muelbert.de/support.html&quot;&lt;br /&gt;!Define PRODUCT_DIR_REGKEY &lt;br /&gt;    &quot;Software\Microsoft\Windows\CurrentVersion\&lt;br /&gt;     App Paths\${EXE_NAME}&quot;&lt;br /&gt;!Define PRODUCT_UNINST_KEY &lt;br /&gt;   &quot;Software\Microsoft\Windows\CurrentVersion\&lt;br /&gt;    Uninstall\${PRODUCT_NAME}&quot;&lt;br /&gt;! Define REG_KEY &quot;SOFTWARE\$(^Name)&quot;&lt;br /&gt;! Define HKLM INSTALL_ROOT_KEY&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt;Most of the definitions shown above are self-explanatory &lt;a href=&quot;http://de.wikipedia.org/wiki/Registrierungsdatenbank&quot; title=&quot;HKLM&quot;&gt; HKLM &lt;/a&gt; is the RegistryKey for the &quot;local machine&quot;. Otherwise your request ...&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;;--------------------------------&lt;br /&gt;; Configuration&lt;br /&gt;Caption &quot;$ {PRODUCT_NAME} $ {PRODUCT_VERSION} Setup&quot;&lt;br /&gt;branding text &quot;© Jürgen Mülbert&quot;&lt;br /&gt;!Ifdef OUTFILE&lt;br /&gt;OutFile &quot;$ {OUTFILE}&quot;&lt;br /&gt;!Else&lt;br /&gt;OutFile &lt;br /&gt;   ..\${PRODUCT_NAME}-${PRODUCT_VERSION}-setup.exe&lt;br /&gt;!Endif&lt;br /&gt;; Installer attributes&lt;br /&gt;InstallDir $PROGRAMFILES\${PRODUCT_NAME}&lt;br /&gt;InstallDirRegKey &lt;br /&gt;   ${INSTALL_ROOT_KEY} &quot;${PRODUCT_DIR_REGKEY}&quot; &quot;&quot;&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt;As seen here, in the above text is already used extensively to access the configuration defined constants. That runs through the entire file, as we shall see at the next example.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;;--------------------------------&lt;br /&gt;; Installer Sections&lt;br /&gt;Section! $(Secmain) secmain&lt;br /&gt;&lt;br /&gt;SetDetailsPrint TextOnly&lt;br /&gt;detailed print &quot;Installing $ {PRODUCT_NAME} core files ...&quot;&lt;br /&gt;SetDetailsPrint listonly&lt;br /&gt;SectionIn 1 2 3 RO&lt;br /&gt;SetShellVarContext all&lt;br /&gt;SetOutPath $ INSTDIR&lt;br /&gt;SetOverwrite on&lt;br /&gt;$ {File} EXE_NAME&lt;br /&gt;Changelog.txt file&lt;br /&gt;File libgcc_s_dw2-1.dll&lt;br /&gt;File mingwm10.dll&lt;br /&gt;File QtCore4.dll&lt;br /&gt;File QtGui4.dll&lt;br /&gt;File addressbook_de.qm&lt;br /&gt;&lt;br /&gt;WriteRegStr &lt;br /&gt;   ${INSTALL_ROOT_KEY} &quot;${REG_KEY}\Components&quot; sec_main 1&lt;br /&gt;SectionEnd&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt;Here is an example of the last main section is listed. In this section, all necessary components installed so the program can run at all. How beautiful is seen here appears as a variable of &lt;code&gt; PRODUCT_NAME &lt;/code&gt;. Although that is only used for the detail log, but still. The &lt;code&gt; INSTALLDIR &lt;/code&gt; is finally initialized with the &lt;code&gt; PRODUCT_NAME &lt;/code&gt; and the much earlier. Incidentally, the command &lt;code&gt; SetShellVarContext &lt;/code&gt; with the all option sets, the set this installation for all users of this computer implemented. &lt;code&gt; SetOverwrite on &lt;/code&gt; causes all existing files are overwritten by the files in the installation archive. The next variable is used &lt;code&gt; EXE_NAME &lt;/code&gt;, which simply contains the name of the executable program. The contents of the file &lt;code&gt; changelog.txt &lt;/code&gt; will be displayed after the installation:&lt;br /&gt;&lt;code&gt;!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt &lt;/code&gt;&lt;br /&gt;&lt;code&gt;!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt &lt;/code&gt;&lt;br /&gt;The &lt;a href=&quot;http://de.wikipedia.org/wiki/Dynamic_Link_Library&quot; target=&quot;_blank&quot; title=&quot;DLL&#39;s&quot;&gt; DLL&#39;s &lt;/a&gt; are required. These are the two &lt;a href=&quot;http://de.wikipedia.org/wiki/Dynamic_Link_Library&quot; target=&quot;_blank&quot; title=&quot;DLL&#39;s&quot;&gt; DLL&#39;s &lt;/a&gt; was compiled with the QT. Without the use Qt libraries, it would not work of course. At the end of the file list still stands, the translation file for the German text of the address book example. At the end of this section is not written in the &lt;a href=&quot;http://de.wikipedia.org/wiki/Registrierungsdatenbank&quot; target=&quot;_blank&quot; title=&quot;Windows-Registry&quot;&gt; Windows registry &lt;/a&gt; that the main components were installed.&lt;br /&gt;As I said the moves so through the entire script, which is seen to be fully compatible with &lt;a href=&quot;http://www.juergen-muelbert.de/de/projects/nsis/setup_0.2.nsi.html&quot;&gt; link &lt;/a&gt;. On my website there are now projects &lt;a de=&quot;&quot; href=&quot;&quot; http:=&quot;&quot; index.html=&quot;&quot; jmnsishelper=&quot;&quot; projects=&quot;&quot; www.juergen-muelbert.de=&quot;&quot;&gt; JMNSISHelper &lt;/a&gt; &lt;a href=&quot;http://www.juergen-muelbert.de/de/projects/nsis4java/index.html&quot;&gt; NSIS4Java &lt;/a&gt; about this topic.</content><link rel='replies' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/8779099434683769535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/07/nsis-installer-fur-qt-projekte.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/8779099434683769535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/8779099434683769535'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/07/nsis-installer-fur-qt-projekte.html' title='NSIS Installer for QT Projects'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3799551646171976020.post-4309887028988486408</id><published>2011-06-20T23:22:00.001+02:00</published><updated>2011-06-20T23:33:08.670+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CMake"/><category scheme="http://www.blogger.com/atom/ns#" term="MINGW"/><category scheme="http://www.blogger.com/atom/ns#" term="QT"/><category scheme="http://www.blogger.com/atom/ns#" term="QT4"/><category scheme="http://www.blogger.com/atom/ns#" term="Skript"/><title type='text'>QT and CMake</title><content type='html'>Dear Readers,&lt;br /&gt;&lt;br /&gt;I now after some experience with &lt;code&gt; C + + &lt;/code&gt; and &lt;a href=&quot;http://doc.trolltech.com/4.7/qmake-manual.html&quot;&gt; &lt;code&gt; qmake &lt;/code&gt; &lt;/a&gt;have made I want to tell you about something new. I create the theme of trying out the programs &lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; to address visibility. I always like to try something new. But it is really in this case so &lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; is better and has other advantages over &lt;a href = &quot;http://doc.trolltech.com/4.7/qmake-manual.html&quot;&gt; &lt;code&gt; qmake &lt;/code&gt; &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; is not only suitable for QT.&lt;br /&gt;&lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; also includes support for installers.&lt;br /&gt;&lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; finds support from the system-installed packages and scripting languages.&lt;br /&gt;&lt;br /&gt;Of course, even a little shade is available. Such a package can not only shine. However, the shortcomings I have found and over which I stumbled at the start&#39;m not caused by CMake. The problem lies in the Windows version of QT GPL package. In this version is a &lt;code&gt; &quot;mingw32-make&quot; &lt;/code&gt; with the &lt;a href=&quot;http://www.cmake.org/&quot;&gt; &lt;code&gt; CMake &lt;/code&gt; &lt;/a&gt; does not work. Who wants it exactly as I try to QT-Windows with CMake must first addition to the &lt;a href=&quot;http://www.mingw.org/&quot;&gt; &lt;code&gt; MINGW &lt;/code&gt; &lt;/a&gt; in the current install version. The newly installed version will work fine.&lt;br /&gt;To simplify the construction of a new program it puts you on the best one on the BATCH file that sets environment variables. The alternative would be to add work to the appropriate paths in PATH. I have only &lt;br /&gt;&lt;pre&gt;&lt;code&gt; &quot;C:\MinGW\ bin&quot; &lt;/code&gt; &lt;/pre&gt;is registered to the GUI version of CMake also the compiler. The remaining paths are set in a script that I &lt;code&gt; &lt;pre&gt;&quot;CMakeShell.bat&quot; &lt;/pre&gt;&lt;/code&gt;. It is not the most creative name, but he hits it exactly. This file contains the paths to the QT directory to the MinGW directory and the directory will be set CMake. Anyone can file this simple little need to expand:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt; echo Setting up a MinGW / Qt only environment ...&lt;br /&gt;set QTDIR = C:\Qt\2010.05\qt&lt;br /&gt;set CMAKEDIR = &quot;C:\Program Files\CMake 2.8&quot;&lt;br /&gt;set MINGWDIR = C:\MinGW&lt;br /&gt;set PATH = %PATH%;C:\Qt\2010.05\&lt;br /&gt;set PATH =%PATH%;%QTDIR%\bin;%MINGWDIR%\bin;%CMAKEDIR%\bin&lt;br /&gt;set PATH =%PATH%;%systemroot%\system32&lt;br /&gt;&lt;/Code&gt; &lt;/pre&gt;&lt;br /&gt;Now you must note that not only the batch script is executed directly. That would only cause the a DOS window for a moment on the screen shows only to disappear again. The trick here is to create a new shortcut. This link must then begin to target this: &lt;br /&gt;&lt;pre&gt;&lt;code&gt; &quot;C:\WINDOWS\system32\cmd.exe / K&quot; &lt;/code&gt; &lt;/pre&gt;. Directly after the space then follows the path to the batch script.&lt;br /&gt;&lt;br /&gt;So and now a lot of fun with testing CMake. I will write about this topic here a little too soon.</content><link rel='replies' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/4309887028988486408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/qt-and-cmake.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/4309887028988486408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/4309887028988486408'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/qt-and-cmake.html' title='QT and CMake'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3799551646171976020.post-784485121478877254</id><published>2011-06-20T23:16:00.002+02:00</published><updated>2011-06-20T23:24:03.429+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CMake"/><category scheme="http://www.blogger.com/atom/ns#" term="DEB"/><category scheme="http://www.blogger.com/atom/ns#" term="NSIS"/><category scheme="http://www.blogger.com/atom/ns#" term="Opensource"/><category scheme="http://www.blogger.com/atom/ns#" term="qmake"/><category scheme="http://www.blogger.com/atom/ns#" term="RPM"/><category scheme="http://www.blogger.com/atom/ns#" term="TGZ"/><category scheme="http://www.blogger.com/atom/ns#" term="ZIP"/><title type='text'>CMake for packages</title><content type='html'>&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;Hi, &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;As already described in previous entries &lt;a href=&quot;http://www.cmake.org/&quot; target=&quot;_blank&quot; title=&quot;CMake&quot;&gt; CMake &lt;/a&gt; is very versatile. Unlike &lt;a href=&quot;http://doc.qt.nokia.com/latest/qmake-manual.html&quot; qmake=&quot;&quot; target=&quot;_blank&quot; title=&quot;QMake&quot;&gt; &lt;/a&gt; it can be used for all types use of projects. It is not tied to an environment. &lt;/span&gt;&lt;br /&gt;&lt;h1&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;CPack &lt;/span&gt;&lt;/h1&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;As an additional feature, the developers have even integretad a package builder. With this, in the normal range of programs is included, additional module you can simply grab the current project. As might be expected to provide &lt;a href=&quot;http://www.cmake.org/&quot; target=&quot;_blank&quot; title=&quot;CMake&quot;&gt; CMake &lt;/a&gt; are many targets for different environments available. &lt;/span&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;Archive &lt;/span&gt;&lt;/h2&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;It can generate archives: &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt; TGZ - Tar with GnuZIP &lt;/span&gt;&lt;/li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;&lt;li&gt; STGZ - Selbstenpakendes TGZ &lt;/li&gt;&lt;li&gt; tbz2 - Tar BZip2 with (an archive is compressed, the better) &lt;/li&gt;&lt;li&gt; TZ - with Tar Compress &lt;/li&gt;? &lt;li&gt; ZIP - For the Windows environment. It must be installed 7Zip or WinZip. &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;Windows &lt;/span&gt;&lt;/h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;For the Windows environment is a &lt;a href=&quot;http://nsis.sourceforge.net/Main_Page&quot; nsis=&quot;&quot; target=&quot;_blank&quot; title=&quot;NSIS&quot;&gt; &lt;/a&gt; generator. Also can be generated for the &lt;a href=&quot;http://www.cygwin.com/&quot; target=&quot;_blank&quot; title=&quot;cygwin&quot;&gt; Cygwin &lt;/a&gt; Environment Binary and source packages. &lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;Mac &lt;/span&gt;&lt;/h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;For the OSX environment, these archives are generated: &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt; DragDrop &lt;/span&gt;&lt;/li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;&lt;li&gt; PackageMaker - PackageMaker must be installed &lt;/li&gt;. &lt;li&gt; OSXX11 - hdiutil must be installed &lt;/li&gt;. &lt;li&gt; bundle &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;Linux &lt;/span&gt;&lt;/h3&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;For Unix, both Debian (DEB), as well as RPM packages can be created. The complete description and its parameters are in the &lt;a href=&quot;http://www.itk.org/Wiki/CMake:Packaging_With_CPack&quot; target=&quot;_blank&quot; title=&quot;WIKI&quot;&gt; WIKI &lt;/a&gt; by CMake to find. &lt;/span&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;How it works &lt;/span&gt;&lt;/h2&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;But how this feature can be invoked? That&#39;s easy. The &lt;code&gt; CMakeLists.txt &lt;/code&gt; file must be added just one line. &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;&lt;code&gt; INCLUDE (CPack) &lt;/code&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;This is not only an additional text file named &lt;code&gt; CPackList.txt &lt;/code&gt; but also creates a new target in the &lt;code&gt; Makefile &lt;/code&gt;. Calling &lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;&lt;code&gt; make package &lt;/code&gt; &lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;en&quot;&gt;for the current environment is defined standard package generates. These options should be determined in the &lt;code&gt;CMakeLists.txt &lt;/code&gt; file. You can thereby specify according to the &lt;a href=&quot;http://www.cmake.org/&quot; target=&quot;_blank&quot; title=&quot;CMake&quot;&gt; CMake &lt;/a&gt; known as syntax, the system generates the packet. Moreover, even the variables are filled in even when you call:&lt;pre&gt;&lt;code&gt; cmake DCPACK_GENERATOR = DEB &lt;/code&gt; &lt;/pre&gt;would create a Debian package.This is all simply and easily by hand. &lt;i&gt; a warning but still &lt;/i&gt;. The emphasis here is really easy. Huge and complicated package, with this function of course does not generate too easy. Operate here, the package manager or the programmers understandably more effort. A simple example is &lt;a href=&quot;http://www.itk.org/Wiki/CMake/CPackExample&quot; target=&quot;_blank&quot; title=&quot;hier&quot;&gt; here &lt;/a&gt; to find. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/784485121478877254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/cmake-for-packages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/784485121478877254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/784485121478877254'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/cmake-for-packages.html' title='CMake for packages'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3799551646171976020.post-5818830050954825392</id><published>2011-06-18T00:33:00.000+02:00</published><updated>2011-06-18T11:19:04.113+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="CMake"/><category scheme="http://www.blogger.com/atom/ns#" term="LRELEASE"/><category scheme="http://www.blogger.com/atom/ns#" term="Opensource"/><category scheme="http://www.blogger.com/atom/ns#" term="QM"/><category scheme="http://www.blogger.com/atom/ns#" term="qmake"/><category scheme="http://www.blogger.com/atom/ns#" term="QT4"/><category scheme="http://www.blogger.com/atom/ns#" term="RCC"/><title type='text'>External or QT translations in the program</title><content type='html'>&lt;h2&gt;Alternatives &lt;/h2&gt;&lt;br /&gt;The &lt;a href=&quot;http://doc.qt.nokia.com/latest/index.html&quot;&gt; QT package &lt;/a&gt; offers two ways to integrate the translated text into the program.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Method 1 (like Linux) &lt;/h3&gt;&lt;br /&gt;In an external file. This file contains the localized strings. For each language a file is necessary. Typical is the collection of these files in the directory &lt;code&gt; translations &lt;/code&gt;. In the program, the file &lt;i&gt; main.cpp &lt;/i&gt; is the code:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;. &lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;QString locale = QLOCAL:: system (), name ();&lt;br /&gt;&lt;br /&gt;QTranslator translator;&lt;br /&gt;translator.load (QString (&quot;translations&quot; +&lt;br /&gt;QDir:: separator () +&lt;br /&gt;&quot;Jmnsishelper_&quot;) + locale);&lt;br /&gt;a.installTranslator (&amp;amp; translator);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;to the translation of the load required. The first line will be determined in what kind of a localization program currently is doing its job. The result is stored in the variable locale. This variable contains a string that &lt;i&gt; de for Germany is &lt;/i&gt;. This string is then appended to the filename. The newly formed string that contains the file name will now pass the class &lt;a href=&quot;http://doc.qt.nokia.com/latest/qtranslator.html&quot;&gt; QTranslator &lt;/a&gt;. The information contained in the library functions then take care of the rest&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Method 2 (Windows-like) &lt;/h2&gt;&lt;br /&gt;The second possibility is the translation available as a resource. This is with the &lt;a href=&quot;http://doc.qt.nokia.com/latest/linguist-manager.html#lrelease&quot;&gt; LRelease &lt;/a&gt; generated &lt;code&gt; m &lt;/code&gt; file required. This file is then converted to C + + code. This code is compiled and then linked with the other source code files for a program to be.&lt;br /&gt;&lt;br /&gt;Add the translations for a &lt;a href=&quot;http://doc.qt.nokia.com/latest/resources.html&quot;&gt; QRC &lt;/a&gt; file is needed:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;rcc&gt; &lt;qresource prefix=&quot;ts&quot;&gt;&lt;br /&gt;&lt;file&gt; jmnsishelper_de.qm &lt;br /&gt;&lt;file&gt; jmnsishelper_es.qm &lt;br /&gt;&lt;file&gt; jmnsishelper_it.qm &lt;br /&gt;&lt;file&gt; jmnsishelper_tr.qm &lt;br /&gt;&lt;/file&gt;&lt;/file&gt;&lt;/file&gt;&lt;/file&gt;&lt;/qresource&gt; &lt;/rcc&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The resource looks like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;static const unsigned char &lt;code&gt; qt_resource_data [] = {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;/code&gt; &lt;code&gt; 0x0, 0x0, 0xa, 0x55, &lt;/code&gt;&lt;br /&gt;&lt;code&gt; 0x3c, &lt;/code&gt;&lt;br /&gt;&lt;code&gt; 0xB8, 0x64, 0x18, 0xCA, 0xEF, 0x9c, 0x95, ...&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;because they have always dated &lt;code&gt; &lt;a href=&quot;http://doc.qt.nokia.com/latest/qmake-manual.html&quot;&gt; qmake &lt;/a&gt; &lt;/code&gt; tool, or with better &lt;code&gt; &amp;lt; produces &lt;a href=&quot;http://www.cmake.org/&quot;&gt; CMake &lt;/a&gt; &lt;/code&gt; must be done is (thankfully) nothing here.&lt;br /&gt;The source of &lt;i&gt; main.cpp &lt;/i&gt; also looks different.&lt;br /&gt;&lt;pre&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;code&gt; QString lang = QLOCAL::. system () name ();&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;code&gt; QTranslator translator; &lt;/code&gt;&lt;br /&gt;&lt;code&gt; translator.load (&quot;jmnsishelper_&quot; + long, &quot;: / ts /&quot;);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; a.installTranslator (&amp;amp; translator); &lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h2&gt;Advantages and disadvantages &lt;/h2&gt;&lt;br /&gt;The second option simplifies the compilation of the package. Also you can save yourself a subdirectory. Also in the &lt;i&gt; main.cpp &lt;/i&gt; written source code is shorter. However, this method has drawbacks. If the translation has been brought up to date, the program is to compile complete and to the left. In this method one can simply &lt;i&gt; qm &lt;/i&gt; file in &lt;code&gt; translations &lt;/code&gt; replace. There is also, at least for Linux and the tools that &lt;i&gt; m &lt;/i&gt; file to read. This is not according to the method two.</content><link rel='replies' type='application/atom+xml' href='http://jmuelbert-en.blogspot.com/feeds/5818830050954825392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/external-or-qt-translations-in-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/5818830050954825392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3799551646171976020/posts/default/5818830050954825392'/><link rel='alternate' type='text/html' href='http://jmuelbert-en.blogspot.com/2011/06/external-or-qt-translations-in-program.html' title='External or QT translations in the program'/><author><name>Jürgen Mülbert</name><uri>https://plus.google.com/115915542128425739223</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MT36YwslPbw/AAAAAAAAAAI/AAAAAAAABn8/DTQo81htEe4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>