Changeset 144 for branches


Ignore:
Timestamp:
01/17/2008 08:45:18 PM (4 years ago)
Author:
guyru
Message:

portable version fixes

Location:
branches/openyahtzee-1.8
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/openyahtzee-1.8/Makefile.am

    r2 r144  
    44 
    55SUBDIRS = src 
    6 AM_CXXFLAGS = $(wx-config --cxxflags) 
     6AM_CXXFLAGS = `wx-config --cxxflags` 
  • branches/openyahtzee-1.8/src/About.cpp

    r96 r144  
    5050        bitmap_1 = new wxDynamicBitmap((wxWindow*)this, (wxWindowID)wxID_ANY,*logo); 
    5151         
     52#ifdef PORTABLE 
     53        app_label = new wxStaticText(this, -1, wxT("Open Yahtzee Portable Edition 1.8.0")); 
     54#else 
    5255        app_label = new wxStaticText(this, -1, wxT("Open Yahtzee 1.8.0")); 
     56#endif 
    5357        label_desc = new wxStaticText(notebook_main_pane_about, -1, wxT("A full-featured wxWidgets version of\nthe classic dice game Yahtzee.")); 
    5458        label_copyright = new wxStaticText(notebook_main_pane_about, -1, wxT("(c) 2006-2007 Guy Rutenberg")); 
  • branches/openyahtzee-1.8/src/HighScoreTableDB.cpp

    r73 r144  
    3030{ 
    3131        /* Open the database which holds the settings. */ 
     32#ifdef PORTABLE 
     33        m_path = ""; 
     34#else 
    3235        m_path = ((wxFileName::GetHomeDir()).mb_str()); 
    33         m_path += "/"; //IMPORTANT! only works under linux/unix/*nix 
     36        m_path += "/"; 
     37#endif 
    3438        m_path += DBFILENAME; 
    3539 
  • branches/openyahtzee-1.8/src/HighScoreTableDB.h

    r28 r144  
    3838#define HIGHSCORETABLEDB_INC 
    3939 
    40 ///Sets the file name of the database the class will open. The directory will always be the home dir. 
    41 #define DBFILENAME ".OpenYahtzee"  
     40///Sets the file name of the database the class will open. 
     41#ifndef PORTABLE 
     42        #define DBFILENAME ".OpenYahtzee" 
     43#else 
     44        #define DBFILENAME "OpenYahtzee.dat" 
     45#endif 
     46 
    4247class HighScoreTableDB : public DBwrapper 
    4348{ 
  • branches/openyahtzee-1.8/src/MainFrame.cpp

    r143 r144  
    306306void MainFrame::OnAbout(wxCommandEvent& event) 
    307307{ 
     308#ifndef PORTABLE 
     309        AboutDialog *about = new AboutDialog(this,wxID_ANY,wxT("About Open Yahtzee PE")); 
     310#else 
    308311        AboutDialog *about = new AboutDialog(this,wxID_ANY,wxT("About Open Yahtzee")); 
     312#endif 
    309313        about->ShowModal(); 
    310314} 
  • branches/openyahtzee-1.8/src/Makefile.am

    r93 r144  
    1313        HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h UtilityFunctions.h 
    1414 
    15 openyahtzee_LDFLAGS = `wx-config --libs` -lsqlite3 
    16 AM_CXXFLAGS = `wx-config --cxxflags` -DPREFIX=\"$(prefix)\" \ 
    17                 -DDATA_DIR=\"$(datadir)\" 
     15openyahtzee_LDFLAGS = `wx-config --libs` 
     16openyahtzee_LDADD = -lsqlite3 
     17AM_CXXFLAGS = `wx-config --cxxflags` 
  • branches/openyahtzee-1.8/src/SettingsDB.cpp

    r17 r144  
    2828{ 
    2929        /* Open the database which holds the settings. */ 
     30#ifdef PORTABLE 
     31        m_path = ""; 
     32#else 
    3033        m_path = ((wxFileName::GetHomeDir()).mb_str()); 
    31         m_path += "/"; //IMPORTANT! only works under linux/unix/*nix 
     34        m_path += "/"; 
     35#endif 
    3236        m_path += DBFILENAME; 
    3337 
  • branches/openyahtzee-1.8/src/SettingsDB.h

    r17 r144  
    3838#define SETTINGSDB_INC 
    3939 
    40 ///Sets the file name of the database the class will open. The directory will always be the home dir. 
    41 #define DBFILENAME ".OpenYahtzee"  
     40///Sets the file name of the datase the class will open. 
     41#ifndef PORTABLE 
     42        #define DBFILENAME ".OpenYahtzee" 
     43#else 
     44        #define DBFILENAME "OpenYahtzee.dat" 
     45#endif 
    4246class SettingsDB : public DBwrapper 
    4347{ 
Note: See TracChangeset for help on using the changeset viewer.