#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
TYTUL=
"SolidWorks 2007"
PREFIX=
"SW2007"
patch_SW2007()
{
POL_SetupWindow_browse
"Select service pack file"
"$TYTUL"
""
POL_SetupWindow_wait_next_signal
"Installation in progress..."
"$TYTUL"
wine
"$APP_ANSWER"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"$LNG_PATCHSUCCES"
"$TYTUL"
}
POL_SetupWindow_make_icon_for_shortcut()
{
convert
"$HOME/.local/share/icons/$2"
-geometry 32X32
"$REPERTOIRE/icones/32/$1"
}
Get_Latest_Wine_Version()
{
cd
"$REPERTOIRE/tmp"
if
[ ! -e LIST ];
then
echo
"--reset"
else
xyz=`
cat
"$REPERTOIRE/tmp/LIST"
|
sed
-e
's/\\.//g'
|
cut
-d
';'
-f2 |
sort
-n |
tail
-n1`
echo
"$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
fi
}
wget http:
//upload
.wikimedia.org
/wikipedia/en/thumb/f/f1/SolidWorks_logo
.png
/200px-SolidWorks_logo
.png --output-document=
"$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert
"$REPERTOIRE/tmp/leftnotscaled.jpeg"
-scale 150x109\\!
"$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init
""
"$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_presentation
"$TYTUL"
"Dassault Systèmes"
"www.3ds.com"
"NSLW"
"$PREFIX"
select_prefix
"$REPERTOIRE/wineprefix/$PREFIX"
LATESTVERSION=$(Get_Latest_Wine_Version)
CHOSENWINEVERSION=
"$LATESTVERSION"
POL_SetupWindow_install_wine
"$CHOSENWINEVERSION"
Use_WineVersion
"$CHOSENWINEVERSION"
POL_SetupWindow_message
"Please insert $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"swlauncher.exe"
POL_SetupWindow_prefixcreate
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
if
[ ! -e
"vc6redistsetup_enu.exe"
]
then
fi
if
[ ! -e
"ole2v.exe"
]
then
fi
if
[ ! -e
"wine_gecko-1.0.0-x86.cab"
]
then
fi
if
[ ! -e
"$HOME/.winetrickscache/dotnet20/dotnetfx.exe"
]
then
mkdir
"$HOME/.winetrickscache/dotnet20"
cd
"$HOME/.winetrickscache/dotnet20"
fi
cd
"$REPERTOIRE/ressources/"
if
[
"`sha1sum < winetricks | sed 's/ .*//'`"
!=
"1bc6af44c8584f01d8e3db0abce6ae869b55e1e4"
];
then
wget http:
//winezeug
.googlecode.com
/svn/trunk/winetricks
--output-document=winetricks
fi
POL_SetupWindow_wait_next_signal
"Installing Visual C++ 6 runtime libraries..."
"$TYTUL"
bash
winetricks -q mfc42 mfc40 fontsmooth-
enable
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"Installing MFC40"
"$TYTUL"
bash
winetricks -q mfc40 fontsmooth-
enable
POL_SetupWindow_detect_exit
bash
winetricks -q fontsmooth-
enable
POL_SetupWindow_wait_next_signal
"Installing .NET Framework 2.0..."
"$TYTUL"
bash
winetricks -q dotnet20
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"$LNG_DOWNLOADINGANDINSTALLING Internet Explorer 6\\n\\nPlease be patient ca. 12 MB is being downloaded."
"$TYTUL"
bash
winetricks -q ie6
POL_SetupWindow_detect_exit
convert
"$CDROM/sw.ico"
-geometry 32X32
"$REPERTOIRE/icones/32/$TYTUL"
POL_SetupWindow_wait_next_signal
"Installation in progress..."
"$TYTUL"
cd
"$CDROM"
wine
"swlauncher.exe"
POL_SetupWindow_message
"Click \\"
Next\\
" when installation will finish."
"$TYTUL"
POL_SetupWindow_make_shortcut
"$PREFIX"
"$PROGRAMFILES/SolidWorks/"
"swspmanager.exe"
""
"$TYTUL"
""
""
Set_WineVersion_Assign
"$CHOSENWINEVERSION"
"$TYTUL"
POL_SetupWindow_make_shortcut
"$PREFIX"
"$PROGRAMFILES/SolidWorks/setup/i386"
"swlmwiz.exe"
""
"$TYTUL - SolidNetWork License Administrator"
""
""
Set_WineVersion_Assign
"$CHOSENWINEVERSION"
"$TYTUL - SolidNetWork License Administrator"
POL_SetupWindow_make_icon_for_shortcut
"$TYTUL - SolidNetWork License Administrator"
"bb89_swlmwizard.0.xpm"
POL_SetupWindow_make_shortcut
"$PREFIX"
"$PROGRAMFILES/SolidWorks/setup/i386"
"reginfo.exe"
""
"$TYTUL - Registration Wizard"
""
""
Set_WineVersion_Assign
"$CHOSENWINEVERSION"
"$TYTUL - Registration Wizard"
POL_SetupWindow_make_icon_for_shortcut
"$TYTUL - Registration Wizard"
"bb89_reginfo_d0220928af1811d3aea400c04f79fcdd.0.png"
cd
"$WINEPREFIX/drive_c/windows/temp/"
rm
-rf *
POL_SetupWindow_reboot
POL_SetupWindow_message
"$TYTUL has been installed successfully"
"$TYTUL"
POL_SetupWindow_Close
exit