问题标签 [rc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1911 浏览

java - Simpler init script for Java daemons?

I've written a small library for creating services/daemons in Java. The idea is simple. When you start your application you pass a command and a port number. If the command is a start command, a new instance of your application will be started on the specified port. Otherwise, the command will be sent to any instance that might be running on that port.

In short, the library provides a daemonize method that starts a daemon controller thread. It uses sockets to make your application communicate with instances of itself (as you've probably already figured out).

For clarity, here's an example of how you would use it:

The library works really well and I've used it to create a couple of daemons that will run on a Linux server. What's missing now is some scripts to let the admins control these daemons like they control other daemons on the server (e.g. start at boot).

Unfortunately my *nix skills, especially when it comes to scripting, are not top level. I have a basic understanding of the BSD-style init procedure (rc.d), but looking at sample scripts like this one I feel a little lost.

So my question is, isn't there a simpler way to do this in my case? I mean, my daemons already understand the commands and should themselves be responsible for any actions (except in the case where a daemon doesn't respond to stop - it should then be killed after some timeout).

0 投票
2 回答
2644 浏览

delphi - 删除 package.dpk 文件中的 {$R *.res} 将删除 .dproj 文件中的 rccompile

我使用自己的 .rc 文件生成自定义资源条目,包括版本信息。

我的 library.rc 文件是:

我通过 Project | 将 .rc 文件添加到包项目文件中。添加到项目。到目前为止,我的 package.dpk 文件是这样的:

package.dproj 文件有 RcCompile 条目:

当我编译包时,一切看起来都很好,但它有一个警告:

这是由于包本身会生成它自己的 package.res 文件,其中包含 MainIcon 和 VersionInfo 条目。并且 VersionInfo 与我自己的 VersionInfo 条目有冲突。

然后我尝试删除 dpk 文件中的 {$R *.res} :

重建项目,一切正常。警告消失了。

但是,手动删除 {$R *.res} 有一些副作用:

  1. 如果您尝试在包中添加新单元或在 Project | 中进行更改,Delphi IDE 将再次添加 {$R *.res} 选项...
  2. .dproj 文件中的所有 RcCompile 条目将被删除

我可以通过在 package.dpk 文件中再次删除 {$R *.res} 来容忍第一个副作用。

然而,第二个副作用是我无法控制的。package.dproj 中缺少的 RcCompile 将导致 rc 文件不再被 brcc32 编译。删除文件系统中的 .res 文件将导致编译错误。

有谁知道如何克服这个问题?谢谢你。

0 投票
1 回答
1399 浏览

c# - 将 Selenium RC 与 C# 和 Nunit 一起使用;如何生成测试用例结果报告?

我将 Selenium RC 与 C# 和 Nunit 一起使用,问题是结果报告。我无法报告测试用例结果,在 Nunit 中我只能执行单个 DLL,如果我有 4 个 DLL,我如何才能在单个报告中加入 4 个 DLL 结果?

有人对这个过程有想法吗,请解释一下。

谢谢

0 投票
1 回答
4532 浏览

windows - 如何以像素为单位设置 Win32 对话框的大小?

我正在尝试获得一个 500x520 像素的 Win32 对话框,但在我的 .rc 文件中,这些设置让我的窗口比我预期的要大。

某处有比例因子吗?

0 投票
1 回答
2738 浏览

windows - 在 rc 文件中格式化文件版本和合法版权

我已经为我的 dll 定义了一个 rc 文件,其中包含以下详细信息

右键单击该文件并选择属性显示以下内容

第一个问题是文件版本。不知道为什么它在文件版本之前添加 0. 我们可以在 rc 文件中格式化该字符串吗?

其次,版权文本在 40 个字符后被截断。用户必须在字符串上拖动光标才能读取整个字符串。我们可以将文本设置为换行以便整个字符串可见吗?我知道版权字符串可以减少到 40 个字符以下,但想知道我们是否可以换行该文本。

0 投票
2 回答
2639 浏览

windows - 如何使用资源文件 (*.rc) 设置基于对话框的应用程序的样式

如何使用资源文件 (*.rc) 设置基于对话框的应用程序的样式?

我可以使用CreateWindowCreateWindowEx创建应用程序的主窗口。还有一些参数CreateWindowCreateWindowEx定义对话框的样式。但我想使用资源文件 (*.rc) 来设置它的样式,而不是通过将样式参数传递给函数的方式。

有人可以给我一些片段吗?

有人说我可以调用DialogBox,并给第二个参数样式模板。CreateWindow这会在和 *.rc 文件之间产生冲突吗?或者我可以同时使用它们吗?

0 投票
5 回答
3721 浏览

node.js - node.js repl 的启动脚本

有没有办法配置node.js的repl?我想在 repl 启动时自动要求 jquery 和下划线。是否有 node.js 在启动 repl 时加载的文件(noderc?)?

Python中的等价物是编辑~/.ipython/ipy_user_conf.py

0 投票
3 回答
7447 浏览

cmake - CMake 没有找到 windres.exe (MingW)、CMAKE_RC_COMPILER

CMake没有从MingW找到windres.exe作为RC编译器有什么具体原因吗?MingW 目录在我的 PATH 变量中,windres.exe 确实存在。

我总是必须CMAKE_RC_COMPILER在 cmake GUI 中手动将变量设置为 windres.exe。

google了好久才发现有这个问题的人比较多,但是一直没有找到真正的解决办法……

我有最新的 cmake (2.8.5)。

我发现的唯一一件事是:http ://public.kitware.com/Bug/view.php?id=4068但那里描述的东西对我不起作用。

0 投票
2 回答
1423 浏览

delphi - 编译rc文件遇到“expected exponent value”错误

我有一个 rc 条目:

当我用 cgrc.exe 或 brcc32.exe 编译 rc 文件时,我遇到了这个错误:

这是由于资源名称“CC6C210B-2EAC”被解释为指数值 (-2EA)。-2E 之后的 A 字符不是有效的指数值。

如果我将 rc 条目更改为类似

资源编译没有任何错误。

不幸的是,我不能简单地更改资源名称,因为它已被广泛使用。有什么方法可以使 rc 不将资源名称解释为指数值?

0 投票
3 回答
10856 浏览

c++ - 我可以通过命令行将预处理器定义传递给资源编译器吗?

我目前正在尝试使用#ifdef标签在 Visual C++ .rc 文件中的几个不同的默认图标之间切换。

正在使用 MSBuild 通过命令行创建切换 #define 值的构建。

我遇到的困难是使用 Visual Studio 2010,为了将预处理器定义传递给资源编译器,您必须在项目设置(配置属性 -> 资源 -> 常规)中定义它。

这使得使用#ifdef标签变得困难,因为使用这种方法,它总是在资源编译器中定义。

我很想将它定义为一个值,以便我使用预处理器#if SOMEVALUE == 4可能会工作,但似乎无法找到通过命令行将预处理器定义 + 值传递给 MSBuild 的方法。

有谁知道将预处理器定义直接传递给资源编译器的方法,或者通过命令行为 msbuild 定义预处理器定义值的方法?