Skip to content

Instantly share code, notes, and snippets.

@neurodroid
Last active April 9, 2017 20:36
Show Gist options
  • Save neurodroid/7388754 to your computer and use it in GitHub Desktop.
Save neurodroid/7388754 to your computer and use it in GitHub Desktop.
Patch to build OpenNX (http://www.opennx.net/) with MacPorts on OS X 10.9. Still quite buggy, and the ancient keyboard issue isn't fixed. See http://www.nerdenmeister.org/2013/11/09/build-opennx-on-os-x-10-9-mavericks/
Index: opennx/AsyncProcess.cpp
===================================================================
--- opennx/AsyncProcess.cpp (revision 724)
+++ opennx/AsyncProcess.cpp (working copy)
@@ -208,7 +208,7 @@
wxOutputStream *os = GetOutputStream();
if (os) {
if (doLog)
- ::myLogTrace(MYTRACETAG, wxT("Sending: '%s'"), s.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Sending: '%s'"), s.wc_str());
else
::myLogTrace(MYTRACETAG, wxT("Sending (hidden): '************'"));
wxString sbuf = s + wxT("\n");
@@ -249,7 +249,7 @@
if (!m_sCmd.IsEmpty()) {
wxString cwd = ::wxGetCwd();
- ::myLogTrace(MYTRACETAG, wxT("Starting '%s'"), m_sCmd.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Starting '%s'"), m_sCmd.wc_str());
if (!m_sDir.IsEmpty())
wxFileName::SetCwd(m_sDir);
m_sOutBuf.Empty();
Index: opennx/LibOpenSC.cpp
===================================================================
--- opennx/LibOpenSC.cpp (revision 724)
+++ opennx/LibOpenSC.cpp (working copy)
@@ -380,7 +380,7 @@
}
if (!wxProcess::Exists(sshpid))
return true;
- ::wxLogError(_("Could not terminate nxssh"));
+ wxLogError(_("Could not terminate nxssh"));
} else
return true;
return false;
Index: opennx/LogDialog.cpp
===================================================================
--- opennx/LogDialog.cpp (revision 724)
+++ opennx/LogDialog.cpp (working copy)
@@ -126,7 +126,7 @@
////@end LogDialog content initialisation
wxFont ff(10, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
- ::myLogTrace(MYTRACETAG, wxT("Font=%s"), ff.GetNativeFontInfoDesc().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Font=%s"), ff.GetNativeFontInfoDesc().wc_str());
m_TextCtrl->SetFont(ff);
}
Index: opennx/LoginDialog.cpp
===================================================================
--- opennx/LoginDialog.cpp (revision 724)
+++ opennx/LoginDialog.cpp (working copy)
@@ -170,7 +170,7 @@
delete m_pCurrentCfg;
m_pCurrentCfg = NULL;
m_pCtrlSessionName->Clear();
- ::myLogTrace(MYTRACETAG, wxT("ReadConfigDirectory: LastSession='%s'"), m_sLastSessionFilename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("ReadConfigDirectory: LastSession='%s'"), m_sLastSessionFilename.wc_str());
if (m_sLastSessionFilename.StartsWith(wxT("http://")) ||
m_sLastSessionFilename.StartsWith(wxT("https://")) ||
m_sLastSessionFilename.StartsWith(wxT("ftp://")) ||
@@ -177,12 +177,12 @@
((m_aConfigFiles.Index(m_sLastSessionFilename) == wxNOT_FOUND) &&
(wxFile::Exists(m_sLastSessionFilename)))) {
m_aConfigFiles.Add(m_sLastSessionFilename);
- ::myLogTrace(MYTRACETAG, wxT("ReadConfigDirectory: Adding '%s'"), m_sLastSessionFilename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("ReadConfigDirectory: Adding '%s'"), m_sLastSessionFilename.wc_str());
}
for (i = 0; i < m_aConfigFiles.GetCount(); i++) {
MyXmlConfig cfg(m_aConfigFiles[i]);
if (cfg.IsValid()) {
- m_pCtrlSessionName->Append(cfg.sGetName(), (void *)m_aConfigFiles[i].c_str());
+ m_pCtrlSessionName->Append(cfg.sGetName(), (void *)m_aConfigFiles[i].wc_str());
if ((cfg.sGetFileName() == m_sLastSessionFilename) ||
(cfg.sGetName() == m_sLastSessionFilename)) {
m_pCurrentCfg = new MyXmlConfig(m_aConfigFiles[i]);
@@ -202,12 +202,12 @@
}
}
if (m_pCurrentCfg) {
- ::myLogTrace(MYTRACETAG, wxT("SS1='%s'"), m_sSessionName.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("SS1='%s'"), m_sSessionName.wc_str());
m_pCtrlSessionName->SetStringSelection(m_sSessionName);
wxCommandEvent event;
OnComboboxSessionSelected(event);
} else {
- ::myLogTrace(MYTRACETAG, wxT("SS2='%s'"), m_sLastSessionFilename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("SS2='%s'"), m_sLastSessionFilename.wc_str());
// Last session name might be a plain session name (backward compatibility)
m_pCtrlSessionName->SetStringSelection(m_sLastSessionFilename);
wxCommandEvent event;
@@ -220,7 +220,7 @@
{
MyXmlConfig cfg(name);
if (cfg.IsValid()) {
- m_pCtrlSessionName->Append(cfg.sGetName(), (void *)name.c_str());
+ m_pCtrlSessionName->Append(cfg.sGetName(), (void *)name.wc_str());
m_pCtrlSessionName->SetStringSelection(cfg.sGetName());
wxCommandEvent event;
OnComboboxSessionSelected(event);
@@ -396,7 +396,7 @@
m_pCurrentCfg = new MyXmlConfig(fn);
break;
case wxID_CLEAR:
- ::myLogTrace(MYTRACETAG, wxT("deleting '%s'"), fn.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("deleting '%s'"), fn.wc_str());
::wxRemoveFile(fn);
ReadConfigDirectory();
break;
Index: opennx/MacOSX.c
===================================================================
--- opennx/MacOSX.c (revision 724)
+++ opennx/MacOSX.c (working copy)
@@ -46,7 +46,12 @@
* 10.4 compatibility. Hence the use of deprecated keyboard services.
*/
#include <Carbon/Carbon.h>
+
const char *getMacKeyboard() {
+# if 1
+ const char* ret = "defkeymap/US";
+ return ret;
+#else
static char ret[256];
KeyboardLayoutRef klr;
memset(ret, 0, sizeof(ret));
@@ -61,7 +66,8 @@
}
}
}
- return ret;
+ return ret;
+#endif
}
#include <IOKit/IOKitLib.h>
Index: opennx/MacUninstallApp.cpp
===================================================================
--- opennx/MacUninstallApp.cpp (revision 724)
+++ opennx/MacUninstallApp.cpp (working copy)
@@ -57,13 +57,13 @@
while (n >= 0) {
fn = m_aFiles[n--];
if (m_bTestMode) {
- ::wxLogMessage(_("TEST: Would delete file: %s"), fn.c_str());
+ wxLogMessage(_("TEST: Would delete file: %s"), fn.c_str());
} else {
if (::wxRemoveFile(fn))
- ::wxLogMessage(_("Deleted file: %s"), fn.c_str());
+ wxLogMessage(_("Deleted file: %s"), fn.c_str());
else {
failed_files++;
- ::wxLogWarning(_("Could not delete file %s"), fn.c_str());
+ wxLogWarning(_("Could not delete file %s"), fn.c_str());
}
}
}
@@ -71,13 +71,13 @@
while (n >= 0) {
fn = m_aDirs[n--];
if (m_bTestMode) {
- ::wxLogMessage(_("TEST: Would delete diretory %s"), fn.c_str());
+ wxLogMessage(_("TEST: Would delete diretory %s"), fn.c_str());
} else {
if (::wxRmdir(fn))
- ::wxLogMessage(_("Deleted diretory %s"), fn.c_str());
+ wxLogMessage(_("Deleted diretory %s"), fn.c_str());
else {
failed_dirs++;
- ::wxLogWarning(_("Could not delete directory %s"), fn.c_str());
+ wxLogWarning(_("Could not delete directory %s"), fn.c_str());
}
}
}
@@ -176,8 +176,8 @@
return false;
}
bool ok = DoUninstall(targetPkg, targetPkgId);
- ::wxLogMessage(_("Uninstall finished at %s"), wxDateTime::Now().Format().c_str());
- ::wxLogMessage(_("Status: %s, failed files: %lu, failed dirs: %lu"),
+ wxLogMessage(_("Uninstall finished at %s"), wxDateTime::Now().Format().c_str());
+ wxLogMessage(_("Status: %s, failed files: %lu, failed dirs: %lu"),
(ok ? _("OK") : _("FAILED")), failed_files, failed_dirs);
// Print result to stdout for parent (elevation wrapper)
wxString ptmp;
@@ -185,7 +185,7 @@
long epid;
if (ptmp.ToLong(&epid)) {
if (getppid() == epid) {
- ::wxLogMessage(_("Reporting result to elevation wrapper %s"), ptmp.c_str());
+ wxLogMessage(_("Reporting result to elevation wrapper %s"), ptmp.c_str());
printf("%d %lu %lu\n", ok ? 0 : 1, failed_files, failed_dirs);
}
}
@@ -242,12 +242,12 @@
wxVariant ret;
ret.Clear();
if (doc.GetRoot()->GetName() != wxT("plist")) {
- ::wxLogError(_("Not an XML plist: %s"), docname.c_str());
+ wxLogError(_("Not an XML plist: %s"), docname.c_str());
return ret;
}
wxXmlNode *child = doc.GetRoot()->GetChildren();
if (child->GetName() != wxT("dict")) {
- ::wxLogError(
+ wxLogError(
_("Invalid plist (missing toplevel <dict> in %s"),
docname.c_str());
return ret;
@@ -258,7 +258,7 @@
while (child) {
if (needkey) {
if (child->GetName() != wxT("key")) {
- ::wxLogError(
+ wxLogError(
_("Invalid plist (expected a key) in %s"),
docname.c_str());
return ret;
@@ -268,7 +268,7 @@
} else {
if (found) {
if (child->GetName().IsSameAs(wxT("array"))) {
- ::wxLogError(
+ wxLogError(
_("Unsupported type array in %s"), docname.c_str());
return ret;
}
@@ -275,7 +275,7 @@
if (child->GetName().IsSameAs(wxT("real"))) {
double val;
if (!child->GetNodeContent().ToDouble(&val)) {
- ::wxLogError(
+ wxLogError(
_("Invalid plist (invalid real value %s) in %s"),
child->GetNodeContent().c_str(), docname.c_str());
} else
@@ -285,7 +285,7 @@
if (child->GetName().IsSameAs(wxT("integer"))) {
long val;
if (!child->GetNodeContent().ToLong(&val)) {
- ::wxLogError(
+ wxLogError(
_("Invalid plist (invalid integer value %s) in %s"),
child->GetNodeContent().c_str(), docname.c_str());
} else
@@ -304,7 +304,7 @@
if (child->GetName().IsSameAs(wxT("date"))) {
wxDateTime dt;
if (NULL == dt.ParseDateTime(child->GetNodeContent())) {
- ::wxLogError(
+ wxLogError(
_("Invalid plist (invalid date value %s) in %s"),
child->GetNodeContent().c_str(), docname.c_str());
} else
@@ -311,7 +311,7 @@
ret = dt;
return ret;
}
- ::wxLogError(
+ wxLogError(
_("Invalid plist (unexpected type %s) in %s"),
child->GetName().c_str(), docname.c_str());
return ret;
@@ -341,7 +341,7 @@
size_t i;
wxString fbuf;
for (i = 0; i < lines.GetCount(); ++i) {
- // ::wxLogMessage(_("RLINE: %s"), lines[i].c_str());
+ // wxLogMessage(_("RLINE: %s"), lines[i].c_str());
fbuf.Append(lines[i]).Append(wxT("\n"));
}
wxMemoryInputStream mis(fbuf.mb_str(), fbuf.Length());
@@ -358,13 +358,13 @@
// Old variant
v = GetPlistValue(doc, rcpt, wxT("IFPkgFlagRelocatable"));
if (v.IsNull()) {
- ::wxLogError(_("Could not find requested key 'IFPkgFlagRelocatable' in receipt %s"),
+ wxLogError(_("Could not find requested key 'IFPkgFlagRelocatable' in receipt %s"),
rcpt.c_str());
return wxEmptyString;
}
wxString t = v.GetType();
if (t != wxT("bool")) {
- ::wxLogError(_("Unexpected type '%s' of 'IFPkgFlagRelocatable' in receipt %s"),
+ wxLogError(_("Unexpected type '%s' of 'IFPkgFlagRelocatable' in receipt %s"),
t.c_str(), rcpt.c_str());
return wxEmptyString;
}
@@ -372,13 +372,13 @@
wxT("IFPkgRelocatedPath") : wxT("IFPkgFlagDefaultLocation"));
v = GetPlistValue(doc, rcpt, pkey);
if (v.IsNull()) {
- ::wxLogError(_("Could not find requested key '%s' in receipt %s"),
+ wxLogError(_("Could not find requested key '%s' in receipt %s"),
pkey.c_str(), rcpt.c_str());
return wxEmptyString;
}
t = v.GetType();
if (t != wxT("string")) {
- ::wxLogError(_("Unexpected type '%s' of '%s' in receipt %s"),
+ wxLogError(_("Unexpected type '%s' of '%s' in receipt %s"),
t.c_str(), pkey.c_str(), rcpt.c_str());
return wxEmptyString;
}
@@ -388,7 +388,7 @@
return v.GetString().Append(wxT("/"));
}
} else
- ::wxLogError(_("Could not read package receipt %s"), rcpt.c_str());
+ wxLogError(_("Could not read package receipt %s"), rcpt.c_str());
return wxEmptyString;
}
@@ -396,7 +396,7 @@
wxArrayString &dirs, wxArrayString &files)
{
if (!wxFileName::FileExists(bom)) {
- ::wxLogError(
+ wxLogError(
_("Missing BOM (Bill Of Materials) '%s'. Already unistalled?"), bom.c_str());
return false;
}
@@ -404,12 +404,12 @@
cmd << bom;
wxArrayString err;
if (0 != ::wxExecute(cmd, files, err)) {
- ::wxLogError(
+ wxLogError(
_("Could not list BOM (Bill Of Materials) '%s'. Already unistalled?"), bom.c_str());
return false;
}
if (0 != err.GetCount() != 0) {
- ::wxLogError(
+ wxLogError(
_("Invalid BOM (Bill Of Materials) '%s'. Already unistalled?"), bom.c_str());
return false;
}
@@ -417,12 +417,12 @@
cmd << bom;
err.Empty();
if (0 != ::wxExecute(cmd, dirs, err)) {
- ::wxLogError(
+ wxLogError(
_("Could not list BOM (Bill Of Materials) '%s'. Already unistalled?"), bom.c_str());
return false;
}
if (0 != err.GetCount() != 0) {
- ::wxLogError(
+ wxLogError(
_("Invalid BOM (Bill Of Materials) '%s'. Already unistalled?"), bom.c_str());
return false;
}
@@ -446,7 +446,7 @@
proot = GetInstalledPath(rpath);
bompath.Append(pkgid).Append(wxT(".bom"));
} else {
- ::wxLogWarning(
+ wxLogWarning(
_("The package receipt does not exist. Already unistalled?"));
return false;
}
@@ -454,7 +454,7 @@
if (proot.IsEmpty())
return false;
if (!wxFileName::DirExists(proot)) {
- ::wxLogWarning(
+ wxLogWarning(
_("The package install path does not exist. Already unistalled?"));
return false;
}
@@ -470,7 +470,7 @@
std::ofstream *log = new std::ofstream();
log->open(m_sLogName.mb_str());
delete wxLog::SetActiveTarget(new wxLogStream(log));
- ::wxLogMessage(_("Uninstall started at %s"), wxDateTime::Now().Format().c_str());
+ wxLogMessage(_("Uninstall started at %s"), wxDateTime::Now().Format().c_str());
wxString rpath = wxT("/Library/Receipts/");
wxString proot;
wxString bompath;
@@ -494,7 +494,7 @@
if (!FetchBOM(bompath, d, f))
return false;
size_t i;
- ::wxLogMessage(_("Deleting package content"));
+ wxLogMessage(_("Deleting package content"));
for (i = 0; i < f.GetCount(); i++) {
if (m_nodelete.find(f[i]) != m_nodelete.end()) {
f.RemoveAt(i--);
@@ -505,14 +505,14 @@
wxString name = fn.GetFullPath();
if (m_bTestMode) {
f.RemoveAt(i--);
- ::wxLogMessage(_("TEST: Would delete file: %s"), name.c_str());
+ wxLogMessage(_("TEST: Would delete file: %s"), name.c_str());
} else {
if (::wxRemoveFile(name) || (!fn.FileExists())) {
f.RemoveAt(i--);
- ::wxLogMessage(_("Deleted file: %s"), name.c_str());
+ wxLogMessage(_("Deleted file: %s"), name.c_str());
} else {
failed_files++;
- ::wxLogWarning(_("Could not delete file %s"), name.c_str());
+ wxLogWarning(_("Could not delete file %s"), name.c_str());
}
}
}
@@ -530,11 +530,11 @@
wxString name = fn.GetFullPath();
if (m_bTestMode) {
d.RemoveAt(i--);
- ::wxLogMessage(_("TEST: Would delete directory: %s"), name.c_str());
+ wxLogMessage(_("TEST: Would delete directory: %s"), name.c_str());
} else {
if (::wxRmdir(name) || (!fn.DirExists())) {
d.RemoveAt(i--);
- ::wxLogMessage(_("Deleted directory: %s"), name.c_str());
+ wxLogMessage(_("Deleted directory: %s"), name.c_str());
}
}
}
@@ -543,12 +543,12 @@
if (0 < d.GetCount()) {
for (i = 0; i < d.GetCount(); i++) {
failed_dirs++;
- ::wxLogWarning(_("Could not delete directory %s"), d[i].c_str());
+ wxLogWarning(_("Could not delete directory %s"), d[i].c_str());
}
}
if (0 == (d.GetCount() + f.GetCount())) {
// Finally delete the receipe itself
- ::wxLogMessage(_("Deleting receipt"));
+ wxLogMessage(_("Deleting receipt"));
if (oldreceipt) {
{
wxDir d(rpath);
@@ -556,34 +556,34 @@
d.Traverse(t);
}
if (m_bTestMode) {
- ::wxLogMessage(_("TEST: Would delete directory: %s"), rpath.c_str());
+ wxLogMessage(_("TEST: Would delete directory: %s"), rpath.c_str());
} else {
if (::wxRmdir(rpath))
- ::wxLogMessage(_("Deleted directory: %s"), rpath.c_str());
+ wxLogMessage(_("Deleted directory: %s"), rpath.c_str());
else {
failed_dirs++;
- ::wxLogWarning(_("Could not delete directory %s"), rpath.c_str());
+ wxLogWarning(_("Could not delete directory %s"), rpath.c_str());
}
}
} else {
if (m_bTestMode) {
- ::wxLogMessage(_("TEST: Would delete receipt: %s"), rpath.c_str());
- ::wxLogMessage(_("TEST: Would delete BOM: %s"), bompath.c_str());
+ wxLogMessage(_("TEST: Would delete receipt: %s"), rpath.c_str());
+ wxLogMessage(_("TEST: Would delete BOM: %s"), bompath.c_str());
} else {
if (::wxRemoveFile(rpath)) {
- ::wxLogMessage(_("Deleted receipt: %s"), rpath.c_str());
+ wxLogMessage(_("Deleted receipt: %s"), rpath.c_str());
} else {
- ::wxLogWarning(_("Could not delete receipt %s"), rpath.c_str());
+ wxLogWarning(_("Could not delete receipt %s"), rpath.c_str());
}
if (::wxRemoveFile(bompath)) {
- ::wxLogMessage(_("Deleted BOM: %s"), bompath.c_str());
+ wxLogMessage(_("Deleted BOM: %s"), bompath.c_str());
} else {
- ::wxLogWarning(_("Could not delete BOM %s"), bompath.c_str());
+ wxLogWarning(_("Could not delete BOM %s"), bompath.c_str());
}
}
}
} else
- ::wxLogMessage(_("Receipt NOT deleted, because package files have been left."));
+ wxLogMessage(_("Receipt NOT deleted, because package files have been left."));
return true;
}
@@ -612,7 +612,7 @@
st = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
kAuthorizationFlagDefaults, &aRef);
if (errAuthorizationSuccess != st) {
- ::wxLogError(_("Authorization could not be created: %s"), MacAuthError(st).c_str());
+ wxLogError(_("Authorization could not be created: %s"), MacAuthError(st).c_str());
return true;
}
AuthorizationItem aItems = { kAuthorizationRightExecute, 0, NULL, 0 };
@@ -638,12 +638,12 @@
fscanf(pout, "%d %lu %lu", &status, &failed_files, &failed_dirs);
ret = (0 == status);
} else
- ::wxLogError(_("Could not execute with administrative rights:\n%s"), MacAuthError(st).c_str());
+ wxLogError(_("Could not execute with administrative rights:\n%s"), MacAuthError(st).c_str());
} else {
if (st) {
m_bCancelled = (errAuthorizationCanceled == st);
if (!m_bCancelled)
- ::wxLogError(_("Authorization failed: %s"), MacAuthError(st).c_str());
+ wxLogError(_("Authorization failed: %s"), MacAuthError(st).c_str());
}
}
AuthorizationFree(aRef, kAuthorizationFlagDefaults);
Index: opennx/Makefile.am
===================================================================
--- opennx/Makefile.am (revision 724)
+++ opennx/Makefile.am (working copy)
@@ -320,11 +320,11 @@
dist-platform: $(PLATFORMDIST)
-packaging/MacOSX/pulse/include/pulse/pulseaudio.h:
- $(MAKE) -C packaging/MacOSX/pulse cachedinstall
+# packaging/MacOSX/pulse/include/pulse/pulseaudio.h:
+# $(MAKE) -C packaging/MacOSX/pulse cachedinstall
-packaging/win32/pulse/include/pulse/pulseaudio.h:
- $(MAKE) -C packaging/win32/pulse tmpinstall
+# packaging/win32/pulse/include/pulse/pulseaudio.h:
+# $(MAKE) -C packaging/win32/pulse tmpinstall
EXTRA_DIST = conf/mkinstalldirs conf/mkinstalldirs conf/mkinstalldirs conf/mkinstalldirs conf/mkinstalldirs conf/mkinstalldirs conf/config.rpath conf/authors.xml \
INSTALL INSTALL.generic COPYING share etc/60-opennx.rules \
Index: opennx/MyDynlib.cpp
===================================================================
--- opennx/MyDynlib.cpp (revision 724)
+++ opennx/MyDynlib.cpp (working copy)
@@ -55,7 +55,7 @@
bool MyDynamicLibrary::Load(const wxString& name, int flags /* = wxDL_DEFAULT */)
{
- ::myLogTrace(MYTRACETAG, wxT("Load(%s, 0x%0x)"), name.c_str(), flags);
+ ::myLogTrace(MYTRACETAG, wxT("Load(%s, 0x%0x)"), name.wc_str(), flags);
#ifdef __WXMSW__
return wxDynamicLibrary::Load(name, flags);
#else
@@ -64,13 +64,13 @@
wxStringTokenizer t(ldpath, wxT(":"));
while (t.HasMoreTokens()) {
wxString abslib = t.GetNextToken() + wxFileName::GetPathSeparator() + name;
- ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s 0x%0x)"), abslib.c_str(), flags);
+ ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s 0x%0x)"), abslib.wc_str(), flags);
if (wxDynamicLibrary::Load(abslib, flags))
return true;
#ifdef __WXMAC__
if (!abslib.EndsWith(wxT(".dylib"))) {
abslib += wxT(".dylib");
- ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s, 0x%0x)"), abslib.c_str(), flags|wxDL_VERBATIM);
+ ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s, 0x%0x)"), abslib.wc_str(), flags|wxDL_VERBATIM);
if (wxDynamicLibrary::Load(abslib, flags|wxDL_VERBATIM))
return true;
}
@@ -84,12 +84,12 @@
if (!name.EndsWith(wxT(".dylib"))) {
wxString dlib(name);
dlib.Append(wxT(".dylib"));
- ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s, 0x%0x)"), dlib.c_str(), flags|wxDL_VERBATIM);
+ ::myLogTrace(MYTRACETAG, wxT("Trying to load(%s, 0x%0x)"), dlib.wc_str(), flags|wxDL_VERBATIM);
if (wxDynamicLibrary::Load(dlib, flags|wxDL_VERBATIM))
return true;
}
#endif
- ::myLogTrace(MYTRACETAG, wxT("Failed to load %s"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Failed to load %s"), name.wc_str());
return false;
#endif
}
Index: opennx/MyIPC.cpp
===================================================================
--- opennx/MyIPC.cpp (revision 724)
+++ opennx/MyIPC.cpp (working copy)
@@ -227,7 +227,7 @@
switch (m_eType) {
case TypeNone:
- ::myLogTrace(MYTRACETAG, wxT("process O: '%s'"), msg.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("process O: '%s'"), msg.wc_str());
if (m_pEvtHandler) {
wxCommandEvent upevent(wxEVT_GENERIC, wxID_ANY);
upevent.SetInt(ActionStdout);
@@ -241,7 +241,7 @@
if (msg.StartsWith(wxT("FREENX>")))
msg = msg.Mid(4);
code = parseCode(msg);
- ::myLogTrace(MYTRACETAG, wxT("nxssh O[%04d]: '%s'"), code, msg.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("nxssh O[%04d]: '%s'"), code, msg.wc_str());
if (m_pEvtHandler) {
wxCommandEvent upevent(wxEVT_NXSSH, wxID_ANY);
upevent.SetInt(ActionLog);
@@ -662,7 +662,7 @@
switch (m_eType) {
case TypeNone:
- ::myLogTrace(MYTRACETAG, wxT("process E: '%s'"), msg.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("process E: '%s'"), msg.wc_str());
if (m_pEvtHandler) {
wxCommandEvent upevent(wxEVT_GENERIC, wxID_ANY);
upevent.SetInt(ActionStderr);
@@ -672,7 +672,7 @@
break;
case TypeSsh:
code = parseCode(msg);
- ::myLogTrace(MYTRACETAG, wxT("nxssh E[%04d]: '%s'"), code, msg.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("nxssh E[%04d]: '%s'"), code, msg.wc_str());
if (m_pEvtHandler) {
wxCommandEvent upevent(wxEVT_NXSSH, wxID_ANY);
upevent.SetInt(ActionLog);
Index: opennx/MySession.cpp
===================================================================
--- opennx/MySession.cpp (revision 724)
+++ opennx/MySession.cpp (working copy)
@@ -123,7 +123,7 @@
return m_sFontPath;
break;
default:
- ::wxLogError(_("Invalid X11 server platform"));
+ wxLogError(_("Invalid X11 server platform"));
break;
}
return wxEmptyString;
@@ -206,7 +206,7 @@
{
for (size_t i = 0; i < m_aDirs.GetCount(); i++) {
if (name.StartsWith(m_aDirs[i])) {
- ::myLogTrace(MYTRACETAG, wxT("adding file '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("adding file '%s'"), name.wc_str());
m_aFiles.Add(name);
return wxDIR_CONTINUE;
}
@@ -217,7 +217,7 @@
virtual wxDirTraverseResult OnDir(const wxString &name)
{
if (name.StartsWith(m_sTopLevel + wxT("S-"))) {
- ::myLogTrace(MYTRACETAG, wxT("Session dir: '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Session dir: '%s'"), name.wc_str());
wxTextFile tf(name + wxFileName::GetPathSeparator() + wxT("session"));
if (tf.Exists()) {
wxString line;
@@ -228,7 +228,7 @@
line.AfterFirst(wxT('\'')).BeforeLast(wxT('\'')).ToLong(&pid);
::myLogTrace(MYTRACETAG, wxT("Proxy-PID: %d"), pid);
if (!wxProcess::Exists(pid)) {
- ::myLogTrace(MYTRACETAG, wxT("PID does not exist, adding '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("PID does not exist, adding '%s'"), name.wc_str());
m_aDirs.Add(name);
return wxDIR_CONTINUE;
}
@@ -236,10 +236,10 @@
}
}
}
- ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.wc_str());
}
if (name.StartsWith(m_sTopLevel + wxT("D-"))) {
- ::myLogTrace(MYTRACETAG, wxT("Service dir: '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Service dir: '%s'"), name.wc_str());
wxTextFile tf(name + wxFileName::GetPathSeparator() + wxT("pid"));
if (tf.Exists()) {
long pid;
@@ -247,21 +247,21 @@
tf.GetFirstLine().ToLong(&pid);
::myLogTrace(MYTRACETAG, wxT("Service-PID: %d"), pid);
if (!wxProcess::Exists(pid)) {
- ::myLogTrace(MYTRACETAG, wxT("PID does not exist, adding '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("PID does not exist, adding '%s'"), name.wc_str());
m_aDirs.Add(name);
return wxDIR_CONTINUE;
}
}
}
- ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.wc_str());
}
if (name.StartsWith(m_sTopLevel + wxT("F-"))) {
- ::myLogTrace(MYTRACETAG, wxT("Failed session dir: '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Failed session dir: '%s'"), name.wc_str());
m_aDirs.Add(name);
return wxDIR_CONTINUE;
}
if (m_cRegex.Matches(name)) {
- ::myLogTrace(MYTRACETAG, wxT("Temp dir: '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Temp dir: '%s'"), name.wc_str());
long mpid = 0;
long spid = 0;
m_cRegex.GetMatch(name, 1).ToLong(&mpid);
@@ -275,11 +275,11 @@
}
}
if (mpid && (!wxProcess::Exists(mpid)) && ((!spid) || (!wxProcess::Exists(spid)))) {
- ::myLogTrace(MYTRACETAG, wxT("PIDs do not exist, adding '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("PIDs do not exist, adding '%s'"), name.wc_str());
m_aDirs.Add(name);
return wxDIR_CONTINUE;
}
- ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Keeping '%s'"), name.wc_str());
return wxDIR_IGNORE;
}
if (name.StartsWith(m_sTopLevel + wxT("temp")))
@@ -362,7 +362,7 @@
{
wxSocketInputStream *inp_stream;
wxString new_path;
- m_perr = wxPROTO_CONNERR;
+ m_lastError = wxPROTO_CONNERR;
if (!m_addr)
return NULL;
@@ -378,7 +378,7 @@
return NULL;
#endif
- if (!BuildRequest(path, m_post_buf.empty() ? wxHTTP_GET : wxHTTP_POST))
+ if (!BuildRequest(path, m_postBuffer.IsEmpty() ? "GET" : "POST"))
return NULL;
inp_stream = new wxSocketInputStream(*this);
@@ -390,9 +390,9 @@
}
protected:
- bool BuildRequest(const wxString& path, wxHTTP_Req req)
+ bool BuildRequest(const wxString& path, const wxString& method)
{
- bool ret = wxHTTP::BuildRequest(path, req);
+ bool ret = wxHTTP::BuildRequest(path, method);
::myLogTrace(MYTRACETAG, wxT("calling ParseHeaders()"));
ParseHeaders();
return ret;
@@ -711,7 +711,7 @@
fn.Assign(m_sUserDir, wxT(".Xauthority"));
return fn.GetFullPath();
default:
- ::wxLogError(_("Invalid X11 server platform"));
+ wxLogError(_("Invalid X11 server platform"));
return wxEmptyString;
}
#endif
@@ -744,7 +744,7 @@
va_list args;
va_start(args, fmt);
wxLog *oldLog = wxLog::SetActiveTarget(m_pSshLog);
- ::wxVLogMessage(fmt, args);
+ wxVLogMessage(fmt, args);
wxLog::SetActiveTarget(oldLog);
va_end(args);
}
@@ -776,7 +776,7 @@
if (m_bCollectConfig) {
m_sConfigBuffer << msg << wxT("\n");
if (m_sConfigBuffer.Length() >= m_nSessionPushLength) {
- ::wxLogInfo(wxT("session override finished"));
+ wxLogInfo(wxT("session override finished"));
m_bCollectConfig = false;
m_pCfg->LoadFromString(m_sConfigBuffer, true);
if (m_pCfg->IsWritable())
@@ -794,7 +794,7 @@
}
break;
case MyIPC::ActionError:
- ::wxLogError(msg);
+ wxLogError(msg);
m_bGotError = true;
break;
case MyIPC::ActionPromptYesNo:
@@ -855,7 +855,7 @@
case MyIPC::ActionSessionPushStart:
m_sConfigBuffer.Empty();
m_bCollectConfig = true;
- ::wxLogInfo(wxT("receiving %d bytes of session override"),
+ wxLogInfo(wxT("receiving %d bytes of session override"),
m_nSessionPushLength);
break;
case MyIPC::ActionNextCommand:
@@ -890,7 +890,7 @@
case STATE_PARSE_RESOURCES:
// Server has sent list of attachable sessions
m_bCollectResources = false;
- ::wxLogInfo(wxT("received end of feature list"));
+ wxLogInfo(wxT("received end of feature list"));
parseResources();
// intentionally fall thru
case STATE_LIST_SESSIONS:
@@ -906,7 +906,7 @@
if (m_bIsShadow) {
// Server has sent list of attachable sessions
m_bCollectSessions = false;
- ::wxLogInfo(wxT("received end of attachable session list"));
+ wxLogInfo(wxT("received end of attachable session list"));
parseSessions(false);
}
break;
@@ -1038,7 +1038,7 @@
case MyIPC::ActionTerminated:
if ((m_eConnectState <= STATE_PARSE_SESSIONS) && (!m_bGotError) && (!m_bRemoveKey) && (m_sOffendingKey.IsEmpty())) {
msg = _("Unexpected termination of nxssh");
- ::wxLogError(msg);
+ wxLogError(msg);
m_bGotError = true;
}
break;
@@ -1060,7 +1060,7 @@
break;
case MyIPC::ActionSessionListStart:
// Server starts sending session list
- ::wxLogInfo(wxT("receiving session list .."));
+ wxLogInfo(wxT("receiving session list .."));
m_aParseBuffer.Empty();
m_bCollectSessions = true;
break;
@@ -1067,12 +1067,12 @@
case MyIPC::ActionSessionListEnd:
// Server has sent list of running & suspended sessions
m_bCollectSessions = false;
- ::wxLogInfo(wxT("received end of session list"));
+ wxLogInfo(wxT("received end of session list"));
parseSessions((event.GetExtraLong() == 148) && (!m_bIsShadow));
break;
case MyIPC::ActionResList:
// NX4: Server starts sending resource info
- ::wxLogInfo(wxT("receiving resource info .."));
+ wxLogInfo(wxT("receiving resource info .."));
m_aParseBuffer.Empty();
m_bCollectResources = true;
break;
@@ -1105,7 +1105,7 @@
MySession::printSsh(const wxString &s, bool doLog /* = true */, const wxString &reason /* = wxT("") */)
{
if (m_pNxSsh) {
- ::myLogTrace(MYTRACETAG, wxT("%ssending '%s'"), reason.c_str(), (doLog ? s.c_str() : wxT("********")));
+ ::myLogTrace(MYTRACETAG, wxT("%ssending '%s'"), reason.wc_str(), (doLog ? s.wc_str() : wxT("********")));
m_pNxSsh->Print(s, doLog);
}
}
@@ -1125,7 +1125,7 @@
wxString sType(re.GetMatch(line, 2));
wxString sValue(re.GetMatch(line, 3));
::myLogTrace(MYTRACETAG, wxT("parseResources: match c='%s' t='%s', v='%s'"),
- sClass.c_str(), sType.c_str(), sValue.c_str());
+ sClass.wc_str(), sType.wc_str(), sValue.wc_str());
if (sClass.IsSameAs(wxT("session"))) {
// Not yet clear what to do with that data.
}
@@ -1137,7 +1137,7 @@
}
}
} else
- ::myLogTrace(MYTRACETAG, wxT("parseResources: NO match line='%s'"), line.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("parseResources: NO match line='%s'"), line.wc_str());
}
}
@@ -1173,7 +1173,7 @@
}
for (size_t i = 0; i < n; i++) {
wxString line = m_aParseBuffer[i].Trim();
- ::myLogTrace(MYTRACETAG, wxT("parseSessions: line='%s'"), line.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("parseSessions: line='%s'"), line.wc_str());
if (re.Matches(line)) {
::myLogTrace(MYTRACETAG, wxT("parseSessions: re match"));
wxString sPort(re.GetMatch(line, 1));
@@ -1237,7 +1237,7 @@
if (bFound) {
d.EnableNew(moreAllowed);
if ((!m_bIsShadow) && wxGetApp().AutoResume() && (iSessionCount == 1) && (sName.IsSameAs(m_pCfg->sGetName()))) {
- ::wxLogInfo(wxT("RESUME"));
+ wxLogInfo(wxT("RESUME"));
m_sResumeName = sName;
m_sResumeType = d.GetSelectedType();
m_sResumeId = d.GetSelectedId();
@@ -1248,16 +1248,16 @@
::myLogTrace(MYTRACETAG, wxT("ResumeDialog returned OK"));
switch (d.GetMode()) {
case ResumeDialog::Refresh:
- ::wxLogInfo(wxT("REFRESH"));
+ wxLogInfo(wxT("REFRESH"));
m_eConnectState = STATE_LIST_SESSIONS;
break;
case ResumeDialog::Terminate:
- ::wxLogInfo(wxT("TERMINATE"));
+ wxLogInfo(wxT("TERMINATE"));
m_sKillId = d.GetSelectedId();
m_eConnectState = STATE_KILL_SESSION;
break;
case ResumeDialog::Resume:
- ::wxLogInfo(wxT("RESUME"));
+ wxLogInfo(wxT("RESUME"));
m_sResumeName = d.GetSelectedName();
m_sResumeType = d.GetSelectedType();
m_sResumeId = d.GetSelectedId();
@@ -1265,7 +1265,7 @@
m_eConnectState = m_bIsShadow ? STATE_ATTACH_SESSION : STATE_RESUME_SESSION;
break;
case ResumeDialog::Takeover:
- ::wxLogInfo(wxT("TAKEOVER"));
+ wxLogInfo(wxT("TAKEOVER"));
m_sResumeName = d.GetSelectedName();
m_sResumeType = d.GetSelectedType();
m_sResumeId = d.GetSelectedId();
@@ -1339,7 +1339,7 @@
continue;
bool bAvailable = false;
wxString sn = sg[i].m_sShareName;
- ::myLogTrace(MYTRACETAG, wxT("startSharing: considering share '%s'"), sn.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("startSharing: considering share '%s'"), sn.wc_str());
for (size_t j = 0; j < sa.GetCount(); j++) {
if ((sa[j].sharetype == sg[i].m_eType) && (sa[j].name == sn)) {
bAvailable = true;
@@ -1346,7 +1346,7 @@
break;
}
}
- ::myLogTrace(MYTRACETAG, wxT("'%s' is %savailable"), sn.c_str(),
+ ::myLogTrace(MYTRACETAG, wxT("'%s' is %savailable"), sn.wc_str(),
(bAvailable ? wxEmptyString : wxT("not ")));
if (!bAvailable)
continue;
@@ -1496,7 +1496,7 @@
case XARCH_CYGWIN:
m_sXauthCookie = getXauthCookie(display, wxT("/unix"));
if (m_sXauthCookie.IsEmpty()) {
- ::wxLogError(_("Could not create X11 authentication cookie"));
+ wxLogError(_("Could not create X11 authentication cookie"));
return false;
}
wxWinCmd = fn.GetShortPath();
@@ -1531,7 +1531,7 @@
dpyStr = wxT("127.0.0.1:");
dpyStr << xdpy - X_PORT_OFFSET;
::wxSetEnv(wxT("DISPLAY"), dpyStr);
- ::wxLogInfo(wxT("env: DISPLAY='%s'"), dpyStr.c_str());
+ wxLogInfo(wxT("env: DISPLAY='%s'"), dpyStr.c_str());
// Xauth cookie and X<dpy>.hosts are still existing
// from initial startup
return true;
@@ -1540,7 +1540,7 @@
fn.SetFullName(wxT("Xming.exe"));
m_sXauthCookie = getXauthCookie(display, wxEmptyString);
if (m_sXauthCookie.IsEmpty()) {
- ::wxLogError(_("Could not create X11 authentication cookie"));
+ wxLogError(_("Could not create X11 authentication cookie"));
return false;
}
wxWinCmd = fn.GetShortPath();
@@ -1572,25 +1572,25 @@
fn.AppendDir(wxT("Xming"));
fn.MakeAbsolute();
::wxSetEnv(wxT("XMING_BASEDIR"), fn.GetPath());
- ::wxLogInfo(wxT("env: XMING_BASEDIR='%s'"), fn.GetPath().c_str());
+ wxLogInfo(wxT("env: XMING_BASEDIR='%s'"), fn.GetPath().c_str());
dpyStr.Prepend(wxT("127.0.0.1"));
break;
default:
- ::wxLogError(_("No X server found."));
+ wxLogError(_("No X server found."));
return false;
break;
}
- ::wxLogInfo(wxT("Executing %s"), wxWinCmd.c_str());
+ wxLogInfo(wxT("Executing %s"), wxWinCmd.c_str());
int r = CreateDetachedProcess((const char *)wxWinCmd.mb_str());
if (r != 0) {
- ::wxLogError(_("Could not execute %s: %s\n"), wxWinCmd.c_str(), wxSysErrorMsg(r));
+ wxLogError(_("Could not execute %s: %s\n"), wxWinCmd.c_str(), wxSysErrorMsg(r));
return false;
}
m_iXserverPID = GetDetachedPID();
AllowSetForegroundWindow(m_iXserverPID);
::wxSetEnv(wxT("DISPLAY"), dpyStr);
- ::wxLogInfo(wxT("env: DISPLAY='%s'"), dpyStr.c_str());
+ wxLogInfo(wxT("env: DISPLAY='%s'"), dpyStr.c_str());
return true;
}
#endif
@@ -1677,7 +1677,7 @@
<< wxT("S-") << m_sSessionID;
{
if (!wxFileName::Mkdir(m_sSessionDir, 0700, wxPATH_MKDIR_FULL)) {
- ::wxLogSysError(_("Could not create session directory\n%s\n"),
+ wxLogSysError(_("Could not create session directory\n%s\n"),
m_sSessionDir.c_str());
m_bGotError = true;
}
@@ -1687,8 +1687,8 @@
if (f.Open(m_sOptFilename, wxFile::write, wxS_IRUSR|wxS_IWUSR)) {
f.Write(popts + wxT("\n"));
f.Close();
- ::wxLogInfo(wxT("Option file='%s'\n"), m_sOptFilename.c_str());
- ::wxLogInfo(wxT("Session options='%s'\n"), popts.c_str());
+ wxLogInfo(wxT("Option file='%s'\n"), m_sOptFilename.c_str());
+ wxLogInfo(wxT("Session options='%s'\n"), popts.c_str());
wxString pcmd;
wxConfigBase::Get()->Read(wxT("Config/SystemNxDir"), &pcmd);
pcmd << wxFileName::GetPathSeparator() << wxT("bin")
@@ -1696,7 +1696,7 @@
<< cygPath(m_sOptFilename) << wxT(":") << m_sSessionDisplay;
printSsh(wxT("bye"), true, wxT("Options file written, "));
if ((m_lProtocolVersion <= 0x00020000) || (!m_bSslTunneling)) {
- ::wxLogInfo(wxT("Executing %s"), pcmd.c_str());
+ wxLogInfo(wxT("Executing %s"), pcmd.c_str());
#ifdef __WXMSW__
CreateDetachedProcess((const char *)pcmd.mb_str());
if (m_iXserverPID)
@@ -1708,7 +1708,7 @@
#endif
}
} else {
- ::wxLogSysError(_("Could not write session options\n%s\n"),
+ wxLogSysError(_("Could not write session options\n%s\n"),
m_sOptFilename.c_str());
m_bGotError = true;
}
@@ -1730,19 +1730,19 @@
size_t idx = i - 1;
if (used.Index(ret[idx].m_sGroupName) == wxNOT_FOUND) {
::myLogTrace(MYTRACETAG, wxT("removing[%d] '%s'"),
- idx, ret[idx].m_sShareName.c_str());
+ idx, ret[idx].m_sShareName.wc_str());
ret.RemoveAt(idx);
continue;
}
if (ret[idx].m_eType != SharedResource::SHARE_CUPS_PRINTER) {
::myLogTrace(MYTRACETAG, wxT("removing[%d] '%s'"),
- idx, ret[idx].m_sShareName.c_str());
+ idx, ret[idx].m_sShareName.wc_str());
ret.RemoveAt(idx);
continue;
}
bool bAvailable = false;
::myLogTrace(MYTRACETAG, wxT("Considering CUPS printer '%s' %d"),
- ret[idx].m_sShareName.c_str(), idx);
+ ret[idx].m_sShareName.wc_str(), idx);
for (size_t j = 0; j < sa.GetCount(); j++) {
if (sa[j].name == ret[idx].m_sShareName) {
bAvailable = true;
@@ -1750,10 +1750,10 @@
}
}
::myLogTrace(MYTRACETAG, wxT("'%s' is %savailable"),
- ret[idx].m_sShareName.c_str(), (bAvailable ? wxEmptyString : wxT("not ")));
+ ret[idx].m_sShareName.wc_str(), (bAvailable ? wxEmptyString : wxT("not ")));
if (!bAvailable) {
::myLogTrace(MYTRACETAG, wxT("removing[%d] '%s'"),
- idx, ret[idx].m_sShareName.c_str());
+ idx, ret[idx].m_sShareName.wc_str());
ret.RemoveAt(idx);
}
}
@@ -1781,7 +1781,7 @@
wxInputStream *is = http.GetInputStream(wxT("/"));
int res = http.GetResponse();
wxString svr = http.GetHeader(wxT("server"));
- ::myLogTrace(MYTRACETAG, wxT("isCupsRunning RC=%d SVR=%s"), res, svr.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("isCupsRunning RC=%d SVR=%s"), res, svr.wc_str());
if ((res == 200) && svr.Contains(wxT("CUPS")))
ret = true;
delete is;
@@ -1798,7 +1798,7 @@
if (cupsport == -1) {
cupsport = getFirstFreePort(20000);
if (0 == cupsport) {
- ::wxLogWarning(_("Could not assign a free port for CUPS printing"));
+ wxLogWarning(_("Could not assign a free port for CUPS printing"));
return false;
}
wxConfigBase::Get()->Write(wxT("Config/CupsPort"), cupsport);
@@ -1812,7 +1812,7 @@
// have failed. In that case, we must start our own new instance of cupsd.
cupsport = getFirstFreePort(20000);
if (0 == cupsport) {
- ::wxLogWarning(_("Could not assign a free port for CUPS printing"));
+ wxLogWarning(_("Could not assign a free port for CUPS printing"));
return false;
}
wxConfigBase::Get()->Write(wxT("Config/CupsPort"), cupsport);
@@ -1865,10 +1865,10 @@
wxTextOutputStream tos(fos);
tos << wxT("CacheDir ") << sCupsDir << wxT("cache") << endl;
tos << wxT("TempDir ") << sCupsDir << wxT("spool")
- << wxFileName::GetPathSeparator() << wxT("tmp") << endl;
+ << (wchar_t)wxFileName::GetPathSeparator() << wxT("tmp") << endl;
tos << wxT("RequestRoot ") << sCupsDir << wxT("spool") << endl;
tos << wxT("ServerRoot ") << m_sUserDir
- << wxFileName::GetPathSeparator() << wxT("cups") << endl;
+ << (wchar_t)wxFileName::GetPathSeparator() << wxT("cups") << endl;
tos << wxT("ErrorLog ") << sCupsDir << wxT("error_log") << endl;
tos << wxT("PageLog ") << sCupsDir << wxT("page_log") << endl;
tos << wxT("AccessLog ") << sCupsDir << wxT("access_log") << endl;
@@ -1922,7 +1922,7 @@
}
wxString cmd = m_pCfg->sGetCupsPath();
cmd << wxT(" -c ") << sCupsDir << wxT("cupsd.conf");
- ::myLogTrace(MYTRACETAG, wxT("Starting '%s'"), cmd.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Starting '%s'"), cmd.wc_str());
if (::wxExecute(cmd, wxEXEC_ASYNC) <= 0)
return false;
wxThread::Sleep(500);
@@ -1965,9 +1965,9 @@
ldpath.Prepend(wxT(":"));
ldpath.Prepend(turbopath);
}
- ::myLogDebug(wxT("DYLD_LIBRARY_PATH='%s'"), ldpath.c_str());
+ ::myLogDebug(wxT("DYLD_LIBRARY_PATH='%s'"), ldpath.wc_str());
if (!::wxSetEnv(wxT("DYLD_LIBRARY_PATH"), ldpath)) {
- ::wxLogSysError(wxT("Cannot set DYLD_LIBRARY_PATH"));
+ wxLogSysError(wxT("Cannot set DYLD_LIBRARY_PATH"));
}
}
} else {
@@ -1985,9 +1985,9 @@
if (newpath.IsEmpty()) {
::wxUnsetEnv(wxT("DYLD_LIBRARY_PATH"));
} else {
- ::myLogDebug(wxT("DYLD_LIBRARY_PATH='%s'"), newpath.c_str());
+ ::myLogDebug(wxT("DYLD_LIBRARY_PATH='%s'"), newpath.wc_str());
if (!::wxSetEnv(wxT("DYLD_LIBRARY_PATH"), newpath)) {
- ::wxLogSysError(wxT("Cannot set DYLD_LIBRARY_PATH"));
+ wxLogSysError(wxT("Cannot set DYLD_LIBRARY_PATH"));
}
}
}
@@ -2012,13 +2012,13 @@
MySession::clearSshKeys(const wxString &keyloc)
{
::myLogTrace(MYTRACETAG, wxT("Clearing keys for %s at %s"),
- m_pCfg->sGetServerHost().c_str(), keyloc.c_str());
+ m_pCfg->sGetServerHost().wc_str(), keyloc.wc_str());
wxString keyfile = keyloc.BeforeLast(wxT(':'));
#ifdef __WXMSW__
if (keyfile.StartsWith(wxT("/cygdrive/"), &keyfile)) {
keyfile = keyfile.BeforeFirst(wxT('/')).Upper().Append(wxT(":/")).Append(keyfile.AfterFirst(wxT('/')));
keyfile.Replace(wxT("/"), wxT("\\"));
- ::myLogTrace(MYTRACETAG, wxT("Keyfile: %s"), keyfile.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Keyfile: %s"), keyfile.wc_str());
}
#endif
long n;
@@ -2027,7 +2027,7 @@
wxTextFile tf(keyfile);
if (tf.Exists()) {
if (tf.Open()) {
- ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), tf[n].c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), tf[n].wc_str());
tf.RemoveLine(n);
wxIPV4address ip;
if (ip.Hostname(m_pCfg->sGetServerHost())) {
@@ -2035,7 +2035,7 @@
wxString line;
for (line = tf.GetFirstLine(); !tf.Eof(); line = tf.GetNextLine()) {
if (line.Contains(ipnum)) {
- ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), line.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), line.wc_str());
tf.RemoveLine(tf.GetCurrentLine());
}
}
@@ -2145,7 +2145,7 @@
f.Write(m_pCfg->sGetSshKey());
f.Close();
} else {
- ::wxLogSysError(_("Could not write %s"), fn.GetFullPath().c_str());
+ wxLogSysError(_("Could not write %s"), fn.GetFullPath().c_str());
return false;
}
}
@@ -2198,18 +2198,18 @@
#endif
::wxSetEnv(wxT("PATH"), stmp);
}
- ::wxLogInfo(wxT("env: PATH='%s'"), stmp.c_str());
+ wxLogInfo(wxT("env: PATH='%s'"), stmp.c_str());
fn.Assign(wxFileName::GetHomeDir());
::wxSetEnv(wxT("NX_HOME"), cygPath(fn.GetFullPath()));
- ::wxLogInfo(wxT("env: NX_HOME='%s'"), cygPath(fn.GetFullPath()).c_str());
+ wxLogInfo(wxT("env: NX_HOME='%s'"), cygPath(fn.GetFullPath()).c_str());
::wxSetEnv(wxT("NX_ROOT"), cygPath(m_sUserDir));
- ::wxLogInfo(wxT("env: NX_ROOT='%s'"), cygPath(m_sUserDir).c_str());
+ wxLogInfo(wxT("env: NX_ROOT='%s'"), cygPath(m_sUserDir).c_str());
::wxSetEnv(wxT("NX_SYSTEM"), cygPath(m_sSysDir));
- ::wxLogInfo(wxT("env: NX_SYSTEM='%s'"), cygPath(m_sSysDir).c_str());
+ wxLogInfo(wxT("env: NX_SYSTEM='%s'"), cygPath(m_sSysDir).c_str());
::wxSetEnv(wxT("NX_CLIENT"), cygPath(::wxGetApp().GetSelfPath()));
- ::wxLogInfo(wxT("env: NX_CLIENT='%s'"), cygPath(::wxGetApp().GetSelfPath()).c_str());
+ wxLogInfo(wxT("env: NX_CLIENT='%s'"), cygPath(::wxGetApp().GetSelfPath()).c_str());
::wxSetEnv(wxT("NX_VERSION"), m_sProtocolVersion);
- ::wxLogInfo(wxT("env: NX_VERSION='%s'"), m_sProtocolVersion.c_str());
+ wxLogInfo(wxT("env: NX_VERSION='%s'"), m_sProtocolVersion.c_str());
if (m_pCfg->eGetDisplayType() == MyXmlConfig::DPTYPE_FULLSCREEN) {
bool bVal = false;
wxConfigBase::Get()->Read(wxT("Config/DisableMagicPixel"), &bVal, false);
@@ -2218,11 +2218,11 @@
::wxDisplaySize(&dspw, &dsph);
wxString w = wxString::Format(wxT("%d"), dspw);
::wxSetEnv(wxT("NX_KIOSK_X"), w);
- ::wxLogInfo(wxT("env: NX_KIOSK_X='%s'"), w.c_str());
+ wxLogInfo(wxT("env: NX_KIOSK_X='%s'"), w.c_str());
}
}
::wxSetEnv(wxT("XAUTHORITY"), getXauthPath(m_eXarch));
- ::wxLogInfo(wxT("env: XAUTHORITY='%s'"), getXauthPath(m_eXarch).c_str());
+ wxLogInfo(wxT("env: XAUTHORITY='%s'"), getXauthPath(m_eXarch).c_str());
#ifdef __UNIX__
// NX needs TEMP or NX_TEMP to be set to the same dir
// where .X11-unix resides (typically /tmp)
@@ -2232,19 +2232,19 @@
fn.RemoveLastDir();
fn.SetName(wxEmptyString);
::wxSetEnv(wxT("NX_TEMP"), cygPath(fn.GetFullPath()));
- ::wxLogInfo(wxT("env: NX_TEMP='%s'"), cygPath(fn.GetShortPath()).c_str());
+ wxLogInfo(wxT("env: NX_TEMP='%s'"), cygPath(fn.GetShortPath()).c_str());
} else {
::wxSetEnv(wxT("NX_TEMP"), wxT("/tmp"));
- ::wxLogInfo(wxT("env: NX_TEMP='/tmp'"));
+ wxLogInfo(wxT("env: NX_TEMP='/tmp'"));
}
#else
::wxSetEnv(wxT("NX_TEMP"), cygPath(m_sTempDir));
- ::wxLogInfo(wxT("env: NX_TEMP='%s'"), cygPath(m_sTempDir).c_str());
+ wxLogInfo(wxT("env: NX_TEMP='%s'"), cygPath(m_sTempDir).c_str());
#endif
#ifdef __WXMSW__
if (!startXserver()) {
- ::wxLogError(_("Could not start local X server"));
+ wxLogError(_("Could not start local X server"));
return false;
}
if (XARCH_XMING == m_eXarch) {
@@ -2251,7 +2251,7 @@
// Now, that the X server has been started, // set XAUTHORITY
// again, but this time in cygwin notation (for nxssh).
::wxSetEnv(wxT("XAUTHORITY"), getXauthPath(XARCH_CYGWIN));
- ::wxLogInfo(wxT("env: XAUTHORITY='%s'"), getXauthPath(XARCH_CYGWIN).c_str());
+ wxLogInfo(wxT("env: XAUTHORITY='%s'"), getXauthPath(XARCH_CYGWIN).c_str());
// Configure XMing's special clipboard filter
HWND clpWnd = FindWindow(NULL ,wxT("OpenNXWinClip"));
if (NULL != clpWnd) {
@@ -2272,21 +2272,21 @@
dlg.SetStatusText(_("Preparing multimedia service ..."));
PulseAudio pa;
if (pa.IsAvailable()) {
- ::wxLogInfo(wxT("using existing pulseaudio"));
+ wxLogInfo(wxT("using existing pulseaudio"));
m_lEsdPort = wxConfigBase::Get()->Read(wxT("State/nxesdPort"), -1);
if (m_lEsdPort < 0)
m_lEsdPort = getFirstFreePort(6000);
if (0 < m_lEsdPort) {
- ::wxLogInfo(wxT("Activating ESD Module in pulseaudio on port %ld"), m_lEsdPort);
+ wxLogInfo(wxT("Activating ESD Module in pulseaudio on port %ld"), m_lEsdPort);
if (pa.ActivateEsound(m_lEsdPort)) {
m_bEsdRunning = true;
wxConfigBase::Get()->Write(wxT("State/nxesdPort"), m_lEsdPort);
wxConfigBase::Get()->Write(wxT("State/nxesdPID"), -1);
} else {
- ::wxLogWarning(_("Could not start multimedia support"));
+ wxLogWarning(_("Could not start multimedia support"));
}
} else
- ::wxLogWarning(_("Could not assign a free port for multimedia support"));
+ wxLogWarning(_("Could not assign a free port for multimedia support"));
}
#ifndef __WXMSW__
if (!m_bEsdRunning) {
@@ -2304,7 +2304,7 @@
m_lEsdPort = getFirstFreePort(6000);
if (0 < m_lEsdPort) {
esdcmd << wxT(" -tcp -nobeeps -bind 127.0.0.1 -spawnfd 1 -port ") << m_lEsdPort;
- ::wxLogInfo(wxT("starting in background: %s"), esdcmd.c_str());
+ wxLogInfo(wxT("starting in background: %s"), esdcmd.c_str());
wxProcess *nxesd = wxProcess::Open(esdcmd,
wxEXEC_ASYNC|wxEXEC_MAKE_GROUP_LEADER);
if (nxesd) {
@@ -2329,11 +2329,11 @@
}
}
if (!m_bEsdRunning)
- ::wxLogWarning(_("Could not start multimedia support"));
+ wxLogWarning(_("Could not start multimedia support"));
} else
- ::wxLogWarning(_("Could not assign a free port for multimedia support"));
+ wxLogWarning(_("Could not assign a free port for multimedia support"));
} else
- ::wxLogWarning(_("Could not start multimedia support"));
+ wxLogWarning(_("Could not start multimedia support"));
}
}
#endif
@@ -2350,7 +2350,7 @@
if (getActiveCupsPrinters().GetCount() > 0) {
dlg.SetStatusText(_("Preparing CUPS service ..."));
if (!prepareCups())
- ::wxLogWarning(_("Could not start CUPS printing"));
+ wxLogWarning(_("Could not start CUPS printing"));
dlg.SetStatusText(wxString::Format(_("Connecting to %s ..."),
m_pCfg->sGetServerHost().c_str()));
}
@@ -2358,7 +2358,7 @@
MyIPC nxssh;
m_pNxSsh = &nxssh;
- ::wxLogInfo(wxT("Starting %s"), nxsshcmd.c_str());
+ wxLogInfo(wxT("Starting %s"), nxsshcmd.c_str());
do {
m_bRemoveKey = false;
m_sOffendingKey = wxEmptyString;
@@ -2402,8 +2402,8 @@
#endif
} else {
setTurboPath(false);
- ::wxLogError(_("Called command was: ") + nxsshcmd);
- ::wxLogError(_("Could not start nxssh."));
+ wxLogError(_("Called command was: ") + nxsshcmd);
+ wxLogError(_("Could not start nxssh."));
#ifdef __WXMSW__
terminateXserver();
#endif
Index: opennx/MyValidator.cpp
===================================================================
--- opennx/MyValidator.cpp (revision 724)
+++ opennx/MyValidator.cpp (working copy)
@@ -653,7 +653,7 @@
chOk = (wxIsalnum(keyCode) || (keyCode == _T('.')) || (keyCode == _T('-')));
break;
case MYVAL_FILENAME:
- chOk = (wxFileName::GetForbiddenChars().Find(keyCode) == -1);
+ chOk = (wxFileName::GetForbiddenChars().Find((wchar_t)keyCode) == -1);
break;
}
if (!chOk) {
Index: opennx/MyWizard.cpp
===================================================================
--- opennx/MyWizard.cpp (revision 724)
+++ opennx/MyWizard.cpp (working copy)
@@ -1344,7 +1344,7 @@
{
if (event.GetDirection()) {
MyXmlConfig *cfg = wxDynamicCast(GetParent(), MyWizard)->pGetConfig();
- ::myLogTrace(MYTRACETAG, _T("MyWizard: creating new config %s"), cfg->sGetFileName().c_str());
+ ::myLogTrace(MYTRACETAG, _T("MyWizard: creating new config %s"), cfg->sGetFileName().wc_str());
cfg->SaveToFile();
TransferDataFromWindow();
if (m_bShowAdvancedConfig) {
@@ -1356,7 +1356,7 @@
case wxID_CANCEL:
break;
case wxID_CLEAR:
- ::myLogTrace(MYTRACETAG, _T("deleting '%s'"), fn.c_str());
+ ::myLogTrace(MYTRACETAG, _T("deleting '%s'"), fn.wc_str());
::wxRemoveFile(fn);
// actually we were not cancelled but we want to behave
// as if we were, because the just created session has
Index: opennx/MyXmlConfig.cpp
===================================================================
--- opennx/MyXmlConfig.cpp (revision 724)
+++ opennx/MyXmlConfig.cpp (working copy)
@@ -555,7 +555,7 @@
size_t len = s.Length();
wxString ret;
for (size_t i = 0; i < len; i++) {
- switch (s[i]) {
+ switch ((wchar_t)s[i]) {
case wxT(' '):
case wxT(':'):
case wxT('"'):
@@ -581,7 +581,7 @@
// decorations) where our toplevel dialog are shown.
wxWindow *tlw = ::wxGetApp().GetTopWindow();
if (NULL == tlw) {
- ::wxLogError(_("Could not find application window"));
+ wxLogError(_("Could not find application window"));
return;
}
int dspidx = wxDisplay::GetFromWindow(tlw);
@@ -1155,7 +1155,7 @@
}
delete f;
}
- ::myLogTrace(MYTRACETAG, wxT("Reading %s"), filename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Reading %s"), filename.wc_str());
wxFileInputStream fis(filename);
if (loadFromStream(fis, false)) {
m_sName = wxFileName(filename).GetName();
@@ -1210,7 +1210,7 @@
curl_easy_setopt(c, CURLOPT_WRITEDATA, &mos);
curl_easy_setopt(c, CURLOPT_ERRORBUFFER, ebuf);
curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, CurlWriteCallback);
- ::myLogTrace(MYTRACETAG, wxT("Fetching %s"), filename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Fetching %s"), filename.wc_str());
CURLcode r = curl_easy_perform(c);
if (0 == r) {
off_t len = mos.TellO();
@@ -1220,7 +1220,7 @@
curl_easy_getinfo(c, CURLINFO_RESPONSE_CODE, &rcode);
}
if (200 == rcode) {
- ::myLogTrace(MYTRACETAG, wxT("Fetching %s"), filename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Fetching %s"), filename.wc_str());
char * const data = new char[len];
mos.CopyTo(data, len);
wxMemoryInputStream mis(data, len);
@@ -1239,12 +1239,12 @@
}
delete data;
} else {
- ::wxLogError(_("Error %d while fetching session configuration"), rcode);
+ wxLogError(_("Error %d while fetching session configuration"), rcode);
}
}
} else {
wxString msg(ebuf, *wxConvCurrent);
- ::wxLogError(_("Error while fetching session configuration:\n%s"), msg.c_str());
+ wxLogError(_("Error while fetching session configuration:\n%s"), msg.c_str());
}
curl_easy_cleanup(c);
# else
@@ -1379,7 +1379,7 @@
tmp = getString(opt, wxT("Clipboard filter"), wxEmptyString);
if (!tmp.IsEmpty()) {
- ::myLogTrace(MYTRACETAG, wxT("read: Clipboard filter '%s'"), tmp.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("read: Clipboard filter '%s'"), tmp.wc_str());
if (tmp.CmpNoCase(wxT("primary")) == 0) {
m_iClipFilter = 0;
}
@@ -1971,7 +1971,7 @@
}
void
-MyXmlConfig::iAddOption(wxXmlNode *group, const wxString &name, const long val)
+MyXmlConfig::iAddOption(wxXmlNode *group, const wxString &name, const int val)
{
wxXmlNode *n = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("option"));
n->AddProperty(new wxXmlProperty(wxT("key"), name, NULL));
@@ -2435,7 +2435,7 @@
if (secondline++) {
// Replace 1st line with non-standard NXclient doctype
len -= (secondline - data);
- ::myLogTrace(MYTRACETAG, wxT("Writing '%s'"), m_sFileName.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Writing '%s'"), m_sFileName.wc_str());
wxFile f;
if (!f.Create(m_sFileName, true, wxS_IRUSR|wxS_IWUSR)) {
delete data;
@@ -2464,7 +2464,7 @@
}
delete data;
}
-#ifdef __WXMAC__
+#if 0 //def __WXMAC__
wxFileName fn(m_sFileName);
fn.MacSetTypeAndCreator('TEXT', 'OPNX');
#endif
Index: opennx/MyXmlConfig.h
===================================================================
--- opennx/MyXmlConfig.h (revision 724)
+++ opennx/MyXmlConfig.h (working copy)
@@ -399,7 +399,7 @@
bool cmpUsedShareGroups(const wxArrayString, const wxArrayString);
ShareGroup &findShare(const wxString &);
void bAddOption(wxXmlNode *, const wxString &, const bool);
- void iAddOption(wxXmlNode *, const wxString &, const long);
+ void iAddOption(wxXmlNode *, const wxString &, const int);
void iAddOptionBool(wxXmlNode *, const wxString &, const bool);
void sAddOption(wxXmlNode *, const wxString &, const wxString &);
wxXmlNode *AddGroup(wxXmlNode *, const wxString &);
Index: opennx/PulseAudio.cpp
===================================================================
--- opennx/PulseAudio.cpp (revision 724)
+++ opennx/PulseAudio.cpp (working copy)
@@ -331,7 +331,7 @@
wxString name(i->name, wxConvUTF8);
wxString args(i->argument ? i->argument : "", wxConvUTF8);
::myLogTrace(MYTRACETAG, wxT("module[%u] %s %s"),
- i->index, name.c_str(), args.c_str());
+ i->index, name.wc_str(), args.wc_str());
if (m_bSearch) {
if (name.IsSameAs(m_sStr)) {
m_bSearch = false;
@@ -444,7 +444,7 @@
+ MachineID() + wxT("-runtime");
wxString pidfile = piddir + wxFileName::GetPathSeparator() + wxT("pid");
do {
- ::myLogTrace(MYTRACETAG, wxT("PulseAudio::AutoSpawn: checking '%s'"), pidfile.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("PulseAudio::AutoSpawn: checking '%s'"), pidfile.wc_str());
wxFileInputStream sPid(pidfile);
if (sPid.IsOk()) {
::myLogTrace(MYTRACETAG, wxT("PulseAudio::AutoSpawn: PID file exists"));
@@ -464,7 +464,7 @@
# ifdef __WXMSW__
pacmd << wxT(".exe");
# endif
- ::myLogTrace(MYTRACETAG, wxT("PulseAudio::AutoSpawn: trying to start '%s'"), pacmd.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("PulseAudio::AutoSpawn: trying to start '%s'"), pacmd.wc_str());
# ifdef __WXMSW__
CreateDetachedProcess((const char *)pacmd.mb_str());
// Don't report an error here, as CreateDetachedProcess may
@@ -536,7 +536,7 @@
wxString ma;
unsigned int mi = -1;
if (pa->findmodule(wxT("module-esound-protocol-tcp"), ma, mi)) {
- ::myLogTrace(MYTRACETAG, wxT("found esdmod, idx=%u args='%s'"), mi, ma.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("found esdmod, idx=%u args='%s'"), mi, ma.wc_str());
long mport = 16001;
wxString laddr(wxT("0.0.0.0"));
wxRegEx rePort(wxT("port=(\\d+)"), wxRE_ADVANCED);
@@ -547,7 +547,7 @@
wxRegEx reListen(wxT("listen=(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})"), wxRE_ADVANCED);
if (reListen.Matches(ma)) {
laddr = reListen.GetMatch(ma, 1);
- ::myLogTrace(MYTRACETAG, wxT("matched listen arg a=%s"), laddr.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("matched listen arg a=%s"), laddr.wc_str());
}
// Must disable cookie auth here, because esddsp runs on the NX server
// and we don't have access to the user's ~/.esd_auth on that machine.
Index: opennx/ResumeDialog.cpp
===================================================================
--- opennx/ResumeDialog.cpp (revision 724)
+++ opennx/ResumeDialog.cpp (working copy)
@@ -204,7 +204,7 @@
m_sSelectedId = id;
}
} else {
- ::wxLogError(_("Could not add session list item"));
+ wxLogError(_("Could not add session list item"));
}
}
@@ -267,7 +267,7 @@
info.SetColumn(7);
m_pCtrlSessions->GetItem(info);
m_sSelectedId = info.GetText();
- ::myLogTrace(MYTRACETAG, wxT("Selected session ID=%s"), m_sSelectedId.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Selected session ID=%s"), m_sSelectedId.wc_str());
event.Skip();
}
Index: opennx/SessionList.cpp
===================================================================
--- opennx/SessionList.cpp (revision 724)
+++ opennx/SessionList.cpp (working copy)
@@ -79,12 +79,12 @@
{
int n = m_aFiles.GetCount() - 1;
while (n >= 0) {
- ::myLogTrace(MYTRACETAG, wxT("Removing file %s"), m_aFiles[n].c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing file %s"), m_aFiles[n].wc_str());
::wxRemoveFile(m_aFiles[n--]);
}
n = m_aDirs.GetCount() - 1;
while (n >= 0) {
- ::myLogTrace(MYTRACETAG, wxT("Removing dir %s"), m_aDirs[n].c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing dir %s"), m_aDirs[n].wc_str());
::wxRmdir(m_aDirs[n--]);
}
}
@@ -91,7 +91,7 @@
virtual wxDirTraverseResult OnFile(const wxString& filename)
{
- ::myLogTrace(MYTRACETAG, wxT("going to delete file %s"), filename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("going to delete file %s"), filename.wc_str());
m_aFiles.Add(filename);
return wxDIR_CONTINUE;
}
@@ -98,7 +98,7 @@
virtual wxDirTraverseResult OnDir(const wxString& dirpath)
{
- ::myLogTrace(MYTRACETAG, wxT("going to delete dir %s"), dirpath.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("going to delete dir %s"), dirpath.wc_str());
m_aDirs.Add(dirpath);
return wxDIR_CONTINUE;
}
@@ -212,8 +212,8 @@
m_re->GetMatch(tmp,5).ToLong(&port);
::myLogTrace(MYTRACETAG,
wxT("State='%s', Type='%s', Host='%s', Port=%d, MD5='%s'"),
- m_re->GetMatch(tmp,2).c_str(), m_re->GetMatch(tmp,3).c_str(),
- m_re->GetMatch(tmp,4).c_str(), port, md5.c_str());
+ m_re->GetMatch(tmp,2).wc_str(), m_re->GetMatch(tmp,3).wc_str(),
+ m_re->GetMatch(tmp,4).wc_str(), port, md5.wc_str());
// Create new hash entry
MySession s(m_dirName + wxFileName::GetPathSeparator() + tmp,
m_re->GetMatch(tmp,2), m_re->GetMatch(tmp,3),
@@ -251,7 +251,7 @@
}
} else {
wxString md5 = it->second.sGetMd5();
- ::myLogTrace(MYTRACETAG, wxT("Session '%s' disappeared"), md5.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Session '%s' disappeared"), md5.wc_str());
finished = false;
if (m_pAdminHandler) {
wxCommandEvent ev(wxEVT_SESSIONLIST_ACTION, wxID_ANY);
@@ -285,7 +285,7 @@
{
if (!dir.IsEmpty()) {
{
- ::myLogTrace(MYTRACETAG, wxT("CleanupDir '%s'"), dir.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("CleanupDir '%s'"), dir.wc_str());
wxDir d(dir);
RmRfTraverser t;
d.Traverse(t);
Index: opennx/SessionProperties.cpp
===================================================================
--- opennx/SessionProperties.cpp (revision 724)
+++ opennx/SessionProperties.cpp (working copy)
@@ -657,19 +657,19 @@
case SharedResource::SHARE_UNKNOWN:
break;
case SharedResource::SHARE_SMB_DISK:
- ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().wc_str());
lidx = m_pCtrlSmbShares->InsertItem(0, sg[i].m_sShareName, 1);
m_pCtrlSmbShares->SetItem(lidx, 1, sg[i].m_sAlias);
m_pCtrlSmbShares->SetItem(lidx, 2, comment);
break;
case SharedResource::SHARE_SMB_PRINTER:
- ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().wc_str());
lidx = m_pCtrlSmbShares->InsertItem(0, sg[i].m_sShareName, 2);
m_pCtrlSmbShares->SetItem(lidx, 1, sg[i].m_sDriver);
m_pCtrlSmbShares->SetItem(lidx, 2, comment);
break;
case SharedResource::SHARE_CUPS_PRINTER:
- ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("%s"), sg[i].toString().wc_str());
lidx = m_pCtrlSmbShares->InsertItem(0, sg[i].m_sShareName, 3);
m_pCtrlSmbShares->SetItem(lidx, 1, sg[i].m_sDriver);
m_pCtrlSmbShares->SetItem(lidx, 2, comment);
@@ -679,7 +679,7 @@
}
}
if (0 > lidx) {
- ::myLogTrace(MYTRACETAG, wxT("Broken '%s'"), sg[i].toString().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Broken '%s'"), sg[i].toString().wc_str());
lidx = m_pCtrlSmbShares->InsertItem(0, sg[i].m_sShareName, 0);
m_pCtrlSmbShares->SetItem(lidx, 1, sg[i].m_sAlias);
m_pCtrlSmbShares->SetItem(lidx, 2, comment);
@@ -797,7 +797,7 @@
if (v->IsKindOf(CLASSINFO(MyValidator)))
wxDynamicCast(v, MyValidator)->SetKeyTyped(this);
else
- ::wxLogError(wxT("Detected %s window with validator other than MyValidator!"),
+ wxLogError(wxT("Detected %s window with validator other than MyValidator!"),
w->IsKindOf(CLASSINFO(wxTextCtrl)) ? wxT("wxTextCtrl") : wxT("wxSpinCtrl"));
} else {
#ifdef __WXMAC__
@@ -805,7 +805,7 @@
if (w->GetName().IsEmpty() || w->GetName().IsSameAs(wxT("text")))
continue;
#endif
- ::wxLogError(wxT("Detected %s (name=%s) window without validator!"),
+ wxLogError(wxT("Detected %s (name=%s) window without validator!"),
(w->IsKindOf(CLASSINFO(wxTextCtrl)) ? wxT("wxTextCtrl") : wxT("wxSpinCtrl")),
(w->GetName().IsEmpty() ? wxEmptyString : w->GetName().c_str()));
}
@@ -1238,7 +1238,7 @@
<< wxFileName::GetPathSeparator() << wxT("keyboards");
wxFileInputStream fis(kbdCfg);
if (!fis.IsOk()) {
- ::wxLogError(_("Error while reading keyboard table"));
+ wxLogError(_("Error while reading keyboard table"));
return false;
}
wxTextInputStream tis(fis);
@@ -1410,7 +1410,7 @@
UpdateDialogConstraints(true);
CheckChanged();
} else {
- ::wxLogWarning(_("No local samba server is running."));
+ wxLogWarning(_("No local samba server is running."));
wxDynamicCast(event.GetEventObject(), wxCheckBox)->SetValue(false);
wxDynamicCast(event.GetEventObject(), wxCheckBox)->Enable(false);
}
@@ -1466,7 +1466,7 @@
}
CheckChanged();
} else {
- ::wxLogWarning(_("No sharable resources found"));
+ wxLogWarning(_("No sharable resources found"));
}
}
@@ -1580,7 +1580,7 @@
m_pCfg->sGetName().c_str()), _("Delete Session"),
wxICON_QUESTION|wxYES_NO|wxNO_DEFAULT) == wxYES) {
::wxGetApp().RemoveDesktopEntry(m_pCfg);
- ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), m_pCfg->sGetFileName().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), m_pCfg->sGetFileName().wc_str());
::wxRemoveFile(m_pCfg->sGetFileName());
EndModal(wxID_CLEAR);
}
@@ -1851,7 +1851,7 @@
UpdateDialogConstraints(true);
CheckChanged();
} else {
- ::wxLogWarning(_("No cups server available."));
+ wxLogWarning(_("No cups server available."));
wxDynamicCast(event.GetEventObject(), wxCheckBox)->SetValue(false);
wxDynamicCast(event.GetEventObject(), wxCheckBox)->Enable(false);
m_bUseCups = false;
@@ -2024,12 +2024,12 @@
#ifdef SUPPORT_USBIP
USB u;
if (!u.IsAvailable()) {
- ::wxLogWarning(_("libusb is not available. No USB devices will be exported"));
+ wxLogWarning(_("libusb is not available. No USB devices will be exported"));
return;
}
ArrayOfUSBDevices a = u.GetDevices();
if (a.IsEmpty()) {
- ::wxLogWarning(_("No USB devices available."));
+ wxLogWarning(_("No USB devices available."));
return;
}
UsbFilterDetailsDialog d(this);
Index: opennx/ShareProperties.cpp
===================================================================
--- opennx/ShareProperties.cpp (revision 724)
+++ opennx/ShareProperties.cpp (working copy)
@@ -367,7 +367,7 @@
break;
}
} else {
- ::wxLogMessage(_("No shares found"));
+ wxLogMessage(_("No shares found"));
m_pCtrlLocalShares->Enable(false);
m_pCtrlMountPoint->Enable(false);
m_pCtrlUsername->Enable(false);
Index: opennx/TextViewer.cpp
===================================================================
--- opennx/TextViewer.cpp (revision 724)
+++ opennx/TextViewer.cpp (working copy)
@@ -56,7 +56,7 @@
public:
- bool DoLoadFile(const wxString& filename, int fileType = wxRICHTEXT_TYPE_XML)
+ bool DoLoadFile(const wxString& filename, wxRichTextFileType fileType = wxRICHTEXT_TYPE_XML)
{
bool success = false;
wxFileSystem fs;
Index: opennx/configure.ac
===================================================================
--- opennx/configure.ac (revision 724)
+++ opennx/configure.ac (working copy)
@@ -16,9 +16,12 @@
darwin*)
preferred_cc="gcc-4.0 $preferred_cc"
preferred_cxx="g++-4.0 $preferred_cxx"
- OSX_MINVER=10.5
- OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
- OSX_SDKFLAGS="-isysroot $OSX_SYSROOT -mmacosx-version-min=$OSX_MINVER"
+ dnl OSX_MINVER=10.5
+ dnl OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
+ dnl OSX_SDKFLAGS="-isysroot $OSX_SYSROOT -mmacosx-version-min=$OSX_MINVER"
+ OSX_MINVER=
+ OSX_SYSROOT=
+ OSX_SDKFLAGS=""
;;
esac
AM_INIT_AUTOMAKE([foreign no-installinfo no-installman])
@@ -58,7 +61,7 @@
fi
PLATFORM_SUBDIRS=packaging/MacOSX
PLATFORM_INCLUDES="-Ipackaging/MacOSX/pulse/include"
- PAHEADER=packaging/MacOSX/pulse/include/pulse/pulseaudio.h
+ PAHEADER=""
;;
mingw*)
PLATFORM_SUBDIRS=packaging/win32
Index: opennx/opennxApp.cpp
===================================================================
--- opennx/opennxApp.cpp (revision 724)
+++ opennx/opennxApp.cpp (working copy)
@@ -162,7 +162,7 @@
// If KDE_LANG is set, then it has precedence over kdeglobals.
wxString lang;
if (::wxGetEnv(wxT("KDE_LANG"), &lang)) {
- myLogDebug(wxT("Overriding LANG from KDE_LANG environment to: '%s'"), lang.c_str());
+ myLogDebug(wxT("Overriding LANG from KDE_LANG environment to: '%s'"), lang.wc_str());
::wxSetEnv(wxT("LANG"), lang);
} else {
// Try to get KDE language settings and override locale accordingly
@@ -181,7 +181,7 @@
if (lang.Length() < 3)
lang << wxT("_") << country.Upper();
lang << wxT(".UTF-8");
- myLogDebug(wxT("Overriding LANG from kdeglobals to: '%s'"), lang.c_str());
+ myLogDebug(wxT("Overriding LANG from kdeglobals to: '%s'"), lang.wc_str());
::wxSetEnv(wxT("LANG"), lang);
}
}
@@ -321,7 +321,7 @@
if (::wxDirExists(path)) {
wxFile f;
wxString fn = path + wxT("/") + cfg->sGetName() + wxT(".desktop");
- ::myLogTrace(MYTRACETAG, wxT("Creating '%s'"), fn.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Creating '%s'"), fn.wc_str());
if (f.Create(fn, true,
wxS_IRUSR|wxS_IWUSR|wxS_IXUSR|wxS_IRGRP|wxS_IROTH)) {
f.Write(dtEntry);
@@ -346,7 +346,7 @@
if (SHGetSpecialFolderPath(NULL, dtPath, CSIDL_DESKTOPDIRECTORY, FALSE)) {
wxString lpath = wxString::Format(wxT("%s\\%s.lnk"),
dtPath, cfg->sGetName().c_str());
- ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), lpath.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Removing '%s'"), lpath.wc_str());
::wxRemoveFile(lpath);
}
#endif
@@ -589,12 +589,12 @@
for (i = 0; candidates[i]; i++) {
if (wxFileName::FileExists(candidates[i])) {
tmp = candidates[i];
- ::wxLogWarning(_("Found a CUPS daemon binary in %s, however it is not executable.\nIn order to use CUPS printing, you need to fix its permissions."), tmp.c_str());
+ wxLogWarning(_("Found a CUPS daemon binary in %s, however it is not executable.\nIn order to use CUPS printing, you need to fix its permissions."), tmp.c_str());
break;
}
}
if (tmp.IsEmpty())
- ::wxLogWarning(_("Could not find any CUPS daemon binary.\nIn order to use CUPS printing, you need to install cups."));
+ wxLogWarning(_("Could not find any CUPS daemon binary.\nIn order to use CUPS printing, you need to install cups."));
tmp = wxEmptyString;
}
}
@@ -627,7 +627,7 @@
ldpath += wxT(";");
ldpath = tmp + wxT("\\bin");
if (!::wxSetEnv(wxT("PATH"), ldpath)) {
- ::wxLogSysError(wxT("Can not set PATH"));
+ wxLogSysError(wxT("Can not set PATH"));
return false;
}
#endif
@@ -674,9 +674,9 @@
}
}
# endif
- ::myLogDebug(wxT("%s='%s'"), LD_LIBRARY_PATH, ldpath.c_str());
+ ::myLogDebug(wxT("%s='%s'"), LD_LIBRARY_PATH, ldpath.wc_str());
if (!::wxSetEnv(LD_LIBRARY_PATH, ldpath)) {
- ::wxLogSysError(wxT("Cannot set LD_LIBRARY_PATH"));
+ wxLogSysError(wxT("Cannot set LD_LIBRARY_PATH"));
return false;
}
#endif
@@ -687,7 +687,7 @@
while (t.HasMoreTokens()) {
wxString tag = t.GetNextToken();
if (allTraceTags.Index(tag) != wxNOT_FOUND) {
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
@@ -861,7 +861,7 @@
// On Unix, --display is a toolkit option
wxRegEx re(wxT("^--((exportres)|(cacert)|(caption)|(style)|(dialog)|(message)|(parent)|(session)|(window)|(trace))$"));
#endif
- wxArrayString as(argc, (const wxChar **)argv);
+ wxArrayString as = argv.GetArguments();
for (i = 1; i < as.GetCount(); i++) {
if (re.Matches(as[i])) {
if ((i + 1) < as.GetCount()) {
@@ -872,7 +872,7 @@
}
wxChar **xargv = new wxChar* [as.GetCount()];
for (i = 0; i < as.GetCount(); i++)
- xargv[i] = wxStrdup(as[i].c_str());
+ xargv[i] = wxStrdup(as[i].wc_str());
parser.SetCmdLine(as.GetCount(), xargv);
}
@@ -1005,7 +1005,7 @@
OnCmdLineError(parser);
return false;
}
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
@@ -1029,7 +1029,7 @@
// Call to base class needed for initializing command line processing
if (!wxApp::OnInit())
return false;
-#ifdef __WXMAC__
+#if 0 //def __WXMAC__
wxFileName::MacRegisterDefaultTypeAndCreator(wxT("nxs"), 'TEXT', 'OPNX');
#endif
@@ -1302,32 +1302,32 @@
for (i = 0; i < af.GetCount(); i++)
if (SharedUsbDevice::MODE_REMOTE == af[i].m_eMode) {
if (!LibUSBAvailable()) {
- ::wxLogError(_("libusb is not available. No USB devices will be exported"));
+ wxLogError(_("libusb is not available. No USB devices will be exported"));
m_bRequireStartUsbIp = false;
break;
}
::myLogTrace(MYTRACETAG, wxT("possibly exported USB device: %04x/%04x %s"),
- af[i].m_iVendorID, af[i].m_iProductID, af[i].toShortString().c_str());
+ af[i].m_iVendorID, af[i].m_iProductID, af[i].toShortString().wc_str());
for (j = 0; j < ad.GetCount(); j++)
if (af[i].MatchHotplug(ad[j])) {
- ::myLogTrace(MYTRACETAG, wxT("Match on USB dev %s"), ad[j].toString().c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Match on USB dev %s"), ad[j].toString().wc_str());
for (k = 0; k < aid.GetCount(); k++) {
if (aid[k].GetUsbBusID().IsSameAs(ad[j].GetBusID())) {
wxString exBusID = aid[k].GetUsbIpBusID();
::myLogTrace(MYTRACETAG, wxT("Exporting usbup-busid %s (libusb-busid %s)"),
- exBusID.c_str(), ad[j].GetBusID().c_str());
+ exBusID.wc_str(), ad[j].GetBusID().wc_str());
if (!usbip.WaitForSession(usessionTO)) {
- ::wxLogError(_("USBIP tunnel registration timeout"));
+ wxLogError(_("USBIP tunnel registration timeout"));
m_bRequireStartUsbIp = false;
}
if (!usbip.ExportDevice(exBusID))
- ::wxLogError(_("Unable to export USB device %s"), af[i].toShortString().c_str());
+ wxLogError(_("Unable to export USB device %s"), af[i].toShortString().c_str());
}
}
}
}
} else {
- ::wxLogError(_("Could not connect to usbipd2. No USB devices will be exported"));
+ wxLogError(_("Could not connect to usbipd2. No USB devices will be exported"));
m_bRequireStartUsbIp = false;
}
}
@@ -1355,13 +1355,13 @@
m_pSessionCfg->sSetFileName(cfgname);
m_pSessionCfg->SaveToFile();
}
- ::myLogTrace(MYTRACETAG, wxT("cfgfile='%s'"), cfgname.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("cfgfile='%s'"), cfgname.wc_str());
watchcmd << wxT(" -s ") << m_sSessionID << wxT(" -p ")
<< m_nNxSshPID << wxT(" -c \"") << cfgname << wxT("\"");
#ifdef __WXDEBUG__
watchcmd << wxT(" --trace=UsbIp,watchUsbIpApp");
#endif
- ::myLogTrace(MYTRACETAG, wxT("starting %s"), watchcmd.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("starting %s"), watchcmd.wc_str());
{
wxLogNull noerrors;
::wxExecute(watchcmd);
@@ -1385,7 +1385,7 @@
#endif
wxString watchcmd = fn.GetShortPath();
watchcmd << wxT(" -r ") << m_iReader << wxT(" -p ") << m_nNxSshPID;
- ::myLogTrace(MYTRACETAG, wxT("executing %s"), watchcmd.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("executing %s"), watchcmd.wc_str());
::wxExecute(watchcmd);
}
}
@@ -1422,7 +1422,7 @@
/// Respond to Apple Event for opening a document
void opennxApp::MacOpenFile(const wxString& filename)
{
- ::myLogTrace(MYTRACETAG, wxT("MacOpen '%s'"), filename.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("MacOpen '%s'"), filename.wc_str());
m_sSessionName = filename;
if (MODE_MAC_WAITOPEN == m_eMode) {
::myLogTrace(MYTRACETAG, wxT("MacOpen finishing wait"));
Index: opennx/packaging/MacOSX/Makefile.am
===================================================================
--- opennx/packaging/MacOSX/Makefile.am (revision 724)
+++ opennx/packaging/MacOSX/Makefile.am (working copy)
@@ -1,5 +1,5 @@
BUILDUSR = $(shell id -u):$(shell id -g)
-SUBDIRS = pulse
+# SUBDIRS = pulse
dmg: pkg
rm -rf dmgroot
@@ -40,7 +40,6 @@
rm -rf nxbuild
mkdir nxbuild
(cd nxbuild ; DEST=$(abs_builddir)/pkgroot PFX=$(prefix) CC=$(CC) CXX=$(CXX) OSX_SDKFLAGS="$(OSX_SDKFLAGS)" $(abs_srcdir)/buildnx)
- $(MAKE) -C pulse PKGROOT=$(abs_builddir)/pkgroot upinstall
$(MAKE) -C $(top_builddir) DESTDIR=$(abs_builddir)/pkgroot install
$(MAKE) -C $(top_builddir) DESTDIR=$(abs_builddir)/pkgroot prefix=/usr install-man
for lang in $(shell cat $(top_srcdir)/po/LINGUAS) ; do \
@@ -49,6 +48,8 @@
done
touch $@
+# $(MAKE) -C pulse PKGROOT=$(abs_builddir)/pkgroot upinstall
+
pkg: pkgdir pkg.plist
sudo chown -R -h root:admin pkgroot
sudo chown -R root:wheel pkgroot/usr
Index: opennx/packaging/MacOSX/pulse/Makefile.am
===================================================================
--- opennx/packaging/MacOSX/pulse/Makefile.am (revision 724)
+++ opennx/packaging/MacOSX/pulse/Makefile.am (working copy)
@@ -46,7 +46,7 @@
CFG_libsamplerateLE =
CFG_libsamplerateBE = --libdir=$(libdir)/ppc --host ppc-apple-darwin10
CFG_pulseaudioLE = --disable-glib2 --disable-openssl --disable-nls --with-udev-rules-dir=$(prefix)/lib \
- --with-mac-version-min=$(OSX_MINVER) --with-mac-sysroot=$(OSX_SYSROOT) --program-suffix=.i386
+ --with-mac-version-min=$(OSX_MINVER) --with-mac-sysroot=$(OSX_SYSROOT) --program-suffix=.x86_64
CFG_pulseaudioBE = --disable-glib2 --disable-openssl --disable-nls --with-udev-rules-dir=$(prefix)/lib \
--with-mac-version-min=$(OSX_MINVER) --with-mac-sysroot=$(OSX_SYSROOT) --libdir=$(libdir)/ppc --host ppc-apple-darwin10 --program-suffix=.ppc
@@ -68,8 +68,8 @@
CFLAGS="$(UNIFLAGS) $(OSX_SDKFLAGS) -I$(TMPDIST)/include" \
CXXFLAGS="$(UNIFLAGS) $(OSX_SDKFLAGS)" CPPFLAGS="-I$(TMPDIST)$(includedir)"
MACENV_INTEL = CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
- CFLAGS="-arch i386 $(OSX_SDKFLAGS)" \
- CXXFLAGS="-arch i386 $(OSX_SDKFLAGS)" CPPFLAGS="-I$(TMPDIST)$(includedir)"
+ CFLAGS="-arch x86_64 $(OSX_SDKFLAGS)" \
+ CXXFLAGS="-arch x86_64 $(OSX_SDKFLAGS)" CPPFLAGS="-I$(TMPDIST)$(includedir)"
MACENV_PPC = CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
CFLAGS="-arch ppc $(OSX_SDKFLAGS)" \
CXXFLAGS="-arch ppc $(OSX_SDKFLAGS)" CPPFLAGS="-I$(TMPDIST)$(includedir)"
@@ -151,22 +151,22 @@
@echo Merging $(subtarget) to universal
@for f in $(TMPDIST)$(libdir)/ppc/*.dylib ; do \
bn=`basename $$f` ; \
- test -L $$f || mv $(TMPDIST)$(libdir)/$$bn $(TMPDIST)$(libdir)/i386-$$bn ; \
- test -L $$f || lipo -create -output $(TMPDIST)$(libdir)/$$bn $$f $(TMPDIST)$(libdir)/i386-$$bn ; \
- rm -f $(TMPDIST)$(libdir)/i386-$$bn ; \
+ test -L $$f || mv $(TMPDIST)$(libdir)/$$bn $(TMPDIST)$(libdir)/x86_64-$$bn ; \
+ test -L $$f || lipo -create -output $(TMPDIST)$(libdir)/$$bn $$f $(TMPDIST)$(libdir)/x86_64-$$bn ; \
+ rm -f $(TMPDIST)$(libdir)/x86_64-$$bn ; \
done
@if test -n "$(modsub)" ; then \
echo Merging $(subtarget) modules to universal ; \
for f in $(TMPDIST)$(libdir)/ppc$(modsub)/*.{dylib,so} ; do \
bn=`basename $$f` ; \
- mv $(TMPDIST)$(libdir)$(modsub)/$$bn $(TMPDIST)$(libdir)$(modsub)/i386-$$bn ; \
+ mv $(TMPDIST)$(libdir)$(modsub)/$$bn $(TMPDIST)$(libdir)$(modsub)/x86_64-$$bn ; \
lipo -create -output $(TMPDIST)$(libdir)$(modsub)/$$bn \
- $$f $(TMPDIST)$(libdir)$(modsub)/i386-$$bn ; \
- rm $(TMPDIST)$(libdir)$(modsub)/i386-$$bn ; \
+ $$f $(TMPDIST)$(libdir)$(modsub)/x86_64-$$bn ; \
+ rm $(TMPDIST)$(libdir)$(modsub)/x86_64-$$bn ; \
done ; \
echo Merging $(subtarget) programs to universal ; \
- for f in $(TMPDIST)$(bindir)/*.i386 ; do \
- bn=`basename $$f .i386` ; \
+ for f in $(TMPDIST)$(bindir)/*.x86_64 ; do \
+ bn=`basename $$f .x86_64` ; \
file $$f|grep -q shell || lipo -create -output $(TMPDIST)$(bindir)/$$bn $$f $(TMPDIST)$(bindir)/$$bn.ppc ; \
file $$f|grep -q shell && mv $$f $(TMPDIST)$(bindir)/$$bn || true ; \
rm -f $$f $(TMPDIST)$(bindir)/$$bn.ppc ; \
Index: opennx/pulseTest.cpp
===================================================================
--- opennx/pulseTest.cpp (revision 724)
+++ opennx/pulseTest.cpp (working copy)
@@ -103,7 +103,7 @@
OnCmdLineError(parser);
return false;
}
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
@@ -130,7 +130,7 @@
ldpath += wxT(";");
ldpath = tmp + wxT("\\bin");
if (!::wxSetEnv(wxT("PATH"), ldpath)) {
- ::wxLogSysError(wxT("Can not set PATH"));
+ wxLogSysError(wxT("Can not set PATH"));
return false;
}
#endif
@@ -154,7 +154,7 @@
ldpath += wxT(":/Library/OpenSC/lib");
# endif
if (!::wxSetEnv(LD_LIBRARY_PATH, ldpath)) {
- ::wxLogSysError(wxT("Can not set LD_LIBRARY_PATH"));
+ wxLogSysError(wxT("Can not set LD_LIBRARY_PATH"));
return false;
}
#endif
@@ -168,7 +168,7 @@
while (t.HasMoreTokens()) {
wxString tag = t.GetNextToken();
if (allTraceTags.Index(tag) != wxNOT_FOUND) {
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
Index: opennx/pwcrypt.cpp
===================================================================
--- opennx/pwcrypt.cpp (revision 724)
+++ opennx/pwcrypt.cpp (working copy)
@@ -47,7 +47,7 @@
if (s.Length()) {
ret = wxT(":");
for (i = 0; i < s.Length(); i++)
- ret += wxString::Format(wxT("%d:"), s[i] + i + 1);
+ ret += wxString::Format(wxT("%d:"), (wchar_t)s[i] + i + 1);
}
return ret;
}
@@ -125,7 +125,7 @@
sRet = s;
sRet.Truncate(s.Length() - 1);
- int n = (sRet.c_str()[0] + sRet.Length()) - 3;
+ int n = (sRet.wc_str()[0] + sRet.Length()) - 3;
for (i = 1; i < sRet.Length(); i++) {
int j = validChars.Find(sRet[i]);
Index: opennx/res/opennx.xrc
===================================================================
--- opennx/res/opennx.xrc (revision 724)
+++ opennx/res/opennx.xrc (working copy)
@@ -74,7 +74,7 @@
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border>
<object class="wxComboBox" name="ID_COMBOBOX_SESSION">
- <style>wxCB_READONLY|wxCB_SORT</style>
+ <style>wxCB_READONLY</style>
</object>
</object>
<object class="spacer">
@@ -508,7 +508,7 @@
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border>
<object class="wxComboBox" name="ID_COMBOBOX_KBDLAYOUT">
- <style>wxCB_READONLY|wxCB_SORT</style>
+ <style>wxCB_READONLY</style>
</object>
</object>
</object>
@@ -3823,7 +3823,7 @@
<flag>wxGROW|wxALL</flag>
<border>5</border>
<object class="wxComboBox" name="ID_COMBOBOX_USBDEVS">
- <style>wxCB_READONLY|wxCB_SORT</style>
+ <style>wxCB_READONLY</style>
</object>
</object>
</object>
Index: opennx/watchReaderApp.cpp
===================================================================
--- opennx/watchReaderApp.cpp (revision 724)
+++ opennx/watchReaderApp.cpp (working copy)
@@ -79,7 +79,7 @@
// If KDE_LANG is set, then it has precedence over kdeglobals.
wxString lang;
if (::wxGetEnv(wxT("KDE_LANG"), &lang)) {
- myLogDebug(wxT("Overriding LANG from KDE_LANG environment to: '%s'"), lang.c_str());
+ myLogDebug(wxT("Overriding LANG from KDE_LANG environment to: '%s'"), lang.wc_str());
::wxSetEnv(wxT("LANG"), lang);
} else {
// Try to get KDE language settings and override locale accordingly
@@ -98,7 +98,7 @@
if (lang.Length() < 3)
lang << wxT("_") << country.Upper();
lang << wxT(".UTF-8");
- myLogDebug(wxT("Overriding LANG from kdeglobals to: '%s'"), lang.c_str());
+ myLogDebug(wxT("Overriding LANG from kdeglobals to: '%s'"), lang.wc_str());
::wxSetEnv(wxT("LANG"), lang);
}
}
@@ -141,7 +141,7 @@
// On Unix, --display is a toolkit option
wxRegEx re(wxT("^--((reader)|(pid)|(trace))$"));
#endif
- wxArrayString as(argc, (const wxChar **)argv);
+ wxArrayString as = argv.GetArguments();
for (i = 1; i < as.GetCount(); i++) {
if (re.Matches(as[i])) {
if ((i + 1) < as.GetCount()) {
@@ -152,7 +152,7 @@
}
wxChar **xargv = new wxChar* [as.GetCount()];
for (i = 0; i < as.GetCount(); i++)
- xargv[i] = wxStrdup(as[i].c_str());
+ xargv[i] = wxStrdup(as[i].wc_str());
parser.SetCmdLine(as.GetCount(), xargv);
}
@@ -175,7 +175,7 @@
OnCmdLineError(parser);
return false;
}
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
@@ -202,7 +202,7 @@
ldpath += wxT(";");
ldpath = tmp + wxT("\\bin");
if (!::wxSetEnv(wxT("PATH"), ldpath)) {
- ::wxLogSysError(wxT("Can not set PATH"));
+ wxLogSysError(wxT("Can not set PATH"));
return false;
}
#endif
@@ -226,7 +226,7 @@
ldpath += wxT(":/Library/OpenSC/lib");
# endif
if (!::wxSetEnv(LD_LIBRARY_PATH, ldpath)) {
- ::wxLogSysError(wxT("Can not set LD_LIBRARY_PATH"));
+ wxLogSysError(wxT("Can not set LD_LIBRARY_PATH"));
return false;
}
#endif
@@ -240,7 +240,7 @@
while (t.HasMoreTokens()) {
wxString tag = t.GetNextToken();
if (allTraceTags.Index(tag) != wxNOT_FOUND) {
- ::myLogDebug(wxT("Trace for '%s' enabled"), tag.c_str());
+ ::myLogDebug(wxT("Trace for '%s' enabled"), tag.wc_str());
wxLog::AddTraceMask(tag);
}
}
@@ -252,7 +252,7 @@
// on MacOS, we use the --dialog functionality of opennx
wxConfigBase::Get()->Read(wxT("Config/SystemNxDir"), &tmp);
tmp << wxFileName::GetPathSeparator() << wxT("Message.app");
- ::myLogTrace(MYTRACETAG, wxT("Executing %s"), tmp.c_str());
+ ::myLogTrace(MYTRACETAG, wxT("Executing %s"), tmp.wc_str());
::wxExecute(tmp);
#else
::myLogTrace(MYTRACETAG, wxT("Showing info dialog"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment