Day 发表于 2014-2-25 21:12:56

[原创]Code::Blocks Protable Launcher 1.0.2 基于官方1.0.1修改

本帖最后由 Day 于 2014-2-25 21:23 编辑

Code::Blocks Portable Launcher
Code::Blocks 便携启动工具
This version is modify from Biplab and Codeur 's version
此版本是在 Biplab 和 Codeur 的基础上修改得来的

You can fllow this link get more infomation:
你可以访问下面的网址获取更多信息:
http://wiki.codeblocks.org/index.php?title=FAQ-Settings#Q:_How_do_I_make_Code::Blocks_portable.3F

启动 CodeBlocksPortable.exe 时:
启动工具仅仅初始化了数据目录并启动主程序 "codeblocks.exe".
这并不会减慢 IDE 的启动速度
When CodeBlocksPortable.exe is executed:
The launcher performs some "housekeeping work" and only then starts "codeblocks.exe".
It does not noticeably slow down the IDE start-up.

以下是文件结构
The following wa is file structure:
标记为 option 的都可以安全删除
The option File/Directory can be remove safely.
.\
├─App\                              App in this directory
│   ├─CodeBlocks\            Code::Blocks App directory
│   ├─fonts\                     Third party fonts (option)
│   ├─tools\                         Include in Path (option)
│   │   └─bin\                      Include in Path (option)
│   ├─default.conf                The default config file (option)
│   └─default.conf.bak          The default config bakup (option)
├─Data\                              AppData dir (option)
│   └─CodeBlocks\               Code::Blocks's Data directory (option)
├─Others\                           Other files (option)
│   └─CBLauncher_src.zip   Code::Blocks Portable Launcher src
├─CodeBlocksPortable.exe    Portable launcher
├─gpl-3.0.txt                     GPL v3 License (option)
└─README.txt                  This file (option)

How to Update Code::Blocks:
Delete all files in .\App\CodeBlocks\
Copy all files into .\App\CodeBlocks\ from Code::Blocks install directory
怎样更新 Code::Blocks:
把 .\App\CodeBlocks\ 目录里的文件全部删除
将 Code::Blocks 安装目录里的文件全部粘贴到 .\App\CodeBlocks\
CodeBlocksPortable starts the Code::Blocks IDE in a portable manner under Windows.

This is achieved the following way:
CodeBlocksPortable 以便携方式来启动 Code::Blocks
实现方式如下:

1. 初始化目录
首先检测 .\App\CodeBlocks\codeblocks.exe 是否存在,不存在直接退出
创建 .\App\fonts, .\App\tools, .\Data, .\Data\CodeBlocks 目录
如果存在 .\App\default.conf ,会复制到 .\Data\CodeBlocks 目录下

2. 设置环境变量
1). 设置 APPDATA 环境变量实现便携
    APPDATA 环境变量指向 Launcher 工作目录下的 "DATA" 目录
    CodeBlocks 的所有插件和配置文件都在这个目录下,
    并且从 CodeBlocks 中启动的软件也将把配置放在这个目录(如果他们真的把文件写在 APPDATA 目录中)。
2). 将第三方工具目录加入环境变量
    目录 "App\tools" 和 "bin" 子目录将被添加到环境变量
    这样就可以在 CodeBlocks 中使用相对路径

3. 加载外挂字体
放置在 .\App\fonts 目录下的字体将被加载,在 CodeBlocks 将可用
使用 AddFontResource 函数
支持 .fon, .fnt, .ttf, .ttc, .fot, .otf, .mmm, .pfb, .pfm
ps:这里的字体和系统字体不会冲突,在 CodeBlocks 里这里的字体会覆盖系统同名字体
不会影响到系统字体

4. 清理
当 CodeBlocks 结束时,Launcher 将此前挂载的字体全部卸载



下载地址:
**** Hidden Message *****





13*0217 发表于 2014-2-26 13:08:28

我看了半天,原来是c/c++编译器,比起我用的c-free要好在 cross-platform&open source上。但是编译出来的程序是否也可以cross-platform呢?:)
我很郁闷的就是,这么多编译器,到现在我就会用一个,其他的还没用。到底哪个编译器的性能要好些?或者说是代码的翻译质量更好些?

0xAA55 发表于 2014-2-26 14:33:30

13*0217 发表于 2014-2-26 05:08
我看了半天,原来是c/c++编译器,比起我用的c-free要好在 cross-platform&open source上。但是编译出来的程 ...

现在Windows的编译器有MinGW(Windows版的最小GNU,用的GNU的C和C艹编译器),有VC。
MinGW的C在文件流方面效率比较低,但是从其它方面,GNUC编译出的程序更小更快,优化也更智能。
而VC编译的程序虽然比较稳定,而且文件流方面的效率较高,但是指令优化方面做得不好,编译出来的程序也大。
DOS下的编译器有DJGPP(DJ的GNUC和C艹,虽说是面向DOS的但是确实是32位的),Turbo C++ 3.0(这个就是真正的16位了,int是2字节的。另外请不要使用Turbo C 2.0,会把你坑出翔的。)
单片机编译器有Keil。int可能是1字节的。
PSP游戏机的编译器是TOPOC_PSPDev,注意这个用的是GNU的C和C艹,大多数特性和GNUC的相似。
页: [1]
查看完整版本: [原创]Code::Blocks Protable Launcher 1.0.2 基于官方1.0.1修改