File: make_win_package.bat

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (114 lines) | stat: -rw-r--r-- 3,719 bytes parent folder | download | duplicates (9)
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
@rem **************************************************************
@rem * This batch file create binary packages for plplot (windows)
@rem *
@rem * Before you run this file modify the configuration part
@rem *
@rem * It is assumed, that before running this batch file, that
@rem * you have already passed the cmake configuration step,
@rem * and have run "make" and "make install" or equivalent
@rem * Usage: make_win_package VISUALC: VisualC, release build
@rem *        make_win_package VISUALC DEBUG : VisualC, debug build
@rem *        make_win_package MINGW : MinGW, release build
@rem *        make_win_package MINGW DEBUG : MinGW, debug build
@rem **************************************************************

@rem **************************************************************
@rem * Configuration
@rem **************************************************************

setlocal
if "%1"=="MINGW" (
  set MINGW=1
  shift /1
)
if "%1"=="VISUALC" (
  set MINGW=0
  shift /1
)
if "%1"=="DEBUG" (
  set DEBUG=d
)

set VERSION=5.7.2

if "%MINGW%"=="1" (
  @rem *** MINGW SETTINGS ***
  @rem * INSTALLDIR is the absolute path to the installed plplot directory (make install)
  set INSTALLDIR=Z:\DevZone\PLDev\plplot\buildmingw\local

  @rem * GDDLLDIR is the absolute path to bgd.dll
  set GDDLLDIR=Z:\DevZone\MinGW\3p_plplot\lib

  @rem * HPDFDLLDIR is the absolute path to libhpdf.dll
  set HPDFDLLDIR=Z:\DevZone\MinGW\3p_plplot\lib

  @rem * WXDLLDIR is the absolute path to wxwidgets dlls
  set WXDLLDIR=%WXWIN%\lib\gcc_dll

  @rem * Name of the package
  set PACKAGE_NAME=plplot-%VERSION%-mingw-binary
) else (
  @rem *** VISUALC SETTINGS ***
  @rem * INSTALLDIR is the absolute path to the installed plplot directory (make install)
  set INSTALLDIR=Z:\DevZone\PLDev\plplot\buildnmake\local

  @rem * GDDLLDIR is the absolute path to bgd.dll
  set GDDLLDIR=Z:\DevZone\VisualC\3p_plplot\lib

  @rem * HPDFDLLDIR is the absolute path to libhpdf.dll
  set HPDFDLLDIR=Z:\DevZone\VisualC\3p_plplot\lib

  @rem * WXDLLDIR is the absolute path to wxwidgets dlls
  set WXDLLDIR=%WXWIN%\lib\vc_dll

  @rem * Name of the package
  set PACKAGE_NAME=plplot-%VERSION%-visualc-binary
)

@rem **************************************************************
@rem * Create Zip package
@rem * You need the zip tool for this step (gnuwin32.sf.net)
@rem **************************************************************

echo Creating package %PACKAGE_NAME%.zip

@rem * delete package if it already exists
if exist %PACKAGE_NAME%.zip (del %PACKAGE_NAME%.zip)

@rem * cd into the install directory
pushd %INSTALLDIR%

@rem * copy 3rd party dlls if they exist
if exist %GDDLLDIR%\bgd.dll (copy %GDDLLDIR%\bgd.dll bin)
if exist %HPDFDLLDIR%\libhpdf.dll (copy %HPDFDLLDIR%\libhpdf.dll bin)
if %MINGW%==1 (
  if exist %WXDLLDIR%\wxbase26%DEBUG%_gcc_custom.dll (copy %WXDLLDIR%\wxbase26%DEBUG%_gcc_custom.dll bin)
  if exist %WXDLLDIR%\wxmsw26%DEBUG%_core_gcc_custom.dll (copy %WXDLLDIR%\wxmsw26%DEBUG%_core_gcc_custom.dll bin)
) else (
  if exist %WXDLLDIR%\wxbase26u%DEBUG%_vc_custom.dll (copy %WXDLLDIR%\wxbase26u%DEBUG%_vc_custom.dll bin)
  if exist %WXDLLDIR%\wxmsw26u%DEBUG%_core_vc_custom.dll (copy %WXDLLDIR%\wxmsw26u%DEBUG%_core_vc_custom.dll bin)
)
@rem strip debug information from libraries
if NOT "%DEBUG%"=="d" ( if %MINGW%==1 (strip bin\*.dll) )

@rem * create base package
zip -r9 %PACKAGE_NAME%.zip *.*

@rem * get back to old directory
popd

@rem * move package into current folder
if exist %INSTALLDIR%\%PACKAGE_NAME%.zip (move %INSTALLDIR%\%PACKAGE_NAME%.zip %PACKAGE_NAME%.zip)

goto end

:error
echo There was an error!
goto :eof

:end
echo.
echo The package %PACKAGE_NAME%.zip was created!
echo.
dir %PACKAGE_NAME%.zip