1
1
echo off
2
2
3
+ echo .
3
4
echo you must start this script from the Visual Studio Command Line Window
4
- echo find this under the start menu at:
5
+ echo find this under the start menu at (depending on your version of Visual Studio) :
5
6
echo All Programs / Microsoft Visual Studio 2012 / Visual Studio Tools / Developer Command Prompt
6
7
echo for the 64-bit build, use the 64-bit prompt:
7
8
echo All Programs / Microsoft Visual Studio 2012 / Visual Studio Tools / VS2012 x64 Cross Tools Command Prompt
8
9
echo .
9
10
echo the script also assumes you have cloned the Fritzing git repository and are launching this script from within that repository
11
+
10
12
echo .
11
13
echo for a full release, run the script twice, once for a 64-built build, once for a 32-bit build
12
- echo you may need to change QTBIN to point to your Qt folder (once for 64-bit, once for 32-bit)
14
+ echo you may need to change the script variable QTBIN to point to your Qt folder (once for 64-bit, once for 32-bit)
15
+ echo .
16
+ echo you may need to set the PATH in the script to your git for windows installation
17
+ echo .
18
+ echo you may need to change the script variable LIBGIT2 to find git2.dll
13
19
echo .
14
20
21
+
15
22
IF .%1 == . (
16
23
echo first parameter--release version--is missing, should be something like 0.8.6b
17
24
EXIT /B
@@ -22,13 +29,16 @@ IF .%2 == . (
22
29
EXIT /B
23
30
)
24
31
32
+ echo add the path for your git installation if it's not already there
33
+ set PATH = %PATH% ;" C:\Users\jonathan\AppData\Local\Programs\Git\bin" ;" C:\Users\jonathan\AppData\Local\Programs\Git\cmd"
34
+
25
35
echo set the path to the qt sdk bin folder
26
36
IF %2 == 64 (
27
- set QTBIN = C:\Qt\Qt5.2.1-64bit\5.2.1\msvc2012_64 \bin
37
+ set QTBIN = C:\Qt2\5.5\msvc2013_64 \bin
28
38
set arch = " " QMAKE_TARGET.arch=x86_64" "
29
39
) ELSE (
30
40
IF %2 == 32 (
31
- set QTBIN = C:\Qt\Qt5.2.1\5.2.1\msvc2012 \bin
41
+ set QTBIN = C:\Qt-32bit\5.5\msvc2013 \bin
32
42
set arch = .
33
43
) ELSE (
34
44
echo second parameter--target architecture--should be either " 32" for a 32-bit build or " 64" for a 64-bit build
47
57
cd /d %~dp0
48
58
cd ..
49
59
60
+ set LIBGIT2 = %~dp0 ..\..\libgit2-build%2
61
+
50
62
rem set environment variable for qmake phoenix.pro
51
63
set RELEASE_SCRIPT = " release_script"
52
64
@@ -56,6 +68,11 @@ echo building fritzing
56
68
nmake release
57
69
58
70
set DESTDIR = ..\release%2
71
+ rem get the absolute path of DESTDIR
72
+ pushd %DESTDIR%
73
+ set DESTDIR = %CD%
74
+ popd
75
+
59
76
set RELEASE_NAME = %DESTDIR% \forzip\fritzing.%1 .%2 .pc
60
77
61
78
echo setting up deploy folder. ignore any " The system cannot find ..." messages
@@ -64,13 +81,14 @@ rmdir %DESTDIR%\forzip /s /q
64
81
if exist %RELEASE_NAME% .zip (
65
82
del %RELEASE_NAME% .zip
66
83
)
84
+
67
85
mkdir %DESTDIR% \deploy
68
86
mkdir %DESTDIR% \forzip
69
87
mkdir %DESTDIR% \deploy\platforms
70
88
mkdir %DESTDIR% \deploy\lib
71
- mkdir %DESTDIR% \deploy\lib\imageformats
72
- mkdir %DESTDIR% \deploy\lib\sqldrivers
73
- mkdir %DESTDIR% \deploy\lib\printsupport
89
+ mkdir %DESTDIR% \deploy\lib\imageformats
90
+ mkdir %DESTDIR% \deploy\lib\sqldrivers
91
+ mkdir %DESTDIR% \deploy\lib\printsupport
74
92
echo deploy folder ready. any further " The system cannot find ..." messages represent significant problems with the script
75
93
echo .
76
94
@@ -87,60 +105,42 @@ copy %QTBIN%\Qt5Widgets.dll %DESTDIR%\deploy\Qt5Widgets.dll
87
105
copy %QTBIN% \Qt5Xml.dll %DESTDIR% \deploy\Qt5Xml.dll
88
106
copy %QTBIN% \Qt5SerialPort.dll %DESTDIR% \deploy\Qt5SerialPort.dll
89
107
90
-
91
- copy %QTBIN% \icudt51.dll %DESTDIR% \deploy\icudt51.dll
92
- copy %QTBIN% \icuin51.dll %DESTDIR% \deploy\icuin51.dll
93
- copy %QTBIN% \icuuc51.dll %DESTDIR% \deploy\icuuc51.dll
108
+ xcopy /q %QTBIN% \icu*.dll %DESTDIR% \deploy /E /I
94
109
95
110
copy %QTBIN% \..\plugins\imageformats\qjpeg.dll %DESTDIR% \deploy\lib\imageformats\qjpeg.dll
96
111
copy %QTBIN% \..\plugins\sqldrivers\qsqlite.dll %DESTDIR% \deploy\lib\sqldrivers\qsqlite.dll
97
112
copy %QTBIN% \..\plugins\platforms\qwindows.dll %DESTDIR% \deploy\platforms\qwindows.dll
98
113
copy %QTBIN% \..\plugins\printsupport\windowsprintersupport.dll %DESTDIR% \deploy\lib\printsupport\windowsprintersupport.dll
99
- copy %QTBIN% \..\plugins\platforms\qwindows.dll %DESTDIR% \deploy\platforms\qwindows.dll
100
114
101
- echo copying bins, parts, sketches, translations, pdb, help
115
+ echo copying git2.dll from %LIBGIT2%
116
+ copy %LIBGIT2% \git2.dll %DESTDIR% \deploy\git2.dll
117
+
118
+ echo copying sketches, translations, help, README, LICENSE
102
119
echo .
103
120
104
121
copy %DESTDIR% \Fritzing.exe %DESTDIR% \deploy\Fritzing.exe
105
122
106
123
xcopy /q .\translations %DESTDIR% \deploy\translations /E /I
107
124
108
- xcopy /q .\bins %DESTDIR% \deploy\bins /E /I
109
-
110
125
xcopy /q .\sketches %DESTDIR% \deploy\sketches /E /I
111
126
112
- move .\parts\core\*.* .\pdb\core\
113
- move .\parts\obsolete\*.* .\pdb\obsolete\
114
- move .\parts\contrib\*.* .\pdb\contrib\
115
- move .\parts\user\*.* .\pdb\user\
116
-
117
- xcopy /q .\parts %DESTDIR% \deploy\parts /E /I
118
- xcopy /q .\pdb %DESTDIR% \deploy\pdb /E /I
119
-
120
- move .\pdb\core\*.* .\parts\core\
121
- move .\pdb\obsolete\*.* .\parts\obsolete\
122
- move .\pdb\user\*.* .\parts\user\
123
- move .\pdb\contrib\*.* .\parts\contrib\
124
- xcopy /q .\parts\core\placeholder.txt .\pdb\core\
125
- xcopy /q .\parts\core\placeholder.txt .\pdb\obsolete\
126
- xcopy /q .\parts\core\placeholder.txt .\pdb\user\
127
- xcopy /q .\parts\core\placeholder.txt .\pdb\contrib\
128
-
129
127
xcopy /q .\help %DESTDIR% \deploy\help /E /I
130
- copy .\README.txt %DESTDIR% \deploy\README.txt
128
+
129
+ copy .\readme.md %DESTDIR% \deploy\readme.md
131
130
copy .\LICENSE.GPL2 %DESTDIR% \deploy\LICENSE.GPL2
132
131
copy .\LICENSE.GPL3 %DESTDIR% \deploy\LICENSE.GPL3
133
132
copy .\LICENSE.CC-BY-SA %DESTDIR% \deploy\LICENSE.CC-BY-SA
134
133
echo removing empty translation files
135
134
echo .
136
135
137
-
138
-
139
136
del %DESTDIR% \deploy\translations\*.ts
140
137
141
138
set CURRENTDIR = %cd%
142
139
cd %DESTDIR%
143
140
cd deploy
141
+
142
+ git clone --depth 1 https://github.com/fritzing/fritzing-parts.git
143
+
144
144
del/s placeholder.txt
145
145
cd translations
146
146
for /f " usebackq delims=;" %%A in (`dir /b *.qm`) do If %%~zA LSS 1024 del " %%A "
@@ -152,15 +152,20 @@ IF %2==32 (
152
152
)
153
153
154
154
echo copying vc redist files
155
+ echo you may have to rename these based on your version of visual studio: 2012 is " 110" ; 2013 is " 120"
155
156
IF %2 == 32 (
156
157
set XFOLDER = x86
157
158
) ELSE (
158
159
set XFOLDER = x64
159
160
)
160
161
161
- copy " %VCINSTALLDIR% redist\%XFOLDER% \Microsoft.VC110.CRT\msvcp110.dll" %DESTDIR% \deploy\msvcp110.dll
162
- copy " %VCINSTALLDIR% redist\%XFOLDER% \Microsoft.VC110.CRT\msvcr110.dll" %DESTDIR% \deploy\msvcr110.dll
162
+ copy " %VCINSTALLDIR% redist\%XFOLDER% \Microsoft.VC120.CRT\msvcp120.dll" %DESTDIR% \deploy\msvcp120.dll
163
+ copy " %VCINSTALLDIR% redist\%XFOLDER% \Microsoft.VC120.CRT\msvcr120.dll" %DESTDIR% \deploy\msvcr120.dll
164
+
165
+ echo run fritzing to create parts.db
166
+ %DESTDIR% \deploy\Fritzing.exe -pp %DESTDIR% \deploy\fritzing-parts -db %DESTDIR% \deploy\fritzing-parts\parts.db
163
167
168
+ echo moving deploy to %RELEASE_NAME%
164
169
move %DESTDIR% \deploy %RELEASE_NAME%
165
170
166
171
echo create zip file
0 commit comments