Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md to include x64 build guides #17

Merged
merged 2 commits into from
Sep 12, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update README.md to include more build guides
  • Loading branch information
wangqr committed Sep 8, 2017
commit 779345f3124ef2c5c0f496b0dbf493525f5d3746
35 changes: 9 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,16 @@ button.

### Install from Source

Before installation, you must have both [cmake][] and [Microsoft Visual C++][]
installed.

1. Download the [EditorConfig C core][] and follow the instructions in the README
and INSTALL files to compile and install it with Microsoft Visual C++. Note that the
EditorConfig C core must be built with the `MT` option.
Before installation, you must have both [cmake][] and [Microsoft Visual Studio][] installed.

1. Download the [EditorConfig C core][] and follow the instructions in the README and INSTALL files to compile and install it with Microsoft Visual C++. Note that the EditorConfig C core must be built with the `MT` option. To build the x64 version of the plugin, the x64 version of EditorConfig C core is needed.
2. Download the [EditorConfig plugin for Notepad++][] and extract it.
3. Open `cmake-gui`, select the extracted folder as source code directory, and create a directory to build the binaries. Then click the `Configure` button. When asked for a generator, select a generator without suffix to build the x86 version, or a generator with `Win64` suffix to build the x64 version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you wanna say the BUILD_TYPE should be set to Release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think Release should be used to compile the dll for daily use. Release builds should be smaller and runs faster than Debug builds. However using the Debug one is also fine.

  2. There are 2 places where we can change the option. The first place is when we "Configure" the CMake project, we can specify a set of available configuration types in the CMAKE_CONFIGURATION_TYPES option. The second place is when we opened the project using VS, there is a drop down menu on the toolbar so we can select the configuration from the set.

    CMAKE_CONFIGURATION_TYPES defaults to Debug;Release;MinSizeRel;RelWithDebInfo and VS defaults to the first one, which is Debug.

  3. Maybe I should call it "configuration type" instead of "build type". Do I need to change it or just remove the suggestion to use Release?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please just mention the existence of Release. Otherwise, many people may forget.
  2. Either place is OK.
  3. Sure, as long as we use some name that is consistent with what is shown in the cmake GUI/VS, it is OK.


3. Open your command line prompt, and use `cd` command to switch current
working directory to the root of the source tree of the Notepad++ plugin.
Use the following command to generate the project file:

C:\path\to\editorconfig-notepad-plus-plus> cmake . -DEDITORCONFIG_CORE_PREFIX="$(The_path_to_EditorConfig_core_prefix)"

After this project file is built, run `cmake-gui .` to set the variable
`PCRE_LIB_DIR` to the directory which contains `pcre.lib` (can be downloaded
from
https://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/3rd-party/pcre-8.38/?upload_just_completed=true
). Double click on the project file and use Microsoft Visual C++ to build
it.
Build options will appear after the configure process has finished. Set `EDITORCONFIG_CORE_PREFIX` to the install directory of EditorConfig C core, and `PCRE_LIB_DIR` to the directory which contains `pcre.lib` (x86 prebuild lib can be downloaded from https://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/3rd-party/pcre-8.38/ . For newer version of pcre, or to build the x64 version, you can find the source at https://ftp.pcre.org/pub/pcre/ and build it using CMake).

4. If the build succeeded, you should have `bin\unicode\NppEditorConfig.dll`
and `bin\ansi\NppEditorConfig.dll` in your build tree. Copy the
corresponding one (the unicode one if your Notepad++ is unicode version or
the ansi one if your Notepad++ is ansi version) to your the plugin directory
of the Notepad++ directory to complete the installation.
Click the `Configure` button again, and then the `Generate` button and the `Open Project` button. Select `Release` build type and build the project.
4. If the build succeeded, you should have `bin\unicode\Release\NppEditorConfig.dll` in your build tree. Copy the dll to your the plugin directory of the Notepad++ directory to complete the installation.


## Supported properties
Expand All @@ -74,11 +57,11 @@ Feel free to submit bugs, feature requests, and other issues to the main
[EditorConfig issue tracker](https://github.com/editorconfig/editorconfig/issues).


[cmake]: http://www.cmake.org
[cmake]: https://www.cmake.org
[EditorConfig]: http://editorconfig.org
[EditorConfig C core]: https://github.com/editorconfig/editorconfig-core
[EditorConfig plugin for Notepad++]: https://github.com/editorconfig/editorconfig-notepad-plus-plus
[Microsoft Visual C++]: http://msdn2.microsoft.com/en-us/visualc/default.aspx
[Notepad++ Plugin Manager]: http://www.brotherstone.co.uk/npp/pm/
[Microsoft Visual Studio]: https://www.visualstudio.com/
[Notepad++ Plugin Manager]: https://bruderste.in/npp/pm/
[download]: https://sourceforge.net/projects/editorconfig/files/EditorConfig-Notepad%2B%2B-Plugin/
[properties]: http://editorconfig.org/#supported-properties