Skip to content

Commit 576af62

Browse files
committed
update release.bat
1 parent 2a97c2f commit 576af62

File tree

3 files changed

+50
-38
lines changed

3 files changed

+50
-38
lines changed

phoenix.pro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ else {
164164
INCLUDEPATH += ../libgit2/include
165165
LIBGIT2LIB = ../libgit2-build
166166
win32 {
167+
contains(QMAKE_TARGET.arch, x86_64) {
168+
LIBGIT2LIB = $${LIBGIT2LIB}64
169+
}
170+
!contains(QMAKE_TARGET.arch, x86_64) {
171+
LIBGIT2LIB = $${LIBGIT2LIB}32
172+
}
173+
167174
exists($$LIBGIT2LIB/git2.lib) {
168175
message("found libgit2 library")
169176
}

src/referencemodel/sqlitereferencemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ bool SqliteReferenceModel::insertPart(ModelPart * modelPart, bool fullLoad) {
923923
}
924924

925925
if (bail) {
926-
DebugDialog::debug(QString("part path not in parts:%1").arg(path));
926+
DebugDialog::debug(QString("part path not in parts:%1 %2 %3").arg(path).arg(prefix).arg(fullLoad));
927927
return true;
928928
}
929929
}

tools/release_fritzing.bat

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
echo off
22

3+
echo .
34
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):
56
echo All Programs / Microsoft Visual Studio 2012 / Visual Studio Tools / Developer Command Prompt
67
echo for the 64-bit build, use the 64-bit prompt:
78
echo All Programs / Microsoft Visual Studio 2012 / Visual Studio Tools / VS2012 x64 Cross Tools Command Prompt
89
echo.
910
echo the script also assumes you have cloned the Fritzing git repository and are launching this script from within that repository
11+
1012
echo.
1113
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
1319
echo.
1420

21+
1522
IF .%1 == . (
1623
echo first parameter--release version--is missing, should be something like 0.8.6b
1724
EXIT /B
@@ -22,13 +29,16 @@ IF .%2 == . (
2229
EXIT /B
2330
)
2431

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+
2535
echo set the path to the qt sdk bin folder
2636
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
2838
set arch=""QMAKE_TARGET.arch=x86_64""
2939
) ELSE (
3040
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
3242
set arch=.
3343
) ELSE (
3444
echo second parameter--target architecture--should be either "32" for a 32-bit build or "64" for a 64-bit build
@@ -47,6 +57,8 @@ echo.
4757
cd /d %~dp0
4858
cd ..
4959

60+
set LIBGIT2=%~dp0..\..\libgit2-build%2
61+
5062
rem set environment variable for qmake phoenix.pro
5163
set RELEASE_SCRIPT="release_script"
5264

@@ -56,6 +68,11 @@ echo building fritzing
5668
nmake release
5769

5870
set DESTDIR=..\release%2
71+
rem get the absolute path of DESTDIR
72+
pushd %DESTDIR%
73+
set DESTDIR=%CD%
74+
popd
75+
5976
set RELEASE_NAME=%DESTDIR%\forzip\fritzing.%1.%2.pc
6077

6178
echo setting up deploy folder. ignore any "The system cannot find ..." messages
@@ -64,13 +81,14 @@ rmdir %DESTDIR%\forzip /s /q
6481
if exist %RELEASE_NAME%.zip (
6582
del %RELEASE_NAME%.zip
6683
)
84+
6785
mkdir %DESTDIR%\deploy
6886
mkdir %DESTDIR%\forzip
6987
mkdir %DESTDIR%\deploy\platforms
7088
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
7492
echo deploy folder ready. any further "The system cannot find ..." messages represent significant problems with the script
7593
echo.
7694

@@ -87,60 +105,42 @@ copy %QTBIN%\Qt5Widgets.dll %DESTDIR%\deploy\Qt5Widgets.dll
87105
copy %QTBIN%\Qt5Xml.dll %DESTDIR%\deploy\Qt5Xml.dll
88106
copy %QTBIN%\Qt5SerialPort.dll %DESTDIR%\deploy\Qt5SerialPort.dll
89107

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
94109

95110
copy %QTBIN%\..\plugins\imageformats\qjpeg.dll %DESTDIR%\deploy\lib\imageformats\qjpeg.dll
96111
copy %QTBIN%\..\plugins\sqldrivers\qsqlite.dll %DESTDIR%\deploy\lib\sqldrivers\qsqlite.dll
97112
copy %QTBIN%\..\plugins\platforms\qwindows.dll %DESTDIR%\deploy\platforms\qwindows.dll
98113
copy %QTBIN%\..\plugins\printsupport\windowsprintersupport.dll %DESTDIR%\deploy\lib\printsupport\windowsprintersupport.dll
99-
copy %QTBIN%\..\plugins\platforms\qwindows.dll %DESTDIR%\deploy\platforms\qwindows.dll
100114

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
102119
echo.
103120

104121
copy %DESTDIR%\Fritzing.exe %DESTDIR%\deploy\Fritzing.exe
105122

106123
xcopy /q .\translations %DESTDIR%\deploy\translations /E /I
107124

108-
xcopy /q .\bins %DESTDIR%\deploy\bins /E /I
109-
110125
xcopy /q .\sketches %DESTDIR%\deploy\sketches /E /I
111126

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-
129127
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
131130
copy .\LICENSE.GPL2 %DESTDIR%\deploy\LICENSE.GPL2
132131
copy .\LICENSE.GPL3 %DESTDIR%\deploy\LICENSE.GPL3
133132
copy .\LICENSE.CC-BY-SA %DESTDIR%\deploy\LICENSE.CC-BY-SA
134133
echo removing empty translation files
135134
echo.
136135

137-
138-
139136
del %DESTDIR%\deploy\translations\*.ts
140137

141138
set CURRENTDIR=%cd%
142139
cd %DESTDIR%
143140
cd deploy
141+
142+
git clone --depth 1 https://github.com/fritzing/fritzing-parts.git
143+
144144
del/s placeholder.txt
145145
cd translations
146146
for /f "usebackq delims=;" %%A in (`dir /b *.qm`) do If %%~zA LSS 1024 del "%%A"
@@ -152,15 +152,20 @@ IF %2==32 (
152152
)
153153

154154
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"
155156
IF %2==32 (
156157
set XFOLDER=x86
157158
) ELSE (
158159
set XFOLDER=x64
159160
)
160161

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
163167

168+
echo moving deploy to %RELEASE_NAME%
164169
move %DESTDIR%\deploy %RELEASE_NAME%
165170

166171
echo create zip file

0 commit comments

Comments
 (0)