diff --git a/.travis.yml b/.travis.yml index 5bf5370a..878285f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,15 +24,14 @@ install: # Use GCC 5. - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi # Run install step script. - - chmod +x install-step.travis.sh - - ./install-step.travis.sh + - chmod +x scripts/install-step.travis.sh + - ./scripts/install-step.travis.sh before_script: # Build Google Test - cd ../.. - - wget https://googletest.googlecode.com/files/gtest-1.7.0.zip - - unzip gtest-1.7.0.zip - - cd gtest-1.7.0 + - wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz -O - | tar -xz + - cd googletest-release-1.7.0 - cmake . - make # Move back into the cloned LOOT repo path. @@ -43,7 +42,7 @@ before_script: # Fetch metadata to test with. - wget https://github.com/loot/testing-metadata/archive/master.tar.gz -O - | tar -xz # Travis machines are 64 bit, and the deps use dynamic linking. - - cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DBUILD_SHARED_LIBS=OFF -DGTEST_ROOT=../../gtest-1.7.0 + - cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DBUILD_SHARED_LIBS=OFF -DGTEST_ROOT=../../googletest-release-1.7.0 script: make tests && ./tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86e03b35..09b83087 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ To translate everything but masterlist messages, first fork this repository. All First check that an [Inno Setup translation](http://www.jrsoftware.org/files/istrans/) exists for your language. Unofficial translations are acceptable, but require a bit of extra handling. If there isn't an official or unofficial translation for Inno Setup, you're better off making a translation and getting it listed on the linked page before continuing. -1. Open the installer script at `src/installer.iss` in a text editor of your choice. +1. Open the installer script at `scripts/installer.iss` in a text editor of your choice. 2. If your language only has an unofficial translation, add a `#define Exists` block for it near the top of the script, like it has been done for Korean and Simplified Chinese. 3. Add your language to the `[Languages]` section. The `Name` must be the POSIX locale code for your language. The `MessagesFile` filename is the filename of the Inno Setup translation that you checked exists. If your language only has an unofficial translation, wrap its line in `#ifdef` and `#endif` lines, again like it has been done for Korean and Simplified Chinese. 4. Translate the string(s) in the `[CustomMessages]` into your language, following the example of the existing translations. Again, if your language only has an unofficial translation, wrap its line(s) in `#ifdef` and `#endif` lines. @@ -63,6 +63,6 @@ If you're adding a new translation, LOOT's source code must be updated to recogn * In [language.h](src/backend/helpers/language.h), add a static constant for the language to the `Language` class. * In [language.cpp](src/backend/helpers/language.cpp), define the value for the constant you added, and update `Language::Language(const std::string& locale)`, `Language::Construct(const unsigned int code)` and `Language::Codes({...})` to include lines for your language. * Add constants for the language in [api.h](src/api/api.h) and [api.cpp](src/api/api.cpp). -* In [archive.py](src/archive.py), add the language folder to the inline list on line 68. -* In [installer.iss](src/installer.iss), add an entry for your language's translation file to the `[Files]` section. +* In [archive.py](scripts/archive.py), add the language folder to the inline list on line 68. +* In [installer.iss](scripts/installer.iss), add an entry for your language's translation file to the `[Files]` section. * In [LOOT Metadata Syntax.html](docs/LOOT%20Metadata%20Syntax.html), add a row for your language to the Language Codes table. diff --git a/README.md b/README.md index 64f9540e..2fac77da 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,11 @@ 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 build/Release/resources/ui/index.html src/gui/html/index.html`. +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 scripts/vulcanize.config.json -o build/Release/resources/ui/index.html src/gui/html/index.html`. ## Packaging Releases -Installer and zip archive releases for the main LOOT application can be handled by running the `src/installer.iss` and `src/archive.py` scripts respectively. The installer script requires [Inno Setup](http://www.jrsoftware.org/isinfo.php), while the archive script requires [Python](http://www.python.org/) (2 or 3). The installer and archive files are created in the `build/` folder, relative to the repository root. +Installer and zip archive releases for the main LOOT application can be handled by running the `scripts/installer.iss` and `scripts/archive.py` scripts respectively. The installer script requires [Inno Setup](http://www.jrsoftware.org/isinfo.php), while the archive script requires [Python](http://www.python.org/) (2 or 3). The installer and archive files are created in the `build/` folder, relative to the repository root. If the unofficial Korean and Simplified Chinese Inno Setup translation files are installed alongside the official translation files, then the installer script will also offer those language options. If they are not found, the installer will be built without them. diff --git a/src/archive.py b/scripts/archive.py similarity index 97% rename from src/archive.py rename to scripts/archive.py index 5ec37606..2460d6f7 100644 --- a/src/archive.py +++ b/scripts/archive.py @@ -98,10 +98,10 @@ def buildUIFiles(): '--inline', '--strip', '--config', - os.path.join('..', 'vulcanize.config.json'), + os.path.join('vulcanize.config.json'), '-o', os.path.join(dest_path, 'index.html'), - os.path.join('gui', 'html', 'index.html')]; + os.path.join('..', 'src', 'gui', 'html', 'index.html')]; if not os.path.exists(dest_path): os.makedirs(dest_path) subprocess.call(args); @@ -181,7 +181,7 @@ def createApiArchive(archive_path): # Now copy everything into the temporary folder. shutil.copy( os.path.join('..', 'build', 'Release', 'loot32.dll'), temp_path ) - shutil.copy( os.path.join('api', 'api.h'), os.path.join(temp_path, 'include', 'loot') ) + shutil.copy( os.path.join('..', 'src', 'api', 'api.h'), os.path.join(temp_path, 'include', 'loot') ) shutil.copy( os.path.join('..', 'docs', 'latex', 'refman.pdf'), os.path.join(temp_path, 'docs', 'readme.pdf') ) shutil.copytree( os.path.join('..', 'docs', 'licenses'), os.path.join(temp_path, 'docs', 'licenses') ) diff --git a/install-step.travis.sh b/scripts/install-step.travis.sh similarity index 100% rename from install-step.travis.sh rename to scripts/install-step.travis.sh diff --git a/src/installer.iss b/scripts/installer.iss similarity index 100% rename from src/installer.iss rename to scripts/installer.iss diff --git a/vulcanize.config.json b/scripts/vulcanize.config.json similarity index 100% rename from vulcanize.config.json rename to scripts/vulcanize.config.json