-
Notifications
You must be signed in to change notification settings - Fork 10
/
README-BUILD-RELEASE.txt
188 lines (159 loc) · 7.98 KB
/
README-BUILD-RELEASE.txt
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/*
* RCS: $Id$
*/
---------------------------------------------------------------------------
How to build the OpenModelica release on Windows using MSVC
---------------------------------------------------------------------------
Previous update: 2010-04-27 Adrian Pop, [email protected]
Last update: 2012-02-10 Adrian Pop, [email protected]
BIG WARNING:
THIS DOCUMENT IS OBSOLETE!
We have discontinued the Visual Studio .NET 2010 build since some years now!
You could still try to build it, but don't expect any help :)
The following step-by-step guides explain how to
build the OpenModelica release .msi file on Windows
using the Microsoft Visual Studio .NET 2010
NOTE: for checkout of any of the SVN directories you will need this user/pass:
user: anonymous
pass: none <- write "none" without quotes here
BIG NOTE WARNING!
- DO NOT ADD MinGW and omclibrary to the Setup project ever again
as it takes *FOREVER* to delete them from it. Instead save the project
before adding them as the last step before building, add them then
build the .msi, then replace Setup.vdproj with the copy you made!
- This is done to keep Setup.vdproj small and sort of like template
(See also Step 11).
- Visual Studio Setup projects are crap!
The more files you add the slower they move!
Also, the biggest issue is that you can add directories by drag-and-drop
from Windows Explorer BUT YOU CANNOT DELETE THEM ANYMORE! You will have
to delete each file in each directory added until you can delete the
directories!
00. Checkout the sources from Subversion:
https://openmodelica.org/svn/OpenModelica/trunk -> trunk
Checkout the VC7 directory from Subversion:
https://openmodelica.org/svn/OpenModelica/installers/windows/VC7
into directory:
trunk\Compiler\VC7
IMPORTANT: VC7 HAS TO BE CHECKOUT into trunk\Compiler\VC7
as the Visual Studio projects are based on
relative paths.
01. Update the version number:
in trunk/Compiler/runtime/settings.c to "x.y.z"
in trunk/Examples/*.onb
in trunk/doc/*.doc + generate .pdfs
02. Please do all the steps in README-OMDev-MINGW.txt
use: make clean testlog
zip trunk\testsuite directory into trunk\testsuite.zip!
03. ADD ALL NEW FILES TO THE SETUP PROJECT WHERE THEY BELONG,
i.e. new files from trunk\build\include\omc
into the File System Setup from the project in the
Application Folder\include\omc\. Same of lib or any
other files you might need for the build. All new
libraries that are used for linking add them to
Application Folder\lib\omc\.
See in Subversion which files were added since the
last modification of Setup.vdproj
Note that changes in the way we handle OPENMODELICALIBRARY
and what changes happened to the trunk\libraries since
last change in Setup.vdproj have to be taken into account.
Currently libraries in trunk\libraries are copied to
\trunk\build\lib\omlibrary.
04. Additional needed files:
- take qtlibs from:
https://www.ida.liu.se/~adrpo/omc/omdev/qtlibs/
unpack it, point it by environment variable QTHOME
- svn checkout https://openmodelica.ida.liu.se/svn/OpenModelica/installers/windows/OMDev/tools/mingw
-> to \trunk\build\MinGW
Clean up (to be easy to add MinGW to the Setup.vdproj, otherwise it takes forever!):
REMOVE all .svn directories from it! Search .svn, select all .svn directories, Delete!
REMOVE MinGW\lib\mlton
REMOVE MinGW\share\doc\mlton
ZIP MinGW\doc\*.* to MinGW\doc\doc.zip and delete them
ZIP MinGW\info\*.* to MinGW\info\info.zip and delete them
ZIP MinGW\man\*.* to MinGW\man\man.zip and delete them
Note that this step will have to be repeated starting from svn checkout
again if anything has changed in svn MinGW directory since last build.
- add files *.xml (commands.xml, modelicacolors.xml, stylesheet.xml) in the directory:
trunk\OMNotebook\OMNotebookQT4\
to \trunk\build\share\omnotebook and \trunk\build\share\omshell
- add file OMNotebookHelp.onb in the directory:
trunk\OMNotebook\OMNotebookQT4\
to \trunk\build\share\omnotebook
- add pltplot.jar (from trunk/Compiler/VC7/Setup/bin/ptplot.jar)
to \trunk\build\bin
- build OMShell, OMNotebook, OMPlot, OMOptim, OMPlotWindow using Qt SDK
into $OMDev\tools\OMTools\bin
- update $OMDev\tools\OMTools\qtdlls with the newest from Qt SDK!
05. Update the version into:
- documentation
- *.onb files
- everywhere you might find it
06. Open the trunk/Compiler/VC7/omc/omc.snl
07. DO NOT build the omc project!
Select all files in the Setup project and in the property window change
Vital to false to prevent re-installation if any of the files are replaced!
08. Open Setup, go to a file, right click on it and say->Properties Window
Then, click on Setup and in the Properties change:
ProductName, Title, Version to update version to x.y.z
09. Right Click in Setup choose View->"File System",
then go to Application Folder, RightClick -> Properties Window
change DefaultLocation to c:\OpenModelica[x.y.z]
10. Locate Uninstall.bat in the solution, edit it and replace the
number with the latest product upgrade code.
11. Save Setup.vdproj, Exit Visual Studio, make a copy of Setup.vdproj
Note: We DO NOT SAVE THE Setup.vdproj AFTER WE ADDED
trunk\build\MinGW and trunk\build\omc\omlibrary
to it as it takes FOREVER to delete them from
the FileSystemView!!
Open Visual Studio and do these steps:
- add trunk\build\MinGW to the FileSystemView
in the Visual Studio project here: \MinGW
- add trunk\build\lib\omlibrary to the FileSystemView
in the Visual Studio project here: lib\omlibrary
- select all files in the Setup project in the Solution explorer
and change in the property window Vital to false!
- SAVE All
- right click on Setup project and say Build
- fix any errors that might appear!
- REPLACE Setup.vdproj with the
copy you made at the start of Step 11
so that it doesn't include MinGW and omclibrary!
12. You get a Setup.msi into trunk\Compiler\VC7\Setup\Release
Copy it to a release folder with name:
OpenModelica-revision-NUMBER.msi
13. Generate files in a release folder:
See an example here:
http://build.openmodelica.org/omc/builds/windows/nightly-builds/
- Below, all NUMBER is the Subversion revision number
- OpenModelica-revision-NUMBER.msi
+ from Setup.msi
- OpenModelica-revision-NUMBER-ChangeLog.txt
+ from Show log on subversion, until the first revision, i.e.
in TortoiseSVN: un-check "Hide unrelated changed paths" and
"Stop on copy/rename" and click "Show All".
- OpenModelica-revision-NUMBER-README.txt
+ write the new important stuff here
- OpenModelica-revision-NUMBER-testsuite-trace.txt.txt
+ from trunk\testsuite\testsuite-trace.txt
Push the new build into:
http://build.openmodelica.org/omc/builds/windows/nightly-builds/
if you have the rights :) and move the old one into:
http://build.openmodelica.org/omc/builds/windows/nightly-builds/older
14. TEST, TEST AND TEST!
- Perfectly would be on a machine with NO VS, NO OMDEV, CLEAN WINDOWS!
- Uninstall your current OpenModelica!
- Delete/backup all your files from c:\OpenModelica[x.y.z]
- Unset environment variable OMDEV (change its name to NOOMDEV)
+ this is needed to make sure no files are missing from
C:\OpenModelica[x.y.z]\MinGW and compilation/simulation
works fine
- Install the new OpenModelica
- test OMShell, OMNotebook, OMEdit, OMPlot*, OMOptim
15. Be extremely proud and glad, you made it! :)
16. Don't forget to re-set NOOMDEV env. var back to OMDEV :)
17. Contact us ([email protected]) or me Adrian Pop [[email protected]]
with any comments, suggestions or problems regarding this document!
That's it,
Cheers,
Adrian Pop/