RailPro User Group

RailPro => RailPro User Guides => Topic started by: G8B4Life on July 04, 2020, 09:08:02 AM

Title: How to: Installing and running RailPro in Linux with Wine: Part 1
Post by: G8B4Life on July 04, 2020, 09:08:02 AM
How to: Installing and running RailPro in Linux with Wine

Previously I ran an experiment (https://rpug.pdc.ca/index.php/topic,1031.0.html) to see if I could get RailPro software to run on Linux. The post I made simply detailed what I did more as a running commentary than a how to and I didn't finish it up completely; once I got the software running I left it and moved on.

This how-to guide covers installing Wine and RailPro Assistant and HC Simulator on Ubuntu and Debian based distributions and getting them to run and making it easier to use than how I left things in my experiment post. Although Wine can be installed on Fedora (31 and 32), macOS (10.8 to 10.14), OpenSUSE, Slackware, FreeBSD and Android as well this guide does not cover those distributions. Full instructions for installing Wine in different Linux distributions can be found on the Wine webpage at winehq.org (http://winehq.org).  It is recommended you familiarise yourself with the instructions at WineHQ (http://winehq.org) even though you are following this guide.

Depending on your terminals capability you may be able to copy and paste the commands into the terminal to save on typing them in. This guide makes the assumption that files that you download will be downloaded to your desktop. If you download the files to a different location you will need to substitute that location for the desktop in the commands.

Obligatory disclaimer

This guide was tested using Lubuntu (Ubuntu 18.04). It has not been tested under other versions of Ubuntu or Debian. If you are installing on Debian you may need to modify the commands entered into the terminal depending on your user permissions (you may be a root user in which case you may not need the sudo command).
. . .

Part 1: Installing Wine

There are two methods for this part, the slightly harder way and the slightly easier way.

The slightly easier way:

Use the install script generator at rptools.pdc.ca (still being written) and follow the instructions there for using the install script.

The slightly harder way:

Open a terminal window and type in the following commands in order.

If your distribution is 64 bit and you haven't previously done this enable 32 bit architecture in your distribution

Code: [Select]
sudo dpkg --add-architecture i386

Download and add the repository key for Wine

For Ubuntu based distributions
Code: [Select]
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

For Debian based distributions
Code: [Select]
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

Add the repository for Wine. You will need to choose the correct repository based on the version of Ubuntu or Debian you have or your distribution is based on. See WineHQ (http://"winehq.org") for further information.

For Ubuntu 20.04 based distributions
Code: [Select]
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

For Ubuntu 19.10 based distributions
Code: [Select]
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eaon main'

For Ubuntu 18.04 based distributions
Code: [Select]
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

For Ubuntu 16.04 based distributions
Code: [Select]
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'

For Debian 10 based distributions
Code: [Select]
deb https://dl.winehq.org/wine-builds/debian/ buster main

For Debian 9 based distributions
Code: [Select]
deb https://dl.winehq.org/wine-builds/debian/ stretch main

If you are installing to Unbuntu 18.04 based or Debian 10 based distributions you need to add a repository to be able to install FAudio which Wine requires. Though you can install these manually if you are confident in your ability to do so by following the instructions linked on the WineHQ (http://winehq.org) site most users will find it easier to let the system handle the installation.

If you want the system to handle the installation add the repository key

For Ubuntu based distributions
Code: [Select]
wget -O - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | sudo apt-key add -

For Debian based distributions
Code: [Select]
wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/Release.key
sudo apt-key add Release.key

And add the repository for FAudio

For Ubuntu based distributions
Code: [Select]
sudo add-apt-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'

For Debian based distributions
Code: [Select]
echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./" >> /etc/apt/sources.list.d/faudio.list

Update the repository list

Code: [Select]
sudo apt update

And finally Install Wine. You will need to choose which version of Wine you wish to install. The choices are Wine Stable, Wine Development and Wine Staging. It is not recommended to use Wine Staging, this version receives the latest new features which are not fully tested which has the potential to cause regressions (break) Wine. Wine development receives more updates than Wine Stable and the updates have had more testing to not cause Wine to break but regressions are still common. Wine Stable receives the least updates and updates generally do not cause regressions due to the amount of time that is available to test features before being put into Wine Stable. This guide was tested using Wine Stable.

To Install Wine Stable
Code: [Select]
sudo apt install --install-recommends winehq-stable

To Install Wine Development
Code: [Select]
sudo apt install --install-recommends winehq-devel

To Install Wine Staging
Code: [Select]
sudo apt install --install-recommends winehq-staging

If the install notifies you of missing dependencies answer yes to install them.
. . .
- Tim
Title: How to: Installing and running RailPro in Linux with Wine: Part 2
Post by: G8B4Life on July 04, 2020, 09:12:03 AM
Part 2: Setting up Wine and hardware access

We now need to set up Wine.

Download the CI-1.reg (http://rptools.pdc.ca/rp-linux-wine/forum-files/CI-1.reg), HC-2b.reg (http://rptools.pdc.ca/rp-linux-wine/forum-files/HC-2b.reg) and Disable-SDL.reg (http://rptools.pdc.ca/rp-linux-wine/forum-files/Disable-SDL.reg) files to your desktop or using your favourite text editor create each of the files with the contents below.

CI-1.reg
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}]
"DeviceInstance"="HID\\Vid_04d8&Pid_f321\\6&24b60e9&0&0000"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\#]
"SymbolicLink"="\\\\?\\HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000]
"Capabilities"=dword:000000e0
"UINumber"=dword:00000000
"ConfigFlags"=dword:00000000
"HardwareID"=hex(7):48,00,49,00,44,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,31,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,48,00,49,00,44,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,31,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,00,56,\
  00,49,00,43,00,45,00,5f,00,55,00,50,00,3a,00,46,00,46,00,30,00,30,00,5f,00,\
  55,00,3a,00,30,00,30,00,30,00,31,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,\
  00,56,00,49,00,43,00,45,00,00,00,00,00
"CompatibleIDs"=hex(7):00,00,00,00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0011"
"Mfg"="(Standard system devices)"
"DeviceDesc"="HID-compliant device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000\Device Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8]
"DeviceDesc"="USB Human Interface Device"
"LocationInformation"="CI-1"
"Capabilities"=dword:00000084
"UINumber"=dword:00000000
"HardwareID"=hex(7):55,00,53,00,42,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,31,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,55,00,53,00,42,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,31,00,00,00,00,00
"CompatibleIDs"=hex(7):55,00,53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,\
  5f,00,30,00,33,00,26,00,53,00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,\
  00,30,00,30,00,26,00,50,00,72,00,6f,00,74,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,26,00,53,\
  00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,00,00,00,\
  00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0010"
"Mfg"="(Standard system devices)"
"Service"="HidUsb"
"ConfigFlags"=dword:00000000
"ParentIdPrefix"="6&24b60e9&0"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8\Device Parameters]
"ExtPropDescSemaphore"=dword:00000001
"SymbolicName"="\\??\\USB#Vid_04d8&Pid_f321#5&269a58e2&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0010]
"InfPath"="input.inf"
"InfSection"="HID_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="usb\\class_03"
"DriverDesc"="USB Human Interface Device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0011]
"InfPath"="input.inf"
"InfSection"="HID_Raw_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="hid_device"
"DriverDesc"="HID-compliant device"

HC-2b.reg
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f320#6&2257ad39&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}]
"DeviceInstance"="HID\\Vid_04d8&Pid_f320\\6&2257ad39&0&0000"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f320#6&2257ad39&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\#]
"SymbolicLink"="\\\\?\\HID#Vid_04d8&Pid_f320#6&2257ad39&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f320]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f320\6&2257ad39&0&0000]
"Capabilities"=dword:000000e0
"UINumber"=dword:00000000
"ConfigFlags"=dword:00000000
"HardwareID"=hex(7):48,00,49,00,44,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,30,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,48,00,49,00,44,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,30,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,00,56,\
  00,49,00,43,00,45,00,5f,00,55,00,50,00,3a,00,46,00,46,00,30,00,30,00,5f,00,\
  55,00,3a,00,30,00,30,00,30,00,31,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,\
  00,56,00,49,00,43,00,45,00,00,00,00,00
"CompatibleIDs"=hex(7):00,00,00,00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0017"
"Mfg"="(Standard system devices)"
"DeviceDesc"="HID-compliant device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f320\6&2257ad39&0&0000\Device Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f320\6&2257ad39&0&0000\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f320\5&269a58e2&0&5]
"DeviceDesc"="USB Human Interface Device"
"LocationInformation"="HC-2b"
"Capabilities"=dword:00000084
"UINumber"=dword:00000000
"HardwareID"=hex(7):55,00,53,00,42,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,30,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,55,00,53,00,42,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,30,00,00,00,00,00
"CompatibleIDs"=hex(7):55,00,53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,\
  5f,00,30,00,33,00,26,00,53,00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,\
  00,30,00,30,00,26,00,50,00,72,00,6f,00,74,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,26,00,53,\
  00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,00,00,00,\
  00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0016"
"Mfg"="(Standard system devices)"
"Service"="HidUsb"
"ConfigFlags"=dword:00000000
"ParentIdPrefix"="6&2257ad39&0"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f320\5&269a58e2&0&5\Device Parameters]
"ExtPropDescSemaphore"=dword:00000001
"SymbolicName"="\\??\\USB#Vid_04d8&Pid_f320#5&269a58e2&0&5#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f320\5&269a58e2&0&5\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0016]
"InfPath"="input.inf"
"InfSection"="HID_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="usb\\class_03"
"DriverDesc"="USB Human Interface Device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0017]
"InfPath"="input.inf"
"InfSection"="HID_Raw_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="hid_device"
"DriverDesc"="HID-compliant device"

Disable-SDL.reg
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus]
"DisableHidraw"=dword:00000000
"DisableInput"=dword:00000000
"Enable SDL"=dword:00000000

Open a terminal window and run Winecfg

Code: [Select]
winecfg

Wine will build a prefix on first run. During the building of the prefix it you haven't got Gecko and Mono already installed on your system Wine will ask you if you'd like to install them. You should answer Yes to install Gecko and Mono.

When the Wine configuration utility loads you can close it as you no longer need it open.

In the terminal window run the regedit command.

Code: [Select]
wine regedit

When the registry editor loads, import each of the CI-1, HC-2b and Disable-SDL registry files you downloaded (or created) into the registry editor. When done close the registry editor. You can then delete the registry files.

Download the 99-usb-rp-ci1.rules (http://rptools.pdc.ca/rp-linux-wine/files/99-usb-rp-ci1.rules), 99-usb-rp-hc2b.rules (http://rptools.pdc.ca/rp-linux-wine/files/99-usb-rp-hc2b.rules) and if you have a HC-1 or old version HC-2 (the non 2b version) 99-usb-serial-rp-hc1.rules (http://rptools.pdc.ca/rp-linux-wine/files/99-usb-serial-rp-hc1.rules) files to your desktop or using your favourite text editor create each of the files with the contents below.

99-usb-rp-ci1.rules
Code: [Select]
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f321", SYMLINK+="railpro_ci-1", MODE="0666"

99-usb-rp-hc2b.rules
Code: [Select]
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f320", SYMLINK+="railpro_hc-2b", MODE="0666"

99-usb-serial-rp-hc1.rules
Code: [Select]
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="railpro_hc-1_2", MODE="0666"
rmmod ftdi_sio
rmmod usbserial



Note: If you need to use the rules file for the HC-1 / old HC-2 be aware that the idVendor and idProduct values are common to other devices that have an FTDI serial-usb chip in them and as such any device you plug in that has these id values will trigger the rule. This could potentially make these other devices inaccessible to any other program on the system. If this is a concern to you you can modify the rule as follows

Code: [Select]
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="xxxxxxxx", SYMLINK+="railpro_hc-1_2", MODE="0666"
rmmod ftdi_sio
rmmod usbserial

where xxxxxxxx is the serial number of the FTDI chip in the HC-1 / old HC-2. To find the serial number of the FTDI chip plug the HC-1 / old HC-2 in, turn it on and in the terminal run the dmesg command

Code: [Select]
dmesg

(http://rptools.pdc.ca/rp-linux-wine/images/Lubuntu_dmesg_old_hc2-cropped.jpg)
The serial number in this screen capture is not your serial number

If you do not wish to edit the 99-usb-serial-rp-hc1.rules yourself you can use the generator at rptools.pdc.ca (still being written) but you will need to copy the serial number accurately into the generator. Once you have found the serial number you can turn off and unplug the HC-1/ old HC-2.



In a terminal window type in the following command to move the rules to the correct location

Code: [Select]
sudo mv ~/Desktop/*.rules /etc/udev/rules.d/

Reload the rules so they take effect

Code: [Select]
sudo udevadm control --reload-rules

You should now test that the device rules are applying correctly. Plug the CI-1 / HC-2 / HC-1 into a USB port. In the terminal run the ls command on the symbolic link

For the CI-1
Code: [Select]
ls -al /dev/railpro_ci-1

For the HC-2b
Code: [Select]
ls -al /dev/railpro_hc-2b

For the HC-1 / old HC-2
Code: [Select]
ls -al /dev/railpro_hc-1_2

The symbolic link will show you the device path.

(http://rptools.pdc.ca/rp-linux-wine/images/Lubuntu_device_symlink_ci-1.jpg)

Now run the ls command on the device path that the symbolic link points to, for example

Code: [Select]
ls -al /dev/bus/usb/002/006

The device should have the permissions crwx-rw-rw. If the permissions do not match then there is a problem with the rules file for the device.

(http://rptools.pdc.ca/rp-linux-wine/images/Lubuntu_device_permissions_correct_ci-1_cropped.jpg)
Correct permissions

(http://rptools.pdc.ca/rp-linux-wine/images/Lubuntu_device_permissions_wrong_ci-1_cropped.jpg)
Incorrect permissions

Repeat the test for each type of RailPro device your own.


If you have a HC-1 or older version HC-2 you will need to install the ftd2xx driver. Download the x86 (32bit) or x64 (64bit) depending on your system Linux drivers from https://www.ftdichip.com/Drivers/D2XX.htm (https://www.ftdichip.com/Drivers/D2XX.htm) to your desktop and extract the libftd2xx.so.1.4.8 driver file from the archive. The current version is 1.4.8.

In the terminal move the libftd2xx.so.1.4.8 file to /usr/lib/ and create the symbolic links needed

Code: [Select]
sudo mv ~/Desktop/libftd2xx.so.1.4.8 /usr/lib/
ln -s /usr/lib/libftd2xx.so.1.4.8 /usr/lib/libftd2xx.so
ln -s /usr/lib/libftd2xx.so.1.4.8 /usr/lib/libftd2xx.so.0


Download the ftd2xx.dll.so (http://rptools.pdc.ca/rp-linux-wine/files/ftd2xx.dll.so) wrapper to your desktop and move it to the Wine lib directory, and create the symbolic link needed.

For Wine Stable
Code: [Select]
sudo mv ~/Desktop/ftd2xx.dll.so /opt/wine-stable/lib/wine/
ln -s /opt/wine-stable/lib/libwine.so.1.0 /usr/lib/libwine/libwine.so.1

For Wine Development
Code: [Select]
sudo mv ~/Desktop/ftd2xx.dll.so /opt/wine-devel/lib/wine/
ln -s /opt/wine-devel/lib/libwine.so.1.0 /usr/lib/libwine/libwine.so.1

For Wine Staging
Code: [Select]
sudo mv ~/Desktop/ftd2xx.dll.so /opt/wine-staging/lib/wine/
ln -s /opt/wine-staging/lib/libwine.so.1.0 /usr/lib/libwine/libwine.so.1
. . .
- Tim
Title: How to: Installing and running RailPro in Linux with Wine: Part 3
Post by: G8B4Life on July 04, 2020, 09:14:29 AM
Part 3: Installling RailPro Assistant and HC Simulator

Download the RailPro Assistant and HC Simulator installers from Ring Engineering (http://ringengineering.com) to your desktop.

Run the installers by double clicking them. Wine should have configured your system to recognise they are Windows executables and run them with Wine automatically. If not you may need to right click the installers and run them with the Wine Loader. When the installers show the prompt about running with Administrator rights just click the Yes button. Windows Administrator rights don't matter in Wine.

Wine does not create any desktop or menu entries for any program you install, so you will need to create them.

Download the RailPro-Blue.svg (http://rptools.pdc.ca/rp-linux-wine/files/RailPro-Blue.svg) and RailPro-Orange.svg (http://rptools.pdc.ca/rp-linux-wine/files/RailPro-Orange.svg) icons to your desktop, and then move them to the correct locations

Code: [Select]
sudo mkdir /usr/share/icons/RailPro
sudo mv ~/Desktop/RailPro-Orange.svg /usr/share/icons/RailPro
sudo mv ~/Desktop/RailPro-Blue.svg /usr/share/icons/RailPro

Download the HC Simulator.desktop (http://rptools.pdc.ca/rp-linux-wine/files/HCSimulator.desktop) file and RailProAssistant.desktop (http://rptools.pdc.ca/rp-linux-wine/files/RailProAssistant.dekstop) file to your desktop, or create them using your favourite editor.

HCSimulator.desktop
Code: [Select]
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=wine "c:\\program files\\ring engineering\\railpro hc simulator\\hc simulator.exe"
Name=HC Simulator
Icon=/usr/share/icons/RailPro/RailPro-Blue.svg
StartupWMClass=HC Simulator
Comment=Run HC Simulator
GenericName=RailPro HC Simulator


RailProAssistant.desktop
Code: [Select]
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=wine "c:\\program files\\ring engineering\\railpro assistant\\ringengassistant.exe"
Name=RailPro Assistant
Icon=/usr/share/icons/RailPro/RailPro-Orange.svg
StartupWMClass=RailPro Assistant
Comment=Run RailPro Assistant
GenericName=RailPro Assistant

Your should now be able to run RailPro Assistant and HC Simulator by double clicking the desktop icons, and RailPro Assistant and HC Simulator should see and communicate with the CI-1, HC-2, HC-2b and HC-1.

(http://rptools.pdc.ca/rp-linux-wine/images/Lubuntu_RPA_HCSim_ready_to_go.jpg)
All ready to go

- Tim