Commit 03346edb authored by Yvan Masson's avatar Yvan Masson
Browse files

Fix Windows client.

- Fix Windows script (I thought I had already done it)
- Fix InnoSetup script
- Improve README.md
parent dbbce126
......@@ -261,6 +261,7 @@ will understand. We will do that later when preparing the clients.
Publishing the client software requires to use a proper versionning scheme. To
deal with our specific use case (this project provides some files, you provide
others), I recommend you use two numbers separated by a `.`:
- the RemoteHelpBuilder version,
- the version of your settings.
......@@ -272,6 +273,7 @@ new RemoteHelpBuilder's version is published, the version would be `2.2`.
# Common clients prerequisites
You first need to choose a custom and unique software name, so that the helped:
- understands that only you can make use of this tool to help him,
- can eventually install more than one software like yours.
......@@ -347,6 +349,7 @@ StartupNotify=true
```
Be carefull to customize:
- The `Name`(s) and `Comment`(s) to match what the helped needs to see.
- The `Exec` line to match your Debian package name.
- The `Icon` line :
......@@ -418,11 +421,12 @@ made easier by using tools from `dh_make` and `devscripts`:
Go inside `~/my-remote-help-tool/` and generate all files needed for proper
packaging. Modify the following command to match:
* your name/company
* your package name (still "my-remote-help-tool" in our example)
* the "upstream" version number (for example "1.1" if RemoteHelpBuilder is in
- your name/company
- your package name (still "my-remote-help-tool" in our example)
- the "upstream" version number (for example "1.1" if RemoteHelpBuilder is in
version 1 and if you publish it for the first time)
* your email address
- your email address
```
cd ~/my-remote-help-tool/ && \
......@@ -443,17 +447,17 @@ $ cd debian && rm manpage.* menu.ex postinst.ex postrm.ex preinst.ex prerm.ex RE
You now need to edit some of the remaining files:
* `changelog`: modify the changelog of the initial release
* `compat`: do not modify
* `control`:
* edit homepage and description (each line of the long description must begin
- `changelog`: modify the changelog of the initial release
- `compat`: do not modify
- `control`:
- edit homepage and description (each line of the long description must begin
with a space)
* replace line `Depends: ${misc:Depends}` by `Depends: openssh-client, sshpass, x11vnc, yad, gnome-icon-theme`
* `copyright`: add the source and copyright for all the files (normally you
- replace line `Depends: ${misc:Depends}` by `Depends: openssh-client, sshpass, x11vnc, yad, gnome-icon-theme`
- `copyright`: add the source and copyright for all the files (normally you
would have to give credits to this project: this is great if you do so, but
currently I do not require it)
* `rules`: do not modify
* `source/format`: do not modify
- `rules`: do not modify
- `source/format`: do not modify
Still in the new `debian/` subdirectory, create a file called
`my-remote-help-tool.install` that defines where all files must be installed to.
......@@ -521,6 +525,7 @@ Make the changes in `~/my-remote-help-tool/`. Do not forget to adapt
`~/my-remote-help-tool/debian/` files if needed.
Define what will be the new version number of your package:
- If you include some RemoteHelpBuilder changes, increase the first number,
- If you modify one of your files, increase the second number,
- In all cases, reset the Debian revision to `1`.
......@@ -576,7 +581,7 @@ From the
download the 32 bits version of `plink.exe` and save it to
`my-remote-help-tool\Sources\PuTTY\`.
Download PuTTY source archive and extract the `LICENCE` file to
Download PuTTY Unix source archive and extract the `LICENCE` file to
`my-remote-help-tool\Sources\PuTTY\`.
Create in this same directory a file called `version.txt` and write inside the
......@@ -586,14 +591,15 @@ version (for example `0.71`), so that you and the user can easily retrieve it.
### UltraVNC
From the [UltraVNC website](http://www.uvnc.com), download the 32 bits version
and save it anywhere on Windows computer. Run the installer, which should be
and save it anywhere on a Windows computer. Run the installer, which should be
called something like `UltraVNC_1_2_24_X86_Setup.exe`. When choosing components
to install, you can choose only `UltraVNC Server`. Do not register the system
service.
Copy directory `<install_dir>\uvnc bvba\UltraVNC\` to
`my-remote-help-tool\Sources\`. In this directory, replace `ultravnc.ini` by the
one provided in RemoteHelpBuilder `Windows-client`.
From the installation target (probably `C:\Program Files (x86)\uvnc bvba\`),
copy `UltraVNC\` directory to `my-remote-help-tool\Sources\`. Then, replace the
settings file `my-remote-help-tool\Sources\UltraVNC\ultravnc.ini` by the one
provided in the `Windows-client\` directory of RemoteHelpBuilder.
Optionnal: If you want to generate yourself a proper `ultravnc.ini`:
......@@ -608,7 +614,7 @@ Notes:
- Some of the UltraVNC files are certainely not needed, but I do not know which
ones.
- This step might be possible under Wine using some workarounds but it is not
- This step might be possible under Wine but running the installer is not
straightforward.
......@@ -619,7 +625,7 @@ public keys. To get your intermediate server's public key from Windows (or from
Linux using Wine), run:
```
plink.exe -v -batch -P <ssh port> <FQDN or IP address>>
plink.exe -v -batch -P <ssh port> <FQDN or IP address>
```
The variable that will be used is the line that looks like
......@@ -633,16 +639,16 @@ building the Linux client:
$ printf "ssh-rsa "; ssh-keygen -l -E md5 -f ~/my-remote-help-tool/ssh-server-public-key | sed 's/MD5://' | cut -d " " -f -2
```
Copy `Windows-client\remote-help.vbs` to `my-remote-help-tool\Sources\`. Edit the
Copy `Windows-client\RemoteHelp.vbs` to `my-remote-help-tool\Sources\`. Edit the
variables at the beginning to suit your needs. For those who do not know
VBScript, see example values for quoting and line returns.
Also, do not hesitate to add your copyright at the beginning of the file.
### license and changelog
### License and changelog
Copy `Windows-client\license.txt` and `Windows-client\Changelog.txt` to
Copy `Windows-client\License.txt` and `Windows-client\Changelog.txt` to
`my-remote-help-tool\Sources\`.
Modify them to have a proper changelog and eventually to add your copyright in
......@@ -673,9 +679,12 @@ with InnoSetup to suit your needs:
- Modify variables in the `[Setup]` section.
- Eventually add or removes languages in the `[Languages]` section.
Once done, click on the "Compile" button and your installer will appear in
`my-remote-help-tool\Output\`. Run the installer to test it (works well under
Wine).
Note that all encodings are not supported: for example, on my setup, I must use
ISO-8859-15 (Windows-1252) and not UTF-8.
Once done, click on the "Compile" button at the top of the window and your
installer will appear in `my-remote-help-tool\Output\`. Test the installer
(works well under Wine) and your program (which obviously needs Windows).
## Building a new client version
......@@ -709,9 +718,10 @@ Finally the easy part!
# Release policy
A new release is published when commits modify one of the provided files of
Windows or Linux client (except when modification is only on examples, comments
or formatting). No release is published when documentation is modified.
A new RemoteHelpBuilder release is published when commits modify one of the
provided files of Windows or Linux client (except when modification is only on
examples, comments or formatting). No release is published when documentation is
modified.
# Frequently asked questions
......
......@@ -12,12 +12,14 @@ AppPublisher=My Name
AppPublisherURL=https://my-website.com
; Will install by default in "%PROGRAMFILES (X86)%" on Windows 64bits
DefaultDirName={pf32}\{#SetupSetting("AppName")}
SetupIconFile=My-icon.ico
; The end of the following value to append version to the installer
; The name of your icon
#define IconFile "My-icon.ico"
SetupIconFile=Sources\{#IconFile}
; The end of the following value will append version to the generated installer
OutputBaseFilename=my-remote-help-tool_{#SetupSetting("AppVersion")}
; You should not need to modify those variables
DisableProgramGroupPage=yes
LicenseFile=Licence.txt
LicenseFile=Sources\License.txt
Compression=lzma
SolidCompression=yes
......@@ -29,15 +31,16 @@ Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "RemoteHelp.vbs"; DestDir: "{app}"; Flags: ignoreversion
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Sources\RemoteHelp.vbs"; DestDir: "{app}"; Flags: ignoreversion
Source: "Sources\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#SetupSetting("AppName")}"; Filename: "{app}\RemoteHelp.vbs"; IconFilename: "{app}\{#SetupSetting("SetupIconFile")}"
Name: "{commondesktop}\{#SetupSetting("AppName")}"; Filename: "{app}\RemoteHelp.vbs"; IconFilename: "{app}\{#SetupSetting("SetupIconFile")}"; Tasks: desktopicon
Name: "{commonprograms}\{#SetupSetting("AppName")}"; Filename: "{app}\RemoteHelp.vbs"; IconFilename: "{app}\{#IconFile}"
Name: "{commondesktop}\{#SetupSetting("AppName")}"; Filename: "{app}\RemoteHelp.vbs"; IconFilename: "{app}\{#IconFile}"; Tasks: desktopicon
[InstallDelete]
Type: files; Name: {app}\*
Type: files; Name: {app}\Putty*
Type: files; Name: {app}\UltraVNC*
......@@ -127,7 +127,7 @@ WshShell.Run "taskkill /F /im plink.exe", 0, true
WshShell.Run "taskkill /F /im uvnc.exe", 0, true
' start ssh
WSHShell.run "cmd /c """""&path&"\PuTTY\plink.exe"" -l " & ssh_user & " " & _
WSHShell.run "cmd /c """""&path&"\PuTTY\plink.exe"" -batch -l " & ssh_user & " " & _
"-pw " & passwd & " -T -N -R 5900:localhost:5900 -P " & ssh_port & " " & _
server & " -hostkey " & hostkey & " " & _
"> %TEMP%\plink-stdout.log 2> %TEMP%\plink-stderr.log""", 0, false
......@@ -143,7 +143,7 @@ Set rdFile = FSO.OpenTextFile(InputFile, 1)
strContents = rdFile.ReadAll
rdFile.Close
if not InStr(1, strContents, "Access Denied", 1) > 0 then
if InStr(1, strContents, "Access Denied", 1) > 0 then
WshShell.Run "taskkill /F /im plink.exe", 0, False
msgbox wrong_password, vbOkOnly, windows_title
FSO.DeleteFile InputFile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment