From ce2b5436798adfc5fe5ef99631ec122e839b5a5a Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Mon, 11 Oct 2010 21:39:14 +1100 Subject: [PATCH] Update to v070r14 release. (there was no r13 release posted to the WIP thread) byuu says: - nall/string: trim and split functions now take the limit as a template parameter for clarity, trim_once variants are removed - quotable.trim<1>("\""); //remove quotes from string - cheatcode.split<3>(","); //split up to three times, third one is a description that may have commas - foobar.trim(" "); //remove any and all spaces - nall/string: added wildcard() and iwildcard() functions for pattern matching - nall/directory: accepts an optional pattern parameter to perform wildcard matching - lstring cartridges = directory::contents(path, "*.sfc"); - some people may prefer directory::contents("/path/to/files/*.sfc"), but I like not having to build a string when you have the path separated already - nall/qt: removed entirely, now resides in bsnes/ui-qt/template; I do intend to replace the check/radio actions with native Qt versions later - bsnes/data: new folder, share the parts that both UIs use; bsnes.ico, bsnes.png, bsnes.Desktop, cheats.xml; simplify Makefile install target - Makefile: install target now creates .bsnes folder and copies cheats.xml there for you - Makefile: gconftool hack removed, not needed for phoenix, will work around with Qt later - will probably make bsnes/Qt read the cheats.xml file externally as well, as that file makes each profile 1MB bigger when embedded - as such, will probably make bsnes also look in the binary directory for that file, so Windows users don't have to copy it to their userdata folder --- bsnes/Makefile | 10 +-- bsnes/{ui-qt => }/data/bsnes.Manifest | 4 +- bsnes/{ui-qt => }/data/bsnes.desktop | 0 bsnes/{ui-phoenix => }/data/bsnes.ico | Bin bsnes/{ui-qt => }/data/bsnes.png | Bin bsnes/{ui-qt => }/data/cheats.xml | 0 bsnes/nall/dictionary.hpp | 6 +- bsnes/nall/directory.hpp | 48 +++++++------ bsnes/nall/string/base.hpp | 26 ++++--- bsnes/nall/string/compare.hpp | 68 ++++++++++++++++++ bsnes/nall/string/split.hpp | 6 +- bsnes/nall/string/trim.hpp | 47 ++++-------- bsnes/nall/string/xml.hpp | 8 +-- bsnes/snes/snes.hpp | 2 +- bsnes/ui-phoenix/general/file-browser.cpp | 2 +- bsnes/ui-phoenix/resource.rc | 4 +- bsnes/ui-phoenix/tools/cheat-editor.cpp | 2 +- bsnes/ui-qt/Makefile | 2 +- bsnes/ui-qt/data/bsnes.ico | Bin 22071 -> 0 bytes bsnes/ui-qt/resource/resource.qrc | 5 +- bsnes/ui-qt/resource/resource.rc | 4 +- bsnes/{nall/qt => ui-qt/template}/Makefile | 0 .../template}/check-action.moc.hpp | 0 bsnes/{nall/qt => ui-qt/template}/concept.hpp | 0 .../qt => ui-qt/template}/file-dialog.moc.hpp | 2 +- .../qt => ui-qt/template}/hex-editor.moc.hpp | 0 .../template}/radio-action.moc.hpp | 0 .../qt => ui-qt/template}/window.moc.hpp | 0 bsnes/ui-qt/ui-base.hpp | 12 ++-- 29 files changed, 159 insertions(+), 99 deletions(-) rename bsnes/{ui-qt => }/data/bsnes.Manifest (71%) rename bsnes/{ui-qt => }/data/bsnes.desktop (100%) rename bsnes/{ui-phoenix => }/data/bsnes.ico (100%) rename bsnes/{ui-qt => }/data/bsnes.png (100%) rename bsnes/{ui-qt => }/data/cheats.xml (100%) delete mode 100755 bsnes/ui-qt/data/bsnes.ico rename bsnes/{nall/qt => ui-qt/template}/Makefile (100%) rename bsnes/{nall/qt => ui-qt/template}/check-action.moc.hpp (100%) rename bsnes/{nall/qt => ui-qt/template}/concept.hpp (100%) rename bsnes/{nall/qt => ui-qt/template}/file-dialog.moc.hpp (99%) rename bsnes/{nall/qt => ui-qt/template}/hex-editor.moc.hpp (100%) rename bsnes/{nall/qt => ui-qt/template}/radio-action.moc.hpp (100%) rename bsnes/{nall/qt => ui-qt/template}/window.moc.hpp (100%) diff --git a/bsnes/Makefile b/bsnes/Makefile index ea8ea462..1e08781e 100755 --- a/bsnes/Makefile +++ b/bsnes/Makefile @@ -62,9 +62,11 @@ endif install: ifeq ($(platform),x) install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes - install -D -m 644 ui-qt/data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png - install -D -m 644 ui-qt/data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop -# gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons true + install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png + install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop + test -d ~/.bsnes || mkdir ~/.bsnes + cp data/cheats.xml ~/.bsnes/cheats.xml + chmod 777 ~/.bsnes ~/.bsnes/cheats.xml endif uninstall: @@ -88,6 +90,6 @@ clean: ui_clean -@$(call delete,*.manifest) archive-all: - tar -cjf bsnes.tar.bz2 launcher libco nall obj out phoenix ruby snes ui-phoenix ui-qt Makefile cc.bat clean.bat sync.sh + tar -cjf bsnes.tar.bz2 data launcher libco nall obj out phoenix ruby snes ui-phoenix ui-qt Makefile cc.bat clean.bat sync.sh help:; diff --git a/bsnes/ui-qt/data/bsnes.Manifest b/bsnes/data/bsnes.Manifest similarity index 71% rename from bsnes/ui-qt/data/bsnes.Manifest rename to bsnes/data/bsnes.Manifest index 4602d4fe..e415f87a 100755 --- a/bsnes/ui-qt/data/bsnes.Manifest +++ b/bsnes/data/bsnes.Manifest @@ -1,9 +1,9 @@ - + - + diff --git a/bsnes/ui-qt/data/bsnes.desktop b/bsnes/data/bsnes.desktop similarity index 100% rename from bsnes/ui-qt/data/bsnes.desktop rename to bsnes/data/bsnes.desktop diff --git a/bsnes/ui-phoenix/data/bsnes.ico b/bsnes/data/bsnes.ico similarity index 100% rename from bsnes/ui-phoenix/data/bsnes.ico rename to bsnes/data/bsnes.ico diff --git a/bsnes/ui-qt/data/bsnes.png b/bsnes/data/bsnes.png similarity index 100% rename from bsnes/ui-qt/data/bsnes.png rename to bsnes/data/bsnes.png diff --git a/bsnes/ui-qt/data/cheats.xml b/bsnes/data/cheats.xml similarity index 100% rename from bsnes/ui-qt/data/cheats.xml rename to bsnes/data/cheats.xml diff --git a/bsnes/nall/dictionary.hpp b/bsnes/nall/dictionary.hpp index 1bdc87dc..dcb04151 100755 --- a/bsnes/nall/dictionary.hpp +++ b/bsnes/nall/dictionary.hpp @@ -27,7 +27,7 @@ namespace nall { bool import(const char *filename) { string data; if(data.readfile(filename) == false) return false; - data.ltrim_once("\xef\xbb\xbf"); //remove UTF-8 marker, if it exists + data.ltrim<1>("\xef\xbb\xbf"); //remove UTF-8 marker, if it exists data.replace("\r", ""); lstring line; @@ -43,8 +43,8 @@ namespace nall { part[1].trim(); //remove quotes - part[0].trim_once("\""); - part[1].trim_once("\""); + part[0].trim<1>("\""); + part[1].trim<1>("\""); unsigned n = index_input.size(); index_input[n] = part[0]; diff --git a/bsnes/nall/directory.hpp b/bsnes/nall/directory.hpp index d6ab5cc7..7ee3398f 100755 --- a/bsnes/nall/directory.hpp +++ b/bsnes/nall/directory.hpp @@ -16,13 +16,13 @@ namespace nall { struct directory { - static lstring folders(const char *pathname); - static lstring files(const char *pathname); - static lstring contents(const char *pathname); + static lstring folders(const string &pathname, const string &pattern = "*"); + static lstring files(const string &pathname, const string &pattern = "*"); + static lstring contents(const string &pathname, const string &pattern = "*"); }; #if defined(_WIN32) - inline lstring directory::folders(const char *pathname) { + inline lstring directory::folders(const string &pathname, const string &pattern) { lstring list; string path = pathname; path.transform("/", "\\"); @@ -34,13 +34,15 @@ struct directory { if(handle != INVALID_HANDLE_VALUE) { if(wcscmp(data.cFileName, L".") && wcscmp(data.cFileName, L"..")) { if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - list.append(string(utf8_t(data.cFileName), "/")); + string name = utf8_t(data.cFileName); + if(wildcard(name, pattern)) list.append(string(name, "/")); } } while(FindNextFile(handle, &data) != false) { if(wcscmp(data.cFileName, L".") && wcscmp(data.cFileName, L"..")) { if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - list.append(string(utf8_t(data.cFileName), "/")); + string name = utf8_t(data.cFileName); + if(wildcard(name, pattern)) list.append(string(name, "/")); } } } @@ -50,7 +52,7 @@ struct directory { return list; } - inline lstring directory::files(const char *pathname) { + inline lstring directory::files(const string &pathname, const string &pattern) { lstring list; string path = pathname; path.transform("/", "\\"); @@ -61,11 +63,13 @@ struct directory { handle = FindFirstFile(utf16_t(path), &data); if(handle != INVALID_HANDLE_VALUE) { if((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) { - list.append(utf8_t(data.cFileName)); + string name = utf8_t(data.cFileName); + if(wildcard(name, pattern)) list.append(name); } while(FindNextFile(handle, &data) != false) { if((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) { - list.append(utf8_t(data.cFileName)); + string name = utf8_t(data.cFileName); + if(wildcard(name, pattern)) list.append(name); } } FindClose(handle); @@ -74,14 +78,14 @@ struct directory { return list; } - inline lstring directory::contents(const char *pathname) { - lstring folders = directory::folders(pathname); - lstring files = directory::files(pathname); - foreach(file, files) folders.append(file); + inline lstring directory::contents(const string &pathname, const string &pattern) { + lstring folders = directory::folders(pathname); //pattern search of contents() should only filter files + lstring files = directory::files(pathname, pattern); + foreach(file, files) folders.append(file, pattern); return folders; } #else - inline lstring directory::folders(const char *pathname) { + inline lstring directory::folders(const string &pathname, const string &pattern) { lstring list; DIR *dp; struct dirent *ep; @@ -90,7 +94,9 @@ struct directory { while(ep = readdir(dp)) { if(!strcmp(ep->d_name, ".")) continue; if(!strcmp(ep->d_name, "..")) continue; - if(ep->d_type & DT_DIR) list.append(string(ep->d_name, "/")); + if(ep->d_type & DT_DIR) { + if(wildcard(ep->d_name, pattern)) list.append(string(ep->d_name, "/")); + } } closedir(dp); } @@ -99,7 +105,7 @@ struct directory { } - inline lstring directory::files(const char *pathname) { + inline lstring directory::files(const string &pathname, const string &pattern) { lstring list; DIR *dp; struct dirent *ep; @@ -108,7 +114,9 @@ struct directory { while(ep = readdir(dp)) { if(!strcmp(ep->d_name, ".")) continue; if(!strcmp(ep->d_name, "..")) continue; - if((ep->d_type & DT_DIR) == 0) list.append(ep->d_name); + if((ep->d_type & DT_DIR) == 0) { + if(wildcard(ep->d_name, pattern)) list.append(ep->d_name); + } } closedir(dp); } @@ -116,9 +124,9 @@ struct directory { return list; } - inline lstring directory::contents(const char *pathname) { - lstring folders = directory::folders(pathname); - lstring files = directory::files(pathname); + inline lstring directory::contents(const string &pathname, const string &pattern) { + lstring folders = directory::folders(pathname); //pattern search of contents() should only filter files + lstring files = directory::files(pathname, pattern); foreach(file, files) folders.append(file); return folders; } diff --git a/bsnes/nall/string/base.hpp b/bsnes/nall/string/base.hpp index fbdcc3c9..f4556e70 100755 --- a/bsnes/nall/string/base.hpp +++ b/bsnes/nall/string/base.hpp @@ -55,12 +55,9 @@ namespace nall { inline string& lower(); inline string& upper(); inline string& transform(const char *before, const char *after); - inline string& ltrim(const char *key = " "); - inline string& rtrim(const char *key = " "); - inline string& trim (const char *key = " "); - inline string& ltrim_once(const char *key = " "); - inline string& rtrim_once(const char *key = " "); - inline string& trim_once (const char *key = " "); + template inline string& ltrim(const char *key = " "); + template inline string& rtrim(const char *key = " "); + template inline string& trim (const char *key = " "); protected: char *data; @@ -77,8 +74,8 @@ namespace nall { template inline lstring& operator<<(T value); inline optional find(const char*); - inline void split (const char*, const char*, unsigned = 0); - inline void qsplit(const char*, const char*, unsigned = 0); + template inline void split (const char*, const char*); + template inline void qsplit(const char*, const char*); lstring(); lstring(std::initializer_list); @@ -88,6 +85,10 @@ namespace nall { inline char chrlower(char c); inline char chrupper(char c); inline int stricmp(const char *dest, const char *src); + inline int strwcmp(const char *str, const char *pattern, unsigned length); + inline int strwicmp(const char *str, const char *pattern, unsigned length); + inline bool wildcard(const char *str, const char *pattern); + inline bool iwildcard(const char *str, const char *pattern); inline bool strbegin (const char *str, const char *key); inline bool stribegin(const char *str, const char *key); inline bool strend (const char *str, const char *key); @@ -115,12 +116,9 @@ namespace nall { inline unsigned strlcat(char *dest, const char *src, unsigned length); //trim.hpp - inline char* ltrim(char *str, const char *key = " "); - inline char* rtrim(char *str, const char *key = " "); - inline char* trim (char *str, const char *key = " "); - inline char* ltrim_once(char *str, const char *key = " "); - inline char* rtrim_once(char *str, const char *key = " "); - inline char* trim_once (char *str, const char *key = " "); + template inline char* ltrim(char *str, const char *key = " "); + template inline char* rtrim(char *str, const char *key = " "); + template inline char* trim (char *str, const char *key = " "); //utility.hpp inline unsigned strlcpy(string &dest, const char *src, unsigned length); diff --git a/bsnes/nall/string/compare.hpp b/bsnes/nall/string/compare.hpp index bd289753..45f22a06 100755 --- a/bsnes/nall/string/compare.hpp +++ b/bsnes/nall/string/compare.hpp @@ -21,6 +21,74 @@ int stricmp(const char *dest, const char *src) { return (int)chrlower(*dest) - (int)chrlower(*src); } +int strwcmp(const char *str, const char *pattern, unsigned length) { + while(length && *str) { + if(*pattern != '?' && *str != *pattern) break; + pattern++, str++, length--; + } + + if(length == 0 || *pattern == '?') return 0; + return (int)chrlower(*str) - (int)chrlower(*pattern); +} + +int strwicmp(const char *str, const char *pattern, unsigned length) { + while(length && *str) { + if(*pattern != '?' && chrlower(*str) != chrlower(*pattern)) break; + pattern++, str++, length--; + } + + if(length == 0 || *pattern == '?') return 0; + return (int)chrlower(*str) - (int)chrlower(*pattern); +} + +bool wildcard(const char *str, const char *pattern) { + while(*pattern) { + char n = *pattern++; + if(n == '*') { + unsigned length = 0; + while(true) { + n = pattern[length]; + if(n == 0 || n == '*') break; + length++; + } + if(length) while(true) { + if(*str == 0) return false; + if(!strwcmp(str, pattern, length)) break; + str++; + } + } else if(n == '?') { + str++; + } else { + if(*str++ != n) return false; + } + } + return true; +} + +bool iwildcard(const char *str, const char *pattern) { + while(*pattern) { + char n = *pattern++; + if(n == '*') { + unsigned length = 0; + while(true) { + n = pattern[length]; + if(n == 0 || n == '*') break; + length++; + } + if(length) while(true) { + if(*str == 0) return false; + if(!strwicmp(str, pattern, length)) break; + str++; + } + } else if(n == '?') { + str++; + } else { + if(chrlower(*str++) != chrlower(n)) return false; + } + } + return true; +} + bool strbegin(const char *str, const char *key) { int i, ssl = strlen(str), ksl = strlen(key); diff --git a/bsnes/nall/string/split.hpp b/bsnes/nall/string/split.hpp index bb77dfcd..8d3ca877 100755 --- a/bsnes/nall/string/split.hpp +++ b/bsnes/nall/string/split.hpp @@ -3,7 +3,8 @@ namespace nall { -void lstring::split(const char *key, const char *src, unsigned limit) { +template void lstring::split(const char *key, const char *src) { + unsigned limit = Limit; reset(); int ssl = strlen(src), ksl = strlen(key); @@ -21,7 +22,8 @@ void lstring::split(const char *key, const char *src, unsigned limit) { operator[](split_count++) = src + lp; } -void lstring::qsplit(const char *key, const char *src, unsigned limit) { +template void lstring::qsplit(const char *key, const char *src) { + unsigned limit = Limit; reset(); int ssl = strlen(src), ksl = strlen(key); diff --git a/bsnes/nall/string/trim.hpp b/bsnes/nall/string/trim.hpp index 4fda05ec..ba577856 100755 --- a/bsnes/nall/string/trim.hpp +++ b/bsnes/nall/string/trim.hpp @@ -3,7 +3,9 @@ namespace nall { -char* ltrim(char *str, const char *key) { +//limit defaults to zero, which will underflow on first compare; equivalent to no limit +template char* ltrim(char *str, const char *key) { + unsigned limit = Limit; if(!key || !*key) return str; while(strbegin(str, key)) { char *dest = str, *src = str + strlen(key); @@ -12,49 +14,28 @@ char* ltrim(char *str, const char *key) { if(!*dest) break; dest++; } + if(--limit == 0) break; } return str; } -char* rtrim(char *str, const char *key) { +template char* rtrim(char *str, const char *key) { + unsigned limit = Limit; if(!key || !*key) return str; - while(strend(str, key)) str[strlen(str) - strlen(key)] = 0; - return str; -} - -char* trim(char *str, const char *key) { - return ltrim(rtrim(str, key), key); -} - -char* ltrim_once(char *str, const char *key) { - if(!key || !*key) return str; - if(strbegin(str, key)) { - char *dest = str, *src = str + strlen(key); - while(true) { - *dest = *src++; - if(!*dest) break; - dest++; - } + while(strend(str, key)) { + str[strlen(str) - strlen(key)] = 0; + if(--limit == 0) break; } return str; } -char* rtrim_once(char *str, const char *key) { - if(!key || !*key) return str; - if(strend(str, key)) str[strlen(str) - strlen(key)] = 0; - return str; +template char* trim(char *str, const char *key) { + return ltrim(rtrim(str, key), key); } -char* trim_once(char *str, const char *key) { - return ltrim_once(rtrim_once(str, key), key); -} - -string& string::ltrim(const char *key) { nall::ltrim(data, key); return *this; } -string& string::rtrim(const char *key) { nall::rtrim(data, key); return *this; } -string& string::trim (const char *key) { nall::trim (data, key); return *this; } -string& string::ltrim_once(const char *key) { nall::ltrim_once(data, key); return *this; } -string& string::rtrim_once(const char *key) { nall::rtrim_once(data, key); return *this; } -string& string::trim_once (const char *key) { nall::trim_once (data, key); return *this; } +template string& string::ltrim(const char *key) { nall::ltrim(data, key); return *this; } +template string& string::rtrim(const char *key) { nall::rtrim(data, key); return *this; } +template string& string::trim (const char *key) { nall::trim (data, key); return *this; } } diff --git a/bsnes/nall/string/xml.hpp b/bsnes/nall/string/xml.hpp index e6f3a81c..185a89f9 100755 --- a/bsnes/nall/string/xml.hpp +++ b/bsnes/nall/string/xml.hpp @@ -139,8 +139,8 @@ inline bool xml_element::parse_head(string data) { xml_attribute attr; attr.name = side[0]; attr.content = side[1]; - if(strbegin(attr.content, "\"") && strend(attr.content, "\"")) attr.content.trim_once("\""); - else if(strbegin(attr.content, "'") && strend(attr.content, "'")) attr.content.trim_once("'"); + if(strbegin(attr.content, "\"") && strend(attr.content, "\"")) attr.content.trim<1>("\""); + else if(strbegin(attr.content, "'") && strend(attr.content, "'")) attr.content.trim<1>("'"); else throw "..."; attribute.append(attr); } @@ -186,10 +186,10 @@ inline bool xml_element::parse_body(const char *&data) { if(strend(tag, "?") == true) { self_terminating = true; - tag.rtrim_once("?"); + tag.rtrim<1>("?"); } else if(strend(tag, "/") == true) { self_terminating = true; - tag.rtrim_once("/"); + tag.rtrim<1>("/"); } parse_head(tag); diff --git a/bsnes/snes/snes.hpp b/bsnes/snes/snes.hpp index d6f3bff0..c0db3ba3 100755 --- a/bsnes/snes/snes.hpp +++ b/bsnes/snes/snes.hpp @@ -1,7 +1,7 @@ namespace SNES { namespace Info { static const char Name[] = "bsnes"; - static const char Version[] = "070.12"; + static const char Version[] = "070.14"; static const unsigned SerializerVersion = 14; } } diff --git a/bsnes/ui-phoenix/general/file-browser.cpp b/bsnes/ui-phoenix/general/file-browser.cpp index a8fac4e2..9218bc44 100755 --- a/bsnes/ui-phoenix/general/file-browser.cpp +++ b/bsnes/ui-phoenix/general/file-browser.cpp @@ -101,7 +101,7 @@ void FileBrowser::folderBrowse() { void FileBrowser::folderUp() { string path = folder; - path.rtrim_once("/"); + path.rtrim<1>("/"); if(path != "") setFolder(dir(path)); } diff --git a/bsnes/ui-phoenix/resource.rc b/bsnes/ui-phoenix/resource.rc index af394337..7fc5b0e3 100755 --- a/bsnes/ui-phoenix/resource.rc +++ b/bsnes/ui-phoenix/resource.rc @@ -1,2 +1,2 @@ -1 24 "../phoenix/windows/phoenix.Manifest" -2 ICON DISCARDABLE "data/bsnes.ico" +1 24 "../data/bsnes.Manifest" +2 ICON DISCARDABLE "../data/bsnes.ico" diff --git a/bsnes/ui-phoenix/tools/cheat-editor.cpp b/bsnes/ui-phoenix/tools/cheat-editor.cpp index 8b55ee02..4747a6c0 100755 --- a/bsnes/ui-phoenix/tools/cheat-editor.cpp +++ b/bsnes/ui-phoenix/tools/cheat-editor.cpp @@ -218,7 +218,7 @@ void CheatEditor::findCodes() { if(element.name == "description") description = element.parse(); else if(element.name == "code") code.append(string(element.parse(), "+")); } - code.rtrim_once("+"); + code.rtrim<1>("+"); code.append("\t"); code.append(description); databaseList.addItem(description); diff --git a/bsnes/ui-qt/Makefile b/bsnes/ui-qt/Makefile index fb4b74e0..2e61fa01 100755 --- a/bsnes/ui-qt/Makefile +++ b/bsnes/ui-qt/Makefile @@ -1,5 +1,5 @@ qtlibs := $(strip QtCore QtGui $(if $(findstring osx,$(platform)),QtOpenGL)) -include nall/qt/Makefile +include $(ui)/template/Makefile ui_objects := ui-main ui-base ui-cartridge ui-debugger ui-input ui-movie ui-settings ui-state ui-tools ui_objects += ruby diff --git a/bsnes/ui-qt/data/bsnes.ico b/bsnes/ui-qt/data/bsnes.ico deleted file mode 100755 index 54acded45d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0K-0?(xB=7AElyM(EtDd diff --git a/bsnes/ui-qt/resource/resource.qrc b/bsnes/ui-qt/resource/resource.qrc index 02b0fc36..a0254613 100755 --- a/bsnes/ui-qt/resource/resource.qrc +++ b/bsnes/ui-qt/resource/resource.qrc @@ -1,11 +1,12 @@ - ../data/bsnes.png + ../../data/bsnes.png + ../../data/cheats.xml + ../data/logo.png ../data/documentation.html ../data/license.html - ../data/cheats.xml ../data/icons-16x16/item-check-on.png ../data/icons-16x16/item-check-off.png diff --git a/bsnes/ui-qt/resource/resource.rc b/bsnes/ui-qt/resource/resource.rc index c5a86429..63dfef44 100755 --- a/bsnes/ui-qt/resource/resource.rc +++ b/bsnes/ui-qt/resource/resource.rc @@ -1,2 +1,2 @@ -1 24 "ui-qt/data/bsnes.Manifest" -IDI_ICON1 ICON DISCARDABLE "ui-qt/data/bsnes.ico" +1 24 "data/bsnes.Manifest" +IDI_ICON1 ICON DISCARDABLE "data/bsnes.ico" diff --git a/bsnes/nall/qt/Makefile b/bsnes/ui-qt/template/Makefile similarity index 100% rename from bsnes/nall/qt/Makefile rename to bsnes/ui-qt/template/Makefile diff --git a/bsnes/nall/qt/check-action.moc.hpp b/bsnes/ui-qt/template/check-action.moc.hpp similarity index 100% rename from bsnes/nall/qt/check-action.moc.hpp rename to bsnes/ui-qt/template/check-action.moc.hpp diff --git a/bsnes/nall/qt/concept.hpp b/bsnes/ui-qt/template/concept.hpp similarity index 100% rename from bsnes/nall/qt/concept.hpp rename to bsnes/ui-qt/template/concept.hpp diff --git a/bsnes/nall/qt/file-dialog.moc.hpp b/bsnes/ui-qt/template/file-dialog.moc.hpp similarity index 99% rename from bsnes/nall/qt/file-dialog.moc.hpp rename to bsnes/ui-qt/template/file-dialog.moc.hpp index 3cb8989e..34a7655b 100755 --- a/bsnes/nall/qt/file-dialog.moc.hpp +++ b/bsnes/ui-qt/template/file-dialog.moc.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include "window.moc.hpp" namespace nall { diff --git a/bsnes/nall/qt/hex-editor.moc.hpp b/bsnes/ui-qt/template/hex-editor.moc.hpp similarity index 100% rename from bsnes/nall/qt/hex-editor.moc.hpp rename to bsnes/ui-qt/template/hex-editor.moc.hpp diff --git a/bsnes/nall/qt/radio-action.moc.hpp b/bsnes/ui-qt/template/radio-action.moc.hpp similarity index 100% rename from bsnes/nall/qt/radio-action.moc.hpp rename to bsnes/ui-qt/template/radio-action.moc.hpp diff --git a/bsnes/nall/qt/window.moc.hpp b/bsnes/ui-qt/template/window.moc.hpp similarity index 100% rename from bsnes/nall/qt/window.moc.hpp rename to bsnes/ui-qt/template/window.moc.hpp diff --git a/bsnes/ui-qt/ui-base.hpp b/bsnes/ui-qt/ui-base.hpp index 544d3230..05b3b6b2 100755 --- a/bsnes/ui-qt/ui-base.hpp +++ b/bsnes/ui-qt/ui-base.hpp @@ -14,12 +14,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include "template/concept.hpp" +#include "template/check-action.moc.hpp" +#include "template/file-dialog.moc.hpp" +#include "template/hex-editor.moc.hpp" +#include "template/radio-action.moc.hpp" +#include "template/window.moc.hpp" using namespace nall; #include