Control: tags 755558 + patch
Attached is a patch for wx3.0 support for wxastrocapture.
I don't have a suitable camera, but the basics of the UI seem to work
as far as I can tell having never used this app before.
It does pop up a dialog on startup complaining that locale en_US isn't
found, but that looks to be unrelated to my changes - the upstream code
has this gem:
// we really want C locale, but it seems not available, so try english
instead
// The purpose is to make sure all numbers are formatted using full stop
// instead of comma when the users locale is something different than C
locale.
// This brute force seems like the only way.
m_locale.Init(wxLANGUAGE_ENGLISH_US);
//CA m_locale.Init(wxLocale::GetSystemLanguage());
I'm happy to NMU these changes, though some testing from someone who
actually uses this app first would be good.
Cheers,
Olly
diff -Nru wxastrocapture-1.8.1+git20140303+dfsg/debian/changelog wxastrocapture-1.8.1+git20140303+dfsg/debian/changelog
--- wxastrocapture-1.8.1+git20140303+dfsg/debian/changelog 2014-05-06 10:52:56.000000000 +1200
+++ wxastrocapture-1.8.1+git20140303+dfsg/debian/changelog 2014-08-12 14:09:28.000000000 +1200
@@ -1,3 +1,11 @@
+wxastrocapture (1.8.1+git20140303+dfsg-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update to use wxWidgets 3.0 (Closes: #755558):
+ + New patch: wx3.0-compat.patch
+
+ -- Olly Betts <[email protected]> Tue, 12 Aug 2014 14:09:26 +1200
+
wxastrocapture (1.8.1+git20140303+dfsg-2) unstable; urgency=low
* Reupload - Thanks got to Thorsten Alteholz for his scrutiny
diff -Nru wxastrocapture-1.8.1+git20140303+dfsg/debian/control wxastrocapture-1.8.1+git20140303+dfsg/debian/control
--- wxastrocapture-1.8.1+git20140303+dfsg/debian/control 2014-05-06 10:52:56.000000000 +1200
+++ wxastrocapture-1.8.1+git20140303+dfsg/debian/control 2014-08-12 13:03:38.000000000 +1200
@@ -5,8 +5,7 @@
Uploaders: Steffen Moeller <[email protected]>
Build-Depends: debhelper (>= 9.0.0), cbp2make,
libusb-dev, libv4l-dev,
- libwxgtk2.8-dev
-#, libwxgtk2.8-dbg # dependency affects dpkg-shlibdeps
+ libwxgtk3.0-dev
Standards-Version: 3.9.5
Vcs-Browser: http://svn.debian.org/wsvn/debian-science/packages/wxAstroCapture/
Vcs-Svn: svn://svn.debian.org/debian-science/packages/wxAstroCapture/trunk/
diff -Nru wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/series wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/series
--- wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/series 2014-05-06 10:52:56.000000000 +1200
+++ wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/series 2014-08-12 13:18:44.000000000 +1200
@@ -1,2 +1,3 @@
avoidUpx.patch
no_minus_s_to_gcc.patch
+wx3.0-compat.patch
diff -Nru wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/wx3.0-compat.patch wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/wx3.0-compat.patch
--- wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/wx3.0-compat.patch 1970-01-01 12:00:00.000000000 +1200
+++ wxastrocapture-1.8.1+git20140303+dfsg/debian/patches/wx3.0-compat.patch 2014-08-12 14:01:33.000000000 +1200
@@ -0,0 +1,205 @@
+Description: Update to work with wxwidgets3.0
+Author: Olly Betts <[email protected]>
+Bug-Debian: http://bugs.debian.org/755558
+Forwarded: no
+Last-Update: 2014-08-12
+
+--- a/wxScopeServer_Demo/wxScopeServer.cbp
++++ b/wxScopeServer_Demo/wxScopeServer.cbp
+@@ -246,13 +246,13 @@
+ <Compiler>
+ <Add option="-Wall" />
+ <Add option="-g" />
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --debug --cxxflags`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --debug --cxxflags`" />
+ <Add option="-DNOPCH" />
+ <Add option="-D__WXDEBUG__" />
+ <Add option="-D_DEBUG" />
+ </Compiler>
+ <Linker>
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --debug --libs`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --debug --libs`" />
+ </Linker>
+ </Target>
+ <Target title="UX_Release">
+@@ -263,11 +263,11 @@
+ <Compiler>
+ <Add option="-O2" />
+ <Add option="-W" />
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --cxxflags`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --cxxflags`" />
+ <Add option="-DNOPCH" />
+ </Compiler>
+ <Linker>
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --libs`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --libs`" />
+ </Linker>
+ </Target>
+ </Build>
+--- a/wxWebcamDB.cbp
++++ b/wxWebcamDB.cbp
+@@ -180,7 +180,7 @@
+ <Compiler>
+ <Add option="-Wall" />
+ <Add option="-g" />
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --debug --cxxflags`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --debug --cxxflags`" />
+ <Add option="-Wno-ignored-qualifiers" />
+ <Add option="-DNOPCH" />
+ <Add option="-D__WXDEBUG__" />
+@@ -188,7 +188,7 @@
+ <Add option="-D__WX__" />
+ </Compiler>
+ <Linker>
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --debug --libs`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --debug --libs`" />
+ <Add library="usb" />
+ </Linker>
+ </Target>
+@@ -201,14 +201,14 @@
+ <Add option="-Os" />
+ <Add option="-O2" />
+ <Add option="-W" />
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --cxxflags`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --cxxflags`" />
+ <Add option="-Wno-ignored-qualifiers" />
+ <Add option="-DNOPCH" />
+ <Add option="-D__WX__" />
+ </Compiler>
+ <Linker>
+ <!-- <Add option="-s" /> not nice for -dbg package -->
+- <Add option="`wx-config --version=2.8 --toolkit=gtk2 --libs`" />
++ <Add option="`wx-config --version=3.0 --toolkit=gtk2 --libs`" />
+ <Add library="usb" />
+ </Linker>
+ <!--
+--- a/wxFactory.cpp
++++ b/wxFactory.cpp
+@@ -69,8 +69,7 @@
+ // C:\Documents and Settings\username\Application Data\appname
+ // We cannot rely on the OS or wx to create this directory
+
+- wxStandardPaths std_paths;
+- wxString userDataDir = std_paths.GetUserDataDir();
++ wxString userDataDir = wxStandardPaths::Get().GetUserDataDir();
+ wxString appname = m_config.GetAppName();
+ userDataDir.Replace(wxT("wxastrocapture"),appname);
+ if(!::wxDirExists(userDataDir)) {
+--- a/wxGuidingConfig.cpp
++++ b/wxGuidingConfig.cpp
+@@ -67,7 +67,7 @@
+ wxConfigPath path(config,wxT("Guiding"));
+ config->Write(_T("ReverseRA"),reverseRA);
+ config->Write(_T("ReverseDEC"),reverseDEC);
+- config->Write(_T("DECguiding"),dec);
++ config->Write(_T("DECguiding"),(int)dec);
+
+ m_cached_reverseRA = reverseRA;
+ m_cached_reverseDEC = reverseDEC;
+--- a/wxIO/wxGuiderPort.cpp
++++ b/wxIO/wxGuiderPort.cpp
+@@ -347,8 +347,8 @@
+ config->Write(_T("GXRA_neg"),this->GXRA_neg());
+ config->Write(_T("GXDEC_neg"),this->GXDEC_neg());
+ config->Write(_T("GXinvertedLogic"), this->InvertedLogic());
+- config->Write(_T("GXhandshake"), this->SerialHandshake());
+- config->Write(_T("GXbaudrate"), this->SerialBaudrate());
++ config->Write(_T("GXhandshake"), (int)this->SerialHandshake());
++ config->Write(_T("GXbaudrate"), (int)this->SerialBaudrate());
+
+ return true;
+ }
+--- a/wxWebcam/ArtDrvSim.cpp
++++ b/wxWebcam/ArtDrvSim.cpp
+@@ -535,7 +535,7 @@
+ // Return the directory for the user-dependent application data files:
+ // Unix: ~/.appname
+ // Windows: C:\Documents and Settings\username\Application Data\appname
+- wxStandardPaths px;
++ wxStandardPaths & px = wxStandardPaths::Get();
+ // if we did not found a file we check the current dir for compatibility reasons
+ switch (Device) {
+ case ACT_Art429:
+--- a/wxWebcam/uxcapture.cpp
++++ b/wxWebcam/uxcapture.cpp
+@@ -108,7 +108,7 @@
+ m_pDsCapFilterItem = new CV4LcapFilterItem( cFilter.GetCapFilter(cfIndex));
+
+ // open the device to control
+- _V_ ::fprintf(stderr, "CUXcapture::ControlDevice() - trying to open(v4l2dev) %S\n", m_pDsCapFilterItem->DevPath().c_str());
++ _V_ ::fprintf(stderr, "CUXcapture::ControlDevice() - trying to open(v4l2dev) %ls\n", (const wchar_t*)m_pDsCapFilterItem->DevPath().c_str());
+ m_device = ::open(m_pDsCapFilterItem->DevPath().fn_str(),O_RDWR /*required*/ | O_NONBLOCK,0);
+
+ if(-1 == m_device) {
+--- a/wxWebcam/v4l2capfilter.cpp
++++ b/wxWebcam/v4l2capfilter.cpp
+@@ -142,7 +142,7 @@
+ close(device);
+ continue;
+ }
+- _V_ ::fprintf(stderr, "CV4LcapFilter::EnumerateCapFilter: Probing %ls\n", m_actualDevPath.c_str());
++ _V_ ::fprintf(stderr, "CV4LcapFilter::EnumerateCapFilter: Probing %ls\n", (const wchar_t*)m_actualDevPath.c_str());
+ EnumPixFormat(device);
+
+ close(device);
+@@ -191,7 +191,7 @@
+ }
+ }
+ if (!found) {
+- ::fprintf(stderr, "CV4LcapFilter::AddSupport: %ls\n", item->FName().c_str());
++ ::fprintf(stderr, "CV4LcapFilter::AddSupport: %ls\n", (const wchar_t*)item->FName().c_str());
+ m_pFilters[m_numFilter] = item;
+ // add an index to the filter
+ m_pFilters[m_numFilter]->put_FIndex(m_numFilter);
+--- a/wxcustom/wxStatusBarEx.cpp
++++ b/wxcustom/wxStatusBarEx.cpp
+@@ -21,7 +21,7 @@
+ }
+
+ /// this code is based on wxStatusBarGeneric::OnPaint
+-void wxStatusBarEx::OnPaint(wxPaintEvent& WXUNUSED(event) )
++void wxStatusBarEx::OnPaint(wxPaintEvent& WXUNUSED( event ) )
+ {
+ wxPaintDC dc(this);
+
+@@ -34,8 +34,10 @@
+ /// when using red theme
+ dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+
+- for (int i = 0; i < m_nFields; i ++)
+- DrawField(dc, i);
++ int textHeight = dc.GetCharHeight();
++ int nFields = GetFieldsCount();
++ for (int i = 0; i < nFields; i ++)
++ DrawField(dc, i, textHeight);
+ }
+
+ #endif
+--- a/wxthings/spinctld.cpp
++++ b/wxthings/spinctld.cpp
+@@ -320,7 +320,7 @@
+ void wxSpinCtrlDbl::OnText( wxCommandEvent &event )
+ {
+ // always reflect the value to m_value
+- if(m_textCtrl->IsModified()) {
++ if(m_textCtrl && m_textCtrl->IsModified()) {
+ wxString value = m_textCtrl->GetValue();
+ value.ToDouble( &m_value );
+ DoSendEvent();
+@@ -353,14 +353,14 @@
+ DoSendEvent();
+ break;
+ }
+- case WXK_PRIOR : // pg-up
++ case WXK_PAGEUP :
+ {
+ if (m_textCtrl && m_textCtrl->IsModified()) SyncSpinToText(false);
+ SetValue( m_value + m_increment * 10.0 * modifier );
+ DoSendEvent();
+ break;
+ }
+- case WXK_NEXT : // pg-down
++ case WXK_PAGEDOWN :
+ {
+ if (m_textCtrl && m_textCtrl->IsModified()) SyncSpinToText(false);
+ SetValue( m_value - m_increment * 10.0 * modifier );
diff -Nru wxastrocapture-1.8.1+git20140303+dfsg/debian/rules wxastrocapture-1.8.1+git20140303+dfsg/debian/rules
--- wxastrocapture-1.8.1+git20140303+dfsg/debian/rules 2014-05-06 10:52:56.000000000 +1200
+++ wxastrocapture-1.8.1+git20140303+dfsg/debian/rules 2014-08-12 14:09:23.000000000 +1200
@@ -12,7 +12,9 @@
#cbp2make -in wxWebcamDB.cbp -unix -out Makefile -targets UX_Debug
override_dh_auto_build:
- $(MAKE) CFLAGS=-g
+ # Compile with NDEBUG defined to handle assertion failures quietly line
+ # wx2.8 does by default.
+ $(MAKE) CFLAGS='-g -DNDEBUG'
override_dh_strip:
dh_strip --dbg-package=wxastrocapture-dbg
--
debian-science-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers