diff --git a/.gitignore b/.gitignore index b49e4e69..6b9649ce 100644 --- a/.gitignore +++ b/.gitignore @@ -52,5 +52,4 @@ build/ docs/html docs/latex *.mo -resources/report/bower_components -resources/report/index.html +bower_components diff --git a/README.md b/README.md index b3a283de..64f9540e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ LOOT's UI relies on a few web libraries: These dependencies are most easily managed using [Bower](http://bower.io/), and are built for distribution using [Vulcanize](https://github.com/Polymer/vulcanize). -To install Bower and Vulcanize, first install [Node](http://nodejs.org/), and run `npm install -g bower vulcanize@0.7.11` from the command line. Once they are installed, fetch and build the dependencies by running `bower install && vulcanize --inline --strip --config vulcanize.config.json -o index.html report.html` from inside this repository's `resources/report` folder. +To install Bower and Vulcanize, first install [Node](http://nodejs.org/), and run `npm install -g bower vulcanize@0.7.11` from the command line. Once they are installed, fetch and build the dependencies by running `bower install && vulcanize --inline --strip --config vulcanize.config.json -o build/Release/resources/ui/index.html src/gui/html/index.html`. ## Packaging Releases diff --git a/resources/report/bower.json b/bower.json similarity index 100% rename from resources/report/bower.json rename to bower.json diff --git a/resources/report/css/dark-theme.css b/resources/ui/css/dark-theme.css similarity index 100% rename from resources/report/css/dark-theme.css rename to resources/ui/css/dark-theme.css diff --git a/resources/report/fonts/Roboto-Bold.ttf b/resources/ui/fonts/Roboto-Bold.ttf similarity index 100% rename from resources/report/fonts/Roboto-Bold.ttf rename to resources/ui/fonts/Roboto-Bold.ttf diff --git a/resources/report/fonts/Roboto-BoldItalic.ttf b/resources/ui/fonts/Roboto-BoldItalic.ttf similarity index 100% rename from resources/report/fonts/Roboto-BoldItalic.ttf rename to resources/ui/fonts/Roboto-BoldItalic.ttf diff --git a/resources/report/fonts/Roboto-Italic.ttf b/resources/ui/fonts/Roboto-Italic.ttf similarity index 100% rename from resources/report/fonts/Roboto-Italic.ttf rename to resources/ui/fonts/Roboto-Italic.ttf diff --git a/resources/report/fonts/Roboto-Light.ttf b/resources/ui/fonts/Roboto-Light.ttf similarity index 100% rename from resources/report/fonts/Roboto-Light.ttf rename to resources/ui/fonts/Roboto-Light.ttf diff --git a/resources/report/fonts/Roboto-LightItalic.ttf b/resources/ui/fonts/Roboto-LightItalic.ttf similarity index 100% rename from resources/report/fonts/Roboto-LightItalic.ttf rename to resources/ui/fonts/Roboto-LightItalic.ttf diff --git a/resources/report/fonts/Roboto-Medium.ttf b/resources/ui/fonts/Roboto-Medium.ttf similarity index 100% rename from resources/report/fonts/Roboto-Medium.ttf rename to resources/ui/fonts/Roboto-Medium.ttf diff --git a/resources/report/fonts/Roboto-MediumItalic.ttf b/resources/ui/fonts/Roboto-MediumItalic.ttf similarity index 100% rename from resources/report/fonts/Roboto-MediumItalic.ttf rename to resources/ui/fonts/Roboto-MediumItalic.ttf diff --git a/resources/report/fonts/Roboto-Regular.ttf b/resources/ui/fonts/Roboto-Regular.ttf similarity index 100% rename from resources/report/fonts/Roboto-Regular.ttf rename to resources/ui/fonts/Roboto-Regular.ttf diff --git a/src/archive.py b/src/archive.py index ea1e730f..5ec37606 100644 --- a/src/archive.py +++ b/src/archive.py @@ -89,18 +89,21 @@ def getNameSuffix(): return '' -def buildUIFiles(ui_path): +def buildUIFiles(): # Vulcanize the UI's files. vulcanize = which('vulcanize.cmd') + dest_path = os.path.join('..', 'build', 'Release', 'resources', 'ui') args = [ vulcanize, '--inline', '--strip', '--config', - os.path.join(ui_path, 'vulcanize.config.json'), + os.path.join('..', 'vulcanize.config.json'), '-o', - os.path.join(ui_path, 'index.html'), - os.path.join(ui_path, 'report.html')]; + os.path.join(dest_path, 'index.html'), + os.path.join('gui', 'html', 'index.html')]; + if not os.path.exists(dest_path): + os.makedirs(dest_path) subprocess.call(args); def createArchive(folder_path, archive_path): @@ -147,11 +150,10 @@ def createAppArchive(archive_path): shutil.copy( os.path.join('..', 'resources', 'l10n', lang, 'LC_MESSAGES', 'loot.mo'), os.path.join(temp_path, 'resources', 'l10n', lang, 'LC_MESSAGES') ) # UI files. - os.makedirs( os.path.join(temp_path, 'resources', 'report') ) - os.makedirs( os.path.join(temp_path, 'resources', 'report', 'css') ) - shutil.copy( os.path.join('..', 'resources', 'report', 'index.html'), os.path.join(temp_path, 'resources', 'report') ) - shutil.copy( os.path.join('..', 'resources', 'report', 'css', 'dark-theme.css'), os.path.join(temp_path, 'resources', 'report', 'css') ) - shutil.copytree( os.path.join('..', 'resources', 'report', 'fonts'), os.path.join(temp_path, 'resources', 'report', 'fonts') ) + os.makedirs( os.path.join(temp_path, 'resources', 'ui', 'css') ) + shutil.copy( os.path.join('..', 'build', 'Release', 'resources', 'ui', 'index.html'), os.path.join(temp_path, 'resources', 'ui') ) + shutil.copy( os.path.join('..', 'resources', 'ui', 'css', 'dark-theme.css'), os.path.join(temp_path, 'resources', 'ui', 'css') ) + shutil.copytree( os.path.join('..', 'resources', 'ui', 'fonts'), os.path.join(temp_path, 'resources', 'ui', 'fonts') ) # Docs. shutil.copytree( os.path.join('..', 'docs', 'images'), os.path.join(temp_path, 'docs', 'images') ) @@ -192,6 +194,6 @@ def createApiArchive(archive_path): # Create the archives. archive_suffix = getNameSuffix() -buildUIFiles( os.path.join('..', 'resources', 'report') ); +buildUIFiles(); createAppArchive( os.path.join('..', 'build', 'LOOT ' + archive_suffix) ) createApiArchive( os.path.join('..', 'build', 'LOOT API ' + archive_suffix) ) diff --git a/src/backend/globals.cpp.in b/src/backend/globals.cpp.in index ec16edb5..4c6e067e 100644 --- a/src/backend/globals.cpp.in +++ b/src/backend/globals.cpp.in @@ -36,7 +36,7 @@ namespace loot { //Common paths. const boost::filesystem::path g_path_readme = boost::filesystem::current_path() / "docs" / "LOOT Readme.html"; - const boost::filesystem::path g_path_report = boost::filesystem::current_path() / "resources" / "report" / "index.html"; + const boost::filesystem::path g_path_report = boost::filesystem::current_path() / "resources" / "ui" / "index.html"; const boost::filesystem::path g_path_l10n = boost::filesystem::current_path() / "resources" / "l10n"; #ifdef _WIN32 const boost::filesystem::path g_path_local = GetLocalAppDataPath() / "LOOT"; diff --git a/resources/report/css/material.css b/src/gui/html/css/material.css similarity index 100% rename from resources/report/css/material.css rename to src/gui/html/css/material.css diff --git a/resources/report/css/overrides.css b/src/gui/html/css/overrides.css similarity index 100% rename from resources/report/css/overrides.css rename to src/gui/html/css/overrides.css diff --git a/resources/report/css/style.css b/src/gui/html/css/style.css similarity index 100% rename from resources/report/css/style.css rename to src/gui/html/css/style.css diff --git a/resources/report/css/typography.css b/src/gui/html/css/typography.css similarity index 100% rename from resources/report/css/typography.css rename to src/gui/html/css/typography.css diff --git a/resources/report/html/editable-table.html b/src/gui/html/elements/editable-table.html similarity index 96% rename from resources/report/html/editable-table.html rename to src/gui/html/elements/editable-table.html index 91d3af13..98c9fbc9 100644 --- a/resources/report/html/editable-table.html +++ b/src/gui/html/elements/editable-table.html @@ -1,9 +1,9 @@ - - - - - - + + + + + + diff --git a/resources/report/html/loot-custom-icons.html b/src/gui/html/elements/loot-custom-icons.html similarity index 86% rename from resources/report/html/loot-custom-icons.html rename to src/gui/html/elements/loot-custom-icons.html index aaef3519..88569071 100644 --- a/resources/report/html/loot-custom-icons.html +++ b/src/gui/html/elements/loot-custom-icons.html @@ -1,4 +1,4 @@ - + diff --git a/resources/report/html/loot-dialog.html b/src/gui/html/elements/loot-dialog.html similarity index 89% rename from resources/report/html/loot-dialog.html rename to src/gui/html/elements/loot-dialog.html index 0f80bcb5..b0675b55 100644 --- a/resources/report/html/loot-dialog.html +++ b/src/gui/html/elements/loot-dialog.html @@ -8,8 +8,8 @@ Still missing compared to are: 3. No `form[method="dialog"]`. --> - - + + @@ -312,9 +312,9 @@

LOOT is free, but if you want to show your appreciation with some money, donations may be made to WrinklyNinja (LOOT's creator and main developer) using PayPal, Bitcoin or Flattr.

OK - - - + + + diff --git a/resources/report/js/events.js b/src/gui/html/js/events.js similarity index 100% rename from resources/report/js/events.js rename to src/gui/html/js/events.js diff --git a/resources/report/js/filters.js b/src/gui/html/js/filters.js similarity index 100% rename from resources/report/js/filters.js rename to src/gui/html/js/filters.js diff --git a/resources/report/js/helpers.js b/src/gui/html/js/helpers.js similarity index 100% rename from resources/report/js/helpers.js rename to src/gui/html/js/helpers.js diff --git a/resources/report/js/init.js b/src/gui/html/js/init.js similarity index 100% rename from resources/report/js/init.js rename to src/gui/html/js/init.js diff --git a/resources/report/js/l10n.js b/src/gui/html/js/l10n.js similarity index 100% rename from resources/report/js/l10n.js rename to src/gui/html/js/l10n.js diff --git a/resources/report/js/loot.js b/src/gui/html/js/loot.js similarity index 100% rename from resources/report/js/loot.js rename to src/gui/html/js/loot.js diff --git a/resources/report/js/plugin.js b/src/gui/html/js/plugin.js similarity index 100% rename from resources/report/js/plugin.js rename to src/gui/html/js/plugin.js diff --git a/src/installer.iss b/src/installer.iss index 87461d4f..722f9037 100644 --- a/src/installer.iss +++ b/src/installer.iss @@ -101,12 +101,12 @@ DestDir: "{app}\docs\images"; Flags: ignoreversion Source: "docs\images\settings.png"; \ DestDir: "{app}\docs\images"; Flags: ignoreversion -Source: "resources\report\index.html"; \ -DestDir: "{app}\resources\report"; Flags: ignoreversion -Source: "resources\report\css\dark-theme.css"; \ -DestDir: "{app}\resources\report\css"; Flags: ignoreversion -Source: "resources\report\fonts\*"; \ -DestDir: "{app}\resources\report\fonts"; Flags: ignoreversion +Source: "build\Release\resources\ui\index.html"; \ +DestDir: "{app}\resources\ui"; Flags: ignoreversion +Source: "resources\ui\css\dark-theme.css"; \ +DestDir: "{app}\resources\ui\css"; Flags: ignoreversion +Source: "resources\ui\fonts\*"; \ +DestDir: "{app}\resources\ui\fonts"; Flags: ignoreversion Source: "resources\l10n\da\LC_MESSAGES\loot.mo"; \ DestDir: "{app}\resources\l10n\da\LC_MESSAGES"; Flags: ignoreversion diff --git a/resources/report/vulcanize.config.json b/vulcanize.config.json similarity index 100% rename from resources/report/vulcanize.config.json rename to vulcanize.config.json