diff --git a/etg/stdpaths.py b/etg/stdpaths.py index 89aba866..d81dbadd 100644 --- a/etg/stdpaths.py +++ b/etg/stdpaths.py @@ -34,7 +34,14 @@ def run(): c.find('IgnoreAppSubDir').ignore() c.find('DontIgnoreAppSubDir').ignore() c.find('IgnoreAppBuildSubDirs').ignore() - c.find('MSWGetShellDir').ignore() + + c.find('MSWGetShellDir').setCppCode("""\ + #ifdef __WXMSW__ + return new wxString(self->MSWGetShellDir(csidl)); + #else + return new wxString; + #endif + """) c.find('SetInstallPrefix').setCppCode("""\ #ifdef __WXMSW__ diff --git a/unittests/test_stdpaths.py b/unittests/test_stdpaths.py new file mode 100644 index 00000000..27f2574d --- /dev/null +++ b/unittests/test_stdpaths.py @@ -0,0 +1,34 @@ +import imp_unittest, unittest +import wtc +import wx +import os + + +#--------------------------------------------------------------------------- + +class stdpaths_Tests(wtc.WidgetTestCase): + + def test_stdpaths(self): + sp = wx.StandardPaths.Get() + sp.GetAppDocumentsDir() + sp.GetConfigDir() + sp.GetDataDir() + sp.GetDocumentsDir() + sp.GetExecutablePath() + sp.GetInstallPrefix() + sp.GetLocalDataDir() + sp.GetPluginsDir() + sp.GetResourcesDir() + sp.GetTempDir() + sp.GetUserConfigDir() + sp.GetUserDataDir() + sp.GetUserLocalDataDir() + sp.SetInstallPrefix('/opt/foo') + sp.GetLocalizedResourcesDir('fr') + + +#--------------------------------------------------------------------------- + + +if __name__ == '__main__': + unittest.main()