commit
554f9028b5
9 changed files with 234 additions and 0 deletions
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/perl -w |
||||
|
||||
use esmith::Build::CreateLinks qw(:all); |
||||
|
||||
templates2events("/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x86.reg", qw(wpkg-update bootstrap-console-save)); |
||||
templates2events("/home/e-smith/files/shares/wpkg/files/settings/tightvnc/tightvnc_x64.reg", qw(wpkg-update bootstrap-console-save)); |
@ -0,0 +1,56 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<packages> |
||||
<package id="tightvnc" |
||||
name="Serveur VNC TightVNC" |
||||
revision="4" |
||||
priority="10" |
||||
reboot="false"> |
||||
|
||||
<variable name="PKG_VERSION" value="2.0.4" /> |
||||
|
||||
<variable architecture="x86" name="INSTALL_PATH" value="%PROGRAMFILES%\TightVNC" /> |
||||
<variable architecture="x64" name="INSTALL_PATH" value="%PROGRAMFILES(x86)%\TightVNC" /> |
||||
<variable architecture="x86" name="REG_PATH" value="%SETTINGS%\tightvnc\tightvnc_x86.reg" /> |
||||
<variable architecture="x64" name="REG_PATH" value="%SETTINGS%\tightvnc\tightvnc_x64.reg" /> |
||||
|
||||
<check type="uninstall" condition="exists" path="TightVNC %PKG_VERSION%" /> |
||||
|
||||
<!-- Remove RealVNC if installed --> |
||||
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\RealVNC\VNC4\unins000.exe" "%PROGRAMFILES%\RealVNC\VNC4\unins000.exe" /SP- /VERYSILENT /NORESTART' /> |
||||
|
||||
<!-- Install TightVNC --> |
||||
<install cmd='"%SOFTWARE%\tightvnc\tightvnc-%PKG_VERSION%-setup.exe" /S' /> |
||||
<!-- Install the TightVNC Server as a service --> |
||||
<install cmd='"%INSTALL_PATH%\tvnserver" -install -silent' > |
||||
<exit code="1" /> |
||||
<exit code="0" /> |
||||
</install> |
||||
<!-- Stop the TightVNC Server whilst we import settings --> |
||||
<install cmd='"%INSTALL_PATH%\tvnserver" -stop -silent' > |
||||
<exit code="1" /> |
||||
<exit code="0" /> |
||||
</install> |
||||
<!-- Import settings --> |
||||
<install cmd='%COMSPEC% /C regedit /s "%REG_PATH%"' /> |
||||
<!-- Restart the TightVNC Server --> |
||||
<install cmd='"%INSTALL_PATH%\tvnserver" -start -silent' /> |
||||
|
||||
<!-- Remove RealVNC if installed --> |
||||
<upgrade cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\RealVNC\VNC4\unins000.exe" "%PROGRAMFILES%\RealVNC\VNC4\unins000.exe" /SP- /VERYSILENT /NORESTART' /> |
||||
<upgrade cmd='"%SOFTWARE%\tightvnc\tightvnc-%PKG_VERSION%-setup.exe" /S' /> |
||||
<upgrade cmd='"%INSTALL_PATH%\tvnserver" -reinstall -silent' /> |
||||
<upgrade cmd='"%INSTALL_PATH%\tvnserver" -stop -silent' > |
||||
<exit code="1" /> |
||||
<exit code="0" /> |
||||
</upgrade> |
||||
<upgrade cmd='%COMSPEC% /C regedit /s "%REG_PATH%"' /> |
||||
<upgrade cmd='"%INSTALL_PATH%\tvnserver" -start -silent' /> |
||||
|
||||
<remove cmd='%COMSPEC% /C "%INSTALL_PATH%\uninstall.exe" /S' /> |
||||
<!-- Uninstall returns immediatly, so just wait a few seconds for it to remove before checking the status again |
||||
Unfortunatly, WINDOWS has no sleep commands --> |
||||
<remove cmd='%COMSPEC% /C ping -n 5 127.0.0.1 1>NUL 2>NUL' > |
||||
<exit code="any" /> |
||||
</remove> |
||||
</package> |
||||
</packages> |
@ -0,0 +1,10 @@ |
||||
{ |
||||
my $rec = $DB->get('wpkg') || $DB->new_record('wpkg', { type => 'service' }); |
||||
my $pw = $rec->prop('VNCPassword'); |
||||
|
||||
if (not $pw){ |
||||
$pw = `/usr/bin/openssl rand -base64 6`; |
||||
chomp($pw); |
||||
$rec->set_prop('VNCPassword', $pw); |
||||
} |
||||
} |
@ -0,0 +1,54 @@ |
||||
Windows Registry Editor Version 5.00 |
||||
|
||||
{ |
||||
|
||||
use Crypt::DES; |
||||
my $clear = $wpkg{'VNCPassword'} || 'secretpassword'; |
||||
$clear = substr $clear, 0, 8; |
||||
my $key = pack ('H16', "E84AD660C4721AE0"); |
||||
my $des = Crypt::DES->new($key); |
||||
my $crypt = $des->encrypt($clear); |
||||
my $pass = join(',', map {unpack('H2', $_)} split //, $crypt); |
||||
|
||||
my $out =<<"EOF"; |
||||
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\TightVNC\\Server] |
||||
"ExtraPorts"="" |
||||
"QueryTimeout"=dword:0000001e |
||||
"QueryAcceptOnTimeout"=dword:00000000 |
||||
"LocalInputPriorityTimeout"=dword:00000003 |
||||
"LocalInputPriority"=dword:00000000 |
||||
"BlockRemoteInput"=dword:00000000 |
||||
"BlockLocalInput"=dword:00000000 |
||||
"IpAccessControl"="" |
||||
"RfbPort"=dword:0000170c |
||||
"HttpPort"=dword:000016a8 |
||||
"DisconnectAction"=dword:00000000 |
||||
"AcceptRfbConnections"=dword:00000001 |
||||
"UseVncAuthentication"=dword:00000001 |
||||
"UseControlAuthentication"=dword:00000001 |
||||
"LoopbackOnly"=dword:00000000 |
||||
"AcceptHttpConnections"=dword:00000000 |
||||
"LogLevel"=dword:00000000 |
||||
"EnableFileTransfers"=dword:00000001 |
||||
"BlankScreen"=dword:00000000 |
||||
"RemoveWallpaper"=dword:00000001 |
||||
"EnableUrlParams"=dword:00000001 |
||||
"Password"=hex:$pass |
||||
"AlwaysShared"=dword:00000000 |
||||
"NeverShared"=dword:00000000 |
||||
"DisconnectClients"=dword:00000001 |
||||
"PollingInterval"=dword:000003e8 |
||||
"AllowLoopback"=dword:00000000 |
||||
"VideoRecognitionInterval"=dword:00000bb8 |
||||
"GrabTransparentWindows"=dword:00000001 |
||||
"SaveLogToAllUsersPath"=dword:00000000 |
||||
"RunControlInterface"=dword:00000001 |
||||
"VideoClasses"="" |
||||
"ControlPassword"=hex:$pass |
||||
|
||||
EOF |
||||
|
||||
$out =~ s/\n/\r\n/g; |
||||
$OUT = $out; |
||||
} |
@ -0,0 +1,54 @@ |
||||
Windows Registry Editor Version 5.00 |
||||
|
||||
{ |
||||
|
||||
use Crypt::DES; |
||||
my $clear = $wpkg{'VNCPassword'} || 'secretpassword'; |
||||
$clear = substr $clear, 0, 8; |
||||
my $key = pack ('H16', "E84AD660C4721AE0"); |
||||
my $des = Crypt::DES->new($key); |
||||
my $crypt = $des->encrypt($clear); |
||||
my $pass = join(',', map {unpack('H2', $_)} split //, $crypt); |
||||
|
||||
my $out =<<"EOF"; |
||||
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\TightVNC\\Server] |
||||
"ExtraPorts"="" |
||||
"QueryTimeout"=dword:0000001e |
||||
"QueryAcceptOnTimeout"=dword:00000000 |
||||
"LocalInputPriorityTimeout"=dword:00000003 |
||||
"LocalInputPriority"=dword:00000000 |
||||
"BlockRemoteInput"=dword:00000000 |
||||
"BlockLocalInput"=dword:00000000 |
||||
"IpAccessControl"="" |
||||
"RfbPort"=dword:0000170c |
||||
"HttpPort"=dword:000016a8 |
||||
"DisconnectAction"=dword:00000000 |
||||
"AcceptRfbConnections"=dword:00000001 |
||||
"UseVncAuthentication"=dword:00000001 |
||||
"UseControlAuthentication"=dword:00000001 |
||||
"LoopbackOnly"=dword:00000000 |
||||
"AcceptHttpConnections"=dword:00000000 |
||||
"LogLevel"=dword:00000000 |
||||
"EnableFileTransfers"=dword:00000001 |
||||
"BlankScreen"=dword:00000000 |
||||
"RemoveWallpaper"=dword:00000001 |
||||
"EnableUrlParams"=dword:00000001 |
||||
"Password"=hex:$pass |
||||
"AlwaysShared"=dword:00000000 |
||||
"NeverShared"=dword:00000000 |
||||
"DisconnectClients"=dword:00000001 |
||||
"PollingInterval"=dword:000003e8 |
||||
"AllowLoopback"=dword:00000000 |
||||
"VideoRecognitionInterval"=dword:00000bb8 |
||||
"GrabTransparentWindows"=dword:00000001 |
||||
"SaveLogToAllUsersPath"=dword:00000000 |
||||
"RunControlInterface"=dword:00000001 |
||||
"VideoClasses"="" |
||||
"ControlPassword"=hex:$pass |
||||
|
||||
EOF |
||||
|
||||
$out =~ s/\n/\r\n/g; |
||||
$OUT = $out; |
||||
} |
Binary file not shown.
@ -0,0 +1,54 @@ |
||||
%define package tightvnc |
||||
%define version 0.1 |
||||
%define realversion 2.0.4 |
||||
%define release 0.beta1 |
||||
|
||||
Name: wpkg-%{package} |
||||
Version: %{version}+%{realversion} |
||||
Release: %{release}%{?dist} |
||||
Summary: %{package} for WPKG on iPasserelle |
||||
|
||||
Group: System/Softwares |
||||
URL: http://www.ipasserelle.com |
||||
Source0: %{name}-%{version}.tar.gz |
||||
License: misc |
||||
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
||||
BuildArch: noarch |
||||
BuildRequires: unix2dos |
||||
BuildRequires: e-smith-devtools |
||||
|
||||
Requires: ipasserelle-gp |
||||
|
||||
%description |
||||
%{package} for WPKG on iPasserelle |
||||
|
||||
%prep |
||||
%setup -q -n %{name}-%{version} |
||||
|
||||
%build |
||||
perl createlinks |
||||
unix2dos packages/* |
||||
|
||||
%install |
||||
/bin/rm -rf %{buildroot} |
||||
cp -a root %{buildroot}/ |
||||
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/settings/%{package} |
||||
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/packages |
||||
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/softwares/%{package} |
||||
cp -r softwares/* %{buildroot}/home/e-smith/files/shares/wpkg/files/softwares/%{package}/ |
||||
cp -r packages/* %{buildroot}/home/e-smith/files/shares/wpkg/files/packages/ |
||||
|
||||
%files |
||||
%defattr(-,root,root) |
||||
%doc CHANGELOG.git |
||||
/home/e-smith/files/shares/wpkg/files/ |
||||
/etc/ |
||||
|
||||
%clean |
||||
/bin/rm -rf %{buildroot} |
||||
|
||||
%changelog |
||||
* Mon Jun 4 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1+2.0.4 |
||||
- initial release with TightVNC 2.0.4 |
||||
|
Loading…
Reference in new issue