Wine

Run wine commands from Python 3.6 on Mac OSX

孤街浪徒 提交于 2019-12-12 19:38:21
问题 I am trying to write a script in Python which opens wine and then sends code to the wine terminal to open a .exe program. The .exe program is also command driven. I can open wine , but I can't get any further: import shlex, subprocess line = "/usr/bin/open -n -a /Applications/Wine\ Stable.app" line2 = '''cd /Applications/application/ && wine application.exe /h1 /k0 Z:/Users/myname/Desktop/File.TXT''' line = shlex.split(line) p1 = subprocess.Popen(line) p1.stdin.write(line2.encode()) The above

Waiting for wine to finish running

旧巷老猫 提交于 2019-12-12 15:54:19
问题 My current script looks like this: cd ~/.wine/drive_c/ echo "test123" > foo$$.txt wine start "C:\foo$$.txt" wineserver -w echo "Wine is done!" which works fine when only one program is running in wine at a time. However if I run this a second time, before the first program is done, both scripts will wait for each others programs to exit. This does not work: cd ~/.wine/drive_c/ echo "test123" > foo$$.txt $(wine start "C:\foo$$.txt") & wait ${!} echo "Wine is done!" as it will exit before you

COM Interop Through Wine in OSX

爷,独闯天下 提交于 2019-12-11 17:27:04
问题 I am trying to write a program that modifies Office files (word, excel) programmatically using C#. Before continuing with my project, I would like to know if the COM Interop can be used in OSX by utilizing Wine, and if so, can this be done in Linux as well? 来源: https://stackoverflow.com/questions/23532327/com-interop-through-wine-in-osx

Automatically “Press Enter to Exit” in bash?

末鹿安然 提交于 2019-12-11 08:54:20
问题 In a bash script, I'm using wine to call a DOS program that requires me to "Press Enter to exit". How do I do that automatically and continue with the rest of the script? 回答1: echo | wine dosprogram.exe 回答2: You might be able to use the expect program. Here is an example script: spawn /path/to/program/Dynamips expect -- "->" send "start R1\r" expect -- "->" { sleep 5 send "start R2\r" } expect eof You can invoke this with: expect scriptname 回答3: Send it the input 0x0D 来源: https:/

Linux下使用Wine出现中文乱码的解决方法

ε祈祈猫儿з 提交于 2019-12-09 19:35:17
准备工作 使用wine打开福昕阅读器FoxitReader(或者通过其他方法打开wine),然后点击“打开PDF文件”(为什么要这样做呢?因为这样子可以看到ubuntu的虚拟C盘),会弹出一个框。 接 着在这个框内在把真正windows系统(Win7)中的 C:\windows\Fonts\simsun.ttc 拷到用wine菜单中。打开的虚拟c盘的同样位置,即虚拟的 C:\windows\Fonts 位置。(这里就是为了让wine能够关联存在的/正确的字体) 进行编辑 在终端输入命令:gedit .wine/system.reg 打开 .wine/system.reg 配置文件(这里一定要使用 gedit 或其他支持 gb2312/utf8 编码的编辑器修改这些文件,否则文件中的中文可能变乱码) 搜索:LogPixels 找到的行应该是:[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts] 将其中的: “LogPixels”=dword:00000060 改为 “LogPixels”=dword:00000070 这里改的是字宽 搜索:FontSubstitutes 找到的行应该是:[Software\\Microsoft\\Windows NT\\CurrentVersion\

Ubuntu 64位系统安装Wine1.7.55

旧时模样 提交于 2019-12-09 19:25:14
wine-1.7.55源码下载地址:wget http://mirrors.ibiblio.org/wine/source/1.7/wine-1.7.55.diff.bz2 下载后上传到目标服务器,也可以在目标服务器直接下载。 进入安装目录 tar -zxf wine-1.7.55.tar.bz2 cd wine-1.4.1 检查环境 sudo ./configure -v 源码安装 ./configure --prefix=/opt/wine --enable-win64 在检查环境是可能会提示缺失什么包,可以联网使用apt-get install安装 编译完成以后,就会提示你可以 make depend && make 了,输入 代码: sudo make depend && make 这时wine开始检查编译环境,检查包依赖是否通过,如果这个不出差错,剩下的几步就只是时间问题。很多人在编译遇到困难而放弃的,最大的原因就是这里了。 接下来可能要等1个小时左右才能完成编译。这个过程需要耐心。 编译完成以后,会提示你Wine built successfully,这时输入 代码: sudo make install 装完之后就不会了,第一次运行Wine前要运行winecfg, 作用是创建~/. win e 当提示 wine.conf找不到 /opt/wine/bin/notepad

wine安装与配置

柔情痞子 提交于 2019-12-09 18:59:00
1. 安装wine32 dpkg --add-architecture i386 && apt-get update && apt-get install wine32 2. 准备字体 为了让中文界面的Windows 应用程序在Wine里运行时能正确显示中文字,需要中文版Windows操作系统下面的字体: C:\WINDOWS\Fonts\simsun.ttc,复制一份到Linux系统中/root/.wine/drive_c/windows/Fonts里面。 [root@kashu Fonts]# pwd;ll /root/.wine/drive_c/windows/Fonts -rw-r--r--. 1 root root 10512288 Sep 15 04:41 simsun.ttc simfang.ttc 是许多 Windows 应用默认使用 simfang.ttc 字体。 3. 修改/root/.wine/system.reg(可以先cp /root/.wine/system.reg /root/.wine/system.reg.bak备份一下) 装好字体后,还要修改一下 Wine 的注册表设置,指定与字体相关的设置: gedit /root/.wine/system.reg (一定要使用 gedit 、vim或其他支持 gb2312/utf8 编码的编辑器修改这些文件

wine中文乱码的终极解决方法

百般思念 提交于 2019-12-09 11:13:21
新装的wine中文全是乱码,需要修改一下几个配置文件,找到一篇比较详细的配置说明,分享一下: “ wine下中文的配置方案 步骤: 1. 初始设置 运行 winecfg,把模拟的 Windows 系统设置为 Windows XP 或者 Windows 2000。 2. 准备字体 为了让 Windows 应用程序看上去更美观,所以需要 Windows 下面的字体。 由于我已经将 simsun.ttc 复制到 /usr/share/fonts/windows/ 目录中了。所以我只需要在 ~/.wine/drive_c/windows/fonts/ 目录中为 simsun.ttc 创建一个符号连接: cd ~/.wine/drive_c/windows/fonts ln -s /usr/share/fonts/windows/simsun.ttc simsun.ttc ln -s /usr/share/fonts/windows/simsun.ttc simfang.ttc 创建一个 simfang.ttc 是许多 Windows 应用默认使用 simfang.ttc 字体。 3. 修改 ~/.wine/system.reg 装好字体后,还要修改一下 Wine 的注册表设置,指定与字体相关的设置: gedit ~/.wine/system.reg (一定要使用 gedit 或其他支持

Sending a keypress to an application

情到浓时终转凉″ 提交于 2019-12-08 07:04:36
问题 Is there an easy way to make an application think the user has pressed a key? Here's why I am trying to do this: I am trying to track down a regression in a Wine application. The bug only seems to show itself when the user presses a specific key (in this case, escape). So I wanted to give git bisect a script that launches the application, simulates pressing escape, and tells git that that the revision is bad if the program crashes. 回答1: Use xdotool: http://www.semicomplete.com/projects

system-function call asynchron?

╄→гoц情女王★ 提交于 2019-12-08 04:49:54
问题 At one place in a code i call an external tool with the system-Call. I work with Wine and program with C. The call is like this: system("blabla.exe outfile"); The command is dynamically generated to change the outfile. A few lines later i try to open the generated file with fopen , but fopen returns NULL . If i change the call to the following everything works: system("blabla.exe outfile"); Sleep(2000); But i don't like to wait 2 seconds... And this solution is very bad. I think the system