The forum

[script] SolidWorks 2007

Author Replies
NSLW Wednesday 14 October 2009 at 19:01
NSLW

Hello,
I wrote script which installs SolidWorks 2007. Installation of Service Pack isn't possible
Wine version : 1.1.31
Distribution : Fedora
Distribution Version : 11 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 190.36

Icon for the game:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/bin/bash
# Date : (2009-10-14 18-00)
# Last revision : (2009-10-14 18-00)
# Wine version used : 1.1.31
# Distribution used to test : Fedora 11
# Author : NSLW
# Licence : Retail
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
 
TYTUL="SolidWorks 2007"
PREFIX="SW2007"
 
#procedure for patching SolidWorks
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"
POL_SetupWindow_download "Downloading Wine versions list" "$TYTUL" "http://mulx.playonlinux.com/wine/linux-i386/LIST"
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"
 
#asking about service pack
#if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
#POL_SetupWindow_menu "What do you want to do?" "Actions" "Apply service pack" "~"
 
#if [ "$APP_ANSWER" == "Apply service pack" ]; then
#   patch_SW2007
#fi
 
#POL_SetupWindow_Close
#exit
#fi
 
#determining which Version is the latest
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"
# checking if mfc42 is in wine tricks cache if not then download
if [ ! -e "vc6redistsetup_enu.exe" ]
then
POL_SetupWindow_download "PlayOnLinux is downloading Visual C++ 6 runtime libraries" "Visual C++ 6" "http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe"
fi
 
# checking if mfc40 is in wine tricks cache if not then download
if [ ! -e "ole2v.exe" ]
then
POL_SetupWindow_download "PlayOnLinux is downloading MFC40" "MFC40" "http://download.microsoft.com/download/ole/ole2v/3.5/w351/en-us/ole2v.exe"
fi
 
if [ ! -e "wine_gecko-1.0.0-x86.cab" ]
then
POL_SetupWindow_download "PlayOnLinux is downloading Gecko HTML Engine" "Gecko HTML Engine" "http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
fi
 
#downloading .NET Framework 2.0
if [ ! -e "$HOME/.winetrickscache/dotnet20/dotnetfx.exe" ]
then
mkdir "$HOME/.winetrickscache/dotnet20"
cd "$HOME/.winetrickscache/dotnet20"
POL_SetupWindow_download "PlayOnLinux is downloading .NET Framework" ".NET Framework 2.0" "http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe"
POL_SetupWindow_download "PlayOnLinux is downloading .NET Framework" ".NET Framework 2.0" "http://kegel.com/wine/l_intl.nls"
fi
 
cd "$REPERTOIRE/ressources/"
#downloading winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "1bc6af44c8584f01d8e3db0abce6ae869b55e1e4" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi
 
#installing mfc42
POL_SetupWindow_wait_next_signal "Installing Visual C++ 6 runtime libraries..." "$TYTUL"
bash winetricks -q mfc42 mfc40 fontsmooth-enable
POL_SetupWindow_detect_exit
 
#installing mfc42
POL_SetupWindow_wait_next_signal "Installing MFC40" "$TYTUL"
bash winetricks -q mfc40 fontsmooth-enable
POL_SetupWindow_detect_exit
 
bash winetricks -q fontsmooth-enable
 
#installing .NET Framework 2.0
POL_SetupWindow_wait_next_signal "Installing .NET Framework 2.0..." "$TYTUL"
bash winetricks -q dotnet20
POL_SetupWindow_detect_exit
 
#installing ie6
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
 
#taking icon from the application
convert "$CDROM/sw.ico" -geometry 32X32 "$REPERTOIRE/icones/32/$TYTUL"
 
#starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
cd "$CDROM"
wine "swlauncher.exe"
POL_SetupWindow_message "Click \\"Next\\" when installation will finish." "$TYTUL"
 
#making shortcut
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"
#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *
#asking about service pack
#POL_SetupWindow_question "Do you want to apply service pack?" "$TYTUL"
#if [ "$APP_ANSWER" == "TRUE" ] ;then
#patch_SW2007
#fi
 
POL_SetupWindow_reboot
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
 
POL_SetupWindow_Close
exit
kvip Friday 11 December 2009 at 18:23
kvipAnonymous

Man so much thanks for that!
I finally managed to run SolidWorks on Linux
and btw it didn't run on friggin vista

Keep up the excellent work!

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca@playonlinux.com