File: universalBinary.dpuser

package info (click to toggle)
dpuser 4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,628 kB
  • sloc: cpp: 148,693; ansic: 18,648; fortran: 5,815; lex: 1,116; makefile: 760; yacc: 741; sh: 390; pascal: 98
file content (128 lines) | stat: -rw-r--r-- 5,493 bytes parent folder | download
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
armdir = "/Users/ott/ottl/project/QFitsView/build/QFitsView.app/"
x64dir = "/Users/ott/QFitsView.app/"

// find frameworks and replace x64 code by Qt5
cd armdir
armframeworks = findfile("*.framework")

for i=1, nelements(armframeworks) {
  cd armdir + armframeworks[i] + "/Versions"
  print "ln -s Current 5"
  exec "ln -s Current 5"
  cd "Current"
  
  file = replace(replace(armframeworks[i], ".framework", ""), "Contents/Frameworks/", "")
  print "lipo " + file + " -remove x86_64 -o " + file
  exec "lipo " + file + " -remove x86_64 -o " + file
  if (fileexists(x64dir + armframeworks[i]) == 1) {
    print "lipo -create -output " + file + " " + x64dir + armframeworks[i] + "/Versions/Current/" + file + " " + file
    exec "lipo -create -output " + file + " " + x64dir + armframeworks[i] + "/Versions/Current/" + file + " " + file
  }
}

cd armdir
armlibs = findfile("*.dylib")
print "rsync -av --ignore-existing " + x64dir + "Contents/PlugIns/" + " Contents/PlugIns/"
exec "rsync -av --ignore-existing " + x64dir + "Contents/PlugIns/" + " Contents/PlugIns/"
for i=1, nelements(armlibs) {
  print "lipo " + armdir + armlibs[i] + " -remove x86_64 -o " + armdir + armlibs[i]
  exec "lipo " + armdir + armlibs[i] + " -remove x86_64 -o " + armdir + armlibs[i]
  if (fileexists(x64dir + armlibs[i]) == 1) {
    print "lipo -create -output " + armdir + armlibs[i] + " " + x64dir + armlibs[i]+ " " + armdir + armlibs[i]
    exec "lipo -create -output " + armdir + armlibs[i] + " " + x64dir + armlibs[i]+ " " + armdir + armlibs[i]
  }
}

cd armdir
file = "Contents/MacOS/QFitsView"
print "lipo " + file + " -remove x86_64 -o " + file
exec "lipo " + file + " -remove x86_64 -o " + file
print "lipo -create -output " + file + " " + x64dir + file + " " + file
exec "lipo -create -output " + file + " " + x64dir + file + " " + file

cd x64dir
file = "Contents/Info.plist"
cd armdir
print "cp " + x64dir + file + " " + armdir + file
exec "cp " + x64dir + file + " " + armdir + file
file = "Contents/Resources/telescope.icns"
print "cp " + x64dir + file + " " + armdir + file
exec "cp " + x64dir + file + " " + armdir + file

/*
cd x64dir
x64libs = findfile("*.dylib")
for i=1, nelements(x64libs) {
  if (fileexists(armdir + x64libs[i]) == 0) {
    print "file " + x64libs + " not there"
  }
}
*/

/*
appdir = pwd()
armdir = pwd() + "/QFitsView.app/Contents/Frameworks/"
x64dir = "/Users/ott/QFitsView.app/Contents/Frameworks/"

for i=1, nelements(frameworks) {
  print "cd " + armdir + frameworks[i] + ".framework/Versions/Current"
	print "lipo -remove x86_64 " + frameworks[i] + " -o " + frameworks[i] + ".arm"
	print "cp " + x64dir + frameworks[i] + ".framework/Versions/Current/" + frameworks[i] + " " + frameworks[i] + ".x64"
	print "rm " + frameworks[i]
	print "lipo -create -output " + frameworks[i] + " " + frameworks[i] + ".arm " + frameworks[i] + ".x64"
	print "cd .."
	print "ln -s current 5"
}

dylib = stringarray(0)
dylib += "Contents/PlugIns/platforminputcontexts/libqtvirtualkeyboardplugin.dylib"
dylib += "Contents/PlugIns/platforms/libqcocoa.dylib"
dylib += "Contents/PlugIns/styles/libqmacstyle.dylib"
dylib += "Contents/PlugIns/tls/libqsecuretransportbackend.dylib"
dylib += "Contents/PlugIns/tls/libqopensslbackend.dylib"
dylib += "Contents/PlugIns/tls/libqcertonlybackend.dylib"
dylib += "Contents/PlugIns/iconengines/libqsvgicon.dylib"
dylib += "Contents/PlugIns/imageformats/libqgif.dylib"
dylib += "Contents/PlugIns/imageformats/libqwbmp.dylib"
dylib += "Contents/PlugIns/imageformats/libqwebp.dylib"
dylib += "Contents/PlugIns/imageformats/libqico.dylib"
dylib += "Contents/PlugIns/imageformats/libqmacheif.dylib"
dylib += "Contents/PlugIns/imageformats/libqjpeg.dylib"
dylib += "Contents/PlugIns/imageformats/libqtiff.dylib"
dylib += "Contents/PlugIns/imageformats/libqsvg.dylib"
dylib += "Contents/PlugIns/imageformats/libqpdf.dylib"
dylib += "Contents/PlugIns/imageformats/libqicns.dylib"
dylib += "Contents/PlugIns/imageformats/libqtga.dylib"
dylib += "Contents/PlugIns/imageformats/libqmacjp2.dylib"
dylib += "Contents/PlugIns/networkinformation/libqscnetworkreachability.dylib"

print "cd " + appdir + "/QFitsView.app"
for i=1, nelements(dylib) {
  print "lipo -remove x86_64 " + dylib[i] + " -o " + dylib[i] + ".arm"
	print "cp " + x64dir + "../../" + dylib[i] + " " + dylib[i] + ".x64"
	print "lipo -create -output " + dylib[i] + " " + dylib[i] + ".arm " + dylib[i] + ".x64"
}

addlib = stringarray(0)
addlib += "Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
addlib += "Contents/PlugIns/bearer/libqgenericbearer.dylib"
addlib += "Contents/PlugIns/virtualkeyboard/libqtvirtualkeyboard_thai.dylib"
addlib += "Contents/PlugIns/virtualkeyboard/libqtvirtualkeyboard_openwnn.dylib"
addlib += "Contents/PlugIns/virtualkeyboard/libqtvirtualkeyboard_hangul.dylib"
addlib += "Contents/PlugIns/virtualkeyboard/libqtvirtualkeyboard_pinyin.dylib"
addlib += "Contents/PlugIns/virtualkeyboard/libqtvirtualkeyboard_tcime.dylib"

print "mkdir Contents/PlugIns/printsupport"
print "mkdir Contents/PlugIns/bearer"
print "mkdir Contents/PlugIns/virtualkeyboard"

for i=1, nelements(addlib) {
  print "cp " + x64dir + "../../" + addlib[i] + " " + addlib[i]
}

print "cp ../../resources/Info.plist Contents/"
print "cp ../../resources/telescope.icns Contents/Resources/"

print "lipo -remove x86_64 Contents/MacOS/QFitsView -o Contents/MacOS/QFitsView.arm"
print "lipo -create -output Contents/MacOS/QFitsView Contents/MacOS/QFitsView.arm " + x64dir + "../MacOS/QFitsView"
*/