浏览代码

Add random flags to the compiling of stuff, does pretty much nothing, but meh!


git-svn-id: http://svn.dmdirc.com/trunk@4822 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6.3m1rc1
Shane Mc Cormack 16 年前
父节点
当前提交
9289d65f0e
共有 2 个文件被更改,包括 29 次插入8 次删除
  1. 26
    6
      installer/windows/makeInstallerWindows.sh
  2. 3
    2
      launcher/windows/compile.sh

+ 26
- 6
installer/windows/makeInstallerWindows.sh 查看文件

70
 	fi
70
 	fi
71
 }
71
 }
72
 
72
 
73
+WGET=`which wget`
74
+FETCH=`which fetch`
75
+CURL=`which curl`
76
+getFile() {
77
+	URL=${1}
78
+	OUTPUT=${2}
79
+
80
+	if [ "${WGET}" != "" ]; then
81
+		${WGET} -O ${OUTPUT} ${URL}
82
+	elif [ "${FETCH}" != "" ]; then
83
+		${FETCH} -o ${OUTPUT} ${URL}
84
+	elif [ "${CURL}" != "" ]; then
85
+		${CURL} -o ${OUTPUT} ${URL}
86
+	fi;
87
+}
88
+
73
 # Check for some CLI params
89
 # Check for some CLI params
74
 compileJar="false"
90
 compileJar="false"
75
 updateSVN="true"
91
 updateSVN="true"
79
 useUPX="false"
95
 useUPX="false"
80
 finalTag=""
96
 finalTag=""
81
 signEXE="true"
97
 signEXE="true"
82
-compilerFlags=""
98
+compilerFlags="-Xs -XX -O2 -Or -Op1"
83
 BRANCH="0"
99
 BRANCH="0"
84
 plugins=""
100
 plugins=""
85
 location="../../../"
101
 location="../../../"
378
 if [ "" != "${jre}" ]; then
394
 if [ "" != "${jre}" ]; then
379
 	if [ ! -e "../common/${jrename}.exe" ]; then
395
 	if [ ! -e "../common/${jrename}.exe" ]; then
380
 		echo "Downloading JRE to include in installer"
396
 		echo "Downloading JRE to include in installer"
381
-		wget ${jre} -O ../common/${jrename}.exe
397
+		getFile "${jre}" "../common/${jrename}.exe"
382
 	fi
398
 	fi
383
 	ln -sf ../common/${jrename}.exe jre.exe
399
 	ln -sf ../common/${jrename}.exe jre.exe
384
 	FILES="${FILES} jre.exe"
400
 	FILES="${FILES} jre.exe"
385
 fi;
401
 fi;
386
 DELETEFILES=${FILES}
402
 DELETEFILES=${FILES}
387
-FPC=`which fpc`
403
+if [ "" != "${DMDIRC_FPC}" ]; then
404
+	FPC=${DMDIRC_FPC}
405
+else
406
+	FPC=`which fpc`
407
+fi;
388
 lazarusDir="/usr/share/lazarus"
408
 lazarusDir="/usr/share/lazarus"
389
 if [ ! -e "${lazarusDir}/lcl" ]; then
409
 if [ ! -e "${lazarusDir}/lcl" ]; then
390
 	lazarusDir="/usr/lib/lazarus/"
410
 	lazarusDir="/usr/lib/lazarus/"
431
 
451
 
432
 # Shortcut.exe is from http://www.optimumx.com/download/#Shortcut
452
 # Shortcut.exe is from http://www.optimumx.com/download/#Shortcut
433
 if [ ! -e Shortcut.exe ]; then
453
 if [ ! -e Shortcut.exe ]; then
434
-	wget http://binary.dmdirc.com/Shortcut.zip
454
+	getFile "http://binary.dmdirc.com/Shortcut.zip" "Shortcut.zip"
435
 	unzip -q Shortcut.zip Shortcut.exe
455
 	unzip -q Shortcut.zip Shortcut.exe
436
 	rm Shortcut.zip
456
 	rm Shortcut.zip
437
 fi
457
 fi
481
 
501
 
482
 # Add wget to allow downloading jre
502
 # Add wget to allow downloading jre
483
 if [ ! -e "wget.exe" ]; then
503
 if [ ! -e "wget.exe" ]; then
484
-	wget http://binary.dmdirc.com/wget.exe
504
+	getFile "http://binary.dmdirc.com/wget.exe" "wget.exe"
485
 fi;
505
 fi;
486
 
506
 
487
 if [ ! -e "wget.exe" ]; then
507
 if [ ! -e "wget.exe" ]; then
507
 
527
 
508
 if [ ! -e "7zS.sfx" ]; then
528
 if [ ! -e "7zS.sfx" ]; then
509
 	echo "Obtaining sfx stub.."
529
 	echo "Obtaining sfx stub.."
510
-	wget http://binary.dmdirc.com/7zS.sfx
530
+	getFile "http://binary.dmdirc.com/7zS.sfx" "7zS.sfx"
511
 fi
531
 fi
512
 
532
 
513
 if [ ! -e "7zS.sfx" ]; then
533
 if [ ! -e "7zS.sfx" ]; then

+ 3
- 2
launcher/windows/compile.sh 查看文件

8
 fi;
8
 fi;
9
 
9
 
10
 rm -Rf ./*.exe
10
 rm -Rf ./*.exe
11
-fpc -Sd -Twin32 DMDirc.dpr
12
-fpc -Sd -Twin32 DMDircUpdater.dpr
11
+compilerFlags="-Xs -XX -O2 -Or -Op1"
12
+fpc -Sd -Twin32 ${compilerFlags} DMDirc.dpr
13
+fpc -Sd -Twin32 ${compilerFlags} DMDircUpdater.dpr
13
 rm -Rf ./*.o ./*.or ./*.ppu
14
 rm -Rf ./*.o ./*.or ./*.ppu
14
 if [ -e DMDircUpdater.exe -a -e DMDirc.exe ]; then
15
 if [ -e DMDircUpdater.exe -a -e DMDirc.exe ]; then
15
 	exit 0;
16
 	exit 0;

正在加载...
取消
保存