블로그 이미지
다엄
잘해야지

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

    'Programming/mis.tools'에 해당되는 글 2

    1. 2009.08.11 notepad++에서 c++ compile하는 방법
    2009. 8. 11. 20:53 Programming/mis.tools

    From notepad-plus

    Jump to: navigation, search
    How To Compile Notepad++ From Source

    To setup VisualC++ 2008 Express Edition:

    1. Download and install: "Visual C++ 2008 Express Edition". There are 3 components, I only installed the first (IDE) and not the other 2 (MSDN, Database).
    2. Run it once to set up environment (mentioned somewhere in SDK docs to do this)
    3. Download and install the platform sdk whose exact name is "Windows Server 2003 R2 Platform SDK"
    4. Do the 3 installation steps listed in the Platform SDK Documentation under Getting Started -> Using the Platform SDK -> Installing the Platform SDK. Namely: Go to Tools -> Options -> Projects and Solutions -> VC++ Directories and use up down arrows keys to:
      1. In Executable Files, move $(WindowsSdkDir)\bin up so its above $(VCInstallDir)\bin
      2. In Include Files, move $(WIndowsSdkDir)\include up so its above $(VCInstallDir)\include
      3. In Library Files, move $(WIndowsSdkDir)\lib up so its above InstallDir)\lib
    5. Download and unzip npp.5.4.5.src, to be found via the official download page, into My Documents\Visual Studio 2008\Projects\
    6. Download and unzip NppInsertPlugin into My Documents\Visual Studio 2008\Projects\

    Build Notepad++ v5.4.5 (win32, Debug):

    1. Within VC++ IDE select File -> Open -> Project/Solution and open the project My Documents\Visual Studio 2008\Projects\npp.5.4.5.src\scintilla\vcbuild\SciLexer.dsp
    2. Allow the project upgrade wizard to run with defaults
    3. Within the Solution Explorer window, right click on Solution 'SciLexer' and select Add -> Existing Project
    4. Open My Documents\Visual Studio 2008\Projects\npp.5.4.5.src\PowerEditor\visual.net\notepadPlus.vcproj.
      • IMPORTANT: do NOT open notepadPlus.7.0.vcproj, it doesn't build (linker error).
    5. Allow the project upgrade wizard to run with defaults
    6. Select Project -> Build Order and confirm that SciLexer is before notepadPlus in the build order
    7. Build the solution. When prompted save your vc2008 project somewhere (eg My Documents\Visual Studio 2008\Projects\npp.5.4.5.src\PowerEditor\visual.net\SciLexer vc2008). The IDE should build Scintilla first, followed by Notepad++. There should be no errors besides the following:
      Link error
      unresolved reference in LexMySQL.cxx
      This will happen while compiling Scilexer.dll. Go to Project -> Include existing element and include LexMySQL.cxx in the SciLexer project. A new build should succeed now
      Warning
      local function cmpStringNoCase in LexUser.cxx was removed because it was not referenced
      Ignore the warning.
    8. Output:
      • The result of the scintilla build is the dll (and associated files) in: My Documents\Visual Studio 2008\Projects\npp.5.4.5.src\scintilla\bin .
      • The result of the Notepad++ build is My Documents\Visual Studio 2008\Projects\npp.5.4.5.src\PowerEditor\visual.net\Debug\Notepad++.exe.

    Build NppInsert Plugin (win32, Debug):

    1. Within VC++ IDE select File -> Open -> Project/Solution and open the project My Documents\Visual Studio 2008\Projects\NppInsertPlugin\NppInsertPlugin.vcproj
    2. Allow the project upgrade wizard to run with defaults
    3. Build the solution. Save your vc2008 project when prompted.
    4. The result of the plugin build is found in a newly created directory under My Documents\Visual Studio 2008\Projects\. The path is: My Documents\Visual Studio 2008\Projects\notepad++\PowerEditor\bin\plugins

    IMPORTANT: Try the Release builds to see if they also work.

    A recommended development environment

    The following has been posted on Open Discussion Forum and results from interactive setup through the official Notepad++ IRC channel.

    1. Use Visual C++ 2008 EE
    2. Checkout the latest trunk
    3. Open the PowerEditor visual.net vc.7.0.vcproj file
    4. Add existing project to the solution, select SciLexer vcbuild 7.0 vcproj file
    5. Add dependency to PowerEditor (it should depend on SciLexer).
    6. Add existing item to SciLexer called LexMySql.cxx.

    Fixing or enhancing Notepad++

    So you modified the code, and that has fixed a bug, enhanced or added some functionality?

    Then the usual rules about open source code apply:

    • thoroughly test that you don't cause regressions, ie break something that previously worked. If at all possible, ask non programmers to test. They are pretty good at hitting gaping faults we don't see.
    • Incorrectly commented code is bad code. You have no idea of whoever will maintain your code, neither when nor why. No one else does anyway.

    Brilliant and perfect? Then you can contact the main developer about it. Make a patch to apply your mods to the latest revision on SVN, and submit it at https://sourceforge.net/tracker/?group_id=95717&atid=612384

    You may want to read this thread: http://sourceforge.net/forum/forum.php?thread_id=3251463&forum_id=331753

    And the story ends here, they lived happy and had lots of lines of code.


    posted by 다엄
    prev 1 2 next