Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit support #1

Open
codeZeilen opened this issue May 3, 2018 · 2 comments
Open

64 bit support #1

codeZeilen opened this issue May 3, 2018 · 2 comments

Comments

@codeZeilen
Copy link
Member

As the 64bit FFI Plugin is currently not working correctly the 32bit VM must be used as a workaround. To set up a 32bit SWT image you can use the following script:

"-=-=-=-=-="
|balloon progdir base|
progdir := (Smalltalk commandLine argumentAt: 1) ifNil: [FileDirectory default fullName].
base := (Smalltalk commandLine argumentAt: 2) ifNil: ['SWA2018'].

Deprecation showDeprecationWarnings: false.

[MCMcmUpdater default doUpdate: false. "non-interactive"]
	on: MCEmptyVersion do: [:warning | warning resume].

"-=-=-=-=-="

Installer gemsource
	project: 'metacello';
	addPackage: 'ConfigurationOfMetacello';
	install.

"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk at: #ConfigurationOfMetacello) project 
	version: #'previewBootstrap') load.

"Quickfix"
Installer squeak
	project: 'squeak51';
	install: 'SqueakSSL-Core';
	install: 'WebClient-Core';
	yourself.

"Load the Preview version of Metacello from GitHub"
(Smalltalk at: #Metacello) new
  configuration: 'MetacelloPreview';
  version: #stable;
  repository: 'github://Metacello/metacello:configuration';
  load.

"Now load latest version of Metacello"
(Smalltalk at: #Metacello) new
  baseline: 'Metacello';
  repository: 'github://Metacello/metacello:master/repository';
  get.
(Smalltalk at: #Metacello) new
  baseline: 'Metacello';
  repository: 'github://Metacello/metacello:master/repository';
  load.

"-=-=-=-=-="
Preferences removeAllPreferencesSuchThat: [:ea | ea provider == MCGitBasedNetworkRepository].
"-=-=-=-=-="

"-=-=-=-=-="
Installer squeakTrunk install: 'Help-Squeak-CorePackages'.

Utilities authorInitials: 'hpi'. "changed at end"

[(Smalltalk at: #Metacello) new
	configuration: 'SwaLint';
	githubUser: 'HPI-SWA-Teaching' project: 'SwaLint' commitish: '' path: 'packages';
	load] valueSupplyingAnswer: true.

(Smalltalk at: #Metacello) new
	baseline: 'AutoTDD';
	githubUser: 'HPI-SWA-Teaching' project: 'AutoTDD' commitish: '' path: 'packages';
	load.

(Smalltalk at: #Metacello) new
	baseline: 'Koans';
	githubUser: 'HPI-SWA-Teaching' project: 'Koans' commitish: '' path: 'src';
	load.
(Smalltalk at: #Metacello) new
	configuration: 'RefactoringTools';
	load.

(Smalltalk at: #Metacello) new
	configuration: 'OCompletion';
	load.

"(Smalltalk at: #Metacello) new
	baseline: 'Algernon';
	githubUser: 'HPI-SWA-Teaching' project: 'Algernon-Launcher' commitish: '' path: 'packages';
	load.
"

"(Smalltalk at: #ALGCore) perform: #activationString: with: '<Cmd-space>'."
(Smalltalk at: #ECPreferences) perform: #smartCharacters: with: false.

"-=-=-=-=-="

"Install Squot-develop for latest fixes"
[Metacello new
  baseline: 'Squot';
  repository: 'github://hpi-swa/Squot:develop/src';
  load.
] on: Warning do: [:e | e resume].

"-=-=-=-=-="

Preferences disable: #projectZoom.
Preferences enable: #mouseOverForKeyboardFocus.

Preferences disable: #alternativeBrowseIt.
SystemBrowser default: Browser.
TextEditor autoEnclose: false.
TextEditor destructiveBackWord: true.

"-=-=-=-=-="

Project current resourceManager reset.
Smalltalk cleanUp: true.
MCHttpRepository clearCredentials.
Environment allInstancesDo: [:env | env purgeUndeclared].
Undeclared removeUnreferencedKeys.
Smalltalk garbageCollect.

"-=-=-=-=-="


MCFileBasedRepository flushAllCaches.
MCCacheRepository instVarNamed: 'default' put: nil.
Categorizer sortAllCategories.
ChangeSet current clear.
ChangeSet current name: 'Unnamed1'.
Smalltalk garbageCollect.
MCCacheRepository cacheDirectory recursiveDelete.
Smalltalk fixObsoleteReferences.

"-=-=-=-=-="

Preferences disable: #showSharedFlaps.

Utilities authorInitials: String empty.
Smalltalk garbageCollect.

(World findA: PreferenceWizardMorph) ifNotNil: [:m | m perform: #showSqueak].

"-=-=-=-=-="
Project current in: [:oldProject | 
	WorldState addDeferredUIMessage: [
		"-=-=-=-=-="
		Project deletingProject: oldProject.
		ProjectHistory forget: oldProject.
		Project forget: oldProject.
		Project current setParent: Project current.
		Preferences disable: #showSharedFlaps.
		"-=-=-=-=-="
		TheWorldMainDockingBar updateInstances.
		(UserInterfaceTheme named: 'Squeak') apply.
		HostWindowProxy new primitiveWindowSize: 1 x: 1024 y: 768.
		Smalltalk saveAs: base, '.image'.
		WorldState addDeferredUIMessage: [
			ReleaseBuilder openWelcomeWorkspacesWith: nil.
			PreferenceWizardMorph open].
		Smalltalk snapshot: true andQuit: true.
	].
	(Smalltalk at: #AnimMorphicProject) new enter: false.
].
@youri-k youri-k closed this as completed Jul 5, 2018
@WorldofJARcraft
Copy link

I got it working on Ubuntu 18.04 LTS 64-Bit today.

@codeZeilen
Copy link
Member Author

"-=-=-=-=-="
|progdir base|

"Initial Setup"
FileStream startUp: true.
TranscriptStream redirectToStdOut: true.
Deprecation showDeprecationWarnings: false.

"To account for an issue together with the current SwaSource"
MCHttpRepository useSharedWebClientInstance: false.

progdir := (Smalltalk commandLine argumentAt: 1) ifNil: [FileDirectory default fullName].
base := (Smalltalk commandLine argumentAt: 2) ifNil: ['SWA'].

[[MCMcmUpdater default doUpdate: false. "non-interactive"]
	on: MCEmptyVersion do: [:warning | warning resume].

"-=-=-=-=-="

"For all trunk repositories add the inbox repository."
(MCWorkingCopy allManagers collect: #repositoryGroup) do: [:g | 
	g addRepository: ReleaseBuilder inboxRepository].

"-=-=-=-=-="

Installer ensureRecentMetacello.

"-=-=-=-=-="
Preferences removeAllPreferencesSuchThat: [:ea | ea provider == (Smalltalk at: #MCGitBasedNetworkRepository)].
"-=-=-=-=-="

"-=-=-=-=-="
Installer squeakTrunk install: 'Help-Squeak-CorePackages'.

Utilities setAuthorInitials: 'hpi'. "changed at end"

[(Smalltalk at: #Metacello) new
	baseline: 'SwaLint';
	repository: 'github://hpi-swa-teaching/SwaLint:master/packages';
	get;
	load: #default]
		on: (Smalltalk at: #MetacelloSkipDirtyPackageLoad) new 
		do: [:e | e resume: false].

(Smalltalk at: #Metacello) new
	baseline: 'Koans';
	githubUser: 'HPI-SWA-Teaching' project: 'Koans' commitish: '' path: 'src';
	load.
	
(Smalltalk at: #Metacello) new
	configuration: 'RefactoringTools';
	load.

"-=-=-=-=-="

"Install Squot-develop for latest fixes"
[(Smalltalk at: #Metacello) new
  baseline: 'Squot';
  repository: 'github://hpi-swa/Squot:master/src';
  load.
] on: Warning do: [:e | e resume].

"-=-=-=-=-="

(Smalltalk at: #Metacello) new
	baseline: 'StarTrack';
	repository: 'github://hpi-swa-lab/learning-liveness/packages';
	load: 'client'.
	

(Smalltalk at: #Metacello) new
  baseline: 'AutoTDD';
  repository: 'github://hpi-swa-teaching/AutoTDD:master/packages';
  onConflict: [:ex | ex allow];
  load.

"-=-=-=-=-="

Preferences disable: #projectZoom.
Preferences enable: #mouseOverForKeyboardFocus.

Preferences disable: #alternativeBrowseIt.
SystemBrowser default: Browser.
TextEditor autoEnclose: false.
TextEditor destructiveBackWord: true.

"-=-=-=-=-="

Project current resourceManager reset.
Smalltalk cleanUp: true.
MCHttpRepository clearCredentials.
Environment allInstancesDo: [:env | env purgeUndeclared].
Undeclared removeUnreferencedKeys.
Smalltalk garbageCollect.

"-=-=-=-=-="

Utilities setAuthorInitials: 'hpi'. "changed at end"

"Vivide needs to be loaded after UI-Theme reset (via Smalltalk cleanUp: true)"
[(Smalltalk at: #Metacello) new
	repository: 'github://hpi-swa/Vivide:master-squot/repository';
	baseline: 'Vivide';
	load.
] on: AssertionFailure do: [:e | e resume].

"-=-=-=-=-="

(Smalltalk at: #Metacello) new
	repository: 'github://Salami555/Squeak-ToolIconsPlus:master';
	baseline: 'ToolIconsPlus';
	load.

"-=-=-=-=-="

(Smalltalk at: #Metacello) new
	repository: 'github://MrModder/Autocompletion:master/packages';
	baseline: 'Autocompletion';
	load.

(Smalltalk at: #ECPreferences) perform: #smartCharacters: with: false.
(Smalltalk at: #ECPreferences) matchSubStrings: true.

"-=-=-=-=-="

MCFileBasedRepository flushAllCaches.
MCCacheRepository instVarNamed: 'default' put: nil.
ChangeSet current clear.
ChangeSet current name: 'Unnamed1'.
Smalltalk garbageCollect.
MCCacheRepository cacheDirectory recursiveDelete.
Smalltalk fixObsoleteReferences.

"-=-=-=-=-="

Utilities setAuthorInitials: 'hpi'. "changed at end"

#(('../HPIicon.png' 'smallFullscreenOnIcon') ('../HPIicon_sw.png' 'smallFullscreenOffIcon')) do: [:info | | image stream |
	FileStream fileNamed: (info first) do: [:f | |writer |
		writer := PNGReadWriter on: f.
		image := [writer nextImage] ensure: [writer close]].
	"store string representation"
	stream := String new writeStream.
	stream
		nextPutAll: info last, 'Contents' ; cr;
		nextPutAll: (MenuIcons methodStart: (info last)).
	image storeOn: stream.
	stream nextPutAll: MenuIcons methodEnd.
	MenuIcons class compile: stream contents classified: '*HPI-private icons-override' notifying: nil.
	"create accessor method"
	stream := String new writeStream.
	stream
		nextPutAll: info last ; cr;
		nextPutAll: (MenuIcons methodAccessorFor: (info last)).
	MenuIcons class compile: stream contents classified: '*HPI-accessing icons-override' notifying: nil.
].
MenuIcons initializeIcons.

HostWindowProxy new primitiveWindowSize: 1 x: 1024 y: 768.
Preferences disable: #showSharedFlaps.

Utilities setAuthorInitials: String empty.
Smalltalk garbageCollect.

(World findA: PreferenceWizardMorph) ifNotNil: [:m | m perform: #showSqueak].

"-=-=-=-=-="
Project current in: [:oldProject | 
	WorldState addDeferredUIMessage: [
		"-=-=-=-=-="
		Project deletingProject: oldProject.
		ProjectHistory forget: oldProject.
		Project forget: oldProject.
		Project current setParent: Project current.
		Preferences disable: #showSharedFlaps.
		UIManager default builderClass: MorphicToolBuilder.
		"-=-=-=-=-="
		TheWorldMainDockingBar updateInstances.
		(UserInterfaceTheme named: 'Squeak') apply.
		Smalltalk saveAs: base, '.image'.
		WorldState addDeferredUIMessage: [
			ReleaseBuilder openWelcomeWorkspacesWith: nil.
			PreferenceWizardMorph open].
		Smalltalk snapshot: true andQuit: true.
	].
	(Smalltalk at: #AnimMorphicProject) new enter: false.
]] ensure: [
	TranscriptStream redirectToStdOut: false.]

@codeZeilen codeZeilen reopened this Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants