리눅스에서 윈도우 프로그램 실행시키는 프로그램

 

Wine(Wine Is Not an Emulator) 
https://en.wikipedia.org/wiki/Wine_(software)
https://www.winehq.org/
https://gitlab.winehq.org/wine/wine
https://github.com/wine-mirror/wine

Wine 역사 (history)
1993 개발시작
v0.9 - 2005
v1.0 - 2008
v1.8 - 2015
v1.9 - 2015-12-26

v2.0 - 2017
v3.0 - 2018
v4.0 - 2019
v5.0 - 2020

v6.0 - 2021-01 , ubuntu 22에서 지원
v7.0 - 2022-01
v8.0 - 2023-01
v9.0 - 2024-01 , 


 Ubuntu 8.10부터 'Wine Microsoft Windows Compatibility Layer'


//-----------------------------------------------------------------------------
Wine 설치

AWS EC2 Ubuntu 22 Headless server


X11 (x server) 를 먼저 설치해야 한다.

//-----------------------------------------------------------------------------

< 이전 버전 삭제 방법 >


./wine_remove.sh

pkill -9 wine
pkill -9 wineserver

pkill -f "\.exe"
pkill -f "[Ww]indows"

sudo apt remove --purge wine*
sudo apt remove --purge winehq*
sudo apt remove --purge winetricks
sudo apt remove --purge wine-staging*

rm -rf ~/.wine
#rm -rf ~/.wine32
#rm -rf ~/.wine_office

rm -rf ~/.local/share/applications/wine*
rm -rf ~/.local/share/icons/wine*

sudo rm /etc/apt/sources.list.d/winehq*
sudo rm /etc/apt/keyrings/winehq-archive.key

sudo rm /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list
sudo rm /etc/apt/sources.list.d/winehq-jammy.sources

sudo apt autoremove
sudo apt clean

sudo apt update

재부팅

//-----------------------------------------------------------------------------
AWS EC2 Ubuntu 22 에서 Wine 설치
AWS EC2 Ubuntu 22, how to install Wine

# 중요! 이것이 없으면 32bit와 64bit를 동시에 사용할 수 없다
sudo add-apt-repository --remove ppa:ondrej/php

# 32-bit 지원 설정
sudo dpkg --add-architecture i386

sudo apt update
sudo apt install -y wine64 wine32
- 여기서 libgd3 설치를 요구하면 위의 sudo add-apt-repository --remove ppa:ondrej/php 를 실행한다.

- 버전 확인
wine --version

//-------------------------------------
< 환경 설정 >
- 환경 생성, 설정
- 기본 환경을 64bit로 설정하면 32bit, 64bit 모든 프로그램 실행 가능
rm -fr ~/.wine
WINEARCH=win64 WINEPREFIX=~/.wine winecfg 

- 32bit 실행
wine cmd /c echo %PROCESSOR_ARCHITECTURE%
결과 : x86

- 64bit 실행
wine64 cmd /c echo %PROCESSOR_ARCHITECTURE%
결과 : AMD64
- 32bit로 설정된 환경에서는 실행 에러

- 64bit 환경 만들기
WINEARCH=win64 WINEPREFIX=~/.wine64 winecfg

- 32bit 환경 만들기
WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg


//-------------------------------------
* 환경지정하여 실행하는 방법
- 64bit 환경에서 32bit 프로그램 실행
WINEPREFIX=~/.wine64 wine cmd /c echo %PROCESSOR_ARCHITECTURE%

- 64bit 환경에서 64bit 프로그램 실행
WINEPREFIX=~/.wine64 wine64 cmd /c echo %PROCESSOR_ARCHITECTURE%

- 32bit 환경에서 32bit 프로그램 실행
WINEPREFIX=~/.wine32 wine cmd /c echo %PROCESSOR_ARCHITECTURE%

- 32bit 환경에서642bit 프로그램 실행 => 에러
WINEPREFIX=~/.wine32 wine64 cmd /c echo %PROCESSOR_ARCHITECTURE%
- 에러(실행 안됨)



//-----------------------------------------------------------------------------
wine 실행 환경이 32bit인지 64bit인지 확인하는 방법
How to check if the Wine execution environment is 32bit or 64bit

wine cmd /c echo %PROCESSOR_ARCHITECTURE%
wine64 cmd /c echo %PROCESSOR_ARCHITECTURE%
~/.wine 설정과 관계 없음


//-------------------------------------
~/.wine 디렉토리에 설정된 환경이 32bit 인지 64bit 인지 확인하는 방법
How to check if the environment set in the ~/.wine directory is 32bit or 64bit

cat ~/.wine/system.reg | grep -i '#arch'

반응형
Posted by codens


반응형