Windows 下安装ReText
打算使用MarkDown了,群友推荐使用ReText,基于Python的,同时依赖了Python的几个包,通过easystall可以方便地安装,同时制作了快捷启动方式,网上找了篇文章以备忘。
Installation
- Download and install the latest version of Python (3.3.0: x86 or amd64).
- Download and install PyQt for your Python version from riverbankcomputing.co.uk.
-
Time to update your computer's Environmental Variables:
- Click Start, right-click My Computer and select Properties.
- Click Environment Variables.
-
For System Variables, click New. Then add:
PYTHONPATH=C:\Python33\Lib\;C:\Python33\Lib\site-packages\
-
Select the System Variable
PATH
, click Edit. - Update the PATH by adding
C:\Python33;C:\Python33\Lib\site-packages\PyQt4\bin;
to the front of it, like so:PATH=C:\Python33;C:\Python33\Lib\site-packages\PyQt4\bin;etc.
-
Download and run distribute_setup.py which will install
distribute
package, which provideseasy_install
tool. -
Time to install additional Python libraries.
- Select Start -> Run
cmd
thencd \Python33\Tools\Scripts
. -
Enter:
easy_install Pygments easy_install ElementTree easy_install Markdown easy_install docutils easy_install Markups
- Select Start -> Run
-
Download and unpack ReText
- Download and unpack ReText icons pack
- Place the unpacked icons into the
ReText\icons
folder - Run
cmd
then cd to the ReText folder. Then enter:python3 retext.py
Creating a Launch Shortcut
If you wish to ReText to have a Shortcut to start it. Then you can pin it to your Start menu, copy to your Desktop or Quick Launch, etc.
For local installs
- Right-click drag-n-drop the retext.py and select "Create shortcuts here"
- Adjust the properties of the shortcut
- Change the Shortcut tab: Target:
C:\python33\pythonw.exe
retext.py's path
; Run = minimized ; Change Icon (to whatever you like). - Change the General tab: rename it to "ReText"
If you wish for the python shell box to not appear, you should follow the USB Stick Batch file instructions at the moment.
For USB Sticks
- Copy
C:\python33
to USB Stick, sayU:\python33
- Put ReText on the stick
-
Create the following BAT file:
retext.bat
REM ReText Startup batch file REM ------------------------- REM determine drive letter of batchfile for /f "delims=\" %%d in ('cd') do set curdrv=%%d echo %curdrv% REM Set ENVs using current drive letter if ENVs not set for USB Sticks REM REM them out if you have the ENVs set set PYTHONPATH=%curdrv%\Python33\Lib;%curdrv%\Python33\Lib\site-packages set PATH=%curdrv%\Python33;%curdrv%\Python33\Lib\site-packages\PyQt4\bin;%PATH% REM Start ReText start /B %curdrv%\Python33\pythonw.exe %CD%\retext.py
-
Right-click drag-n-drop the retext.bat and select "Create shortcuts here"
- Adjust the properties of the shortcut
- Change the Shortcut tab: Run = minimized ; Change Icon (to whatever you like)
- Change the General tab: rename it to "ReText"
Notables
- Install performed without a proxy.
easy_install
requires an internet connection. You're on your own dealing with a proxy. As there's really no Registry Entries, you could install else where and copy to USB Stick and create the batch file. - Tested on Windows XP 32-bit. Untested with ActiveState Python, so adjust your steps accordingly.