Skip to content

Commit efac3ca

Browse files
author
Jeremy Bowman
committed
Windows updates, packaging tweaks, translation tools
1 parent 40bc994 commit efac3ca

32 files changed

+2037
-412
lines changed

CHANGES

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2010-05-05 #################### PortaBase 2.0b1 ####################
2+
3+
2010-05-05 JMB Windows updates, packaging tweaks, translation tools
4+
5+
Updated the Windows-specific parts of portabase.pro. Fixed a bug in
6+
imageselector.cpp that broke compiling with MinGW. Updated the application
7+
icon for Windows and the Inno Setup installer script. Created a couple of
8+
batch scripts to automate compilation and creation of the installer.
9+
Updated the INSTALL file with current instructions for building on Windows.
10+
Made some minor packaging fixes for Debian and Maemo.
11+
12+
There's now a trio of environment variables that can be used to test out
13+
PortaBase UI and help file translations: PORTABASE_QM, PORTABASE_QT_QM, and
14+
PORTABASE_HELP. I'll document their usage fully on the web site with the
15+
notes on doing translations. Clarified the encoding (UTF-8) of the
16+
existing help files and updated the UI translation files while I was at it.
17+
118
2010-05-02 JMB Help file update, more Maemo and usability improvements
219

320
Updated the English help file to match the current state of the code.

INSTALL

+30-21
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ need the following:
1515
- Windows XP, Vista, or 7
1616
- A recent version of Qt 4 (http://qt.nokia.com/downloads). It's easiest to
1717
get started with a version that comes with the MinGW compiler, since I
18-
haven't tested the latest code with Visual Studio.
18+
haven't tested the latest code with Visual Studio. Add both the "bin"
19+
directory and the "mingw\bin" directory that come with it to your "Path"
20+
environment variable.
21+
- MSYS 1.0.11 (http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download).
22+
This emulates a basic UNIX system on Windows, and is the easiest way to
23+
compile Metakit with MinGW. Newer versions are available, but lack a
24+
convenient installer; this one should work fine.
1925
- Inno Setup, if you wish to create the PortaBase installer; available from:
2026
http://www.jrsoftware.org/isinfo.php
2127

@@ -50,11 +56,19 @@ the Metakit README file) inside the appropriate Scratchbox environment. You'll
5056
want to pass the "--enable-threads" and "--disable-shared" parameters to the
5157
configure script.
5258

53-
To compile Metakit for Windows, follow the instructions in Metakit's README
54-
file; be sure to build the static library version (mklib). To compile
55-
Metakit for use in Linux or Mac OS X desktop PortaBase, just follow the
56-
README directions (the "UNIX" instructions in both cases); you'll want to use
57-
the same configure script parameters mentioned above for Maemo development.
59+
To compile Metakit for use in Linux or Mac OS X desktop PortaBase, just follow
60+
the README directions (the "UNIX" instructions in both cases); you'll want to
61+
use the same configure script parameters mentioned above for Maemo development.
62+
63+
To compile Metakit for Windows, first install Qt in order to get the MinGW
64+
compiler. Then install MSYS as mentioned above; in the postinstallation
65+
script, you'll be asked for the path of the MinGW installation that came with
66+
Qt. Start MSYS from the installed shortcut, and change to the metakit/builds
67+
directory that is included with the PortaBase source code. Note that you use
68+
"cd" to change directories, use "/" as the directory separator, and the C:
69+
drive is located at "/c". From the metakit/builds directory, run
70+
"../unix/configure --enable-threads --disable-shared". Once that finishes, run
71+
"make". You should now have a libmk4.a static library file in that directory.
5872

5973
PortaBase for Maemo Compilation
6074
--------------------------------
@@ -64,21 +78,16 @@ documentation for more information.
6478

6579
PortaBase for Windows Compilation, Packaging
6680
--------------------------------------------
67-
- Install a recent version of Qt 4 and configure it (make sure the "bin"
68-
directory is in your path and that the QTDIR and QMAKESPEC environment
69-
variables are set correctly).
70-
- Adjust the value of INCLUDEPATH in portabase.pro as needed to locate the
71-
library header files on your system.
72-
- Run "qmake -t vcapp -o portabase.dsp portabase.pro"
73-
- Copy mk4vc60s.lib to the PortaBase source directory.
74-
- Open the generated portabase.dsp file in Visual C++, and from
75-
"Build->Set Active Configuration..." select "portabase - Win32 Release".
76-
- Execute the build.
77-
- Copy qt-mtnc321.dll from Qt's "lib" directory to the Release subdirectory
78-
created by Visual C++.
79-
- Copy msvcrt.dll to the PortaBase source directory.
80-
- Run "lrelease portabase.pro" to generate the UI translation files.
81-
- Open portabase.iss with Inno Setup and choose "Compile"
81+
- Compile Metakit as described above.
82+
- Open a command prompt, and change to the root directory of the downloaded
83+
PortaBase source code. If this isn't at "C:\portabase", you'll have to
84+
change the paths for "LIBS" and "INCLUDEPATH" in portabase.pro.
85+
- From that directory run "packaging\windows\build.bat"; this will generate a
86+
working PortaBase.exe file in the "build" directory.
87+
- If you want to create an installer for PortaBase, first install Inno Setup.
88+
Then run "packaging\windows\installer.bat"; you may need to edit it first
89+
in order to adjust the paths to Qt and/or Inno Setup. This will generate an
90+
executable installer in the "build/windows" directory.
8291

8392
Debian Package Building
8493
-----------------------

image/imageselector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
#include <QPushButton>
2222
#include "../database.h"
2323
#include "../factory.h"
24+
#include "../importdialog.h"
2425
#include "imageeditor.h"
2526
#include "imageselector.h"
2627
#include "imageutils.h"
2728
#include "imageviewer.h"
28-
#include "importdialog.h"
2929

3030
/**
3131
* Constructor.

main.cpp

+28-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
#include <QApplication>
1717
#include <QIcon>
18+
#include <QProcess>
19+
#include <QRegExp>
1820
#include <QTranslator>
1921
#include "commandline.h"
2022
#include "eventfilter.h"
@@ -41,13 +43,35 @@ int main(int argc, char **argv) {
4143
app.setOrganizationDomain("sourceforge.net");
4244
app.setApplicationName("PortaBase");
4345
app.setWindowIcon(QIcon(":/appicon/PortaBase.png"));
46+
// can't use QProcessEnvironment because Diablo doesn't have it yet
47+
QStringList env = QProcess::systemEnvironment();
48+
int qmIndex = env.indexOf(QRegExp("PORTABASE_QM=.*"));
49+
int qtQmIndex = env.indexOf(QRegExp("PORTABASE_QT_QM=.*"));
4450
QTranslator qtTranslator;
45-
if (qtTranslator.load(QString(":/i18n/Qt.qm"))) {
46-
app.installTranslator(&qtTranslator);
51+
if (qtQmIndex != -1) {
52+
QString path = env[qtQmIndex];
53+
path = path.right(path.length() - 16);
54+
if (qtTranslator.load(path)) {
55+
app.installTranslator(&qtTranslator);
56+
}
57+
}
58+
else {
59+
if (qtTranslator.load(QString(":/i18n/Qt.qm"))) {
60+
app.installTranslator(&qtTranslator);
61+
}
4762
}
4863
QTranslator translator;
49-
if (translator.load(QString(":/i18n/PortaBase.qm"))) {
50-
app.installTranslator(&translator);
64+
if (qmIndex != -1) {
65+
QString path = env[qmIndex];
66+
path = path.right(path.length() - 13);
67+
if (translator.load(path)) {
68+
app.installTranslator(&translator);
69+
}
70+
}
71+
else {
72+
if (translator.load(QString(":/i18n/PortaBase.qm"))) {
73+
app.installTranslator(&translator);
74+
}
5175
}
5276
QStringList args = app.arguments();
5377
if ((args.count() > 1 && args[1].startsWith("-")) || args.count() > 2) {

packaging/linux/debian.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
VERSION=2.0
3+
VERSION=2.0~beta1
44
DEST=build/debian/portabase-$VERSION
55

66
rm -rf build/debian

packaging/mac/build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ rm -f build/PortaBase.app
77
rm -f build/PortaBase.dmg
88
qmake -spec macx-g++40 portabase.pro
99
make clean
10+
lrelease portabase.pro
11+
lrelease resources/translations/qt*.ts
1012
make
1113
cd build
1214
macdeployqt PortaBase.app

packaging/maemo/debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
portabase (2.0~beta1-2) unstable; urgency=low
2+
3+
* Declare the debug package in the control file
4+
5+
-- Jeremy Bowman <[email protected]> Wed, 05 May 2010 13:49:03 +0100
6+
17
portabase (2.0~beta1-1) unstable; urgency=low
28

39
* Initial Maemo Release.

packaging/maemo/debian/control

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Standards-Version: 3.7.2
77

88
Package: portabase
99
Architecture: any
10-
Depends: ${shlibs:Depends}, ${misc:Depends}, hildon-application-manager
10+
Depends: ${shlibs:Depends}, hildon-application-manager
1111
Description: An easy-to-use personal database application
1212
PortaBase is a program for conveniently managing one-table database files.
1313
It is available for many platforms, including Linux, Mac OS X, Windows,
@@ -71,3 +71,9 @@ XB-Maemo-Icon-26:
7171
IAXKcs6zjLFMrzYzxmSaR5xSyjcDcM6ZFEClK7bWdqy1URrbbWttK/0u0VqbXsO61djnc40kKaWM
7272
McbTJSilPetzQkgvL3qbqF5l64WQcc7p1BPGWmtc90C867///w+iNyjsMjIXAQAAAABJRU5ErkJg
7373
gg==
74+
75+
Package: portabase-dbg
76+
Section: devel
77+
Architecture: any
78+
Depends: portabase (= ${Source-Version})
79+
Description: Debug symbols for PortaBase

packaging/maemo/diablo.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ cp src/packaging/maemo/portabase.pro portabase.pro
1111
cp -R src/packaging/maemo/debian .
1212
cp src/packaging/maemo/diablo_control debian/control
1313
cp src/packaging/maemo/diablo_postinst debian/postinst
14-
dpkg-buildpackage -rfakeroot -uc -us -sa
14+
dpkg-buildpackage -rfakeroot -sa -S
15+
#dpkg-buildpackage -rfakeroot -uc -us -sa

packaging/maemo/diablo_control

+6
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ XB-Maemo-Icon-26:
5353
hRBCSllyHKfqOM6zUsop13XHXdetOI5T5px7jDGHEMLx8MJN0jTVSZIEWutOFEXNKIq2lFKbWut/
5454
tNYNpZRvjDF933VCCC6EcHK5nCeEKHDOC5zz/D6I7YPSfVCYJEnXGNON4zgwxmhjHvtDAvgXDRHA
5555
N2eaZkMAAAAASUVORK5CYII=
56+
57+
Package: portabase-dbg
58+
Section: devel
59+
Architecture: any
60+
Depends: portabase (= ${Source-Version})
61+
Description: Debug symbols for PortaBase

packaging/maemo/fremantle.sh

100644100755
+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/sh
22

33
VERSION=2.0~beta1
4-
DEST=build/diablo/portabase-$VERSION
4+
DEST=build/fremantle/portabase-$VERSION
55

66
rm -rf build/fremantle
77
packaging/copy_source.sh $DEST/src
88
cd $DEST
99
mv src/portabase.pro src/src.pro
1010
cp src/packaging/maemo/portabase.pro portabase.pro
1111
cp -R src/packaging/maemo/debian .
12-
dpkg-buildpackage -rfakeroot -uc -us -sa
12+
dpkg-buildpackage -rfakeroot -sa -S
13+
#dpkg-buildpackage -rfakeroot -uc -us -sa

0 commit comments

Comments
 (0)